bug-gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gdb/libiberty/vasprintf.c


From: Andrew Cagney
Subject: Re: gdb/libiberty/vasprintf.c
Date: Mon, 15 Apr 2002 14:19:09 -0400
User-agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.9) Gecko/20020328

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







reply via email to

[Prev in Thread] Current Thread [Next in Thread]