From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: pgsql-committers@postgresql.org
Cc: pgsql-hackers@postgresql.org
Subject: Re: pgsql: Avoid premature free of pass-by-reference CALL arguments.
Date: Sat, 24 Mar 2018 14:25:02 -0700
Message-ID: <20180324212502.wt4serghfidge2on@alap3.anarazel.de> (raw)
In-Reply-To: <E1eka1V-0002Ed-A3@gemulon.postgresql.org>
References: <E1eka1V-0002Ed-A3@gemulon.postgresql.org>
On 2018-02-10 18:37:17 +0000, Tom Lane wrote:
> Avoid premature free of pass-by-reference CALL arguments.
> src/test/regress/expected/create_procedure.out | 12 +++++++----
> src/test/regress/sql/create_procedure.sql | 4 +++-
> 3 files changed, 33 insertions(+), 11 deletions(-)
There's a recent llvm buildfarm animal failure related to this:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=pogona&dt=2018-03-24%2020%3A10%3A01inline patch 1: /home/bf/build/buildfarm-pogona/HEAD/pgsql.build/src/test/regress/results/create_procedure.out (+1/-1 lines) download inline-1.patch*** /home/bf/build/buildfarm-pogona/HEAD/pgsql.build/../pgsql/src/test/regress/expected/create_procedure.out 2018-03-23 08:10:44.326010286 +0100
--- /home/bf/build/buildfarm-pogona/HEAD/pgsql.build/src/test/regress/results/create_procedure.out 2018-03-24 21:15:28.749352165 +0100
***************
*** 44,50 ****
SELECT * FROM cp_test ORDER BY b COLLATE "C";
a | b
---+-------
! 1 | 0
1 | a
1 | xyzzy
(3 rows)
--- 44,50 ----
SELECT * FROM cp_test ORDER BY b COLLATE "C";
a | b
---+-------
! 1 | 9
1 | a
1 | xyzzy
(3 rows)
With the differening output created by:
CREATE PROCEDURE ptest1(x text)
LANGUAGE SQL
AS $$
INSERT INTO cp_test VALUES (1, x);
$$;
CALL ptest1(substring(random()::text, 1, 1)); -- ok, volatile arg
At first I was gosh darned confused, this really didn't seem likely to
be an LLVM induced failure. And it turns out it isn't. If the value
returned by random() is very small, the text representation switches to
scientific notation like 8.26204195618629e-05.
So, perhaps we should choose a different volatile function here?
Greetings,
Andres Freund
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: andres@anarazel.de, tgl@sss.pgh.pa.us, peter_e@gmx.net, pgsql-hackers@postgresql.org
Subject: Re: pgsql: Avoid premature free of pass-by-reference CALL arguments.
In-Reply-To: <20180324212502.wt4serghfidge2on@alap3.anarazel.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox