[LLVMbugs] [Bug 17825] New: Stack Unwinding Protocol Broken by Ignoring Non-return Definitions

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Nov 5 16:18:58 PST 2013


http://llvm.org/bugs/show_bug.cgi?id=17825

            Bug ID: 17825
           Summary: Stack Unwinding Protocol Broken by Ignoring Non-return
                    Definitions
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: zhaoshiz at codeaurora.org
                CC: llvmbugs at cs.uiuc.edu, qcolombet at apple.com
    Classification: Unclassified

Created attachment 11492
  --> http://llvm.org/bugs/attachment.cgi?id=11492&action=edit
Simple Test Case

The following patch prevents setting LR as used PhysReg so 'push {r11, lr}' is
not generated in PEI, eventually ruining runtime stack with certain flag
combination:

-mllvm -arm-enable-ehabi -mllvm -arm-enable-ehabi-descriptors
-fomit-frame-pointer -mllvm -inline-threshold=20

Runtime behavior: test case program never finishes.

> clang++ -target arm-none-linux-gnueabi -mfloat-abi=softfp -mfpu=neon --sysroot=~/build_tools/gcc-4.6.1-cs/arm-2011.09 -mcpu=cortex-a9 -Os -mthumb -static -trigraphs -fexceptions -fcxx-exceptions ./test.cpp  -o test.exe -mllvm -arm-enable-ehabi -mllvm -arm-enable-ehabi-descriptors -fomit-frame-pointer -mllvm -inline-threshold=20


Problematic function (missing instructions noted by ">"):

_ZN1SD1Ev:
        .fnstart
.Leh_func_begin2:
>       .save   {r11, lr}
>       push.w  {r11, lr}
        bl      _ZN1SD2Ev
.Ltmp8:
        .size   _ZN1SD1Ev, .Ltmp8-_ZN1SD1Ev
.Leh_func_end2:
        .fnend

commit ce734f1f43b3c5f614b95b53e3ed86f65daca8dd
Author: Quentin Colombet <qcolombet at apple.com>
Date:   Wed Sep 25 00:26:17 2013 +0000

    [PR16882] Ignore noreturn definitions when setting isPhysRegUsed.

-- 
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/20131106/745cf47a/attachment.html>


More information about the llvm-bugs mailing list