Hadn't heard that before, but you're right. Here's what the propolice docs say: "When you specify the option -O3, the protection instruments may be eliminated by the optimizer." So, it doesn't necessarily make propolice ineffective, but depending on the code, some optimizations might make stack protection impossible. Based on the difference between -O3 and -O2, this implies that there's something about -finline-functions and/or -frename-registers that's the source of the potential ineffectiveness. Whatever the details, no matter -- I'd rather take the chance with -fstack-protector that it can make a difference, even if only in some circumstances. Besides, now that I'll be using -Os, I can add improved propolice functionality to the list of benefits.siti wrote:ozonator: On a side note I have read that you make Propolice ineffective when enabling -O3
As for there being a performance hit with propolice, the propolice docs indicate that there can a performance hit of up to 8%, but in practice it should be much less than that (4% is the maximum hit they report with a 'real world' program); depending on the program, it might be nil. I didn't check for a performance hit myself, since I'd rather increase my chances of having secure code by using it. The only thing I can offer is that I also use OpenBSD, which implemented propolice system-wide a little over a year ago; I don't recall noticing any difference in speed when moving to the newly-compiled version.




