public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Zamyatin, Igor" <igor.zamyatin@intel.com>
To: Jeff Law <law@redhat.com>,
	"GCC Patches (gcc-patches@gcc.gnu.org)"	<gcc-patches@gcc.gnu.org>
Subject: RE: [PATCH, i686] Fix for asan test failures with -m32 happened after EBX enabling in PIC mode
Date: Wed, 05 Nov 2014 15:20:00 -0000	[thread overview]
Message-ID: <0EFAB2BDD0F67E4FB6CCC8B9F87D756969C25D63@IRSMSX101.ger.corp.intel.com> (raw)
In-Reply-To: <5453D872.3070402@redhat.com>

> > Hi!
> >
> > Following patch (moving initialization of pic_offset_table_rtx
> earlier) fixes failures for asan tests on 32 bits in PIC mode mentioned here -
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63534#c48
> >
> >
> > Bootstrapped/regtested on x86_64, i686
> >
> > Is it ok for trunk?
> >
> > ChangeLog:
> >
> > 2014-10-30  Igor Zamyatin  <igor.zamyatin@intel.com>
> >
> > 	* function.c (assign_parms): Move init of pic_offset_table_rtx
> > 	from here to...
> > 	* cfgexpand.c (expand_used_vars): ...here.
> The patch is probably fine.  However, it would be good to have the analysis
> why you want to move initialization of the PIC register earlier.

Asan (and anybody else can) emits global variable(s) in expand_used_vars  during function expanding while pic reg is currently initialized later, during expand_function_start in assign_parms thus to be late in asan case in PIC mode.

So to avoid such cases we put pic reg initialization in the beginning of expand_used_vars. This seems to be early enough.

Thanks,
Igor


  reply	other threads:[~2014-11-05 15:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-31 16:42 Zamyatin, Igor
2014-10-31 19:08 ` Jeff Law
2014-11-05 15:20   ` Zamyatin, Igor [this message]
2014-11-13 13:20     ` H.J. Lu
2014-11-14 17:01       ` Zamyatin, Igor
2014-11-14 17:08         ` H.J. Lu
2014-11-14 17:09           ` Zamyatin, Igor
2014-11-14 17:11             ` Jakub Jelinek
2014-11-14 17:31               ` Zamyatin, Igor
2014-11-18  0:15                 ` Jeff Law

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0EFAB2BDD0F67E4FB6CCC8B9F87D756969C25D63@IRSMSX101.ger.corp.intel.com \
    --to=igor.zamyatin@intel.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=law@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).