Wiki Roadmap Timeline Tickets New Ticket Source Search Help / Guide About Trac Login

Ticket #265 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Segfault on undefined template member of undefined template

Reported by: Deewiant Assigned to: lindquist
Priority: major Milestone:
Component: frontend (both) Version: hg tip
Keywords: Cc:

Description

The following causes a segfault on revision 1257:7af860e4f403:

void main() {
	Bar!().Foo!().foo;
}

DMD 1.043 doesn't crash. I didn't try 1.042 so it could have been fixed upstream already.

GDB's backtrace:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fc9a6859700 (LWP 15194)]
0x000000000058fbf4 in DotTemplateInstanceExp::semantic (this=0xf89120, sc=0xfb0d30) at /home/deewiant/src/ldc/dmd/expression.c:5803
5803	    {	error("template identifier %s is not a member of %s %s", id->toChars(), s->kind(), s->ident->toChars());
(gdb) bt
#0  0x000000000058fbf4 in DotTemplateInstanceExp::semantic (this=0xf89120, sc=0xfb0d30)
    at /home/deewiant/src/ldc/dmd/expression.c:5803
#1  0x00000000005868be in UnaExp::semantic (this=0xf89170, sc=0xf881d0) at /home/deewiant/src/ldc/dmd/expression.c:4833
#2  0x0000000000597376 in DotIdExp::semantic (this=0xf89170, sc=0xfb0d30) at /home/deewiant/src/ldc/dmd/expression.c:5282
#3  0x00000000005a6cdb in ExpStatement::semantic (this=0xf891c0, sc=0xfb0d30) at /home/deewiant/src/ldc/dmd/statement.c:207
#4  0x00000000005a88dc in CompoundStatement::semantic (this=0xf89210, sc=0xfb0d30) at /home/deewiant/src/ldc/dmd/statement.c:402
#5  0x0000000000548fea in FuncDeclaration::semantic3 (this=0xf88740, sc=0xfb0c50) at /home/deewiant/src/ldc/dmd/func.c:1039
#6  0x0000000000583d80 in Module::semantic3 (this=0xf87e90, unused_sc=<value optimized out>)
    at /home/deewiant/src/ldc/dmd/module.c:746
#7  0x00000000005cb341 in main (argc=<value optimized out>, argv=0x7fffae87bc58) at /home/deewiant/src/ldc/gen/main.cpp:786

Change History

04/23/09 14:46:13 changed by ChristianK

  • status changed from new to closed.
  • resolution set to fixed.

Fixed in [1258]

Copyright © 2008, LDC Development Team.