[libcxx-commits] [PATCH] D148630: [libc++abi] Make the error message for recursive initialization of function-local statics more explicit
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Apr 19 13:18:28 PDT 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG59736ceb8d45: [libc++abi] Make the error message for recursive initialization of function… (authored by ldionne).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148630/new/
https://reviews.llvm.org/D148630
Files:
libcxxabi/src/cxa_guard_impl.h
Index: libcxxabi/src/cxa_guard_impl.h
===================================================================
--- libcxxabi/src/cxa_guard_impl.h
+++ libcxxabi/src/cxa_guard_impl.h
@@ -255,7 +255,7 @@
if (*init_byte_address == COMPLETE_BIT)
return true;
if (*init_byte_address & PENDING_BIT)
- ABORT_WITH_MESSAGE("__cxa_guard_acquire detected recursive initialization");
+ ABORT_WITH_MESSAGE("__cxa_guard_acquire detected recursive initialization: do you have a function-local static variable whose initialization depends on that function?");
*init_byte_address = PENDING_BIT;
return false;
}
@@ -325,7 +325,7 @@
// Check for possible recursive initialization.
if (has_thread_id_support && (*init_byte_address & PENDING_BIT)) {
if (*thread_id_address == current_thread_id.get())
- ABORT_WITH_MESSAGE("__cxa_guard_acquire detected recursive initialization");
+ ABORT_WITH_MESSAGE("__cxa_guard_acquire detected recursive initialization: do you have a function-local static variable whose initialization depends on that function?");
}
// Wait until the pending bit is not set.
@@ -460,7 +460,7 @@
// Check for recursive initialization
if (has_thread_id_support && thread_id.load(std::_AO_Relaxed) == current_thread_id.get()) {
- ABORT_WITH_MESSAGE("__cxa_guard_acquire detected recursive initialization");
+ ABORT_WITH_MESSAGE("__cxa_guard_acquire detected recursive initialization: do you have a function-local static variable whose initialization depends on that function?");
}
if ((last_val & WAITING_BIT) == 0) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148630.515066.patch
Type: text/x-patch
Size: 1650 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230419/ec54ce76/attachment-0001.bin>
More information about the libcxx-commits
mailing list