diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-01-22 13:39:59 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-01-22 16:36:39 +0100 |
commit | 8539e4b1b609f8060677fcb3e27b6b6224d582d6 (patch) | |
tree | e7e284b8efe58ea162d7d43dadb8774503ab212b | |
parent | b20c3dc664314a3045fa31e2245d4613e9efa508 (diff) | |
download | mariadb-git-8539e4b1b609f8060677fcb3e27b6b6224d582d6.tar.gz |
improve ASAN instrumentation: clang
translate clang __has_feature to gcc macros
-rw-r--r-- | include/my_valgrind.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/my_valgrind.h b/include/my_valgrind.h index 9baed2e01d6..b76f5607bb5 100644 --- a/include/my_valgrind.h +++ b/include/my_valgrind.h @@ -13,6 +13,14 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* clang -> gcc */ +#ifndef __has_feature +# define __has_feature(x) 0 +#endif +#if __has_feature(address_sanitizer) +# define __SANITIZE_ADDRESS__ 1 +#endif + #ifdef HAVE_valgrind #define IF_VALGRIND(A,B) A #else |