PR go/65349
commit9d68290acef4b19e56992477c346e814cf8e40c5
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 9 Mar 2015 23:40:58 +0000 (9 23:40 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 9 Mar 2015 23:40:58 +0000 (9 23:40 +0000)
tree1a0a01f1fe702feadf8fd20a3cf9fa97c02fd779
parent7bb12776cc9082f80bf319b2c0d9942c7614a1e4
PR go/65349
runtime: Don't call malloc from __go_file_line callback.

When crashing, we call runtime_printcreatedby which calls
__go_file_line which used to call the Go malloc.  If we are
crashing due to a signal due to heap corruption of some sort,
the GO malloc lock might already be held, leading to a crash
within a crash.  Avoid that by assuming that the libbacktrace
strings will stick around, as we already do in go-callers.c.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@221291 138bc75d-0d04-0410-961f-82ee72b054a4
libgo/runtime/go-caller.c