[Issue 23805] New: Runtime segmentation fault when destructor access function frame

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Mar 24 03:15:37 UTC 2023


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

          Issue ID: 23805
           Summary: Runtime segmentation fault when destructor access
                    function frame
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: critical
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: pro.mathias.lang at gmail.com

```
void main ()
{
    size_t destructionCount;
    struct CantDestruct {
        int value;
        ~this () { ++destructionCount; }
    }
    static void test(CantDestruct a) {}
    test(CantDestruct.init);
}
```

This crashes with a segfault when running the program.

--


More information about the Digitalmars-d-bugs mailing list