[Issue 7861] New: Segfault during __error propagation with self-referencing module
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Apr 8 14:32:03 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7861
Summary: Segfault during __error propagation with
self-referencing module
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: blocker
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: code at klickverbot.at
--- Comment #0 from klickverbot <code at klickverbot.at> 2012-04-08 14:32:43 PDT ---
Another segfault-on-invalid bug:
---
module test;
mixin template A() {
import test;
}
struct B {
mixin A!();
}
enum C = B.nonexistent;
---
Produces (DMD e0cdcac):
---
(gdb) r
Starting program: /usr/local/bin/dmd a.reduced/test.d
a.reduced/test.d(11): Error: no property 'nonexistent' for type 'B'
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
0x000000010013ae0b in ExpInitializer::semantic (this=0x10051def0,
sc=0x100580240, t=0x0, needInterpret=4) at init.c:827
827 Type *tb = t->toBasetype();
(gdb) bt
#0 0x000000010013ae0b in ExpInitializer::semantic (this=0x10051def0,
sc=0x100580240, t=0x0, needInterpret=4) at init.c:827
#1 0x000000010008ecc7 in VarDeclaration::semantic2 (this=0x10051df10,
sc=0x100580240) at declaration.c:1596
#2 0x0000000100155445 in Module::semantic2 (this=0x10051d270) at module.c:847
#3 0x000000010013879b in Import::semantic2 (this=0x10057fad0, sc=0x10057ffb0)
at import.c:326
#4 0x00000001001d578f in TemplateMixin::semantic2 (this=0x10051dc80,
sc=0x10057ffb0) at template.c:6170
#5 0x00000001001d55fe in TemplateMixin::semantic (this=0x10051dc80,
sc=0x10057f200) at template.c:6125
#6 0x00000001001cfb09 in StructDeclaration::semantic (this=0x10051d9b0,
sc=0x10051e1e0) at struct.c:470
#7 0x00000001001555b7 in Module::semantic (this=0x10051d270) at module.c:806
#8 0x0000000100152cf9 in tryMain (argc=5, argv=0x100514190) at mars.c:1287
#9 0x0000000100153787 in main (argc=2, argv=0x7fff5fbffb48) at mars.c:1476
---
This time it's not really a regression – DMD 2.058 crashed at a different
location.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list