Alan Wu 2025-11-27 02:59:37 +0000 (Thu, 27 Nov 2025)
New Revision: d209e6f1c0
https://github.com/ruby/ruby/commit/d209e6f1c0
Log:
search_nonascii(): Replace UB pointer cast with memcpy
Casting a pointer to create an unaligned one is undefined behavior in C
standards. Use memcpy to express the unaligned load instead to play by
the rules.
Practically, this yields the same binary output in many situations
while fixing the crash in [Bug #21715].
Modified files:
string.c