Crash if fiber sleeps in catch block (Windows only)
- 主要语言
- 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 还没有评估数据。