Segfault in DMD OSX

Etienne via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Sep 22 10:24:46 PDT 2014


Here's with debug symbols in DMD

Program received signal SIGSEGV, Segmentation fault.
0x000000010013c4d0 in TemplateInstance::findBestMatch (this=0x101c34050, 
sc=0x12058d740, fargs=0x0) at template.c:7329
7329 tempdecl->kind(), tempdecl->parent->toPrettyChars(), 
tempdecl->ident->toChars());
(gdb) print havetempdecl
$1 = false
(gdb) print tempdecl->kind()
$2 = 0x100290149 "overload alias"
(gdb) print tempdecl->parent->toPrettyChars()
Cannot access memory at address 0x0
(gdb) print tempdecl->ident->toChars()
$3 = 0x100515bd8 "Array"
(gdb) print tempdel->parent
No symbol "tempdel" in current context.
(gdb) print tempdecl->parent
$4 = (Dsymbol *) 0x0
(gdb) print tempdecl
$5 = (Dsymbol *) 0x1095fbc50
(gdb)

The tempdecl->parent is being accessed even though it may be null in :7329 :
   ::error(loc, "%s %s.%s does not match any template declaration",
tempdecl->kind(), tempdecl->parent->toPrettyChars(), 
tempdecl->ident->toChars());



More information about the Digitalmars-d-learn mailing list