[Issue 16699] [REG 2.070] stack corruption with scope(exit)
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Nov 17 12:04:54 PST 2016
https://issues.dlang.org/show_bug.cgi?id=16699
--- Comment #2 from hsteoh at quickfur.ath.cx ---
Looking at the assembly, it seems like a codegen bug. The static array is
actually correctly initialized with the return value, but when scope(exit){} is
uncommented, the return value (%eax) is never set, thus it's left as a garbage
value. When scope(exit){} is commented out, the return value is (correctly)
loaded into %eax and the caller is able to receive the right value.
--
More information about the Digitalmars-d-bugs
mailing list