Re: Seg fault on PQconnectdb - Mailing list pgsql-general

From Tom Lane
Subject Re: Seg fault on PQconnectdb
Date
Msg-id 26237.1286982178@sss.pgh.pa.us
Whole thread Raw
In response to Re: Seg fault on PQconnectdb  (Joe La Frite <joelafrite84@gmail.com>)
List pgsql-general
Joe La Frite <joelafrite84@gmail.com> writes:
> Tough after some testing, I'm fairly sure the problem isn't caused by
> libpq at all. I think the heap gets corrupted at some point before the
> call to PQconnectdb is made, as replacing the call by a simple void*
> test = malloc(10) causes it to crash as well.

Yeah, a crash inside malloc almost certainly means that you've stomped
on some of malloc's internal data structures, probably by overrunning
the allocated size of some malloc'd data chunk.  I'd suggest valgrind,
ElectricFence, or similar for locating the offending code.

            regards, tom lane

pgsql-general by date:

Previous
From: Ray Stell
Date:
Subject: Re: about RPM build options
Next
From: Geoffrey Myers
Date:
Subject: pitr question