Thread overview
[Issue 4982] New: Repeating same error message thousands of times due to brute forcing matching symbol name
Oct 03, 2010
Koroskin Denis
Oct 04, 2010
Stewart Gordon
Oct 04, 2010
Koroskin Denis
Oct 05, 2010
Stewart Gordon
Jun 15, 2011
yebblies
October 03, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4982

           Summary: Repeating same error message thousands of times due to
                    brute forcing matching symbol name
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: 2korden@gmail.com


--- Comment #0 from Koroskin Denis <2korden@gmail.com> 2010-10-02 21:37:35 PDT ---
class A
{
    Foo foo;
    // int someSymbol;
}

class B : A
{
}

alias typeof(&B.init.someSymbol) Foo;

Result:
test.d(6): Error: class test.B is forward referenced when looking for
'someSymboKl'
test.d(6): Error: class test.B is forward referenced when looking for
'someSymboLl'
test.d(6): Error: class test.B is forward referenced when looking for
'someSymboMl'
test.d(6): Error: class test.B is forward referenced when looking for
'someSymboNl'
test.d(6): Error: class test.B is forward referenced when looking for
'someSymboOl'
test.d(6): Error: class test.B is forward referenced when looking for
'someSymboPl'
test.d(6): Error: class test.B is forward referenced when looking for
'someSymboQl'
test.d(6): Error: class test.B is forward referenced when looking for
'someSymboRl'
test.d(6): Error: class test.B is forward referenced when looking for
'someSymboSl'
test.d(6): Error: class test.B is forward referenced when looking for
'someSymboTl'
...

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 04, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4982


Stewart Gordon <smjg@iname.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic,
                   |                            |ice-on-invalid-code
                 CC|                            |smjg@iname.com
           Platform|Other                       |All
            Version|D2                          |D1 & D2
             Blocks|                            |340


--- Comment #1 from Stewart Gordon <smjg@iname.com> 2010-10-04 06:02:35 PDT ---
The error message is bogus in any case.  Should be something like

test.d(11): no property 'someSymbol' for type 'B'

Though not technically an ICE, it seems to run into an infinite loop, effectively hanging the compiler, hence my adding ice-on-invalid-code.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 04, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4982



--- Comment #2 from Koroskin Denis <2korden@gmail.com> 2010-10-04 11:59:44 PDT ---
With "int someSymbol;" uncommented code becomes valid, isn't it?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 05, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4982


Stewart Gordon <smjg@iname.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|ice-on-invalid-code         |rejects-valid


--- Comment #3 from Stewart Gordon <smjg@iname.com> 2010-10-05 09:56:50 PDT ---
Well, obviously, but that isn't part of the bug being reported.  But I've just found that the same happens with it in.

And I've just had a closer look at the output, and realise it's the spellcheck facility seeing if there's something closely resembling the symbol it thinks is undefined.  So the loop isn't infinite.  Though DMD's notion of closely resembling puzzles me: if I reduce the name to "s" then it tries a total of 16130 of them.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
June 15, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=4982


yebblies <yebblies@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |yebblies@gmail.com
         Resolution|                            |FIXED


--- Comment #4 from yebblies <yebblies@gmail.com> 2011-06-15 09:03:24 PDT ---
This works in current dmd (1.068 & 2.053)

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