Thread overview
[Issue 1011] New: illegal import declaration causes compile time segfault
Feb 28, 2007
d-bugmail
Mar 08, 2007
d-bugmail
Apr 19, 2009
d-bugmail
May 14, 2009
Don
February 28, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1011

           Summary: illegal import declaration causes compile time segfault
           Product: D
           Version: 1.007
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P3
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: thomas-dloop@kuehne.cn


-- a.d --
import b;

-- b.d --
import foo 0

dmd a.d
> b.d(1): ';' expected
> Segmentation fault

dmd b.d
> b.d(1): ';' expected


Program received signal SIGSEGV, Segmentation fault.
0x0000000000423610 in DsymbolTable::lookup (this=0x6118b0, ident=0x0) at
dmd/dsymbol.c:858
858         sv = tab->lookup((char*)ident->string, ident->len);
Current language:  auto; currently c++
(gdb) bt
#0  0x0000000000423610 in DsymbolTable::lookup (this=0x6118b0, ident=0x0) at
dmd/dsymbol.c:858
#1  0x00000000004540d2 in Import::load (this=0x630360, sc=0x62fb10) at
dmd/import.c:90
#2  0x00000000004542d1 in Import::semantic (this=0x630360, sc=0x62fb10) at
dmd/import.c:120
#3  0x0000000000465aa9 in Module::semantic (this=0x62fea0) at dmd/module.c:652
#4  0x0000000000454229 in Import::load (this=0x61a1d0, sc=0x61a600) at
dmd/import.c:110
#5  0x00000000004542d1 in Import::semantic (this=0x61a1d0, sc=0x61a600) at
dmd/import.c:120
#6  0x0000000000465aa9 in Module::semantic (this=0x619cc0) at dmd/module.c:652
#7  0x00000000004640dc in main (argc=8, argv=0x619750) at dmd/mars.c:782


-- 

March 08, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1011





------- Comment #1 from thomas-dloop@kuehne.cn  2007-03-08 10:29 -------
Added to DStress as http://dstress.kuehne.cn/nocompile/i/import_19_A.d http://dstress.kuehne.cn/nocompile/i/import_19_B.d


-- 

April 19, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=1011





------- Comment #2 from clugdbug@yahoo.com.au  2009-04-19 03:19 -------
Created an attachment (id=326)
 --> (http://d.puremagic.com/issues/attachment.cgi?id=326&action=view)
Patch against DMD 2.028

Import shouldn't do any semantic action if it doesn't know which module it's supposed to be importing. The error message I've added may be unnecessary; just returning would probably be OK.


-- 

May 14, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=1011


Don <clugdbug@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |clugdbug@yahoo.com.au
         Resolution|                            |FIXED




--- Comment #3 from Don <clugdbug@yahoo.com.au>  2009-05-14 05:22:01 PDT ---
Fixed DMD2.030 and DMD1.045.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------