Bug 23368 – Throwing a null exception at compile time crashes the compiler

Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-09-24T11:30:33Z
Last change time
2022-11-14T22:27:10Z
Keywords
pull
Assigned to
No Owner
Creator
Ate Eskola

Comments

Comment #0 by Ajieskola — 2022-09-24T11:30:33Z
Tested with a recent master DMD version, flags -preview=dip1000 -main ----------------------------- enum x = throw Exception.init; ----------------------------- Attempt to compile the above program results in a compiler crash. It should result in a normal compilation error.
Comment #1 by dlang-bot — 2022-09-24T15:06:04Z
@maxhaton updated dlang/dmd pull request #14482 "Fix Issue 23368 - Don't segfault on throwing null exception" fixing this issue: - Fix Issue 23368 - Don't segfault on throwing null exception https://github.com/dlang/dmd/pull/14482
Comment #2 by dlang-bot — 2022-11-01T10:06:21Z
dlang/dmd pull request #14482 "Fix Issue 23368 - Don't segfault on throwing null exception" was merged into stable: - 534645e0a45ecf7dc4b9a62bfc8ab5fc6f1313a5 by mhh: Fix Issue 23368 - Don't segfault on throwing null exception https://github.com/dlang/dmd/pull/14482
Comment #3 by dlang-bot — 2022-11-14T22:27:10Z
dlang/dmd pull request #14643 "merge stable" was merged into master: - ab39d16b006ba3db4639ce663da9f1efa49c9d4e by mhh: Fix Issue 23368 - Don't segfault on throwing null exception https://github.com/dlang/dmd/pull/14643