This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
question about the usage of DECL_INCOMING_RTL in a stack-smashing protector
- From: Hiroaki Etoh <ETOH at jp dot ibm dot com>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 5 Feb 2004 10:32:15 +0900
- Subject: question about the usage of DECL_INCOMING_RTL in a stack-smashing protector
- Sensitivity:
I am developing a stack protection tool (
http://www.research.ibm.com/trl/projects/security/ssp). The tool is a kind
of program translator in a RTL code level. In order to prevent the
corruption of pointers from stack smashing attacks, the tool changes the
location of pointers in function arguments to a pseudo register, which
will be assigned to the stack when the register is spilled out from the
assignment of hard registers.
To maintain the location of arguments for gdb, I am setting the pseudo
register to DECL_INCOMING_RTL after rtl generation. I examined that
register allocator allocates a hard register or a stack region for that
pseudo and it also changes DECL_INCOMING_RTL to the right location.
I'd like to know issues about setting a pseudo register to
DECL_INCOMING_RTL.
Hiroaki Etoh, Tokyo Research Laboratory, IBM Japan
----- Forwarded by Hiroaki Etoh/Japan/IBM on 2004/01/19 10:04 -----
Josef Zlomek <zlomekj@suse.cz> wrote on 2004/01/02 22:24:43:
> I noticed you are setting a pseudoregister to DECL_INCOMING_RTL.
> IMHO (according to comment in tree.h for DECL_INCOMING_RTL and my
experience
> with it) it may contain only memory or hard registers. When
registerallocator
> allocates a hard register for that pseudo you should change
DECL_INCOMING_RTL
> too. Or maybe you should set DECL_RTL instead of DECL_INCOMING_RTL.
> Please ask on gcc@gcc.gnu.org mailing list.
>
> Josef