[fiber] destruction order fiasco
15 Nov
2016
15 Nov
'16
11:25 a.m.
The fiber still makes use of the scheduling algorithm after main context exits, which is a problem for my case that puts a stack-allocated shared data to the algorithm. Some points: https://github.com/boostorg/fiber/blob/master/src/context.cpp#L52 I doubt if the schwarz counter is needed; isn't it only one? https://github.com/boostorg/fiber/blob/master/src/scheduler.cpp#L137 I don't think there's a need to wake it up; if it's sleeping, the thread is blocked and it never enters here. This is the main problem: use-after-free. Anyway, what I think is ideal is that just making the algorithm a reference and assign it from the main context. An example of this approach is Qt's Q*Application.
2933
Age (days ago)
2933
Last active (days ago)
0 comments
1 participants
participants (1)
-
Tatsuyuki Ishi