<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 - builtin longjmp miscompiled when jmpbuf is rbp-relative address"
   href="https://bugs.llvm.org/show_bug.cgi?id=48533">48533</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>builtin longjmp miscompiled when jmpbuf is rbp-relative address
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>10.0
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>FreeBSD
          </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>jfc@mit.edu
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=24293" name="attach_24293" title="bitcode that llc miscompiles">attachment 24293</a> <a href="attachment.cgi?id=24293&action=edit" title="bitcode that llc miscompiles">[details]</a></span>
bitcode that llc miscompiles

If the address argument to __builtin_longjmp is %rbp-relative the longjmp is
miscompiled.  If I compile the attached .ll file with the 10.0 llc the function
ends

        movq    -48(%rbp), %rbp
        movq    -40(%rbp), %rax # This load needs the original rbp
        movq    -32(%rbp), %rsp # This load needs the original rbp
        jmpq    *%rax

Note that the first instruction overwrites %rbp but the next two instructions
depend on the old value.  The branch goes to a random address with a random
%rsp.

The same bug is present in the version of llvm 11 included with FreeBSD-CURRENT
(13.0).</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>