Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save vvavrychuk/a97f4ae1af0123eadf42 to your computer and use it in GitHub Desktop.
Save vvavrychuk/a97f4ae1af0123eadf42 to your computer and use it in GitHub Desktop.
diff --git a/src/cxa_guard.cpp b/src/cxa_guard.cpp
index b22fcbb..c6ac89f 100644
--- a/src/cxa_guard.cpp
+++ b/src/cxa_guard.cpp
@@ -187,6 +187,7 @@ void __cxa_guard_abort(guard_type* guard_object)
int __cxa_guard_acquire(guard_type* guard_object)
{
+ char* initialized = (char*)guard_object;
if (pthread_mutex_lock(&guard_mut))
abort_message("__cxa_guard_acquire failed to acquire mutex");
int result = *initialized == 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment