[Issue 10345] New: Segfault on simple main() with -release

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jun 12 11:50:19 PDT 2013


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 at puremagic.com
        ReportedBy: justin at economicmodeling.com


--- Comment #0 from Justin Whear <justin at economicmodeling.com> 2013-06-12 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.
#0  D main () at test_assert.d:3
3        assert(false, "Uhoh");
(gdb) bt
#0  D main () at test_assert.d:3
#1  0x0000000000417e00 in rt.dmain2._d_run_main() ()
#2  0x0000000000417932 in rt.dmain2._d_run_main() ()
#3  0x0000000000417e50 in rt.dmain2._d_run_main() ()
#4  0x0000000000417932 in rt.dmain2._d_run_main() ()
#5  0x00000000004178ee in _d_run_main ()
#6  0x000000000041773b in main ()
-----------------------------------------------

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


More information about the Digitalmars-d-bugs mailing list