Re: conn = PQconnectdb(conninfo); - Mailing list pgsql-general

From Tom Lane
Subject Re: conn = PQconnectdb(conninfo);
Date
Msg-id 19182.1437171348@sss.pgh.pa.us
Whole thread Raw
In response to conn = PQconnectdb(conninfo);  (Peter Kroon <plakroon@gmail.com>)
Responses Re: conn = PQconnectdb(conninfo);
List pgsql-general
Peter Kroon <plakroon@gmail.com> writes:
> Every now and then my program will abort.
> IAnd this is because: conn = PQconnectdb(conninfo);
> The error given:
> *** Error in `./server_prog': malloc(): smallbin double linked list
> corrupted: 0x092c10a0 ***

This looks like malloc() complaining because something has corrupted its
bookkeeping data, which generally means that something previously wrote
past the end of a malloc'd data chunk, or tried to write into an
already-freed chunk.  The odds are very high that the bug is in your
program rather than libpq, though, because no such problems have been
found within libpq recently.

valgrind is a fairly useful tool for tracking down such issues.

            regards, tom lane


pgsql-general by date:

Previous
From: Peter Kroon
Date:
Subject: conn = PQconnectdb(conninfo);
Next
From: Amitabh Kant
Date:
Subject: Recovering database from crashed HD (bad sectors)