Bug 20946 – Segfault by forward reference and undefined identifier

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-06-18T00:33:44Z
Last change time
2020-06-18T02:49:55Z
Keywords
pull
Assigned to
No Owner
Creator
kntroh

Comments

Comment #0 by kntroh — 2020-06-18T00:33:44Z
dmd 2.092.1 on Linux Mint 19(64-bit), Windows 8 Pro(64-bit) Segfault after a error message for undefined identifer. $ cat test.d class C1 { UndefinedType a; } typeof(func) f; void func(C1 ) { } $ dmd test.d test.d(2): Error: undefined identifier UndefinedType Segmentation fault $
Comment #1 by uplink.coder — 2020-06-18T02:03:50Z
This gets triggered in the typeof. Shouldn't be too hard to fix.
Comment #2 by uplink.coder — 2020-06-18T02:19:11Z
Comment #3 by dlang-bot — 2020-06-18T02:34:55Z
@UplinkCoder updated dlang/dmd pull request #11294 "Fix 20946 - Move the check for a null scope after semantic." fixing this issue: - Fix Issue 20946 - Add a check for a null scope after semantic. https://github.com/dlang/dmd/pull/11294
Comment #4 by uplink.coder — 2020-06-18T02:47:38Z
I am stupid ... I should have checked the updated stable branch. This is fixed.
Comment #5 by uplink.coder — 2020-06-18T02:49:55Z
fixed by c227dd4849acbac2f7ff741d1cf0736f23552d09 fix issue 20709 - Segmentation fault when importing nonexistent type