[Bug c/49016] always_inline causes references below the current stack pointer
merrill_707_1 at yahoo dot com
gcc-bugzilla@gcc.gnu.org
Tue May 17 13:51:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49016
--- Comment #6 from Lee Merrill <merrill_707_1 at yahoo dot com> 2011-05-17 13:29:56 UTC ---
(In reply to comment #5)
> Yeah, 128 bytes below %rsp can be freely used on x86_64, interrupts must not
> clobber those.
I should have mentioned that this is kernel driver code, so then the interrupt
does not change privilege level, and a stack switch will not occur. When an
interrupt happens, the flags / cs / ip are stored at the next 24 bytes of
stack, overwriting the variables in view here. I've seen this happen on a
standard Suse 10 x86_64 Linux machine, so this would not be just theoretical...
More information about the Gcc-bugs
mailing list