www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22120] New: Exceptions not caused by compiler bugs should not

https://issues.dlang.org/show_bug.cgi?id=22120

          Issue ID: 22120
           Summary: Exceptions not caused by compiler bugs should not be
                    reported as such
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: maxsamukha gmail.com

int foo() {
    string[] a = "a";
    for(;;)
        a ~= a;
}

void main() {
    enum a = foo;
}

----

Performing "debug" build using C:\D\dmd2\windows\bin\dmd.exe for x86_64.
dtest ~master: building configuration "application"...
---
ERROR: This is a compiler bug.
Please report it via https://issues.dlang.org/enter_bug.cgi
with, preferably, a reduced, reproducible example and the information below.
DustMite (https://github.com/CyberShadow/DustMite/wiki) can help with the
reduction.
---
DMD v2.096.0-dirty
predefs   Have_dtest DigitalMars Windows CRuntime_Microsoft
CppRuntime_Microsoft LittleEndian D_Version2 all D_SIMD D_InlineAsm_X86_64
X86_64 Win64 D_LP64 assert D_ModuleInfo D_Exceptions D_TypeInfo D_HardFloat
binary    C:\D\dmd2\windows\bin\dmd.exe
version   v2.096.0-dirty
config    C:\D\dmd2\windows\bin\sc.ini
DFLAGS    -IC:\D\dmd2\windows\bin\..\..\src\phobos
-IC:\D\dmd2\windows\bin\..\..\src\druntime\import
---

core.exception.OutOfMemoryError core\exception.d(647): Memory allocation failed
----------------
0x0104B20B
0x0104AFC2
0x0103D5BD
C:\D\dmd2\windows\bin\dmd.exe failed with exit code 1.

--
Jul 13 2021