Files
Alex Duran 82b0ff3778 [Offload][Omp] Fix libomptarget OMPT disconnect segfault (#243190)
Libomp is calling libomptarget `finalizeLibrary` as part of its `atexit`
tear-down process. But because the order of library dependencies,
libomptarget deinitializes first so when `finalizeLibrary` is called,
calling even a simple `ODBG` (with debug enabled) results in a segfault
because the stream has already been destructed.

In this PR, we ensure that OMPT is disconnected (in libomptarget) at
deinit at the latest and avoid doing that again if recalled from libomp.

Also, the LibraryFinalizer was never used (and in any case it should be
called before olShutDown) so simplify the disconnect to the minimum.
2026-11-19 12:42:12 +01:00
..