Bug 20750 – checkaction=context segfaults for null references

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-04-19T11:54:06Z
Last change time
2020-04-19T13:37:04Z
Keywords
pull
Assigned to
No Owner
Creator
moonlightsentinel

Comments

Comment #0 by moonlightsentinel — 2020-04-19T11:54:06Z
The following code segfaults when compiled with -checkaction=context: ======================================= void main() { Object o = null; assert(o !is o); } ======================================= This segfaults because miniFormat unconditionally calls toString on a null reference.
Comment #1 by dlang-bot — 2020-04-19T11:57:23Z
@MoonlightSentinel created dlang/druntime pull request #3045 "Fix Issue 20750 - checkaction=context segfaults for null references" fixing this issue: - Fix Issue 20750 - checkaction=context segfaults for null references https://github.com/dlang/druntime/pull/3045
Comment #2 by dlang-bot — 2020-04-19T13:37:04Z
dlang/druntime pull request #3045 "Fix Issue 20750 - checkaction=context segfaults for null references" was merged into stable: - a045839291d07a9366d42920f1cf30b030d9fc35 by MoonlightSentinel: Fix Issue 20750 - checkaction=context segfaults for null references https://github.com/dlang/druntime/pull/3045