[Issue 3101] Stack overflow: declaring aggregate member twice with static if

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Aug 12 11:26:48 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=3101


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch




--- Comment #3 from Don <clugdbug at yahoo.com.au>  2009-08-12 11:26:48 PDT ---
Patch is very easy.

in int AliasDeclaration::overloadInsert(Dsymbol *s), make sure it doesn't call
itself.


Index: declaration.c
===================================================================
--- declaration.c    (revision 194)
+++ declaration.c    (working copy)
@@ -543,6 +543,8 @@
     {    overnext = s;
     return TRUE;
     }
+    else if (overnext==this) // a recursive expansion would ensue. Bugzilla
3101
+       return FALSE;
     else
     {
     return overnext->overloadInsert(s);

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list