This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix ubsan ICE (PR sanitizer/79897)
- From: Richard Biener <rguenther at suse dot de>
- To: Jeff Law <law at redhat dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 7 Mar 2017 09:01:59 +0100 (CET)
- Subject: Re: [PATCH] Fix ubsan ICE (PR sanitizer/79897)
- Authentication-results: sourceware.org; auth=none
- References: <20170306225832.GI22703@tucnak> <63cd3973-df4a-5375-7059-c707cbc70721@redhat.com>
On Mon, 6 Mar 2017, Jeff Law wrote:
> On 03/06/2017 03:58 PM, Jakub Jelinek wrote:
> > Hi!
> >
> > Apparently fold_build_addr_expr doesn't make the argument addressable,
> > it is only made addressable during following gimplification and that is too
> > late here.
> Yea. There's some special stuff going on here. I've never dug into the
> details myself -- Richi knows it better than I.
You can't generally make things addressable out of thin air unless you
know what you're doing (and fold_build_addr_expr is called all over the
place). This is because doing that generally needs adjustment of
points-to-info.
> >
> > Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for
> > trunk?
> >
> > 2017-03-06 Jakub Jelinek <jakub@redhat.com>
> >
> > PR sanitizer/79897
> > * ubsan.c (ubsan_encode_value): Call mark_addressable on the
> > temporary.
> IMHO, you've got carte blanche in the sanitizer bits. So Ok.
Yes, looks like the correct fix.
Richard.