WTF::HashMap crashes when mapping 0 to WTF::String? |
|
Issue description
I tried to map int to String/AtomicString, however found the following test will crash HashMap.
TEST(HashMapTest, IntToStringMapTest) {
using IntToStringMap = HashMap<int, String>;
IntToStringMap map;
map.add(0, "abc");
auto iter = map.find(0);
ASSERT_TRUE(iter != map.end());
EXPECT_EQ("abc", iter->value);
}
It happens for the key is integer 0 and the value is a String/AtomicString.
It reaches an assertion failure at HashTable.h(1243):
ASSERTION FAILED: !isEmptyOrDeletedBucket(*entry)
,
Oct 18 2016
OK, Thanks :) |
|
►
Sign in to add a comment |
|
Comment 1 by yutak@chromium.org
, Oct 18 2016