[llvm-bugs] [Bug 40322] New: clang generates incorrect unwind information on 32-bit mingw

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jan 15 09:12:34 PST 2019


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

            Bug ID: 40322
           Summary: clang generates incorrect unwind information on 32-bit
                    mingw
           Product: new-bugs
           Version: 7.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: marc at groundctl.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

Created attachment 21330
  --> https://bugs.llvm.org/attachment.cgi?id=21330&action=edit
attached program

When compiling the attached program with the arguments "-target
i686-w64-mingw32 -O2", the resulting executable aborts.  When compiling with
"-target i686-w64-mingw32 -O0" the executable works correctly.

This appears to be because the generated dwarf unwind information is incorrect.
 When the unwinder looks for the return address of "am" it is off by 4 bytes
and finds the argument to "am", which is 0, and so it thinks the stack has
ended.

I am using the current Arch Linux clang build, version "7.0.1
(tags/RELEASE_701/final)".  This does not happen when targeting
"x86_64-w64-mingw32".  This does not happen when using -O1.

-- 
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/20190115/399693a8/attachment.html>


More information about the llvm-bugs mailing list