public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: David Edelsohn <dje.gcc@gmail.com>
To: Richard Biener <richard.guenther@gmail.com>
Cc: Richard Biener <rguenther@suse.de>,
	GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: genmatch infinite loop during bootstrap on AIX
Date: Thu, 30 Oct 2014 14:29:00 -0000	[thread overview]
Message-ID: <CAGWvnynDX6VqPWPjeK83Goxdtm5UmR=pz0xD2Rj-pc+S2gjyvQ@mail.gmail.com> (raw)
In-Reply-To: <CAFiYyc178vbTAjWH49N=hLTMZEAs81vs=TBHP-Y3Cnkv0X4qeQ@mail.gmail.com>

On Thu, Oct 30, 2014 at 4:51 AM, Richard Biener
<richard.guenther@gmail.com> wrote:
> On Wed, Oct 29, 2014 at 6:13 PM, David Edelsohn <dje.gcc@gmail.com> wrote:
>> On Wed, Oct 29, 2014 at 9:24 AM, Richard Biener
>> <richard.guenther@gmail.com> wrote:
>>
>>> Because only genmatch calls functions from libstdc++.  Btw, why
>>> would genmatch miscompile an empty function or the call to it?
>>
>> I tried bootstrapping with libstdc++ built without the AIX ld "-G"
>> flag and that is succeeding.
>>
>> "-G" produces a shared object for use with SVR4-style runtime linking,
>> so this version of libstdc++ no longer allows runtime function
>> interposition, e.g., operator new, although it is not used frequently.
>> Something about the GCC-produced tail calls is interacting badly with
>> that feature.
>>
>> Note that this makes GCC bootstrap on AIX very fragile at the moment
>> because it depends on how libstdc++ was built in previous releases.  I
>> can bootstrap with GCC 4.6.3 and 4.8.1 but not with 4.7.3, 4.8.0, nor
>> 4.9.0.  A problematic libstdc++ from earlier releases causes genmatch
>> to loop in stage 1.
>
> I see.  A bootstrap with IPA ICF disabled did not succeed but runs into
> the same issue in stage2.  So I wonder if the issue is latent for much
> longer and genmatch just exposes it now.
>
> I'll see if I can remove the use of std::map from genmatch as a
> workaround.

I assume that this is a pervasive issue in the interaction between GCC
optimizations and AIX -G linker option. Something expects the second
call to point to a different implementation. I don't know if the
address in the TOC (GOT) is wrong or something expects the second call
to use a different TOC, but there is a circular reference.

I am going to apply a patch to GCC to not build libstdc++ with -G.  I
also will apply it to GCC 4.9 branch.  I was hoping that it could be
included in GCC 4.9.2, but I needed to test it thoroughly and Jakub
beat me with the release.

- David

  reply	other threads:[~2014-10-30 14:15 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-24 23:37 David Edelsohn
2014-10-25  8:08 ` Richard Biener
2014-10-25 14:05   ` David Edelsohn
2014-10-25 15:16   ` David Edelsohn
2014-10-25 17:40     ` David Edelsohn
     [not found]       ` <CAGWvnynWYR5FYctJTa2GGvwGo3asvkU23Y-7Om8pLqCT3w-52A@mail.gmail.com>
2014-10-26  6:40         ` David Edelsohn
2014-10-26 10:37           ` Richard Biener
2014-10-27  1:36             ` David Edelsohn
2014-10-27  7:48               ` Richard Biener
2014-10-27 14:32                 ` David Edelsohn
2014-10-27 14:56                 ` David Edelsohn
2014-10-27 19:28                 ` David Edelsohn
2014-10-27 20:13                   ` Richard Biener
2014-10-27 23:36                     ` David Edelsohn
2014-10-28  8:43                       ` Richard Biener
2014-10-29 12:54 ` Richard Biener
2014-10-29 13:23   ` David Edelsohn
2014-10-29 13:31     ` Richard Biener
2014-10-29 17:31       ` David Edelsohn
2014-10-30  8:54         ` Richard Biener
2014-10-30 14:29           ` David Edelsohn [this message]
2014-10-31  8:54             ` Richard Biener

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='CAGWvnynDX6VqPWPjeK83Goxdtm5UmR=pz0xD2Rj-pc+S2gjyvQ@mail.gmail.com' \
    --to=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rguenther@suse.de \
    --cc=richard.guenther@gmail.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).