[llvm-bugs] [Bug 27501] New: [WinEH] bad instruction ordering with function calls that might throw

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Apr 24 09:51:00 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=27501

            Bug ID: 27501
           Summary: [WinEH] bad instruction ordering with function calls
                    that might throw
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: r.sagitario at gmx.de
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

When compiling the attached IR with "llc -O1", the resulting application
crashes. It works when compiling with "llc -O0".

The problem seems to be that inside the function _D5sdtor9test10972FZi,
-24(%ebp) is only written after the call to
_D5sdtor9test10972FZ1S15__fieldPostblitMFZv, which can throw, but used later in
code after catching the exception.

.Ltmp2:
    leaq    -56(%rbp), %rcx
    callq    _D5sdtor9test10972FZ1S15__fieldPostblitMFZv
.Ltmp3:
    movq    %rsi, -24(%rbp)         # 8-byte Spill

This is built from a test case in the D compiler suite. I can provide a library
to link the snippet, but without further reduction it has size 7MB.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160424/aec4d436/attachment.html>


More information about the llvm-bugs mailing list