Demonstration: --- void main() { struct S { Object a; alias a this; } cast(void) .object.hashOf(S.init); // Segfaults. } ---
@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
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
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