Issue 86684
Summary OpenMP runtime might try to take the bootstrap lock twice and deadlock
Labels new issue
Assignees
Reporter jprotze
    This was initially reported here (including stacktraces): https://stackoverflow.com/questions/78183545/does-compiling-imagick-with-openmp-enabled-in-freebsd-13-2-cause-sched-yield

If `__kmp_register_library_startup` detects that another instance of the library is present, `__kmp_is_address_mapped` is eventually called. It calles `__kmp_str_format`, which uses `kmpc_alloc` to allocate memory for the string. This function calls `__kmp_entry_thread` to access the thread-local memory pool, which seems a bad idea during initialization. This macro internally calls `__kmp_get_global_thread_id_reg` which set the bootstrap look at the beginning (before calling `__kmp_register_library_startup`).
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to