[Issue 3401] Segfault(expression.c) on invariant + method overload

2014-04-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3401

Walter Bright bugzi...@digitalmars.com changed:

   What|Removed |Added

Version|1.048   |D1

--


[Issue 3401] Segfault(expression.c) on invariant + method overload

2009-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3401


Don clugd...@yahoo.com.au changed:

   What|Removed |Added

Summary|Compiler crash on invariant |Segfault(expression.c) on
   |+ method overload   |invariant + method overload


--- Comment #2 from Don clugd...@yahoo.com.au 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: ---


[Issue 3401] Segfault(expression.c) on invariant + method overload

2009-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3401


Don clugd...@yahoo.com.au changed:

   What|Removed |Added

   Keywords||patch


--- Comment #3 from Don clugd...@yahoo.com.au 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: ---