Mrmaxmeier 2026-08-26 23:00:15 +0000 (Wed, 26 Aug 2026)
New Revision: 69b49ac7ae
https://github.com/ruby/ruby/commit/69b49ac7ae
Log:
hash.c: avoid signed integer overflow in ar_hint_first_match SWAR splat
This was previously flagged by ubsan because the AR_HINT_BASE_MASK
constant is implicitly typed as long:
hash.c:664:43: runtime error: signed integer overflow: 72340172838076673
* 131 cannot be represented in type 'long'
Notably, in an unsigned context, this line can't overflow
(AR_HINT_BASE_MASK is 0x0101..0101). VALUE is always an unsigned type