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

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Jun 25 05:36:02 PDT 2015


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

Shachar Shemesh <shachar at shemesh.biz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |shachar at shemesh.biz
         Resolution|INVALID                     |---

--- Comment #11 from Shachar Shemesh <shachar at shemesh.biz> ---
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)

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

Also, the following statement in the spec is demonstrable wrong:
(on the x86 processor, a HLT instruction can be used to halt execution)

This is untrue (or, at the very least, highly misleading) for all user space
programming purposes.

--


More information about the Digitalmars-d-bugs mailing list