December 17, 2022 [Issue 20900] dmd crashes on static foreach over infinite range | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=20900 Iain Buclaw <ibuclaw@gdcproject.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P1 |P2 -- |
September 12, 2023 [Issue 20900] dmd crashes on static foreach over infinite range | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=20900 --- Comment #1 from Bolpat <qs.il.paperinik@gmail.com> --- I’d suggest DMD abort when a `static foreach` surpasses 2^16−1 (65,535) iterations; also add a compiler switch (suggestion: `-static-foreach-depth=<number>`) to change the aforementioned default for the rare cases it’s needed. Alternatively, a `pragma` could work well, too. -- |
Copyright © 1999-2021 by the D Language Foundation