[compiler-rt] [AIX][PGO] Handle atexit functions when dlclose'ing shared libraries (PR #102940)

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 27 15:02:05 PDT 2024


================
@@ -1259,7 +1259,7 @@ int __llvm_profile_register_write_file_atexit(void) {
   lprofSetupValueProfiler();
 
   HasBeenRegistered = 1;
-  return atexit(writeFileWithoutReturn);
+  return lprofAtExit(writeFileWithoutReturn);
----------------
vitalybuka wrote:

`fn_stack_push` tries to be thread safe, but this `HasBeenRegistered` assignment is not.

https://github.com/llvm/llvm-project/pull/102940


More information about the llvm-commits mailing list