diff options
author | Ian Lance Taylor <iant@google.com> | 2015-05-05 16:38:57 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2015-05-05 16:38:57 +0000 |
commit | 590eb3b8463b20e17ab7e29c6c9ffb4e9ce41ba2 (patch) | |
tree | dd7e1d70888d6d5dda6b5331020269bd661b06ae /libgo | |
parent | a75aae7755e7a6d1ca24fad091f048b30fe5dfd1 (diff) |
PR go/66016
runtime: Don't crash in Func.Name if the Func is nil.
Related to Go issue 10696
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@222816 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo')
-rw-r--r-- | libgo/runtime/go-caller.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libgo/runtime/go-caller.c b/libgo/runtime/go-caller.c index ed6fd107b0e..d6901e07377 100644 --- 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; } |