🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #2324

Re: gdb/libiberty/vasprintf.c

#2324
From: Andrew Cagney
Date: Mon, 15 Apr 2002 18:19
43 lines
2137 bytes
FYI,

Liberty patches can be sent to gcc at gcc dot gnu dot org.  GDB is just 
a client.  For GDB, see http://sources.redhat.com/gdb/mailing-lists/

Thanks for finding this,
Andrew


> Hi.
> 
> I found a bug in gdb/libiberty/vasprintf.c.  Well, actually a
> SIGSEGV found it for me.  One of the kernel developers here at 
> QNX provided me with the explanation for the fix, which I have
> appended.
> 
> Here is the change I made to fix it for me.  In vasprintf() I 
> have added 2 lines before the return, and changed the va_list
> parameter being passed to int_vasprintf():
> 
> 
>   int
>   vasprintf (result, format, args)
>        char **result;
>        const char *format;
>   #if defined (_BSD_VA_LIST_) && defined (__FreeBSD__)
>        _BSD_VA_LIST_ args;
>   #else
>        va_list args;
>   #endif
>   {
>     /* Handle both array and non-array va_list types. */
>     va_list temp;
>     va_copy(temp, args);
>     return int_vasprintf (result, format, &temp);
>   }
> 
> 
> Thanks.
> Graeme Peterson
> QNX Tools Group
> 
> 
Technical Details
Message-ID: <3CBB199D.8050203@cygnus.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!paloalto-snf1.gtei.net!chcgil2-snh1.gtei.net!cpk-news-hub1.bbnplanet.com!news.gtei.net!nntp.abs.net!uunet!dca.uu.net!ash.uu.net!spool0901.news.uu.net!wendy-fate.uu.net!bug-gdb
References: <200204151732.NAA509440049@gp2>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f5053,5df6ea670ac76c5d
X-Google-Attributes: gidf5053,public
X-Google-ArrivalTime: 2002-04-15 11:19:06 PST
x-uunet-gateway: mr1.ash.ops.us.uu.net from bug-gdb to gnu.gdb.bug; Mon, 15 Apr 2002 18:19:05 GMT
Message-ID: <3CBB199D.8050203@cygnus.com>
Date: Mon, 15 Apr 2002 14:19:09 -0400
From: ac131313@cygnus.com (Andrew Cagney)
User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.9) Gecko/20020328
X-Accept-Language: en-us, en
MIME-Version: 1.0
Subject: Re: gdb/libiberty/vasprintf.c
References: <200204151732.NAA509440049@gp2>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Approved: bug-gdb-request@mail.gnu.org
Newsgroups: gnu.gdb.bug
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!paloalto-snf1.gtei.net!chcgil2-snh1.gtei.net!cpk-news-hub1.bbnplanet.com!news.gtei.net!nntp.abs.net!uunet!dca.uu.net!ash.uu.net!spool0901.news.uu.net!wendy-fate.uu.net!bug-gdb
Sender: bug-gdb-request@mail.gnu.org
Lines: 45