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

ruby-changes:53376

From: shyouhei <ko1@a...>
Date: Wed, 7 Nov 2018 14:23:09 +0900 (JST)
Subject: [ruby-changes:53376] shyouhei:r65592 (trunk): string.c: this assumption is false [ci skip]

shyouhei	2018-11-07 14:23:03 +0900 (Wed, 07 Nov 2018)

  New Revision: 65592

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=65592

  Log:
    string.c: this assumption is false [ci skip]
    
    Looking at the lines right above, it is clear than a blue sky
    that we cannot assume `p` to be aligned at all when
    UNALIGNED_WORD_ACCESS is true.  It is a wrong idea to use
    __builtin_assume_aligned for that situation.
    
    See also: https://travis-ci.org/ruby/ruby/jobs/451710732#L2007

  Modified files:
    trunk/string.c
Index: string.c
===================================================================
--- string.c	(revision 65591)
+++ string.c	(revision 65592)
@@ -490,7 +490,7 @@ search_nonascii(const char *p, const cha https://github.com/ruby/ruby/blob/trunk/string.c#L490
 	    }
 	}
 #endif
-#ifdef HAVE_BUILTIN___BUILTIN_ASSUME_ALIGNED
+#if defined(HAVE_BUILTIN___BUILTIN_ASSUME_ALIGNED) &&! UNALIGNED_WORD_ACCESS
 #define aligned_ptr(value) \
         __builtin_assume_aligned((value), sizeof(uintptr_t))
 #else

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

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