Bug 8404 – Importing the enclosing package of a module will crash dmd instead of generating errors.

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2012-07-21T12:13:00Z
Last change time
2012-07-21T12:32:38Z
Assigned to
nobody
Creator
overkill9999

Comments

Comment #0 by overkill9999 — 2012-07-21T12:13:16Z
Make a file called "mod.d" inside of folder "pkg" with these contents: module pkg.mod; import pkg; When running this under DMD 2.059 on Windows 7 (and possibly other platforms, I haven't checked): dmd mod.d This crashes the compiler, instead of giving error output. I don't know exactly where it is happening in the code, because I couldn't retrieve the debug symbols when I launched VS2010's debugger, but the disassembly tells me that some piece of code is trying to indirect [ecx] when ecx=0x00000000 (a null pointer dereference). -- Andrew G. Crowell
Comment #1 by issues.dlang — 2012-07-21T12:32:38Z
Already fixed on github. *** This issue has been marked as a duplicate of issue 8089 ***