The current code does not take alloca array size into account and,
as a result, considers any access past the first array element to be
unsafe.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
| lib/Transforms/Instrumentation/SafeStack.cpp | ||
|---|---|---|
| 185 | AI can be a dynamic alloca at this point, I believe (see findInsts -> IsSafeStackAlloca -> IsAccessSafe -> getStaticAllocaAllocationSize), so this may not be a constant. | |
| lib/Transforms/Instrumentation/SafeStack.cpp | ||
|---|---|---|
| 185 | Right. Returning 0 for unknown size allocas. | |
| lib/Transforms/Instrumentation/SafeStack.cpp | ||
|---|---|---|
| 185 | This would check such allocas for safety as if they are size 0, i.e. some operations are still allowed, but not any loads or stores. | |
AI can be a dynamic alloca at this point, I believe (see findInsts -> IsSafeStackAlloca -> IsAccessSafe -> getStaticAllocaAllocationSize), so this may not be a constant.