www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 3101] New: Compiler hangs with 100% CPU load

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3101

           Summary: Compiler hangs with 100% CPU load
           Product: D
           Version: 2.030
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: jason.james.house gmail.com


The attached code demonstrates the issue.  Below is the compilation command
used to reproduce the bug (and the output from dmd before it hung)
dmd -gc -O -release main.d -ofmain
error: foo is not shared (1)
main.d(4): Error: declaration T is already defined

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 28 2009
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3101





--- Comment #1 from Jason House <jason.james.house gmail.com>  2009-06-28
18:28:35 PDT ---
Created an attachment (id=407)
 --> (http://d.puremagic.com/issues/attachment.cgi?id=407)
file demonstrating issue

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 28 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3101


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug yahoo.com.au
            Version|2.030                       |1.042
            Summary|Compiler hangs with 100%    |Stack overflow: declaring
                   |CPU load                    |aggregate member twice with
                   |                            |static if
         OS/Version|Linux                       |All




--- Comment #2 from Don <clugdbug yahoo.com.au>  2009-07-09 04:56:58 PDT ---
Reduced test case (Windows):

---
struct foo{
  static if (is(int T == int)) {}
  static if (is(int T == int)) {}
}
----
 dmd ice.d

Stack overflow On DMD1, it stack overflows without error message. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 09 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3101


Don <clugdbug yahoo.com.au> changed:

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




--- Comment #3 from Don <clugdbug 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: -------
Aug 12 2009
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3101


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED


--- Comment #4 from Walter Bright <bugzilla digitalmars.com> 2009-10-13
13:45:47 PDT ---
Fixed dmd 1.049 and 2.034

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