[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-general
Subject:    [GENERAL] vsnprintf and 64-bit Solaris 7 (was: abnormal exits)
From:       Andrew Sullivan <andrew () libertyrms ! info>
Date:       2002-02-28 21:36:59
[Download RAW message or body]

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


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic