1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
shyouhei 2018-11-07 05:23:03 +00:00
parent 4d3c254ebe
commit 74fe1cc3d9

View file

@ -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