On Thu, Jul 11, 2002 at 11:15:42PM -0400, Tom Lane wrote:
> Mats Lofkvist <mal@algonet.se> writes:
> > When testing postgres 7.2.1 on a sparc/solaris8 box with
> > --enable-locale --enable-multibyte I get a crash in
> > convert_string_datum.
>
> This smells like a problem that we chased down awhile back, that
> snprintf on Solaris is broken (it will write past the end of the
> specified buffer length, thus corrupting adjacent data).
It does indeed. This was only the 64-bit library, though, or at
least as far as we were able to tell. And I wasn't able to turn up
any evidence that it happened on Solaris 8. But it might. We don't
use 8, at least not yet.
> Andrew, I think that was your test case we found it on. Do you
> recall if a fix is available from Sun?
Not as far as I know, at least for 7. Come to think of it, I now
_do_ recall seeing something in my various Google wanderings which
suggested that there is a fix in one of the patch packages for
Solaris 8 (which suggests the buggy library is in the basic Solaris 8
install). I dimly recall some mention of incompatibility between it
and some other patchlevel, as well, so it might require some digging.
(Given that it's really a bounds mistake in a system library, you'd
think that it'd be easier to find more information about it; I
actually learned almost everything I know about the problem from,
IIRC, the autoconf web pages, so I'd not expect a cursory search of
Sun's site to turn anything up.)
In the FAQ_Solaris, there is a suggestion to use the substitute
function included in the Postgres tree (which is what you suggested,
Tom, and what I did), as well as instructions on how to do it. It
definitely works for me on Solaris 7. Might be worth trying on 8 as
well. If so, the FAQ should be updated so as not to limit the
discussion to Solaris 7 and earlier.
Sorry I can't be more help than this.
A
--
----
Andrew Sullivan 87 Mowat Avenue
Liberty RMS Toronto, Ontario Canada
<andrew@libertyrms.info> M6K 3E3
+1 416 646 3304 x110