OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: postgresql W^X problem?

From: Adam (suckmy-balls.com)
Date: Mon Feb 02 2004 - 15:09:16 CST


On Mon, Feb 02, 2004 at 03:01:49PM -0500, Adam Skutt wrote:
> Adam wrote:
> >Writing some code to handle database connections to postgresql, I have a
> >linked list of structures containing a PGconn pointer and a status flag.
> >When some connections are no longer needed, and I walk through the list
> >calling PQfinish, the first 2 connections get cleaned up fine, and then
> >when it tries to call PQfinish on the 3rd connection, the app core
> >dumps on OpenBSD (-current i386).
> Kinda difficult to asertain without some source code to look at, hmmm?
>
> -- Adam S.

Yeah, I was just hoping there would be some obvious telltale W^X sign or
something. The problem with the code is that if you don't have a copy
of Ultima Online it won't work. So, I started to write a simple test
app to show the problem, and that's when I noticed it "working" on
freebsd actually looks like this:

test in free(): warning: chunk is already free
test in free(): warning: chunk is already free
test in free(): warning: chunk is already free
test in free(): warning: chunk is already free
test in free(): warning: chunk is already free
test in free(): warning: chunk is already free
test in free(): warning: chunk is already free
test in free(): warning: chunk is already free
test in free(): warning: page is already free
test in free(): warning: page is already free
test in free(): warning: chunk is already free
test in free(): warning: chunk is already free
test in free(): warning: chunk is already free

But the real app is a daemon so I never saw that before.
Sorry for the noise.

Adam