[Issue 19231] New: Infinite loop in exception chains
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Sep 6 17:09:59 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=19231
Issue ID: 19231
Summary: Infinite loop in exception chains
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: minor
Priority: P1
Component: druntime
Assignee: nobody at puremagic.com
Reporter: dhasenan at gmail.com
void throwy()
{
auto e = new Exception("root");
scope (exit) throw new Exception("scope 1", e);
throw e;
}
void main()
{
throwy();
}
This results in an infinite loop in druntime. There are only two exceptions,
but because they form a loop instead of a proper linked list, druntime keeps on
printing them.
Perhaps we should define a reasonable limit on the number of exceptions we
print before quitting out. 10 should probably be plenty.
--
More information about the Digitalmars-d-bugs
mailing list