From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: exclusion@gmail.com
Subject: BUG #16466: Valgrind detects an invalid read in dblink_open() with a cursor inside a transaction
Date: Wed, 27 May 2020 18:00:32 +0000
Message-ID: <16466-09cfa4a5a0e72cce@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 16466
Logged by: Alexander Lakhin
Email address: exclusion@gmail.com
PostgreSQL version: 13beta1
Operating system: Ubuntu 18.04
Description:
When running under valgrind the following query (based on
contrib/dblink/sql/dblink.sql):
CREATE EXTENSION dblink;
CREATE FUNCTION connection_parameters() RETURNS text LANGUAGE SQL AS $f$
SELECT $$dbname='$$||current_database()||$$'
port=$$||current_setting('port');
$f$;
SELECT dblink_connect('myconn',connection_parameters());
SELECT dblink_exec('myconn','BEGIN');
SELECT dblink_open('myconn','xxx','SELECT 1');
The following error is detected:
==00:00:00:07.723 2378719== Conditional jump or move depends on
uninitialised value(s)
==00:00:00:07.723 2378719== at 0x486A5D0: dblink_open (dblink.c:492)
==00:00:00:07.723 2378719== by 0x3BCA2B: ExecInterpExpr
(execExprInterp.c:699)
==00:00:00:07.723 2378719== by 0x3B97F0: ExecInterpExprStillValid
(execExprInterp.c:1802)
==00:00:00:07.723 2378719== by 0x3F3C05: ExecEvalExprSwitchContext
(executor.h:313)
==00:00:00:07.723 2378719== by 0x3F3C05: ExecProject (executor.h:347)
==00:00:00:07.723 2378719== by 0x3F3C05: ExecResult (nodeResult.c:136)
==00:00:00:07.723 2378719== by 0x3C90EC: ExecProcNodeFirst
(execProcnode.c:450)
==00:00:00:07.723 2378719== by 0x3C139B: ExecProcNode (executor.h:245)
==00:00:00:07.723 2378719== by 0x3C139B: ExecutePlan (execMain.c:1646)
==00:00:00:07.723 2378719== by 0x3C1FEC: standard_ExecutorRun
(execMain.c:364)
==00:00:00:07.723 2378719== by 0x3C20BA: ExecutorRun (execMain.c:308)
==00:00:00:07.723 2378719== by 0x55FED3: PortalRunSelect (pquery.c:912)
==00:00:00:07.723 2378719== by 0x5615C7: PortalRun (pquery.c:756)
==00:00:00:07.723 2378719== by 0x55D8F0: exec_simple_query
(postgres.c:1239)
==00:00:00:07.723 2378719== by 0x55F7F5: PostgresMain (postgres.c:4315)
==00:00:00:07.724 2378719==
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-bugs@postgresql.org
Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, exclusion@gmail.com
Subject: Re: BUG #16466: Valgrind detects an invalid read in dblink_open() with a cursor inside a transaction
In-Reply-To: <16466-09cfa4a5a0e72cce@postgresql.org>
* 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