* conf_post.h (ADDRESS_SANITIZER_WORKAROUND): Port to GCC 4.9.0
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 23 Apr 2014 18:23:28 +0000 (11:23 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 23 Apr 2014 18:23:28 +0000 (11:23 -0700)
and to clang 3.4, which have fixed the bug.  This should let us
run a bit faster on these platforms when address sanitization is
in effect.

src/ChangeLog
src/conf_post.h

index fdbf922..1a4c29f 100644 (file)
@@ -1,3 +1,10 @@
+2014-04-23  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * conf_post.h (ADDRESS_SANITIZER_WORKAROUND): Port to GCC 4.9.0
+       and to clang 3.4, which have fixed the bug.  This should let us
+       run a bit faster on these platforms when address sanitization is
+       in effect.
+
 2014-04-22  Paul Eggert  <eggert@cs.ucla.edu>
 
        Port to GCC 4.9.0 with --enable-gcc-warnings.
index 2e78c2f..95b028a 100644 (file)
@@ -226,14 +226,14 @@ extern void _DebPrint (const char *fmt, ...);
 
 /* Work around GCC bug 59600: when a function is inlined, the inlined
    code may have its addresses sanitized even if the function has the
-   no_sanitize_address attribute.  This bug is present in GCC 4.8.2
-   and clang 3.3, the latest releases as of December 2013, and the
-   only platforms known to support address sanitization.  When the bug
-   is fixed the #if can be updated accordingly.  */
-#if ADDRESS_SANITIZER
-# define ADDRESS_SANITIZER_WORKAROUND NO_INLINE
+   no_sanitize_address attribute.  This bug is fixed in GCC 4.9.0 and
+   clang 3.4.  */
+#if (! ADDRESS_SANITIZER \
+     || ((4 < __GNUC__ + (9 <= __GNUC_MINOR__)) \
+        || 3 < __clang_major__ + (4 <= __clang_minor__)))
+# define ADDRESS_SANITIZER_WORKAROUND /* No workaround needed.  */
 #else
-# define ADDRESS_SANITIZER_WORKAROUND
+# define ADDRESS_SANITIZER_WORKAROUND NO_INLINE
 #endif
 
 /* Attribute of functions whose code should not have addresses