<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - libunwind: _Unwind_GetIPInfo doesn't handle signal frames correctly"
   href="https://bugs.llvm.org/show_bug.cgi?id=43488">43488</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>libunwind: _Unwind_GetIPInfo doesn't handle signal frames correctly
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libc++abi
          </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>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>jgorbe@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, mclow.lists@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>_Unwind_GetIPInfo has an output argument which is a flag indicating whether the
returned IP points before or after the next instruction to be executed.

This flag is currently always set to 0 (see
<a href="https://github.com/llvm-mirror/libunwind/blob/master/src/UnwindLevel1-gcc-ext.c#L224">https://github.com/llvm-mirror/libunwind/blob/master/src/UnwindLevel1-gcc-ext.c#L224</a>).
Therefore, when the caller of _GetIPInfo uses this flag to decide if it should
decrement the returned IP to get the actual address of the next instruction to
be executed, it will always decrement.

This is wrong for signal frames (where _Unwind_GetIPInfo should set the flag to
1), and the caller might even end up looking at a different function if the
returned IP was pointing to the first instruction of a function.</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>