Bug 20100 – Segfault with checkaction=context on struct comparison
Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-08-03T15:26:19Z
Last change time
2019-08-08T01:32:24Z
Keywords
pull
Assigned to
No Owner
Creator
moonlightsentinel
Comments
Comment #0 by moonlightsentinel — 2019-08-03T15:26:19Z
The following snippet segfaults DMD (and LDC) when using -checkaction=context:
types.d
--------------------
struct Tuple {
bool opEquals(Tuple) { return true; }
}
void main() {
Tuple t1;
assert(t1 == t1);
}
--------------------
dmd -checkaction=context types.d
=> Segmentation fault (core dumped)
This snippet is a reduced test case from std.typecons (which is currently only usable without this switch)
Comment #1 by dlang-bot — 2019-08-03T17:00:40Z
@wilzbach created dlang/dmd pull request #10270 "Fix Issue 20100 - Segfault with checkaction=context on struct comparison" fixing this issue:
- Fix Issue 20100 - Segfault with checkaction=context on struct comparison
https://github.com/dlang/dmd/pull/10270
Comment #2 by dlang-bot — 2019-08-03T19:47:46Z
@wilzbach created dlang/dmd pull request #10271 " -checkaction=context: improve struct equals detection" fixing this issue:
- Fix Issue 20100 - Segfault with checkaction=context on struct comparison
https://github.com/dlang/dmd/pull/10271
Comment #3 by dlang-bot — 2019-08-03T19:52:23Z
@wilzbach created dlang/druntime pull request #2720 "-checkaction=context: Improve struct output + add tests for issue 20100" mentioning this issue:
- -checkaction=context: Improve struct output + add tests for issue 20100
https://github.com/dlang/druntime/pull/2720
Comment #4 by dlang-bot — 2019-08-08T01:32:24Z
dlang/dmd pull request #10270 "Fix Issue 20100 - Segfault with checkaction=context on struct comparison" was merged into master:
- 769cca98a012f5cbdab14fd2bc5019ae650117a0 by Sebastian Wilzbach:
Fix Issue 20100 - Segfault with checkaction=context on struct comparison
https://github.com/dlang/dmd/pull/10270