diff options
| author | Russ Cox <rsc@golang.org> | 2014-02-20 16:18:05 -0500 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2014-02-20 16:18:05 -0500 |
| commit | e56c6e75353d32a97a301d4890b58a4e10963d82 (patch) | |
| tree | 9b966f33cda2ca69d863d11ec638006ccbb40a52 /src/pkg/runtime/proc.c | |
| parent | 67c83db60db744c17316a4dc1d590c9649d66e6c (diff) | |
| download | go-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.c | 1 |
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) { |
