[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


            Bug ID: 17825
           Summary: Stack Unwinding Protocol Broken by Ignoring Non-return
           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

-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 ">"):

>       .save   {r11, lr}
>       push.w  {r11, lr}
        bl      _ZN1SD2Ev
        .size   _ZN1SD1Ev, .Ltmp8-_ZN1SD1Ev

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