www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12395] New: Program segfaults despite being entirely within SafeD

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

           Summary: Program segfaults despite being entirely within SafeD
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: dspies ualberta.ca



I've annotated every class and function with  safe, but my program is still
segfaulting and I can't figure out why or where.  I've tried compiling under
both v2.065 and v2.066-devel-f17dfa3

My understanding is that method-calls to  safe functions are guaranteed by the
compiler not to segfault, so that means this the result of a DMD bug, yes? 
Please let me know if I misunderstood  safe.

(compile with -main -unittest)

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 17 2014
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12395




Created an attachment (id=1339)
the source code

Oops, Forgot the attachment

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 17 2014
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12395


Vladimir Panteleev <thecybershadow gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |thecybershadow gmail.com
         Resolution|                            |INVALID



03:58:59 EET ---
 safe programs can still segfault, e.g. due to dereferencing a null pointer or
causing a stack overflow. Your program does the latter: the functions
disjunction.check_match and memo_expression.matches call each other
recursively.

 but my program is still segfaulting and I can't figure out why or where.
To diagnose segfaults, compile your program with symbols (DMD -g switch) and run it under a debugger (such as gdb). -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 17 2014