<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 --- - MCJIT on Windows x64 causes assert(isInt<32>(RealOffset)) in RuntimeDyidELF.cpp"
   href="https://llvm.org/bugs/show_bug.cgi?id=24978">24978</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>MCJIT on Windows x64 causes assert(isInt<32>(RealOffset)) in RuntimeDyidELF.cpp
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.7
          </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>Backend: X86
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>alex.moiseenko@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>Environment: Windows 8 x64.

On some machines all goes well when using MCJIT but on others there is an
assertion failure on assert(isInt<32>(RealOffset)); in RuntimeDyidELF.cpp

However if we explicitly set code and relocation model when we create
ExecutionEngine - then assertion is not triggered and everything is fine:

.setCodeModel(llvm::CodeModel::Large)
.setRelocationModel(llvm::Reloc::Static)

Probably the following issues are related:

<a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - RuntimeDyldELF doesn't handle >2GB relocations on x86-64 platforms"
   href="show_bug.cgi?id=15356">https://llvm.org/bugs/show_bug.cgi?id=15356</a>
<a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - On x86_64 ELF, short relocation can be produced even in large code model"
   href="show_bug.cgi?id=21423">https://llvm.org/bugs/show_bug.cgi?id=21423</a></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>