Commit bd9e8f7e by Ian Lance Taylor

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
parent 460f31ee
...@@ -231,6 +231,8 @@ String runtime_funcname_go (Func *f) ...@@ -231,6 +231,8 @@ String runtime_funcname_go (Func *f)
String String
runtime_funcname_go (Func *f) runtime_funcname_go (Func *f)
{ {
if (f == NULL)
return runtime_gostringnocopy ((const byte *) "");
return f->name; return f->name;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment