[Issue 21995] New: Struct with size uint.max or greater causes ICE

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jun 6 03:18:24 UTC 2021


          Issue ID: 21995
           Summary: Struct with size uint.max or greater causes ICE
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: snarwin+bugzilla at gmail.com

Attempting to compile the following program with DMD 2.097.0 results in an ICE:

// S.sizeof == uint.max (0xffffffff)
struct S
    ubyte[0x7ffffffe] a;
    ubyte[0x7ffffffe] b;
    ubyte[3] c;

The compiler crashes with no output and an exit code of 132 ("Illegal
instruction"), most likely as the result of hitting an `assert(0)`.


More information about the Digitalmars-d-bugs mailing list