[LLVMdev] [PROPOSAL] Adding support for -fstack-protector-strong

David Chisnall David.Chisnall at cl.cam.ac.uk
Tue Oct 2 00:40:26 PDT 2012

On 2 Oct 2012, at 03:26, Magee, Josh wrote:

>    1) An address of a local variable is taken in such a way as to expose the
>       address of a stack location.
>      - Example: the address of a local on the RHS of an assignment, the
>        address of a local passed into function.

This sounds like something that would be triggered for any function containing a block, even if the block doesn't do anything that is potentially unsafe.  It also sounds like it would be triggered for a lot of C++ function s that allocates an object on the stack and call methods on them.  Is it possible to tighten up the heuristic slightly so that this isn't the case?  For blocks, in particular, you always have the IR for the block invoke function available in the compilation unit where you are creating the block (on the stack) and so you can potentially verify at compile time whether it is doing anything unsafe to any of the bound variables.  


More information about the llvm-dev mailing list