public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew Haley <aph@redhat.com>
To: "Vivek Katakam" <vivek1717@gmail.com>
Cc: "John Love-Jensen" <eljay@adobe.com>, gcc-help@gcc.gnu.org
Subject: Re: Reg SEGV
Date: Sat, 13 May 2006 10:06:00 -0000	[thread overview]
Message-ID: <17509.59329.206688.755244@dell.pink> (raw)
In-Reply-To: <d0e0ce060605130250j4f64990bj3d13fe2af40cb9f2@mail.gmail.com>

Vivek Katakam writes:

 > I am actually working on a proc file and when i am running it I am
 > getting the error.
 > 
 > The code is in a file called vaprintf.c
 > 
 > These are the Lines of code from where the error came.
 >  /* Write out the message to the file. */
 >         va_start(args, input_msg);
 >         #ifdef LINUX
 >         va_copy(allargs,args);
 >         #else
 >         allargs=args;
 >         #endif
 >         vfprintf(output_file, input_msg, args);
 >         va_end(args);
 > 
 >         fputc('\n', output_file);
 >         fflush(output_file);
 >         return_value = ML_LOGGING_MESSAGE_LOGGED;
 > 
 >         va_end(args);

Why are you calling va_end() twice?  This is wrong.

You still haven't given us enough code.  In particular you haven't
show us the args that get passed to this function.  You haven't even
shown us all of this function.

Andrew.

      reply	other threads:[~2006-05-13 10:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-12 14:44 Vivek Katakam
2006-05-12 14:47 ` Andrew Haley
2006-05-12 14:53 ` John Love-Jensen
2006-05-13  9:50   ` Vivek Katakam
2006-05-13 10:06     ` Andrew Haley [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17509.59329.206688.755244@dell.pink \
    --to=aph@redhat.com \
    --cc=eljay@adobe.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=vivek1717@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).