[postgis-devel] C-Library function returning PostGIS point crashing backend

Sandro Santilli strk at keybit.net
Tue Jan 15 00:04:42 PST 2013


On Mon, Jan 14, 2013 at 10:19:52PM -0500, David Fuhry wrote:
> Not sure if this reveals anything more, but here's the valgrind output.
> Apparently the segfault is of reading 16 bytes before the memory location
> malloced in lwgeom_to_wkb, I don't know if that's a coincidence or not.

16 bytes could the the amount of bytes used for postgresql memory 
management functions, so it could really be that postgis is allocating
with malloc and deallocating with pfree, pointing back to liblwgeom
memory initialization functions.
Try to drop the memory management initialization function and see
what happens. Or try to get liblwgeom initialized with your own
management functions and see how/when they are called.

--strk;



More information about the postgis-devel mailing list