[PATCH] D17094: [safestack] Add -safe-stack-subr-acc-as-unsafe option

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 15 12:08:51 PDT 2016


pcc added a subscriber: pcc.
pcc added a comment.

Regarding the first motivation, the code is already being conservative. As far as I know, the nocapture readnone attributes are stronger than what safestack requires of a pointer. For example, they forbid loading from a pointer at a constant offset (which safestack could conceivably allow). Rather than adding this flag, we should in the long term be adding an attribute that specifically means what safestack requires.

Regarding the second motivation, if we do intend to start using segment selectors on x86 in some cases, we should probably make this behavior gated on the target (e.g. the `separate-stack-seg` feature you appear to be adding) rather than on a flag.


http://reviews.llvm.org/D17094





More information about the llvm-commits mailing list