Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ezvov-0002Ix-UB for pgsql-hackers@arkaria.postgresql.org; Sun, 25 Mar 2018 02:55:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ezvou-00073p-6n for pgsql-hackers@arkaria.postgresql.org; Sun, 25 Mar 2018 02:55:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ezvot-00073b-VZ; Sun, 25 Mar 2018 02:55:44 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ezvop-0002W4-Be; Sun, 25 Mar 2018 02:55:42 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w2P2tQtd011489; Sat, 24 Mar 2018 22:55:26 -0400 From: Tom Lane To: Andres Freund cc: Peter Eisentraut , pgsql-committers@postgresql.org, pgsql-hackers@postgresql.org Subject: Re: pgsql: Avoid premature free of pass-by-reference CALL arguments. In-reply-to: <20180324212502.wt4serghfidge2on@alap3.anarazel.de> References: <20180324212502.wt4serghfidge2on@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Sat, 24 Mar 2018 14:25:02 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <11487.1521946526.1@sss.pgh.pa.us> Date: Sat, 24 Mar 2018 22:55:26 -0400 Message-ID: <11488.1521946526@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > On 2018-02-10 18:37:17 +0000, Tom Lane wrote: > 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. Ooops. I'll do something about that tomorrow. regards, tom lane