<html>
    <head>
      <base href="https://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 --- - JumpThreading.cpp segfault in ThreadEdge function"
   href="https://llvm.org/bugs/show_bug.cgi?id=29048">29048</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>JumpThreading.cpp segfault in ThreadEdge function
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </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>Scalar Optimizations
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>davidnoursi@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>We have been modifying LLVM for use to compile our C-like language, and in the
process of debugging some newly overloaded intrinsics we experienced segfaults
in JumpThreading.cpp. Although we never quite determined what in the IR caused
this segfault, we found the bug in the code and corrected it; my reference is
the code at <a href="http://llvm.org/docs/doxygen/html/JumpThreading_8cpp_source.html">http://llvm.org/docs/doxygen/html/JumpThreading_8cpp_source.html</a>.

Our correction involved the declaration of SSAUpdater SSAUpdate on line 1535,
which is not initialized until after a conditional "continue" statement on line
1553. We found, with print statements, that the segfault occurred from the
SSAUpdater destructor at the very end of ThreadEdge. We eliminated the error by
moving the declaration from line 1535 to an else statement on lines 1554-1567.</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>