Bug 22076 – hashOf(S) can segfault if S.toHash is forwarded via 'alias this' to a receiver which may be null
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-06-23T02:28:58Z
Last change time
2021-07-24T17:57:10Z
Keywords
pull
Assigned to
No Owner
Creator
Nathan S.
Comments
Comment #0 by n8sh.secondary — 2021-06-23T02:28:58Z
Demonstration:
---
void main()
{
struct S
{
Object a;
alias a this;
}
cast(void) .object.hashOf(S.init); // Segfaults.
}
---
Comment #1 by dlang-bot — 2021-06-23T02:32:45Z
@n8sh created dlang/druntime pull request #3501 "[stable] hashOf(S) can segfault if S.toHash is forwarded via 'alias this' to a receiver which may be null" fixing this issue:
- Fix 22076 - hashOf(S) can segfault if S.toHash is forwarded via 'alias this' to a receiver which may be null
https://github.com/dlang/druntime/pull/3501
Comment #2 by dlang-bot — 2021-06-23T03:05:54Z
dlang/druntime pull request #3501 "[stable] hashOf(S) can segfault if S.toHash is forwarded via 'alias this' to a receiver which may be null" was merged into stable:
- 3b861301cfe1dbe3e4a02093312e6f2c68454daa by Nathan Sashihara:
Fix 22076 - hashOf(S) can segfault if S.toHash is forwarded via 'alias this' to a receiver which may be null
https://github.com/dlang/druntime/pull/3501
Comment #3 by dlang-bot — 2021-07-24T17:57:10Z
dlang/druntime pull request #3515 "merge stable" was merged into master:
- ed76256b7dd63748ba135467e9d8be5722b579cc by Nathan Sashihara:
Fix 22076 - hashOf(S) can segfault if S.toHash is forwarded via 'alias this' to a receiver which may be null
- 186e58071e35ac1866f371b44b50cf560ef06f9b by Nathan Sashihara:
Fix 22076 - hashOf(S) can segfault if S.toHash is forwarded via 'alias this' to a receiver which may be null
https://github.com/dlang/druntime/pull/3515