DMD [-O flag] vs. [memory allocation in a synchronized class]

realhet via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jun 8 04:41:40 PDT 2017


I've managed to narrow the problem even more:

//win32 dmd -O

class Obj{
   synchronized void trigger(){ new ubyte[1]; }
}

void main(){
   auto k = new shared Obj;
   k.trigger;
}

This time I got a more sophisticated error message:

object.Error@(0): Access Violation
----------------
0x7272456D in SymInitialize
0x00402667
0x00402A97
0x00402998
0x004022A0
0x76F13744 in BaseThreadInitThunk
0x773B9E54 in RtlSetCurrentTransaction
0x773B9E1F in RtlSetCurrentTransaction


More information about the Digitalmars-d-learn mailing list