DMD Deadlocks

Sean Kelly sean at invisibleduck.org
Mon Mar 19 13:13:11 PDT 2012


On Mar 19, 2012, at 12:21 PM, Benjamin Thaut <code at benjamin-thaut.de> wrote:

> Am 19.03.2012 19:08, schrieb Sean Kelly:
>> 
>> On Mar 19, 2012, at 10:58 AM, Benjamin Thaut wrote:
>>> 
>>> I somehow hit a bug where dmd deadlocks within Mem::Free if I use -inline. With previous bugs I was able to reduce my code using DustMite but with this one it is hard because dmd gives no output and just freezes. Any ideas how I could reduce my code?
>>> 
>>> Callstack:
>>> kernel32.dll!_WaitForSingleObject at 8()  + 0x12 Bytes    
>>> dmd.exe!__WaitSemaphore()  + 0x1c Bytes    C++
>>> dmd.exe!Mem::free(void *)()  Zeile 95 + 0x8 Bytes    C++
>>> dmd.exe!Array::~Array()()  Zeile 59 + 0x10 Bytes    C++
>>> dmd.exe!main()  Zeile 1431 + 0x26 Bytes    C++
>> 
>> What are the callstacks of the other threads?
> 
> The funny thing is: There are no other threads.
> I always thought that dmd is single threaded. Or am I mistaken there?

I think DMD will spawn a thread per module, or something like that. It would be weird for a thread to crash while holding the allocator lock though, unless there's memory corruption involved. 


More information about the Digitalmars-d mailing list