www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10345] New: Segfault on simple main() with -release

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10345

           Summary: Segfault on simple main() with -release
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: justin economicmodeling.com



11:50:17 PDT ---
Using dmd 2.063:

void main()
{
    assert(false, "Uhoh");
}

Compiling with -release and running segfaults (tested on linux).  Compiling
without -release and running produces the expected AssertError.

Expected behavior with -release is an effectively empty main().

Examining the core dump:
-----------------------------------------------
Core was generated by `./test_assert'.
Program terminated with signal 11, Segmentation fault.

3        assert(false, "Uhoh");
(gdb) bt







-----------------------------------------------

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 12 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10345


David Nadlinger <code klickverbot.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |code klickverbot.at
         Resolution|                            |INVALID



PDT ---
assert(false) is turned into a halt/abort in release mode.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 12 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10345




11:57:56 PDT ---
My bad.  This special case is documented here:
http://dlang.org/expression.html#AssertExpression

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 12 2013