This is the mail archive of the
mailing list for the GCC project.
Re: Do we want to add -fsanitize=function?
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Martin Liška <mliska at suse dot cz>
- Cc: GCC Development <gcc at gcc dot gnu dot org>, Marek Polacek <polacek at redhat dot com>
- Date: Tue, 14 Jan 2020 13:59:20 +0100
- Subject: Re: Do we want to add -fsanitize=function?
- References: <email@example.com> <20200114115402.GC10088@tucnak> <firstname.lastname@example.org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Jan 14, 2020 at 01:57:47PM +0100, Martin Liška wrote:
> > seems to be what they emit on x86_64. Now, wonder what they do on other
> > targets
> Other targets are not supported :P
> > , and how does it play with all the other options that add stuff
> > to the start of functions, e.g. -fcf-protection=full (where it needs to
> > really start with endbr64 instruction)
> Using the options one will get:
> _Z4savev: # @_Z4savev
> .long 846595819 # 0x327606eb
> .long .L__unnamed_2-_Z4savev
> # %bb.0:
> So endbr64 is placed after the RTTI record.
Which is wrong, this will then fail on CET hardware.