Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a7bba6da6eaff0cb9337108aa08289f4d7aa2b0b
https://github.com/WebKit/WebKit/commit/a7bba6da6eaff0cb9337108aa08289f4d7aa2b0b
Author: Chris Dumez <[email protected]>
Date: 2026-03-27 (Fri, 27 Mar 2026)
Changed paths:
M Source/WTF/wtf/BitVector.cpp
M Tools/TestWebKitAPI/Tests/WTF/BitVector.cpp
Log Message:
-----------
BitVector::filterSlow fails to zero trailing words when other is inline
https://bugs.webkit.org/show_bug.cgi?id=310801
Reviewed by Darin Adler and Ryosuke Niwa.
When other is inline and this is out-of-line, `filterSlow` only ANDs the
first word and returns, leaving words at index 1+ untouched. Since
filter is AND and an inline BitVector has no bits beyond position 62,
all higher words should be zeroed. This causes bits at positions 64+
to incorrectly survive the filter.
Fix this by zeroing the remaining words after ANDing the first. This
matches what the both-out-of-line path already does with
`zeroSpan(a.subspan(b.size()))`.
Added an API test that filters an out-of-line BitVector with bits in
multiple words against an inline BitVector.
Test: Tools/TestWebKitAPI/Tests/WTF/BitVector.cpp
* Source/WTF/wtf/BitVector.cpp:
(WTF::BitVector::filterSlow):
* Tools/TestWebKitAPI/Tests/WTF/BitVector.cpp:
(TestWebKitAPI::TEST(WTF_BitVector, FilterOutOfLineWithInline)):
Canonical link: https://commits.webkit.org/310129@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications