[Openmp-commits] [openmp] [libomp] Fix hang when a fatal error is raised before library registration (PR #215988)
Robert Imschweiler via Openmp-commits
openmp-commits at lists.llvm.org
Mon Aug 17 00:22:42 PDT 2026
================
@@ -6918,6 +6927,13 @@ void __kmp_register_library_startup(void) {
void __kmp_unregister_library(void) {
+ // The library can be torn down before it ever registered itself, e.g. when
+ // __kmp_abort_process() runs for a fatal error raised during environment
+ // parsing. There is nothing to unregister then, and __kmp_registration_str
+ // is still NULL, so the strcmp() below would dereference it.
+ if (__kmp_registration_flag == 0)
+ return;
----------------
ro-i wrote:
yeah, I'll do a follow-up
https://github.com/llvm/llvm-project/pull/215988
More information about the Openmp-commits
mailing list