Bug 19187 – __traits(compiles) segfaults on access to partially undefined overload set from import

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2018-08-24T16:31:09Z
Last change time
2018-08-30T06:24:46Z
Assigned to
No Owner
Creator
FeepingCreature

Comments

Comment #0 by default_357-line — 2018-08-24T16:31:09Z
Repro: $ cat test1.d import test2; enum test = __traits(compiles, test2.foo); $ cat test2.d template test() { } alias foo = test; alias foo = NONEXISTENT; $ dmd test1.d Segmentation fault (core dumped) $
Comment #1 by default_357-line — 2018-08-24T16:40:37Z
Comment #2 by github-bugzilla — 2018-08-30T06:24:39Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/b69d67407ecbac890ddf706f5b8fe65adece61a3 Fix Issue 19187: check variable type is defined before accessing https://github.com/dlang/dmd/commit/6e53e55ad35a12e48674a4844d0995e8ec7f9097 Merge pull request #8613 from FeepingCreature/fix/Issue-19187 Fix Issue 19187: check variable type is defined before accessing merged-on-behalf-of: Jacob Carlborg <[email protected]>