Commit 94e12bd4 by Ian Lance Taylor

runtime: don't stat a NULL filename

    
    Noticed in https://gcc.gnu.org/PR86331.
    
    Reviewed-on: https://go-review.googlesource.com/121417

From-SVN: r262234
parent eacb16dc
baaaf1e0f1e9a54ea2dfe475154c85c83ec03740 e1fcce0aec27b1f50ac0e736f39f4c806c2a5baa
The first line of this file holds the git revision number of the last The first line of this file holds the git revision number of the last
merge done from the gofrontend repository. merge done from the gofrontend repository.
...@@ -116,7 +116,7 @@ __go_get_backtrace_state () ...@@ -116,7 +116,7 @@ __go_get_backtrace_state ()
argv[0] (http://gcc.gnu.org/PR61895). It would be nice to argv[0] (http://gcc.gnu.org/PR61895). It would be nice to
have a better check for whether this file is the real have a better check for whether this file is the real
executable. */ executable. */
if (stat (filename, &s) < 0 || s.st_size < 1024) if (filename != NULL && (stat (filename, &s) < 0 || s.st_size < 1024))
filename = NULL; filename = NULL;
back_state = backtrace_create_state (filename, 1, error_callback, NULL); back_state = backtrace_create_state (filename, 1, error_callback, NULL);
......
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