Skip to content

Commit f4067da

Browse files
committed
Duplicate fix for phmap issue 117 - segfault when out of memory
when constructing an object to be inserted throws std::bad_alloc, the slot was mark as used (even though the object was not properly constructed), so eventually the destructor of a non-initialized object was called causing a segfault. Solution: mark the slot used only after the object is successfully constructed.
1 parent 9d7e2b2 commit f4067da

File tree

1 file changed

+147
-124
lines changed

1 file changed

+147
-124
lines changed

0 commit comments

Comments
 (0)