Bug 142224

Summary: BitStack::top() should calculate an index instead of always using m_words.last()
Product: WebKit Reporter: W. James MacLean <wjmaclean>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: All   

Description W. James MacLean 2015-03-03 10:24:44 PST
BitStack::push() calculates an index based on m_size to determine where the new entry is supposed to go.

However, BitStack::top() always looks up the bit value using m_words.last(), which can be wrong if popping elements has caused m_size to point into a word other than the last one (simple test: push 'true' 33 times, then pop() once and call top() ... it will read 'false'.)

BitStack::top() should instead calculate an index the same as push().
Comment 1 EWS 2022-12-21 07:07:02 PST
Committed 258190@main (409456bc5cee): <https://commits.webkit.org/258190@main>

Reviewed commits have been landed. Closing PR #7888 and removing active labels.
Comment 2 Radar WebKit Bug Importer 2022-12-21 07:08:16 PST
<rdar://problem/103597584>