[Webkit-unassigned] [Bug 70691] BitVector isInline check could fail
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Oct 23 11:33:08 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=70691
Geoffrey Garen <ggaren at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ggaren at apple.com
--- Comment #2 from Geoffrey Garen <ggaren at apple.com> 2011-10-23 11:33:08 PST ---
> One possible fix is to use the lowest bit of m_bitsOrPointer to indicate inline or outofline, based on the assumption that the pointer to OutOfLineBits should be 4 or 8 byte aligned (please correct me if we can safely make this assumption).
I think this is a reasonable assumption.
You can do two things to make your assumption clearer to the reader:
(1) Add an ASSERT(!isInline()) at the end of BitVector::resizeOutOfLine()
(2) Add a comment above the declaration of m_bitsOrPointer explaining what the low bit means:
"The low bit of m_bitsOrPointer is a flag indicating whether this field is inline bits or a pointer to out of line bits. If the flag is set, the field is inline bits. This works because the low bit in a pointer is always unset."
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list