D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 20750 - checkaction=context segfaults for null references
Summary: checkaction=context segfaults for null references
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: druntime (show other issues)
Version: D2
Hardware: All All
: P1 minor
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2020-04-19 11:54 UTC by moonlightsentinel
Modified: 2020-04-19 13:37 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 moonlightsentinel 2020-04-19 11:54:06 UTC
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 Dlang Bot 2020-04-19 11:57:23 UTC
@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 Dlang Bot 2020-04-19 13:37:04 UTC
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