[webkit-reviews] review denied: [Bug 130509] HashTable::add() works wrong when inserting of an empty value causes rehash : [Attachment 227288] patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 20 09:08:49 PDT 2014


Darin Adler <darin at apple.com> has denied Mikhail Pozdnyakov
<mikhail.pozdnyakov at intel.com>'s request for review:
Bug 130509: HashTable::add() works wrong when inserting of an empty value
causes rehash
https://bugs.webkit.org/show_bug.cgi?id=130509

Attachment 227288: patch
https://bugs.webkit.org/attachment.cgi?id=227288&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=227288&action=review


> Tools/TestWebKitAPI/Tests/WTF/HashMap.cpp:158
> +    ASSERT_TRUE(map.add(0, 0).iterator.get());

This doesn’t look right. We don’t support adding map entries where the key has
the empty or deleted value. And 0 is the empty value from HashTraits<int>. So
calling add(0, 0) is illegal and should cause an assertion in a debug build and
undefined behavior in a release build.


More information about the webkit-reviews mailing list