Segfault with DMD optimization switch

Rob T alanb at ucora.com
Tue Jan 22 22:31:32 PST 2013


On Wednesday, 23 January 2013 at 05:55:34 UTC, Jonathan M Davis 
wrote:
>
> assert(0) is put at the end of functions in case the end of the 
> function is
> reached without returning, and unlike normal assertions, 
> assert(0) is left in
> in release mode, except it becomes a halt instruction, which be 
> pretty much
> the same thing as a segfault. So, it sounds like you ran into a 
> situation
> which was normal and expected given the bug that resulted in 
> the end of the
> function being reached without returning.
>
> - Jonathan M Davis

I just tried reproducing the assert(0) segfault with released 
2.061 but it no longer segfaults, instead it halts and displays 
the text message in the assert statement as expected. I guess 
it's no longer an issue, or was a side effect of something else 
that I was doing that was later resolved.

--rt


More information about the Digitalmars-d mailing list