runtime: don't stat a NULL filename

Noticed in https://gcc.gnu.org/PR86331.

Change-Id: I6bce7dd8fad05a13b5e95a09077a9978f637c69f
Reviewed-on: https://go-review.googlesource.com/121417
Reviewed-by: Than McIntosh <thanm@google.com>
diff --git a/libgo/runtime/go-caller.c b/libgo/runtime/go-caller.c
index 6b26ddc..7f36955 100644
--- a/libgo/runtime/go-caller.c
+++ b/libgo/runtime/go-caller.c
@@ -116,7 +116,7 @@
 	 argv[0] (http://gcc.gnu.org/PR61895).  It would be nice to
 	 have a better check for whether this file is the real
 	 executable.  */
-      if (stat (filename, &s) < 0 || s.st_size < 1024)
+      if (filename != NULL && (stat (filename, &s) < 0 || s.st_size < 1024))
 	filename = NULL;
 
       back_state = backtrace_create_state (filename, 1, error_callback, NULL);