[Issue 22076] New: hashOf(S) can segfault if S.toHash is forwarded via 'alias this' to a receiver which may be null
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jun 23 02:28:58 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=22076
Issue ID: 22076
Summary: hashOf(S) can segfault if S.toHash is forwarded via
'alias this' to a receiver which may be null
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: druntime
Assignee: nobody at puremagic.com
Reporter: n8sh.secondary at hotmail.com
Demonstration:
---
void main()
{
struct S
{
Object a;
alias a this;
}
cast(void) .object.hashOf(S.init); // Segfaults.
}
---
--
More information about the Digitalmars-d-bugs
mailing list