boostorg / boostorg/fiber

Crash if fiber sleeps in catch block (Windows only)

オープン
#293 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C++
スター
510
フォーク
123
PR マージ指標
30日以内にマージされた PR はありません

説明

If anything makes a fiber sleep in the 'catch' block (not by thread sleeping, but switching to another fiber), then, when it wakes up, it crashes on trying to switch back to the 'try' block (at least, according to the call stack). The issue is not reproducible on Linux.
The following code crashes when built and run on Windows (tested with boost 1.67 and boost 1.76):

```C++
#include "boost/fiber/all.hpp"

void func()
{
try
{
throw std::logic_error("error");
}
catch (...)
{
boost::this_fiber::sleep_for(std::chrono::milliseconds(100));
}
}

int main()
{
boost::fibers::fiber f1(func);
boost::fibers::fiber f2(func);

f1.join();
f2.join();

return 0;
}
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。