Thread: ecpg segmentation error

ecpg segmentation error

From
margitsw@t-online.de (Margit Schubert-While)
Date:
Following cursor declaration which worked in 7.3.4, produces
a seg fault with 7.4.1 and todays cvs.

         exec sql
         declare functestcur0 scroll cursor for
         select oid, * into
                          :rownum
                         ,:sfunckey
                         ,:sfuncfill
         from functest
         where funckey between :xsfunckey
         and :efunckey
         order by funckey
         ;
(All referenced variables are declared correctly)

Margit

Re: ecpg segmentation error

From
Michael Meskes
Date:
On Fri, Feb 27, 2004 at 07:16:43PM +0100, Margit Schubert-While wrote:
> Following cursor declaration which worked in 7.3.4, produces
> a seg fault with 7.4.1 and todays cvs.

Hmm, not for me:

./preproc/ecpg a.pgc
a.pgc:7: WARNING: cursor `functestcur0=C2=B4 has been declared but ot opened

With a.pgc being exactly your declare statement plus some variable
definitions.

> (All referenced variables are declared correctly)

For the furture, please include a test case I can work with. Just that
one line does not enable me to find the bug at all as you can see. In
fact it is not even enough code to run a simple test. It shouldn't be
too difficult to include the variable declarations so it's at least
compilable code.

Michael
--=20
Michael Meskes
Email: Michael at Fam-Meskes dot De
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!

Re: ecpg segmentation error

From
margitsw@t-online.de (Margit Schubert-While)
Date:
Actually caused by undefined variable later in the code.
Sample prog sent to Michael.
Margit

Re: ecpg segmentation error

From
Michael Meskes
Date:
On Sun, Feb 29, 2004 at 09:22:45PM +0100, Margit Schubert-While wrote:
> Actually caused by undefined variable later in the code.
> Sample prog sent to Michael.

Sorry, forgot to tell you that I fixed this. Should be in latest CVS,
HEAD and 7.4.

Michael
--
Michael Meskes
Email: Michael at Fam-Meskes dot De
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!

Re: ecpg segmentation error

From
Bruce Momjian
Date:
Michael Meskes wrote:
> On Sun, Feb 29, 2004 at 09:22:45PM +0100, Margit Schubert-While wrote:
> > Actually caused by undefined variable later in the code.
> > Sample prog sent to Michael.
>
> Sorry, forgot to tell you that I fixed this. Should be in latest CVS,
> HEAD and 7.4.

Yep, seems I am one step being ecpg emails today.  :-)

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073