Re: Back branches vs. gcc 4.8.0

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Geoghegan <pg(at)heroku(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Back branches vs. gcc 4.8.0
Date: 2013-07-23 08:30:02
Message-ID: 20130723083002.GE21996@alap2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2013-04-29 23:37:43 -0400, Peter Eisentraut wrote:
> On Sat, 2013-04-06 at 12:59 -0400, Tom Lane wrote:
> > The reason I'm thinking it's a good idea is that it would expose any
> > remaining places where we have nominally var-length arrays embedded in
> > larger structs. Now that I've seen the failures with gcc 4.8.0, I'm
> > quite worried that there might be some more declarations like that
> > which we've not identified yet, but that by chance aren't causing
> > obvious failures today.
>
> Here is a rough patch that replaces almost all occurrences of
> something[1] in a struct with FLEXIBLE_ARRAY_MEMBER. It crashes left
> and right (because of sizeof issues, probably), but at least so far the
> compiler hasn't complained about any flexible-array members not at the
> end of the struct, which is what it did last time. So the answer to
> your concern so far is negative.

I think this point in the cycle would be a good one to apply something
like this.

> Completing this patch will be quite a bit more debugging work. Some
> kind of electric fence for palloc would be helpful.

Noah's recently added valgrind mode should provide this.

Do you have an updated version of this patch already? I'd be willing to
make a pass over it to check whether I find any missed updates...

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2013-07-23 08:51:28 Re: changeset generation v5-01 - Patches & git tree
Previous Message Amit Langote 2013-07-23 08:23:58 Re: maintenance_work_mem and CREATE INDEX time