[PATCH] D33858: [PDB] Fix use after free.

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 2 17:25:05 PDT 2017


zturner added a comment.

Also, no current code was exercising this bug which is why it never surfaced on ASAN bots.  It's difficult to generate a PDB that is guaranteed to exhibit this problem, so instead a unit test is used.  The unit test arranges the blocks of a fabricated `MappedBlockStream` so that it's guaranteed to allocate from the temporary allocator, and then it ensures that this data lives after the stream is destroyed.


https://reviews.llvm.org/D33858





More information about the llvm-commits mailing list