Movatterモバイル変換


[0]ホーム

URL:


Quick Links

Re: pgsql: Avoid premature free of pass-by-reference CALL arguments.

From:Andres Freund <andres(at)anarazel(dot)de>
To:Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc:pgsql-committers(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject:Re: pgsql: Avoid premature free of pass-by-reference CALL arguments.
Date:2018-03-24 21:25:02
Message-ID:20180324212502.wt4serghfidge2on@alap3.anarazel.de
Views:Whole Thread |Raw Message |Download mbox |Resend email
Thread:
Lists:pgsql-committerspgsql-hackers


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%3A01

*** /home/bf/build/buildfarm-pogona/HEAD/pgsql.build/../pgsql/src/test/regress/expected/create_procedure.out2018-03-23 08:10:44.326010286 +0100
--- /home/bf/build/buildfarm-pogona/HEAD/pgsql.build/src/test/regress/results/create_procedure.out2018-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

In response to

Responses

Browse pgsql-committers by date

 FromDateSubject
Next MessagePeter Eisentraut2018-03-25 01:53:06pgsql: Add long options to pg_resetwal and pg_controldata
Previous MessagePeter Eisentraut2018-03-24 19:47:14pgsql: initdb: Improve --wal-segsize handling

Browse pgsql-hackers by date

 FromDateSubject
Next MessagePeter Geoghegan2018-03-24 21:51:32Re: Undesirable entries in typedefs list
Previous MessageTom Lane2018-03-24 20:56:36Re: [PROPOSAL] Shared Ispell dictionaries

[8]ページ先頭

©2009-2026 Movatter.jp