[Issue 3372] optlink silently mistreats object files with more than 16384 symbols

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Sep 1 23:45:36 PDT 2010


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


Rainer Schuetze <r.sagitario at gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WORKSFORME                  |


--- Comment #2 from Rainer Schuetze <r.sagitario at gmx.de> 2010-09-01 23:45:20 PDT ---
Sorry, but the error is still there with optlink 8.00.7 and dmd svn r638.

Here's an updated test case that does not need a compiler change:


import std.stdio;

class genfuns(int n, int m)
{
    static void run() { 
        genfuns!(n - 1, m).run(); 
    }
}

class genfuns(int n : 0, int m)
{
    static void run() { writefln("=== 0, %d ===", m); }
}

version = crash;

void main()
{
    // dmd-release: stack overflow with n=700
    // dmd-debug:   stack overflow with n=500
    // dmd-2.037: error "recursive expansion" for n=300
    genfuns!(200, 0).run(); 
    genfuns!(200, 1).run();
    genfuns!(200, 2).run();
    genfuns!(200, 3).run();
    genfuns!(200, 4).run();
    genfuns!(200, 5).run();
    genfuns!(200, 6).run();
    genfuns!(200, 7).run();
    genfuns!(200, 8).run();
    genfuns!(200, 9).run();
    genfuns!(200, 10).run();
    genfuns!(200, 11).run();
    genfuns!(200, 12).run();
    genfuns!(200, 13).run();
    genfuns!(200, 14).run();
    genfuns!(200, 15).run();
    genfuns!(200, 16).run();
    genfuns!(200, 17).run();
    genfuns!(200, 18).run();
    genfuns!(200, 19).run(); // 16224 symbols up to here
version(crash)
    genfuns!(200, 20).run(); // 17028 symbols with this line
}

The actual bad behaviour of the executable can vary a little due to changed
symbols in libraries and resulting different relocations. For me it is
currently a long loop repeating the expected output followed by access
violations or failed memory allocations.

If you uncomment the version=crash statement, you'll get the expected result.

-- 
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