aarch64: blacklist gcc prior to 5.1
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 22 Jan 2021 20:27:35 +0000 (15:27 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 22 Jan 2021 20:27:35 +0000 (15:27 -0500)
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 <mathieu.desnoyers@efficios.com>
README.md
include/urcu/arch/aarch64.h

index dd7ebd1c39cf6b5d2182c04522caed31cddbd35f..8dfd5e96a62ab2cc048e54e26a111bcc7b357894 100644 (file)
--- 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.
 
index d6a133758dffca0c22ca5f6e94314c4c6d0d5390..9e2f1ffdb6d09ee93c12692a77db3866a69de9e3 100644 (file)
@@ -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
This page took 0.02592 seconds and 4 git commands to generate.