From: Otto Moerbeek Date: Fri, 4 Nov 2022 09:04:01 +0000 (+0100) Subject: error if the stack base and size cannot be determined when using ASAN X-Git-Tag: dnsdist-1.8.0-rc1~230^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7aeadc2ff0e2649c5230fa7fdc203749d9eac93c;p=thirdparty%2Fpdns.git error if the stack base and size cannot be determined when using ASAN --- diff --git a/pdns/mtasker.hh b/pdns/mtasker.hh index c1806a8241..0097a1e8ad 100644 --- a/pdns/mtasker.hh +++ b/pdns/mtasker.hh @@ -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 */