1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

use __attribute__((__no_sanitize__("memory")))

This commit is contained in:
Urabe, Shyouhei 2019-04-23 18:36:20 +09:00
parent fa09acafde
commit 572f2ddff6

View file

@ -44,7 +44,18 @@ extern "C" {
# define WARN_UNUSED_RESULT(x) x
#endif
#ifndef __has_feature
# define __has_feature(x) 0
#endif
#ifndef __has_extension
# define __has_extension __has_feature
#endif
#if 0
#elif defined(NO_SANITIZE) && __has_feature(memory_sanitizer)
# define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(x) \
NO_SANITIZE("memory", NO_SANITIZE("address", NOINLINE(x)))
#elif defined(NO_SANITIZE)
# define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(x) \
NO_SANITIZE("address", NOINLINE(x))
@ -87,14 +98,6 @@ extern "C" {
#define numberof(array) ((int)(sizeof(array) / sizeof((array)[0])))
#ifndef __has_feature
# define __has_feature(x) 0
#endif
#ifndef __has_extension
# define __has_extension __has_feature
#endif
#ifndef MJIT_HEADER
#ifdef HAVE_SANITIZER_ASAN_INTERFACE_H