public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* libgo patch committed: Permit nil Func in Func.Name
@ 2015-05-05 16:39 Ian Lance Taylor
  2015-05-05 17:35 ` Andreas Schwab
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Lance Taylor @ 2015-05-05 16:39 UTC (permalink / raw)
  To: gcc-patches, gofrontend-dev

[-- Attachment #1: Type: text/plain, Size: 304 bytes --]

The gc toolchain permits Func to be nil when calling the
runtime.Func.Name method, returning an empty string.  This patch
changes libgo to do the same, rather than crashing.  This is GCC PR
66016.  Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu.
Committed to mainline and 4.9 branch.

Ian

[-- Attachment #2: foo.txt --]
[-- Type: text/plain, Size: 333 bytes --]

diff -r f3c36747f019 libgo/runtime/go-caller.c
--- a/libgo/runtime/go-caller.c	Thu Apr 30 13:40:30 2015 -0700
+++ b/libgo/runtime/go-caller.c	Tue May 05 07:12:06 2015 -0700
@@ -231,6 +231,8 @@
 String
 runtime_funcname_go (Func *f)
 {
+  if (f == NULL)
+    return runtime_gostringnocopy ((const byte *) "");
   return f->name;
 }
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: libgo patch committed: Permit nil Func in Func.Name
  2015-05-05 16:39 libgo patch committed: Permit nil Func in Func.Name Ian Lance Taylor
@ 2015-05-05 17:35 ` Andreas Schwab
  2015-05-05 17:39   ` Ian Lance Taylor
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Schwab @ 2015-05-05 17:35 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc-patches, gofrontend-dev

Ian Lance Taylor <iant@golang.org> writes:

> Committed to mainline and 4.9 branch.

What about the 5 branch?

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: libgo patch committed: Permit nil Func in Func.Name
  2015-05-05 17:35 ` Andreas Schwab
@ 2015-05-05 17:39   ` Ian Lance Taylor
  0 siblings, 0 replies; 3+ messages in thread
From: Ian Lance Taylor @ 2015-05-05 17:39 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: gcc-patches, gofrontend-dev

On Tue, May 5, 2015 at 10:35 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> Ian Lance Taylor <iant@golang.org> writes:
>
>> Committed to mainline and 4.9 branch.
>
> What about the 5 branch?

Oh yeah.  Thanks.  Committing to GCC 5 branch shortly, after tests complete.

Ian

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-05-05 17:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-05 16:39 libgo patch committed: Permit nil Func in Func.Name Ian Lance Taylor
2015-05-05 17:35 ` Andreas Schwab
2015-05-05 17:39   ` Ian Lance Taylor

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).