From 156962872575382697a0487030cd5777312d6d0c Mon Sep 17 00:00:00 2001 From: Dmitriy Vyukov Date: Thu, 13 Mar 2014 13:25:59 +0400 Subject: runtime: harden conditions when runtime panics on crash This is especially important for SetPanicOnCrash, but also useful for e.g. nil deref in mallocgc. Panics on such crashes can't lead to anything useful, only to deadlocks, hangs and obscure crashes. This is a copy of broken but already LGTMed https://golang.org/cl/68540043/ TBR=rsc R=rsc CC=golang-codereviews https://golang.org/cl/75320043 --- src/pkg/runtime/runtime.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/pkg/runtime/runtime.h') diff --git a/src/pkg/runtime/runtime.h b/src/pkg/runtime/runtime.h index 0682a8026a..ecff533f59 100644 --- a/src/pkg/runtime/runtime.h +++ b/src/pkg/runtime/runtime.h @@ -836,6 +836,7 @@ void runtime·goenvs_unix(void); void* runtime·getu(void); void runtime·throw(int8*); void runtime·panicstring(int8*); +bool runtime·canpanic(G*); void runtime·prints(int8*); void runtime·printf(int8*, ...); byte* runtime·mchr(byte*, byte, byte*); -- cgit v1.3-5-g9baa