From: Paul Eggert Date: Wed, 23 Apr 2014 18:23:28 +0000 (-0700) Subject: * conf_post.h (ADDRESS_SANITIZER_WORKAROUND): Port to GCC 4.9.0 X-Git-Tag: emacs-25.0.90~2640^2~191 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=417c9bcba10006e773e24cbed1ddb9b16712ceb0;p=emacs.git * 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. --- diff --git a/src/ChangeLog b/src/ChangeLog index fdbf922173b..1a4c29f2580 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2014-04-23 Paul Eggert + + * 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 Port to GCC 4.9.0 with --enable-gcc-warnings. diff --git a/src/conf_post.h b/src/conf_post.h index 2e78c2f5e25..95b028a66ee 100644 --- a/src/conf_post.h +++ b/src/conf_post.h @@ -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