Re: segfault at aset.c:539 - Mailing list pgsql-bugs

From Tom Lane
Subject Re: segfault at aset.c:539
Date
Msg-id 9971.1058203828@sss.pgh.pa.us
Whole thread Raw
In response to Re: segfault at aset.c:539  (Tomas Szepe <szepe@pinerecords.com>)
List pgsql-bugs
Tomas Szepe <szepe@pinerecords.com> writes:
> (BTW, it seems the bug can't be triggered on Linux/sparc32).

You'd be less likely to see it on a machine where MAXALIGN is 8,
since there would be more pad bytes on the average ... but depending
on the string length fed to to_ascii(), I think it could be made
to happen on any platform.  Strings whose length is an odd multiple
of four (4, 12, etc) would have no pad bytes on any platform.

I'm surprised we did not notice this case when we were testing the fix
for the other bug.  That bug was only an off-by-one, this was an
off-by-four :-(

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tomas Szepe
Date:
Subject: Re: segfault at aset.c:539
Next
From: "Jefferies, Rupert"
Date:
Subject: createdb failure on version 7.3.3 with Solaris 9