Project

General

Profile

Bug #8680 » 0001-Enable-usage-of-AddressSanitizer-in-CRuby.patch

halfie (Ruby Guy), 09/25/2013 10:27 PM

View differences:

gc.c
#include <sys/types.h>
#include <assert.h>
#if defined(__has_feature) /* Clang */
#if __has_feature(address_sanitizer) /* is ASAN enabled? */
#define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS \
__attribute__((no_address_safety_analysis)) \
__attribute__ ((noinline))
#else
#define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS
#endif
#else
#if defined(__SANITIZE_ADDRESS__) /* GCC 4.8.x, is ASAN enabled? */
#define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS \
__attribute__((no_address_safety_analysis)) \
__attribute__ ((noinline))
#else
#define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS
#endif
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
......
#endif
}
ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS
static void
mark_locations_array(rb_objspace_t *objspace, register VALUE *x, register long n)
{
(2-2/2)