aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/proc.c
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-02-20 16:18:05 -0500
committerRuss Cox <rsc@golang.org>2014-02-20 16:18:05 -0500
commite56c6e75353d32a97a301d4890b58a4e10963d82 (patch)
tree9b966f33cda2ca69d863d11ec638006ccbb40a52 /src/pkg/runtime/proc.c
parent67c83db60db744c17316a4dc1d590c9649d66e6c (diff)
downloadgo-e56c6e75353d32a97a301d4890b58a4e10963d82.tar.xz
runtime/debug: add SetPanicOnFault
SetPanicOnFault allows recovery from unexpected memory faults. This can be useful if you are using a memory-mapped file or probing the address space of the current program. LGTM=r R=r CC=golang-codereviews https://golang.org/cl/66590044
Diffstat (limited to 'src/pkg/runtime/proc.c')
-rw-r--r--src/pkg/runtime/proc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c
index 7799dc8b52..986136d7e6 100644
--- a/src/pkg/runtime/proc.c
+++ b/src/pkg/runtime/proc.c
@@ -1449,6 +1449,7 @@ goexit0(G *gp)
gp->status = Gdead;
gp->m = nil;
gp->lockedm = nil;
+ gp->paniconfault = 0;
m->curg = nil;
m->lockedg = nil;
if(m->locked & ~LockExternal) {