<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 --- - MCJIT EH fails when more than one instance used during program"
   href="http://llvm.org/bugs/show_bug.cgi?id=20953">20953</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>MCJIT EH fails when more than one instance used during program
          </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>Windows NT
          </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>MC
          </td>
        </tr>

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

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

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>When MCJIT is executed during a program, if MCJIT is executed again, the EH
fails. This is targetting i686-pc-windows-itanium-elf, linking in dynamically
libstdc++ 4.6.3 with mingw-w64-dw2. I'm running Windows 7 x64, but the host is
x86 MSVC 2013 ABI and not Itanium.

Specifically, in my current frontend, the JIT is used to evaluate certain
constructs during compilation time, in the sample case a simple function
returning a constant integer, and then invoked again later to run the resulting
program. The resulting program doesn't appear to have correct EH mechanisms-
when __cxa_throw is invoked, the process terminates as if there were no
handlers, even if a catch-all landingpad is used. 

If a fast-path for a constant integer is included that avoids invoking MCJIT,
the resulting program executes correctly. I've verified that the IR generated
for the fast path and the MCJIT path is identical.</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>