projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
460f31e
)
re PR go/66016 (Accessing nil Func's name results in crash)
author
Ian Lance Taylor
<ian@gcc.gnu.org>
Tue, 5 May 2015 16:38:57 +0000
(16:38 +0000)
committer
Ian Lance Taylor
<ian@gcc.gnu.org>
Tue, 5 May 2015 16:38:57 +0000
(16:38 +0000)
PR go/66016
runtime: Don't crash in Func.Name if the Func is nil.
Related to Go issue 10696
From-SVN: r222816
libgo/runtime/go-caller.c
patch
|
blob
|
history
diff --git
a/libgo/runtime/go-caller.c
b/libgo/runtime/go-caller.c
index ed6fd107b0e1b702b47788ac5d100701d812a2cc..d6901e07377c5c68dea043dbb872dd363865ee57 100644
(file)
--- a/
libgo/runtime/go-caller.c
+++ b/
libgo/runtime/go-caller.c
@@
-231,6
+231,8
@@
String runtime_funcname_go (Func *f)
String
runtime_funcname_go (Func *f)
{
+ if (f == NULL)
+ return runtime_gostringnocopy ((const byte *) "");
return f->name;
}