From e0a0c2f4c6b7db9634f7cdd8b8516bac156d12d7 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 23 Jan 2015 19:49:53 +0000 Subject: [PATCH] re PR go/64595 (go programs abort when debug info is stripped) PR go/64595 runtime: Don't crash in runtime_callers if no debug info available. From-SVN: r220057 --- libgo/runtime/go-callers.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libgo/runtime/go-callers.c b/libgo/runtime/go-callers.c index 047034539a9..34a21188e3a 100644 --- a/libgo/runtime/go-callers.c +++ b/libgo/runtime/go-callers.c @@ -129,6 +129,11 @@ static void error_callback (void *data __attribute__ ((unused)), const char *msg, int errnum) { + if (errnum == -1) + { + /* No debug info available. Carry on as best we can. */ + return; + } if (errnum != 0) runtime_printf ("%s errno %d\n", msg, errnum); runtime_throw (msg); -- 2.30.2