[PATCH] D40863: [AArch64][Darwin] Implement stack probing for static and dynamic stack objects

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 5 15:23:08 PST 2017


aemerson added a comment.

In https://reviews.llvm.org/D40863#945833, @MatzeB wrote:

> It would be helpful to describe somewhere what exactly stack probing is. Maybe add more comments to emitStackProbe() and the commit message.
>
> Is it one of those situations where you have to touch the OS pages backing stack memory one after the other (instead of accidentally jumping across pages for big arrays)?


Yes, that's correct. The default implementation I've created in https://reviews.llvm.org/D40857 in compiler-rt loads data in 4096 (=page size) byte intervals. This ensures that the stack guard page is always hit. I'll add some comments to the code as you suggest. However the implementation in compiler-rt has a weakly defined symbol and may be overridden at link time so I'm reticent to define what the probe function does *exactly* in the compiler.


Repository:
  rL LLVM

https://reviews.llvm.org/D40863





More information about the llvm-commits mailing list