[PATCH] D87237: [ADT] Add ASAN Support for SmallVector

Nathan James via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 7 07:37:46 PDT 2020


njames93 created this revision.
Herald added subscribers: llvm-commits, dexonsmith, hiraditya.
Herald added a project: LLVM.
njames93 requested review of this revision.

Mark addresses that are currently unused in a SmallVector as poisoned. This can help catch some iterator invalidation bugs when the SmallVector grows.

Running the ADTTest suite found an iterator invalidation bug in SmallVectorImpl<T>::insert(iterator, const T&) when the item to insert is contained inside the SmallVector.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D87237

Files:
  llvm/include/llvm/ADT/SmallString.h
  llvm/include/llvm/ADT/SmallVector.h
  llvm/lib/Support/Twine.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87237.290286.patch
Type: text/x-patch
Size: 9331 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200907/57450ce5/attachment.bin>


More information about the llvm-commits mailing list