Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: -lmcheck new FAILs for __FILE__  [Re: FYI: fix PR macros/13205]
Date: Mon, 21 May 2012 15:27:00 -0000	[thread overview]
Message-ID: <8762bph7w9.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20120519075208.GA3761@host2.jankratochvil.net> (Jan Kratochvil's	message of "Sat, 19 May 2012 09:52:08 +0200")

>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Jan> FAIL: gdb.base/macscp.exp: info macro __FILE__ before running
Jan> FAIL: gdb.base/macscp.exp: print __FILE__

I reproduced it with valgrind and I'm checking in the appended to fix it.

Tom

2012-05-21  Tom Tromey  <tromey@redhat.com>

	* macroexp.c (macro_stringify): Terminate the string.

diff --git a/gdb/macroexp.c b/gdb/macroexp.c
index 22b904e..fa34311 100644
--- a/gdb/macroexp.c
+++ b/gdb/macroexp.c
@@ -704,6 +704,7 @@ macro_stringify (const char *str)
 
   init_buffer (&buffer, len);
   stringify (&buffer, str, len);
+  appendc (&buffer, '\0');
 
   return free_buffer_return_text (&buffer);
 }


      reply	other threads:[~2012-05-21 15:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-16 20:28 FYI: fix PR macros/13205 Tom Tromey
2012-05-16 20:43 ` Pedro Alves
2012-05-16 20:44   ` Tom Tromey
2012-05-19  7:52 ` -lmcheck new FAILs for __FILE__ [Re: FYI: fix PR macros/13205] Jan Kratochvil
2012-05-21 15:27   ` Tom Tromey [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=8762bph7w9.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.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