This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: libgo patch RFA: Fix printing of names in stack dumps
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: gcc-patches at gcc dot gnu dot org, gofrontend-dev at googlegroups dot com
- Date: Thu, 7 Jun 2012 11:23:37 +0200
- Subject: Re: libgo patch RFA: Fix printing of names in stack dumps
- References: <mcrr4troci5.fsf@dhcp-172-18-216-180.mtv.corp.google.com>
On Thu, Jun 7, 2012 at 8:35 AM, Ian Lance Taylor <iant@google.com> wrote:
> Go strings are not necessarily NUL terminated. ?The stack dump code was
> erroneously using %s to print the contents of a Go string. ?The
> runtime_printf function that it uses supports %S to print a Go string.
> This patch fixes the code to use %S. ?Without this a stack dump
> sometimes prints random junk characters at the end of a function or file
> name in a stack dump.
>
> Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu.
>
> Committed to mainline. ?OK for 4.7 branch? ?It's nice to have, since it
> avoids printing garbage, but it's not critical.
Please wait until after 4.7.1 is released for this and all further patches
that are not fixes for bootstrap/build issues.
Thanks,
Richard.
> Ian
>