|
|
Subscribe / Log in / New account

"Strong" stack protection for GCC

"Strong" stack protection for GCC

Posted Feb 6, 2014 6:25 UTC (Thu) by eru (subscriber, #2753)
Parent article: "Strong" stack protection for GCC

In addition, any function that uses local register variables will be protected.

I don't understand this condition. How would using some "register int i" make a stack problem more likely? It seems to me it would have no effect on the issue, and when optimizing, the compiler treats "register" just as a hint that may be ignored anyway. Tried already looking at the linked gcc mailing list entry, but there was no explanation either.


to post comments

"Strong" stack protection for GCC

Posted Feb 6, 2014 11:40 UTC (Thu) by sorokin (guest, #88478) [Link] (1 responses)

User 'kees' answered this question in comment to the blog post:

"It was to catch unusual ways to get a reference to the frame address, with things like “register unsigned rsp __asm__(“rsp”);”, etc"

"Strong" stack protection for GCC

Posted Feb 6, 2014 12:52 UTC (Thu) by nix (subscriber, #2304) [Link]

Note that 'register variables' in this context are not variables declared with the obsolescent 'register' qualifier: they are registers that use the local register variable language extension.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds