[Issue 4904] New: Win32 phobos unittest crashes with access violation

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Sep 21 00:54:41 PDT 2010


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

           Summary: Win32 phobos unittest crashes with access violation
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: rsinfu at gmail.com


--- Comment #0 from Shin Fujishiro <rsinfu at gmail.com> 2010-09-21 00:54:02 PDT ---
dmd r680
phobos trunk r2043

Paste the following code at the bottom of phobos/unittest.d. This simply
increases the size of unittest executable.
--------------------
unittest
{
    struct K(Q...)
    {
        static if (Q.length < 5) static K!(Q, int) next;
        Q q;
    }
    static K!byte a1;
    static K!short a2;
    static K!int a3;
    static K!long a4;
    static K!ubyte a5;
    static K!ushort a6;
    static K!uint a7;
    static K!ulong a8;
    static K!float a9;
    static K!double a10;
    static K!real a11;
    static K!char a12;
    static K!wchar a13;
    static K!dchar a14;
}
--------------------

Then, run the phobos unittest on Windows. It will crash.
--------------------
>make -f win32.mak unittest
...
unittest
object.Error: Access Violation
--------------------

Access violation seems to start happening when the size of executable exceeds
some critical point. Sometimes the AV didn't occur, and alternatively the test
showed weird behavior - such as infinitely failing unittests or broken output.

See this message and follow ups.
 http://lists.puremagic.com/pipermail/phobos/2010-September/002609.html

Auto tester output:
 http://d.puremagic.com/test-results/test_data.ghtml?dataid=3525

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