[PATCH] D43834: Fix use after free in PDB linker.

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 27 14:51:58 PST 2018


rnk added a comment.

How many bytes does a PDB session allocator end up holding? Try the debug CRT PDB, since it's the most common one. I suspect it holds a ton of temporary data that we really should throw away after closing the type server PDB.

A different way of fixing this would be to disable the optimization that skips copying records without type indices.

Or, why are these non-remapped records even being copied into BumpPtrAllocator memory? Why don't they come directly from the PDB's MemoryBuffer? Can we extend the life of the memory mapped PDB instead? That memory is shared with the FS cache, and is much cheaper to keep around.


https://reviews.llvm.org/D43834





More information about the llvm-commits mailing list