From: Mathieu Desnoyers Date: Fri, 22 Jan 2021 20:27:35 +0000 (-0500) Subject: aarch64: blacklist gcc prior to 5.1 X-Git-Tag: v0.12.2~2 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=466eec5563104024abf9c58a3388717f57d5e221;p=userspace-rcu.git aarch64: blacklist gcc prior to 5.1 Linux aarch64 requires GCC 5.1 or better because prior versions perform unsafe access to deallocated stack. Some Linux distributions may have backported the fix, but it was never released into earlier upstream gcc versions. Link: https://lwn.net/Articles/842122/ Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63293 Signed-off-by: Mathieu Desnoyers --- diff --git a/README.md b/README.md index dd7ebd1..8dfd5e9 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,8 @@ supported, with the following exceptions: - Alpha, ia64 and ARM architectures depend on GCC 4.x with atomic builtins support. For ARM this was introduced with GCC 4.4: http://gcc.gnu.org/gcc-4.4/changes.html. + - Linux aarch64 depends on GCC 5.1 or better because prior versions + perform unsafe access to deallocated stack. Clang version 3.0 (based on LLVM 3.0) is supported. diff --git a/include/urcu/arch/aarch64.h b/include/urcu/arch/aarch64.h index d6a1337..9e2f1ff 100644 --- a/include/urcu/arch/aarch64.h +++ b/include/urcu/arch/aarch64.h @@ -42,6 +42,15 @@ extern "C" { #define __NR_membarrier 283 #endif +/* + * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63293 + */ +#ifdef URCU_GCC_VERSION +# if URCU_GCC_VERSION < 50100 +# error Your gcc version performs unsafe access to deallocated stack +# endif +#endif + #ifdef __cplusplus } #endif