Segfault with DMD optimization switch

Stephan stephan_schiffels at mac.com
Thu Jan 24 09:59:27 PST 2013


On Thursday, 24 January 2013 at 00:01:26 UTC, Walter Bright wrote:
> On 1/23/2013 2:15 PM, Stephan wrote:
>> What would be the prototypic short program that simulates 
>> referencing an out of
>> scope stack frame? It would be great to see an example that 
>> produces a
>> deterministic segfault.
>
>
> Just return a pointer to a local (first passing it through 
> another function in order to hide what you're doing from the 
> compiler).
>
> btw, bug 8832 is an example of one.

OK. This bug was introduced in 2.061!
With 2.060, the optimization switch does not corrupt the program. 
I put this in the bug report as well.

Stephan


More information about the Digitalmars-d mailing list