gc.c: disable AddressSanitizer

* gc.c (mark_locations_array): disable AddressSanitizer.  based on a
  patch by halfie (Ruby Guy) at [ruby-core:57372].
  [ruby-core:56155] [Bug #8680]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2013-09-26 05:46:52 +00:00
Родитель f1e99541b5
Коммит 2bf5be1db5
2 изменённых файлов: 17 добавлений и 0 удалений

Просмотреть файл

@ -1,3 +1,9 @@
Thu Sep 26 14:46:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* gc.c (mark_locations_array): disable AddressSanitizer. based on a
patch by halfie (Ruby Guy) at [ruby-core:57372].
[ruby-core:56155] [Bug #8680]
Wed Sep 25 17:41:29 2013 Koichi Sasada <ko1@atdot.net> Wed Sep 25 17:41:29 2013 Koichi Sasada <ko1@atdot.net>
* README.EXT, README.EXT.ja: remove description of RARRAY_PTR() * README.EXT, README.EXT.ja: remove description of RARRAY_PTR()

11
gc.c
Просмотреть файл

@ -31,6 +31,16 @@
#include <sys/types.h> #include <sys/types.h>
#include <assert.h> #include <assert.h>
#if /* is ASAN enabled? */ defined(__has_feature) ? \
__has_feature(address_sanitizer) /* Clang */ : \
defined(__SANITIZE_ADDRESS__) /* GCC 4.8.x */
#define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS \
__attribute__((no_address_safety_analysis)) \
__attribute__((noinline))
#else
#define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS
#endif
#ifdef HAVE_SYS_TIME_H #ifdef HAVE_SYS_TIME_H
#include <sys/time.h> #include <sys/time.h>
#endif #endif
@ -2685,6 +2695,7 @@ ruby_stack_check(void)
#endif #endif
} }
ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS
static void static void
mark_locations_array(rb_objspace_t *objspace, register VALUE *x, register long n) mark_locations_array(rb_objspace_t *objspace, register VALUE *x, register long n)
{ {