Skip site navigation (1) Skip section navigation (2)

Re: libpq block allocated before my malloc handler inits?

From: Russell Smith <mr-russ(at)pws(dot)com(dot)au>
To: rob(at)robstoddard(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: libpq block allocated before my malloc handler inits?
Date: 2008-06-29 23:36:11
Message-ID: 48681C6B.5020605@pws.com.au (view raw or flat)
Thread:
Lists: pgsql-general
rob wrote:
> I am trying to build a small program with libpq as the interface to a
> Postgre database.  I am using the most current version.  My program
> uses malloc and free hooks to manage memory without having to request
> memory from the system all the time.  I expected that the init
> function (__malloc_initialize_hook)  would run before anything else,
> but after opening a number of connections to the database with
> PQconnectdb, my program blows up because of a free which refers to a
> block of memory that wasn't allocated using my malloc function.  My
> program runs without a hitch if I comment out the PQconnectdb function
> calls.
I've experienced an openSSL, libpq + other library using SSL bug
recently.  Do you get the same crash is you explicitly disable SSL in
the connection string?  sslmode=disable.

Thanks

Russell

In response to

Responses

pgsql-general by date

Next:From: robDate: 2008-06-30 00:58:47
Subject: Re: libpq block allocated before my malloc handler inits?
Previous:From: Alvaro HerreraDate: 2008-06-29 23:10:14
Subject: Re: libpq block allocated before my malloc handler inits?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group