From: Ian Lance Taylor Date: Tue, 5 May 2015 16:38:45 +0000 (+0000) Subject: re PR go/66016 (Accessing nil Func's name results in crash) X-Git-Tag: releases/gcc-4.9.3~165 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa180d19869fb1b791281ebdb20f9c2b4be99717;p=thirdparty%2Fgcc.git 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: r222815 --- diff --git a/libgo/runtime/go-caller.c b/libgo/runtime/go-caller.c index a3e04240d9ce..f0ee4ebf02d9 100644 --- a/libgo/runtime/go-caller.c +++ b/libgo/runtime/go-caller.c @@ -255,6 +255,8 @@ String runtime_funcname_go (Func *f) String runtime_funcname_go (Func *f) { + if (f == NULL) + return runtime_gostringnocopy ((const byte *) ""); return f->name; }