public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jan Hubicka <hubicka@ucw.cz>
To: Ilya Enkovich <enkovich.gnu@gmail.com>
Cc: Jan Hubicka <hubicka@ucw.cz>, gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: Fix ice on comdat groups with -check-pointer-bounds
Date: Mon, 30 Mar 2015 17:20:00 -0000	[thread overview]
Message-ID: <20150330172019.GD14471@atrey.karlin.mff.cuni.cz> (raw)
In-Reply-To: <20150330113121.GA52842@msticlxl57.ims.intel.com>

> On 30 Mar 14:05, Ilya Enkovich wrote:
> > 2015-03-27 18:23 GMT+03:00 Jan Hubicka <hubicka@ucw.cz>:
> > > Index: symtab.c
> > > ===================================================================
> > > --- symtab.c    (revision 221734)
> > > +++ symtab.c    (working copy)
> > > @@ -1130,15 +1130,20 @@ symtab_node::verify_symtab_nodes (void)
> > >                                                   &existed);
> > >           if (!existed)
> > >             *entry = node;
> > > -         else
> > > -           for (s = (*entry)->same_comdat_group; s != NULL && s != node; s = s->same_comdat_group)
> > > +         else if (!DECL_EXTERNAL (node->decl))
> > > +           {
> > > +             for (s = (*entry)->same_comdat_group; s != NULL && s != node;
> > > +                  s = s->same_comdat_group)
> > > +               ;
> > 
> > With no if-statement in the loop body you need an additional exit
> > condition for a case when you reach the entry.
> > 
> > Thanks,
> > Ilya
> > 
> 
> Here is a patch to add a testcase, fix the loop and avoid same_comdat_group for instrumented external symbols.  Does it look OK?

OK
> 
> BTW should we check same_comdat_group is NULL for external symbols?

We could do that, yes.  If you can come with a patch, it is OK for next stage1.

Honza

  reply	other threads:[~2015-03-30 17:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-27 15:23 Jan Hubicka
2015-03-30  9:59 ` Ilya Enkovich
2015-03-30 11:05 ` Ilya Enkovich
2015-03-30 11:31   ` Ilya Enkovich
2015-03-30 17:20     ` Jan Hubicka [this message]
2015-03-31 11:43       ` Ilya Enkovich

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=20150330172019.GD14471@atrey.karlin.mff.cuni.cz \
    --to=hubicka@ucw.cz \
    --cc=enkovich.gnu@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    /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).