runtime: Don't use filename without '/' for backtrace library.
Fixes http://golang.org/issue/6715. From-SVN: r204828
This commit is contained in:
parent
58c55a329a
commit
37512c0399
1 changed files with 7 additions and 0 deletions
|
@ -101,6 +101,13 @@ __go_get_backtrace_state ()
|
|||
const char *filename;
|
||||
|
||||
filename = (const char *) runtime_progname ();
|
||||
|
||||
/* If there is no '/' in FILENAME, it was found on PATH, and
|
||||
might not be the same as the file with the same name in the
|
||||
current directory. */
|
||||
if (__builtin_strchr (filename, '/') == NULL)
|
||||
filename = NULL;
|
||||
|
||||
back_state = backtrace_create_state (filename, 1, error_callback, NULL);
|
||||
}
|
||||
runtime_unlock (&back_state_lock);
|
||||
|
|
Loading…
Add table
Reference in a new issue