Revamped concurrency API

Adam D. Ruppe destructionator at gmail.com
Wed Oct 14 15:13:02 PDT 2009


On Wed, Oct 14, 2009 at 05:56:10PM -0400, Bartosz Milewski wrote:
> The problem was in core.thread. I tried to implement a struct Tid (thread ID) with reference-counting semantics and deterministic destruction. It passed all the tests, but when it was used in one particular place in druntime it produced incorrect assembly. Even the slightest change made the bug disappear, so I wasn't able to reproduce it under controlled conditions.

Was it by any chance a null this pointer making its way into the ebx register
somehow, thus causing an access violation on Windows seemingly at random?
(My bug didn't happen if I compiled the exact same code on Linux - I figure
 it must be a Windows codegen problem.)

If so, I've been fighting that bug for over two years, similarly unable to
track down a small test case. I haven't put it on bugzilla since I can't
even really prove it exists to an outsider. I just keep hoping that the
next dmd release will magically fix it.

-- 
Adam D. Ruppe
http://arsdnet.net



More information about the Digitalmars-d mailing list