From 74fe1cc3d9826aeafa281709397c75e63e617fb6 Mon Sep 17 00:00:00 2001 From: shyouhei Date: Wed, 7 Nov 2018 05:23:03 +0000 Subject: [PATCH] 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 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/string.c b/string.c index 42f9b53148..5a5cbb576c 100644 --- a/string.c +++ b/string.c @@ -490,7 +490,7 @@ search_nonascii(const char *p, const char *e) } } #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