]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
error if the stack base and size cannot be determined when using ASAN 12152/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 4 Nov 2022 09:04:01 +0000 (10:04 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 4 Nov 2022 09:04:01 +0000 (10:04 +0100)
pdns/mtasker.hh

index c1806a8241441c93b7e14827390ae927ecf130c1..0097a1e8ad33350deb4e516764e27b602809b7f0 100644 (file)
@@ -104,10 +104,11 @@ public:
     pthread_getattr_np(pthread_self(), &attr);
     pthread_attr_getstack(&attr, &t_mainStack, &t_mainStackSize);
     pthread_attr_destroy(&attr);
-#endif
-#if defined(HAVE_PTHREAD_GET_STACKSIZE_NP) && defined(HAVE_PTHREAD_GET_STACKADDR_NP)
+#elif defined(HAVE_PTHREAD_GET_STACKSIZE_NP) && defined(HAVE_PTHREAD_GET_STACKADDR_NP)
     t_mainStack = pthread_get_stackaddr_np(pthread_self());
     t_mainStackSize = pthread_get_stacksize_np(pthread_self());
+#else
+#error Cannot determine stack size and base on this platform
 #endif
 
 #endif /* HAVE_FIBER_SANITIZER */