mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
workaround C++ism in ASAN header
See also: 451299690
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3f97d88ac4
commit
bb2ee549ef
1 changed files with 4 additions and 0 deletions
|
@ -95,6 +95,8 @@ extern "C" {
|
||||||
# define __has_extension __has_feature
|
# define __has_extension __has_feature
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef MJIT_HEADER
|
||||||
|
|
||||||
#ifdef HAVE_SANITIZER_ASAN_INTERFACE_H
|
#ifdef HAVE_SANITIZER_ASAN_INTERFACE_H
|
||||||
# include <sanitizer/asan_interface.h>
|
# include <sanitizer/asan_interface.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -149,6 +151,8 @@ unpoison_object(VALUE obj, bool newobj_p)
|
||||||
unpoison_memory_region(ptr, SIZEOF_VALUE, newobj_p);
|
unpoison_memory_region(ptr, SIZEOF_VALUE, newobj_p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Prevent compiler from reordering access */
|
/* Prevent compiler from reordering access */
|
||||||
#define ACCESS_ONCE(type,x) (*((volatile type *)&(x)))
|
#define ACCESS_ONCE(type,x) (*((volatile type *)&(x)))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue