[Issue 3401] Segfault(expression.c) on invariant + method overload
https://issues.dlang.org/show_bug.cgi?id=3401 Walter Bright changed: What|Removed |Added Version|1.048 |D1 --
[Issue 3401] Segfault(expression.c) on invariant + method overload
http://d.puremagic.com/issues/show_bug.cgi?id=3401 Moritz Warning changed: What|Removed |Added CC||m...@krej.cz --- Comment #5 from Moritz Warning 2009-10-15 14:03:32 PDT --- *** Issue 3405 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3401] Segfault(expression.c) on invariant + method overload
http://d.puremagic.com/issues/show_bug.cgi?id=3401 --- Comment #4 from Moritz Warning 2009-10-15 13:02:23 PDT --- The test case compiles and runs with dmd svn r215. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3401] Segfault(expression.c) on invariant + method overload
http://d.puremagic.com/issues/show_bug.cgi?id=3401 Don changed: What|Removed |Added Keywords||patch --- Comment #3 from Don 2009-10-15 02:07:03 PDT --- func.c, line 1568 (DMD 1.050), in mergeFensure(): Need to check fdensure as well as fensure. FuncDeclaration *fdv = (FuncDeclaration *)foverrides.data[i]; sf = fdv->mergeFensure(sf); -if (fdv->fensure) +if (fdv->fensure && fdv->fdensure) { //printf("fdv->fensure: %s\n", fdv->fensure->toChars()); // Make the call: __ensure(result) Expression *eresult = NULL; Likewise in mergeFrequire, line 1524 should probably be: FuncDeclaration *fdv = (FuncDeclaration *)foverrides.data[i]; sf = fdv->mergeFrequire(sf); -if (fdv->frequire) +if (fdv->frequire && fdv->fdrequire) { //printf("fdv->frequire: %s\n", fdv->frequire->toChars()); /* Make the call: * try { __require(); } * catch { frequire; } */ Expression *eresult = NULL; Expression *e = new CallExp(loc, new VarExp(loc, fdv->fdrequire), eresult); Statement *s2 = new ExpStatement(loc, e); -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3401] Segfault(expression.c) on invariant + method overload
http://d.puremagic.com/issues/show_bug.cgi?id=3401 Don changed: What|Removed |Added Summary|Compiler crash on invariant |Segfault(expression.c) on |+ method overload |invariant + method overload --- Comment #2 from Don 2009-10-15 01:57:40 PDT --- Crashing in VarExp::VarExp(). var is NULL. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---