F*cked by memory corruption after assiging value to associative array

vitamin vit at vit.vit
Mon Jan 25 14:34:23 UTC 2021


On Monday, 25 January 2021 at 13:44:52 UTC, frame wrote:
> On Monday, 25 January 2021 at 11:25:56 UTC, FeepingCreature 
> wrote:
>
>> I suspect the memory used by the original data got reused for 
>> the associative array somehow. But if the GC is off from 
>> program start, that should really not occur. Do you maybe turn 
>> the GC off before the AA assignment, but after it's already 
>> marked that memory freed? Try turning it off completely from 
>> the commandline with --DRT-gcopt=gc:manual
>
> With that option the bytes behind the strings look different, 
> so it has an impact. But sadly it does not help.
>
> - I have comment out all GC.free().
> - GC.disable() is called in main.
> - GC.profileStats.numCollections is 0.

Is the object returned from dll GC allocated?


More information about the Digitalmars-d-learn mailing list