Bug 16333 – show stack overflow as error message instead of segfaulting

Status
NEW
Severity
major
Priority
P2
Component
druntime
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2016-07-28T19:36:34Z
Last change time
2024-12-07T13:36:47Z
Assigned to
No Owner
Creator
Seb
Moved to GitHub: dmd#17332 →

Comments

Comment #0 by greensunny12 — 2016-07-28T19:36:34Z
Is there any way that we can show the user that a stack overflow has happened? Just a SEGFAULT is quite difficult to debug. Consider this simple program: ``` void endless() { endless(); } void main() { endless(); } ``` All it will print is: segmentation fault (core dumped) ./main while it is quite easy to see what's going wrong here, in a more complex application it isn't. At least it took me a couple of hours to realize that my program doesn't do semi-random segfaults (given special input data), but deterministic stack overflows. Even C++ throws a StackOverflow Error.
Comment #1 by robert.schadek — 2024-12-07T13:36:47Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17332 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB