<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Stack Unwinding Protocol Broken by Ignoring Non-return Definitions"
   href="http://llvm.org/bugs/show_bug.cgi?id=17825">17825</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Stack Unwinding Protocol Broken by Ignoring Non-return Definitions
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>zhaoshiz@codeaurora.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu, qcolombet@apple.com
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=11492" name="attach_11492" title="Simple Test Case">attachment 11492</a> <a href="attachment.cgi?id=11492&action=edit" title="Simple Test Case">[details]</a></span>
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.

<span class="quote">> 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</span >


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

_ZN1SD1Ev:
        .fnstart
.Leh_func_begin2:
<span class="quote">>       .save   {r11, lr}
>       push.w  {r11, lr}</span >
        bl      _ZN1SD2Ev
.Ltmp8:
        .size   _ZN1SD1Ev, .Ltmp8-_ZN1SD1Ev
.Leh_func_end2:
        .fnend

commit ce734f1f43b3c5f614b95b53e3ed86f65daca8dd
Author: Quentin Colombet <<a href="mailto:qcolombet@apple.com">qcolombet@apple.com</a>>
Date:   Wed Sep 25 00:26:17 2013 +0000

    [PR16882] Ignore noreturn definitions when setting isPhysRegUsed.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>