[llvm-bugs] [Bug 33845] New: clang calls __gnu_mcount_nc with the wrong calling convention

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jul 18 16:53:12 PDT 2017


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

            Bug ID: 33845
           Summary: clang calls __gnu_mcount_nc with the wrong calling
                    convention
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: efriedma at codeaurora.org
                CC: compnerd at compnerd.org, llvm-bugs at lists.llvm.org,
                    renato.golin at linaro.org

__gnu_mcount_nc works differently from _mcount.  The caller is supposed to pass
its return address on the stack ("push {lr}"), and the stack pointer is
callee-pop.  This means that passing "-pg -meabi gnu" to clang will generate
code which corrupts the stack pointer.

Apparently nobody tested r265899.

-- 
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/20170718/c94e366e/attachment.html>


More information about the llvm-bugs mailing list