diff options
Diffstat (limited to 'libgo/go/runtime/panic.go')
-rw-r--r-- | libgo/go/runtime/panic.go | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/libgo/go/runtime/panic.go b/libgo/go/runtime/panic.go index 8e56bbe..21ffb5c 100644 --- a/libgo/go/runtime/panic.go +++ b/libgo/go/runtime/panic.go @@ -61,24 +61,13 @@ func panicCheck1(pc uintptr, msg string) { } // Same as above, but calling from the runtime is allowed. -// -// Using this function is necessary for any panic that may be -// generated by runtime.sigpanic, since those are always called by the -// runtime. func panicCheck2(err string) { - // panic allocates, so to avoid recursive malloc, turn panics - // during malloc into throws. gp := getg() if gp != nil && gp.m != nil && gp.m.mallocing != 0 { throw(err) } } -// Many of the following panic entry-points turn into throws when they -// happen in various runtime contexts. These should never happen in -// the runtime, and if they do, they indicate a serious issue and -// should not be caught by user code. -// // The panic{Index,Slice,divide,shift} functions are called by // code generated by the compiler for out of bounds index expressions, // out of bounds slice expressions, division by zero, and shift by negative. @@ -208,10 +197,6 @@ func panicmem() { panic(memoryError) } -func throwinit() { - throw("recursive call during initialization - linker skew") -} - // deferproc creates a new deferred function. // The compiler turns a defer statement into a call to this. // frame points into the stack frame; it is used to determine which @@ -1200,6 +1185,8 @@ func dopanic_m(gp *g, pc, sp uintptr) bool { lock(&deadlock) } + printDebugLog() + return docrash } |