D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 23368 - Throwing a null exception at compile time crashes the compiler
Summary: Throwing a null exception at compile time crashes the compiler
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 critical
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2022-09-24 11:30 UTC by Ate Eskola
Modified: 2022-11-14 22:27 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Ate Eskola 2022-09-24 11:30:33 UTC
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 Dlang Bot 2022-09-24 15:06:04 UTC
@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 Dlang Bot 2022-11-01 10:06:21 UTC
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 Dlang Bot 2022-11-14 22:27:10 UTC
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