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:
parent
fa09acafde
commit
572f2ddff6
1 changed files with 11 additions and 8 deletions
19
internal.h
19
internal.h
|
@ -44,7 +44,18 @@ extern "C" {
|
||||||
# define WARN_UNUSED_RESULT(x) x
|
# define WARN_UNUSED_RESULT(x) x
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __has_feature
|
||||||
|
# define __has_feature(x) 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __has_extension
|
||||||
|
# define __has_extension __has_feature
|
||||||
|
#endif
|
||||||
|
|
||||||
#if 0
|
#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)
|
#elif defined(NO_SANITIZE)
|
||||||
# define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(x) \
|
# define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(x) \
|
||||||
NO_SANITIZE("address", NOINLINE(x))
|
NO_SANITIZE("address", NOINLINE(x))
|
||||||
|
@ -87,14 +98,6 @@ extern "C" {
|
||||||
|
|
||||||
#define numberof(array) ((int)(sizeof(array) / sizeof((array)[0])))
|
#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
|
#ifndef MJIT_HEADER
|
||||||
|
|
||||||
#ifdef HAVE_SANITIZER_ASAN_INTERFACE_H
|
#ifdef HAVE_SANITIZER_ASAN_INTERFACE_H
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue