[BUGS] BUG #14801: ECPG core dump - Mailing list pgsql-bugs

From davidr@openscg.com
Subject [BUGS] BUG #14801: ECPG core dump
Date
Msg-id 20170906161212.25634.31573@wrigleys.postgresql.org
Whole thread Raw
Responses Re: [BUGS] BUG #14801: ECPG core dump
List pgsql-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
causesAbort (core dumped)EXEC SQL DECLARE buggy CURSOR FORselect 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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: [BUGS] BUG #14800: substring produces different results with similar types
Next
From: Francisco Olarte
Date:
Subject: Re: [BUGS] BUG #14800: substring produces different results withsimilar types