[PATCH] Implement variable-sized alloca instrumentation (take 2).
Kostya Serebryany
kcc at google.com
Thu Feb 26 10:29:59 PST 2015
> > Note that number of allocas is not known statically so in general you'll need a dynamically growing array.
>
Haha, no.
While you don't know the number of allocas, their total size is limited by the size of the stack,
so you can pre-allocate an array at the thread start up.
dynamically growing array in a hot spot in asan is not wise.
We better allocate a bit extra space (maybe with MAP_NORESERVE)
So, maybe we simply use the existing fake stack (in use-after-return mode, or maybe even by default?) to simulate dynamic alloca?
REPOSITORY
rL LLVM
http://reviews.llvm.org/D7098
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list