[Issue 6088] New: Stack trace or some info with stack overflow
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jun 2 07:24:44 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6088
Summary: Stack trace or some info with stack overflow
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: diagnostic
Severity: enhancement
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2011-06-02 07:20:16 PDT ---
This crashes at runtime because of a stack overflow (DMD 2.053). No stack
trace, stack frame, error message or line number are shown:
int foo(int n) {
return n ? foo(n - 1) : 1;
}
void main() {
foo(100_000);
}
If you aren't running a debugger then receiving a nude crash is not so nice,
because in a larger program there are many functions that may be the cause of a
stack overflow.
So is it possible to produce a stack trace in this case too? If this is not
possible, then an error message with the name of the last function called (and
line number) or anything is useful. If necessary DMD may add some stack
protection code in non-release mode only.
--
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