<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/55681>55681</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Check for `__unw_add_dynamic_eh_frame_section` in non-ORC-runtime exception registration paths.
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            orcjit
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          lhames
      </td>
    </tr>
</table>

<pre>
    Background:

LLVM JIT clients using libunwind on Linux have historically encountered "FDE is really a CIE" errors and associated issues with exception handling (see e.g. https://github.com/llvm/llvm-project/issues/86). 

To address these issues @housel added new dynamic registration functions for eh-frame-sections to libunwind in bab39816085d7 (`__unw_add_dynamic_eh_frame_section` registers a section, `__unw_remove_dynamic_eh_frame_section` deregisters it), and updated the ORC runtime was updated to check for and use these registration functions in 981523b2e4675d4be496a333583b2f728c057d02.

@housel's patch fixes the issue for JIT clients who use the ORC runtime, but the LLVM-only registration paths are still hardcoded to use the `__register_frame` and `__deregister_frame` functions. We should update the LLVM-only paths to check and use these functions too.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJydlG9vmzAQxj8NvDkFgfkTeMGLNW2lTp0mTdX2MjL2AW4dHNmmab_9DhKSdNOmaVJEwGffPc_vDhoj3-sbLl46a8ZBBumnIL4N4tP18fH7F_j88ARCKxy8g9GpoQOtmnE4qEGCGeBRDeMb9PwVoVfOG6sE1_odcBCU0aNFCQFj97d3oBxYnIMcNg93tAporbEOOOXizhmhuKf9yrkRHRyU7wHfBO69oko97dJT_YCVDhEw6iLovd-7STa7p19HJ8YmEmZHD1q_Ln-rvTXPKDw9HnPTTVkErIrg2u-TAS6lRefA9-hwERJkcW9Gh3oKk74BDyDfB75Tghx1ZNvyWWI7DmK6cdAaC9ivWst3uHJ4WvXmCp4aoOFNWpVJEZe5XE--giLebim-pULbU4kt9ts5z_aUhzadyuLEDpZltoHzeYs784p_TSHxkkQRmmpKMHVi3Mu5DcQAvn7bgKU-qh3CgbtLzIDoUbzMRudDhOsI7Q9EyC5ZzVnaMMyKdS6zBrOq4Gma5iUttmtWijhfy5hF1005ww_Y2sGee9FDq95w7tGxQ7OI6zk99GYRdO1gMtiMfl6eZntlBhrGD3opf09MLYLzSmsaOiuFkUfHS8qZ8gLvCHYCOmGYQxeyl-AZRAQ_KDlZ0gvpX_QcJZwBf4R74emNiUJZp7JKKx565TXWm3NL_nmQqC2DGVZEabX0-fLK_Y4mCker6_9_6_K8KJOwr9Oy5FWRtXnW5E3TxlUlJMuLoopzmSQiDjVvULs6yG_oO2GseJ5GlAX5bahqFjMW5yxLqiSOswh5lqVJWmBSrDlvOU0M7rjS0SQiMrYLbT3racbOUVCTJ3cJ0odHdQPiXIvy89H3hk70RMqFs_J6lv0TLVzEag">