Re: PGexec dumps core at pqResultAlloc

From: Shridhar Daithankar <shridhar_daithankar(at)persistent(dot)co(dot)in>
To: ljb <ljb220(at)mindspring(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PGexec dumps core at pqResultAlloc
Date: 2003-11-13 06:12:32
Message-ID: 3FB320D0.3000007@persistent.co.in
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

ljb wrote:

>ryan(at)ostrich-emulators(dot)com wrote:
>
>
>>...
>>#0 0x408cf47e in malloc_consolidate () from /lib/libc.so.6
>>#1 0x408ced83 in _int_malloc () from /lib/libc.so.6
>>#2 0x408cdf1a in malloc () from /lib/libc.so.6
>>#3 0x40c834cd in pqResultAlloc (res=0x4098a9a0, nBytes=1083746720,
>>isBinary=1 '\001') at fe-exec.c:496
>>#4 0x40c83e18 in getRowDescriptions (conn=0x80699b8) at fe-exec.c:1129
>>#5 0x40c83d5f in parseInput (conn= x80699b8) at fe-exec.c:1023
>>#6 0x40c8437b in PQgetResult (conn=0x80699b8) at fe-exec.c:1349
>>#7 0x40c84489 in PQexec (conn=0x80699b8, query=0x8070398 "select * from
>>accounts where ID!=0") at fe-exec.c:1461
>>
>>The code is pretty basic, in my opinion. The following is the snippet that's
>>failling. By the time execution gets to this point, the connection is open,
>>and the first line always prints 0 1 0
>>---
>> cout<<conn<<": "<<PQstatus( conn )<<" "<<CONNECTION_BAD<<"
>>"<<CONNECTION_OK<<endl;
>>
>> PGresult * result=PQexec( conn, "BEGIN" );
>> cout<<"here a"<<endl;
>> PQclear( result );
>>
>> cout<<"here a.1"<<endl;
>> result=PQexec( conn, stmt );
>> cout<<"here a.2"<<endl;
>>--
>>
>>Platform: Slackware Linux 9.1, x86, gcc-3.2.3
>>
>>
>
>If you aren't getting answers it's not because nobody looked at this. I
>did, and I can't figure it out. You are apparently running 7.3.x based on
>
>
Same here..:-)

I had a thought yesterday but didn't put it because was not sure how
helpful it is... anyways..

Are your postgresql include headers are within a extern "C" block? In
C++, that can cause quite a grief. Check it out..

Shridhar

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Shridhar Daithankar 2003-11-13 06:39:26 Re: PL/PGSQL functions suddenly not working
Previous Message Christopher Browne 2003-11-13 05:04:24 Re: embedded postgresql