[PATCH] Implement variable-sized alloca instrumentation (take 2).
Kostya Serebryany
kcc at google.com
Fri Feb 27 17:02:00 PST 2015
> Right, that's why we originally proposed lists. Wouldn't this be much simpler?
There is nothing simpler than a non-resizable array :)
I still urge you to find a solution w/o lists, I think it's possible.
If nothing good shows up, ok, let's do lists, but in the asan-runtime (as opposed to compiler module)
try to minimize the amount of compiler changes. something like
1. all dynamic alloca() are replaced with __asan_dynamic_alloca which will use fake stack in use-after-return mode and real stack (with redzones) in base mode.
2. at all RET instructions __asan_release_dynamic_allocas is called, but in presence of exceptions/longjmp there is a backup recovery mechanism.
>
>
> > So, maybe we simply use the existing fake stack (in use-after-return mode, or maybe even by default?) to simulate dynamic alloca?
>
>
> I'd oppose to that - fake stacks pose unacceptable RAM overheads for mobile devices.
Fair enough.
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