<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 - Improve llvm-jitlink test infrastructure for allocation actions."
   href="https://bugs.llvm.org/show_bug.cgi?id=52503">52503</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Improve llvm-jitlink test infrastructure for allocation actions.
          </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>All
          </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>OrcJIT
          </td>
        </tr>

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

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

        <tr>
          <th>CC</th>
          <td>1101.debian@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Allocation actions are run during JIT memory finalization and deallocation. The
code for these actions may be in the ORC runtime. This makes them an awkward
fit for llvm-jitlink -noexec tests, which (1) are meant to be able to run on
all platforms, including platforms that can't execute the code being jit-linked
at all (e.g. arm64 tests running on an x86-64 tester), and (2) ideally
shouldn't assume that we have a built ORC runtime.

We could solve this by:
(1) Adding a jitlink-test-environment dylib to the build that provides mocks of
the required actions.
(2) Add a new "add-executor-mangled-alias <name>" option to llvm-jitlink which
adds aliases of the form executor_mangle(<name>) -> Dylib::lookup(<name>) to
the session.

This will cause allocation actions to be redirected to code executable on the
host and we can use this to print debugging output that can be used to verify
that the required actions were run.</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>