Bug 10370 – ICE on invalid imports when module is used as package
Status
RESOLVED
Resolution
DUPLICATE
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-06-16T00:35:00Z
Last change time
2013-10-01T15:03:54Z
Keywords
ice
Assigned to
nobody
Creator
verylonglogin.reg
Comments
Comment #0 by verylonglogin.reg — 2013-06-16T00:35:04Z
`Package::resolve` returns NULL as the last `pkg` in loop is a module with NULL `symtab` so `Import::load` calls `lookup` on NULL `dst` and segfaults.
The issue is rather nasty as the compiler fails early without any errors.
Sorry, the testcase is huge and non-opensource. One can email me directly if it is needed.
Comment #1 by verylonglogin.reg — 2013-06-16T00:43:57Z
Looks like this is only wrong code issue and is triggered on invalid import like:
---
import p1.p2.m1.x;
---
when there is module `p1.p2.m1`.
Comment #2 by bugzilla — 2013-10-01T15:03:54Z
11136 has a reduced test case.
*** This issue has been marked as a duplicate of issue 11136 ***