[前][次][番号順一覧][スレッド一覧]

ruby-changes:30968

From: nobu <ko1@a...>
Date: Thu, 26 Sep 2013 14:47:02 +0900 (JST)
Subject: [ruby-changes:30968] nobu:r43047 (trunk): gc.c: disable AddressSanitizer

nobu	2013-09-26 14:46:52 +0900 (Thu, 26 Sep 2013)

  New Revision: 43047

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43047

  Log:
    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]

  Modified files:
    trunk/ChangeLog
    trunk/gc.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 43046)
+++ ChangeLog	(revision 43047)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Sep 26 14:46:49 2013  Nobuyoshi Nakada  <nobu@r...>
+
+	* 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@a...>
 
 	* README.EXT, README.EXT.ja: remove description of RARRAY_PTR()
Index: gc.c
===================================================================
--- gc.c	(revision 43046)
+++ gc.c	(revision 43047)
@@ -31,6 +31,16 @@ https://github.com/ruby/ruby/blob/trunk/gc.c#L31
 #include <sys/types.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
 #include <sys/time.h>
 #endif
@@ -2685,6 +2695,7 @@ ruby_stack_check(void) https://github.com/ruby/ruby/blob/trunk/gc.c#L2695
 #endif
 }
 
+ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS
 static void
 mark_locations_array(rb_objspace_t *objspace, register VALUE *x, register long n)
 {

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]