[cfe-dev] Bug in MapVector::erase ?

Yaron Keren yaron.keren at gmail.com
Tue Jul 15 07:17:57 PDT 2014


+llvmdev +Oliver. MapVector::erase was added in r211273.

To avoid duplications, MapVector stores Values inside the vector only,
while the map caches key->indices to the vector.

When a value is erased from the MapVector, it is removed from the vector,
invalidating the cached vector indices stored in the map, so the map points
to wrong locations and the MapVector is corrupted.
--
Yaron

>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140715/7a552d86/attachment.html>


More information about the cfe-dev mailing list