new(malloc) locks everything in multithreading

Kapps via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Oct 24 14:02:02 PDT 2014


On Friday, 24 October 2014 at 18:38:39 UTC, tcak wrote:
> On Friday, 24 October 2014 at 16:51:02 UTC, Kapps wrote:
>> On Friday, 24 October 2014 at 10:49:42 UTC, tcak wrote:
>>
>> Not sure if this is the same issue, but by default gdb breaks 
>> on signals that the GC uses, which would explain why it's 
>> breaking in gdb but not normally.
>>
>> What happens if you try:
>> handle SIGUSR1 noprint nostop
>> handle SIGUSR2 noprint nostop
>>
>> In GDB before starting execution of the program?
>
> This is what I did on shell: (I put some spaces for readability)
>
> tolga at tolga:~/dev/d/bug$ dmd -gc -debug test.d
>
> tolga at tolga:~/dev/d/bug$ gdb ./test
>

Yes, GDB is stopping on SIGUSR1 / SIGUSR2 since that's the 
default settings. D's GC uses these signals for suspending / 
resuming threads during a collection. You need to type what I 
said above, prior to typing 'run'.


More information about the Digitalmars-d-learn mailing list