plpython versus gcc 4.5.x - Mailing list pgsql-hackers

From Tom Lane
Subject plpython versus gcc 4.5.x
Date
Msg-id 28249.1295721528@sss.pgh.pa.us
Whole thread Raw
Responses Re: plpython versus gcc 4.5.x  (Andrew Dunstan <andrew@dunslane.net>)
Re: plpython versus gcc 4.5.x  (Jan Urbański <wulczer@wulczer.org>)
List pgsql-hackers
Buildfarm members bobcat (Fedora 14 x86) and frogmouth (mingw) have
been showing an assertion failure in the plpython regression tests
since this patch went in:
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=740e54c

I have been able to reproduce the problem locally on Fedora 14 x86_64.
The common thread appears to be use of gcc 4.5 --- Andrew says that
frogmouth is using 4.5.0, and current F-14 has gcc 4.5.1.  I have found
that manually re-inlining PLy_procedure_input_conversion is sufficient
to make the problem go away, as is reducing the optimization level below
-O2.

Based on these observations, I believe it's not our bug but an
optimization bug in gcc, and have accordingly filed a gcc bug:
https://bugzilla.redhat.com/show_bug.cgi?id=671899
However, it's hard to guess how long it might take for the gcc boys to
provide a fix, and in any case I fear it will be a long time before the
fix propagates to places like mingw.

Given these facts, and the fact that the above-mentioned patch has no
purpose other than code beautification, I recommend reverting the patch.
We could just revert the de-inlining of PLy_procedure_input_conversion,
but there doesn't seem to be a lot of point in having one separate and
the other not.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql: Move test_fsync to /contrib.
Next
From: Andrew Dunstan
Date:
Subject: Re: plpython versus gcc 4.5.x