Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] NetBSD mac68k crashing on union regression test

From: Rémi Zara <remi_zara(at)mac(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>,pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] NetBSD mac68k crashing on union regression test
Date: 2005-04-14 20:14:07
Message-ID: ac8f9102954f587783f45edf92a22ca3@mac.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Le 12 avr. 05, à 08:23, Rémi Zara a écrit :

> Hi,
>
> With the following patch, the crash still occurs in the same way. But 
> it does seem, reading the code, that it still may be necessary.

Well, I've re-run the checks several times after a clean make and it 
does not crash anymore. So the patch seems to help !

Please consider applying it.

Regards,

Rém Zara

> RCS file: /projects/cvsroot/pgsql/src/port/snprintf.c,v
> retrieving revision 1.26
> diff -u -r1.26 snprintf.c
> --- snprintf.c  20 Mar 2005 13:54:53 -0000      1.26
> +++ snprintf.c  12 Apr 2005 06:08:02 -0000
> @@ -222,7 +222,7 @@
>
>         /* Create enough structures to hold all arguments */
>         for (p = format; *p != '\0'; p++)
> -               if (*p == '%')                  /* counts %% as two, 
> so overcounts */
> +               if ((*p == '%') || (*p == '*'))         /* counts %% 
> as two, so overcounts */
>                         percents++;
>
>         /* Need to use malloc() because memory system might not be 
> started yet. */
>
> Regards,
>
> Rémi Zara
>
> Le 11 avr. 05, à 22:31, Tom Lane a écrit :
>
>> =?ISO-8859-1?Q?R=E9mi_Zara?= <remi_zara(at)mac(dot)com> writes:
>>> The crash occurs in pg_sprintf,  work on which has been done 
>>> beginning
>>> march 11th....
>>
>> Offhand I'd bet it's overrunning its malloc'd arrays because the loop 
>> at
>> the top doesn't count "*" as needing a fmtpos position.
>>
>> 			regards, tom lane
>>
>>
> --
> Rémi Zara
> http://www.remi-zara.net/
>
--
Rémi Zara
http://www.remi-zara.net/

In response to

Responses

pgsql-hackers by date

Next:From: Chris CampbellDate: 2005-04-14 20:28:50
Subject: New wal_sync_method for Darwin?
Previous:From: Greg StarkDate: 2005-04-14 19:55:47
Subject: Re: Interactive docs idea

pgsql-patches by date

Next:From: OpenMacNewsDate: 2005-04-14 20:26:41
Subject: pgsql config flag update: apple rendezvous renamed bonjour
Previous:From: Mark KirkwoodDate: 2005-04-14 09:33:39
Subject: Re: Proof of concept for MIN/MAX optimization

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group