D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 22779 - druntime: Calling __delete with null pointer-to-struct segfaults
Summary: druntime: Calling __delete with null pointer-to-struct segfaults
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: druntime (show other issues)
Version: D2
Hardware: All All
: P1 critical
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-16 11:38 UTC by Iain Buclaw
Modified: 2022-03-01 10:32 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 Iain Buclaw 2022-02-16 11:38:58 UTC
---
import core.memory;
A *aptr;
__delete(aptr);
---

This differs from both the documentation of __delete and the old delete behaviour which is to return with no effect.
Comment 1 Dlang Bot 2022-02-16 11:43:30 UTC
@ibuclaw created dlang/druntime pull request #3745 "Issue 22779 - druntime: Calling __delete with null pointer-to-struct segfaults" mentioning this issue:

- Issue 22779 - druntime: Calling __delete with null pointer-to-struct segfaults

https://github.com/dlang/druntime/pull/3745
Comment 2 Dlang Bot 2022-02-16 12:25:44 UTC
dlang/druntime pull request #3745 "fix Issue 22779 - druntime: Calling __delete with null pointer-to-struct segfaults" was merged into stable:

- ed0e0dbf706dd0b9aaab6b47ad9fe61b48524cc0 by Iain Buclaw:
  fix Issue 22779 - druntime: Calling __delete with null pointer-to-struct segfaults

https://github.com/dlang/druntime/pull/3745
Comment 3 Dlang Bot 2022-03-01 10:32:14 UTC
dlang/druntime pull request #3764 "merge stable" was merged into master:

- cc1f52689f4091cb3eb608659b71c0d9a51415ff by Iain Buclaw:
  fix Issue 22779 - druntime: Calling __delete with null pointer-to-struct segfaults

https://github.com/dlang/druntime/pull/3764