From: davidr@openscg.com
To: pgsql-bugs@postgresql.org
Cc: davidr@openscg.com
Subject: BUG #14801: ECPG core dump
Date: Wed, 06 Sep 2017 16:12:12 +0000
Message-ID: <20170906161212.25634.31573@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
The following bug has been logged on the website:
Bug reference: 14801
Logged by: David Rader
Email address: davidr@openscg.com
PostgreSQL version: 9.6.4
Operating system: CentOS 7
Description:
Using a int* variable as a where-clause parameter in a declare cursor
construct causes ECPG to Abort (core dump). Using an int variable works
correctly (as expected), and using a pointer type in where clause in a
simple select into works.
$ /usr/pgsql-9.6/bin/ecpg bug1.pgc
Aborted (core dumped)
$ cat bug1.pgc
int main( )
{
EXEC SQL BEGIN DECLARE SECTION;
int iparm = 5, iparm2;
int *pparm = &iparm;
int *outparm = &iparm2;
EXEC SQL END DECLARE SECTION;
// this runs through ECPG with no warning
/*
EXEC SQL
select 2 into :outparm from foo
where foo.bar = :pparm;
*/
// this causes Abort (core dumped)
EXEC SQL DECLARE buggy CURSOR FOR
select 2 from foo
where foo.bar = :pparm;
return( 0 );
}
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: davidr@openscg.com
Subject: Re: BUG #14801: ECPG core dump
In-Reply-To: <20170906161212.25634.31573@wrigleys.postgresql.org>
References: <20170906161212.25634.31573@wrigleys.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