| Thread overview | |||||
|---|---|---|---|---|---|
|
March 18, 2014 [Issue 12395] New: Program segfaults despite being entirely within SafeD | ||||
|---|---|---|---|---|
| ||||
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 --- Comment #0 from David Spies <dspies@ualberta.ca> 2014-03-17 18:52:17 PDT --- 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: ------- | ||||
March 18, 2014 [Issue 12395] Program segfaults despite being entirely within SafeD | ||||
|---|---|---|---|---|
| ||||
Posted in reply to David Spies | https://d.puremagic.com/issues/show_bug.cgi?id=12395 --- Comment #1 from David Spies <dspies@ualberta.ca> 2014-03-17 18:54:06 PDT --- 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: ------- | |||
March 18, 2014 [Issue 12395] Program segfaults despite being entirely within SafeD | ||||
|---|---|---|---|---|
| ||||
Posted in reply to David Spies | 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 --- Comment #2 from Vladimir Panteleev <thecybershadow@gmail.com> 2014-03-18 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: ------- | |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply