Memory corruption with -O3, but not -O2 (and not with DMD)

James Blachly james.blachly at gmail.com
Thu Aug 22 00:34:12 UTC 2019


On 8/21/19 2:29 AM, Kagamin wrote:
> On Saturday, 17 August 2019 at 20:33:08 UTC, James Blachly wrote:
>> Am at my wits' end, so help or next steps are greatly appreciated. I 
>> can provide disassembly of whatever combination of -O/-O2/-O3 and 
>> triggering/nontriggering code blocks if it would e helpful.
> 
> Did you check that only this block is responsible for it? Compile all 
> code with -O2 and only this particular block with -O3 and see if it 
> still happens.

I had never considered the possibility of optimizing different parts at 
different levels :-O  I guess you just break it out into a separate 
.d/.o file and link?


More information about the digitalmars-d-ldc mailing list