diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2015-05-05 16:38:57 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2015-05-05 16:38:57 +0000 |
commit | bd9e8f7e4a07c659959c4c5f2b874c2a292924a1 (patch) | |
tree | dd7e1d70888d6d5dda6b5331020269bd661b06ae /libgo | |
parent | 460f31eeeb19cfe6e28120586f7a28ff53994723 (diff) | |
download | gcc-bd9e8f7e4a07c659959c4c5f2b874c2a292924a1.tar.gz |
re PR go/66016 (Accessing nil Func's name results in crash)
PR go/66016
runtime: Don't crash in Func.Name if the Func is nil.
Related to Go issue 10696
From-SVN: r222816
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; } |