Bug 21281 – Fiber.state race condition

Status
NEW
Severity
normal
Priority
P3
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-09-27T13:10:25Z
Last change time
2024-12-07T13:40:42Z
Assigned to
No Owner
Creator
Adam D. Ruppe
Moved to GitHub: dmd#17413 →

Comments

Comment #0 by destructionator — 2020-09-27T13:10:25Z
The implementation of Fiber.yield does: cur.m_state = State.HOLD; cur.switchOut(); cur.m_state = State.EXEC; This makes it useless for threaded work, the state of HOLD is set before it actually starts holding and another thread can corrupt it.
Comment #1 by robert.schadek — 2024-12-07T13:40:42Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17413 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB