[Issue 5517] SEGV: assert(false) in release mode

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Jun 27 18:54:22 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=5517

--- Comment #12 from Jonathan M Davis <issues.dlang at jmdavisProg.com> ---
(In reply to Shachar Shemesh from comment #11)
> Quoth the same spec:
> void main()
> {
>   assert(0, "an" ~ "error message");
> }
> 
> When compiled and run, it will produce the message:
> Error: AssertError Failure test.d(3) an error message
> 
> In practice, all it produces is:
> Segmentation fault (core dumped)

It produces a message when compiled without -release. With -release, it becomes
a HLT instruction, so no message.

> We can clearly see that dmd, hence, violates the spec.

Walter quoted the spec. It's correct. If somewhere is in the spec doesn't match
that, then it should be updated. I would not expect the compiler's behavior to
be changed.

Why have you reopened this issue? If the spec needs to be updated because it's
unclear somewhere, then open a new issue for that. But Walter has made it clear
this is acting as intended, and I really don't see a problem with it.

--


More information about the Digitalmars-d-bugs mailing list