Bug 24409 – DMD crash for CTFE in stompOverlappedFields

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2024-02-24T19:28:28Z
Last change time
2024-03-01T23:57:04Z
Keywords
pull
Assigned to
No Owner
Creator
Tim

Comments

Comment #0 by tim.dlang — 2024-02-24T19:28:28Z
DMD tries to access a null pointer in stompOverlappedFields for the following code: ``` static struct S { union { int i; long l; } } int f() { S* r = new S(); r.i = 5; return r.i; } enum X = f(); ```
Comment #1 by dlang-bot — 2024-02-24T19:32:05Z
@tim-dlang created dlang/dmd pull request #16246 "Fix Bugzilla 24409 - DMD crash for CTFE in stompOverlappedFields" fixing this issue: - Fix Bugzilla 24409 - DMD crash for CTFE in stompOverlappedFields https://github.com/dlang/dmd/pull/16246
Comment #2 by dlang-bot — 2024-02-27T12:11:12Z
dlang/dmd pull request #16246 "Fix Bugzilla 24409 - DMD crash for CTFE in stompOverlappedFields" was merged into stable: - 089809afe9f8cfa7a803f8ce49029d92a7c247a1 by Tim Schendekehl: Fix Bugzilla 24409 - DMD crash for CTFE in stompOverlappedFields https://github.com/dlang/dmd/pull/16246
Comment #3 by dlang-bot — 2024-03-01T23:57:04Z
dlang/dmd pull request #16276 "merge stable" was merged into master: - dd23837579e28e931b823315605ae7bc8e4f1608 by Tim Schendekehl: Fix Bugzilla 24409 - DMD crash for CTFE in stompOverlappedFields (#16246) https://github.com/dlang/dmd/pull/16276