vsnprintf and 64-bit Solaris 7 (was: abnormal exits)

From: Andrew Sullivan <andrew(at)libertyrms(dot)info>
To: PostgreSQL general list <pgsql-general(at)postgresql(dot)org>
Subject: vsnprintf and 64-bit Solaris 7 (was: abnormal exits)
Date: 2002-02-28 21:36:59
Message-ID: 20020228163659.B17534@mail.libertyrms.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Feb 27, 2002 at 06:39:47PM -0500, Tom Lane wrote:
> Andrew Sullivan <andrew(at)libertyrms(dot)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(at)libertyrms(dot)info> M6K 3E3
+1 416 646 3304 x110

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-02-28 21:48:21 Re: killed select?
Previous Message Jean-Michel POURE 2002-02-28 21:12:34 Re: convert Postgres script to SQL Server script?