llvm/llvm-project

Check for `__unw_add_dynamic_eh_frame_section` in non-ORC-runtime exception registration paths.

Open

#55.681 geöffnet am 24. Mai 2022

Auf GitHub ansehen
 (4 Kommentare) (3 Reaktionen) (0 zugewiesene Personen)C++ (10.782 Forks)batch import
good first issueorcjit

Repository-Metriken

Stars
 (26.378 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 1T 2h) (1.000 gemergte PRs in 30 T)

Beschreibung

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.

Contributor Guide