[Issue 6698] New: Regression(2.053): segfault with naked asm in inner function

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Sep 20 05:05:09 PDT 2011


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

           Summary: Regression(2.053): segfault with naked asm in inner
                    function
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: clugdbug at yahoo.com.au


--- Comment #0 from Don <clugdbug at yahoo.com.au> 2011-09-20 05:04:39 PDT ---
This comes from the test suite, fail_compilation/fail135.d
The code actually worked for a very long time (since around DMD1.000), but
wasn't compiling because it had a missing import for printf.


// segfault on 0.150
void fail135()
{
    int i = 0;

    void fn()
    {
    asm
    {
        naked;
        lea EAX, i;
        mov [EAX], 42;
        ret;
    }
    }
    fn();
    assert(i==42);
}

void main()
{
    fail135();
}

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