vsnprintf and 64-bit Solaris 7 (was: abnormal exits) - Mailing list pgsql-general

From Andrew Sullivan
Subject vsnprintf and 64-bit Solaris 7 (was: abnormal exits)
Date
Msg-id 20020228163659.B17534@mail.libertyrms.com
Whole thread Raw
In response to Re: abnormal exits: what am I overlooking?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: vsnprintf and 64-bit Solaris 7 (was: abnormal exits)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Wed, Feb 27, 2002 at 06:39:47PM -0500, Tom Lane wrote:
> Andrew Sullivan <andrew@libertyrms.info> writes:
> > I'm doing some tests with 7.2 here, and I'm having trouble creating a
> > table.  This is on Solaris 7 compiled with a 64 bit gcc; gcc -v gives

> Can you get a gdb backtrace from the core file?

Tom very kindly stepped in and had a poke around with a debugger (and
had to use -- eek -- adb because there was some sort of argument
between gdb compiled as 64 bit and Solaris), and discovered that
vsnprintf was doing something nasty.

Turns out, according to the GNU autoconf pages (at
<http://www.dis.com/gnu/autoconf/autoconf_45.html#SEC45>), that
vsnprintf overruns the buffer sometimes.

The answer is to edit src/backend/port/Makefile and add "snprintf.o"
to OBJS.  Postgres includes its own implementation for platforms that
don't have it.

Thanks to Tom Lane.

A

--
----
Andrew Sullivan                               87 Mowat Avenue
Liberty RMS                           Toronto, Ontario Canada
<andrew@libertyrms.info>                              M6K 3E3
                                         +1 416 646 3304 x110


pgsql-general by date:

Previous
From: Jean-Michel POURE
Date:
Subject: Re: convert Postgres script to SQL Server script?
Next
From: Tom Lane
Date:
Subject: Re: killed select?