X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FSupport%2FAllocator.h;fp=include%2Fllvm%2FSupport%2FAllocator.h;h=043d823146091ef083f5d602602fbf7845e6dcf7;hb=37aa498e312aab2e7ddb22f687c1b7a32d679d0c;hp=c608736fa95616f74dd65341550140da53351614;hpb=ea5802f21214d1a606eb3fe6239bda938f9bd006;p=oota-llvm.git diff --git a/include/llvm/Support/Allocator.h b/include/llvm/Support/Allocator.h index c608736fa95..043d8231460 100644 --- a/include/llvm/Support/Allocator.h +++ b/include/llvm/Support/Allocator.h @@ -187,6 +187,7 @@ public: /// \brief Deallocate all but the current slab and reset the current pointer /// to the beginning of it, freeing all memory allocated so far. void Reset() { + // Deallocate all but the first slab, and deallocate all custom-sized slabs. DeallocateCustomSizedSlabs(); CustomSizedSlabs.clear(); @@ -198,7 +199,7 @@ public: CurPtr = (char *)Slabs.front(); End = CurPtr + SlabSize; - // Deallocate all but the first slab, and deallocate all custom-sized slabs. + __asan_poison_memory_region(*Slabs.begin(), computeSlabSize(0)); DeallocateSlabs(std::next(Slabs.begin()), Slabs.end()); Slabs.erase(std::next(Slabs.begin()), Slabs.end()); }