Compiler crash I can't pin down

Mehrdad wfunction at hotmail.com
Fri May 11 18:38:55 PDT 2012


I can't tell which part of my code is causing this (there's quite
a few files in my project and I can't really submit every file),
but when I run DMD, it crashes in template.c with
"Access violation reading location 0x00000004":


TemplateInstance::TemplateInstance(Loc loc, TemplateDeclaration
*td, Objects *tiargs)
         : ScopeDsymbol(NULL)
{
#if LOG
         printf("TemplateInstance(this = %p, tempdecl = '%s')\n",
this, td->toChars());
#endif
         this->loc = loc;
         this->name = td->ident;   // Crash here; apparently 'td' 
is
null?
         ...



Does anyone know what the bug might be? (Version 2.060 DEBUG)

It's a bit of a wild goose chase to narrow down the problem,
since I've tried commenting out several parts of my code entirely
(including the file mentioned in the "Loc" structure) but to no
avail. I also tried using Process Monitor to figure out the last
file DMD is opening, which happened to be std/utf.d, but
commenting out the entire code for that still caused the crash,
so idk...


More information about the Digitalmars-d mailing list