Thread overview
[Issue 9233] New: compiler infinite recursion on recursive mixin
Dec 28, 2012
luka8088
[Issue 9233] compiler infinite recursion on nested mixin
Dec 29, 2012
Kenji Hara
Dec 29, 2012
Kenji Hara
December 28, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=9233

           Summary: compiler infinite recursion on recursive mixin
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: critical
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: luka8088@owave.net


--- Comment #0 from luka8088 <luka8088@owave.net> 2012-12-28 04:27:50 PST ---
The following code causes dmd compiler to infinitely allocate new memory with high cpu load, so I suspect a infinite recursion in the compiler.

----------

module program;

mixin template ParentMix () {
  mixin template ChildMix (alias PMix) {}
}

class A {
  mixin ParentMix pmix;
}

mixin A.pmix.ChildMix!(A.pmix);

void main () {}

----------

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 29, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=9233


Kenji Hara <k.hara.pg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE


--- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2012-12-28 23:39:37 PST ---
The root problem is same as bug 9026, and it is already fixed.
Then, infinitely allocation and high cpu load do not occur with git head.

*** This issue has been marked as a duplicate of issue 9026 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 29, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=9233



--- Comment #2 from Kenji Hara <k.hara.pg@gmail.com> 2012-12-28 23:41:23 PST ---
(In reply to comment #1)
> The root problem is same as bug 9026, and it is already fixed.
> Then, infinitely allocation and high cpu load do not occur with git head.
> 
> *** This issue has been marked as a duplicate of issue 9026 ***

Finally this issue will have been fixed in 2.061.

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