[postgis-users] Re: [postgis-devel] Moving towards a 1.2.2 release?

Michael Fuhr mike at fuhr.org
Sat May 19 06:04:27 PDT 2007


On Sat, May 19, 2007 at 08:31:54AM +0100, Mark Cave-Ayland wrote:
> I've had a quick look at this, and the news is not great. Basically
> there are multiple places in the code that write directly to the first
> byte of a varlena structure rather than using the PostgreSQL VAR*
> macros. Since the first byte of a varlena is not longer just an integer
> representing its length but a "packed" pointer, it cause PostgreSQL to
> either use an incorrect size or dereference an incorrect pointer which
> causes the crash.

First byte or first 32-bit word?  It's interesting that the code works
-- at least to the extent that it passes the regression tests -- on 
one of my platforms (big-endian sparc).

> I've started looking at this, but it's impossible to do via search and
> replace. I'm currently running through the regression tests and
> correcting the places one-by-one as they either return an incorrectly
> sized string or crash the backend. Yuck.

I have access to all four combinations of 32-bit/64-bit big-endian/
little-endian architectures; please let me know when you have
something ready to test and I'll try it on all of them.

-- 
Michael Fuhr



More information about the postgis-users mailing list