Skip to content

Commit

Permalink
Do not call fiber if it's not available
Browse files Browse the repository at this point in the history
  • Loading branch information
Dat Chu committed Aug 4, 2023
1 parent a07f07b commit ba375d7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions c++/src/kj/async.c++
Original file line number Diff line number Diff line change
Expand Up @@ -1468,8 +1468,10 @@ struct FiberStack::StartRoutine {

auto& stack = *reinterpret_cast<FiberStack*>(ptr);

#if KJ_USE_FIBERS
__sanitizer_finish_switch_fiber(nullptr,
&stack.impl->originalBottom, &stack.impl->originalSize);
#endif

// We first switch to the fiber inside of the FiberStack constructor. This is just for
// initialization purposes, and we're expected to switch back immediately.
Expand Down

0 comments on commit ba375d7

Please sign in to comment.