• Russ Cox's avatar
    runtime: print signal information during panic · 12307008
    Russ Cox authored
    $ 6.out
    panic: runtime error: invalid memory address or nil pointer dereference
    
    [signal 11 code=0x1 addr=0x0 pc=0x1c16]
    
    runtime.panic+0xa7 /Users/rsc/g/go/src/pkg/runtime/proc.c:1089
    	runtime.panic(0xf6c8, 0x25c010)
    runtime.panicstring+0x69 /Users/rsc/g/go/src/pkg/runtime/runtime.c:88
    	runtime.panicstring(0x24814, 0x0)
    runtime.sigpanic+0x144 /Users/rsc/g/go/src/pkg/runtime/darwin/thread.c:465
    	runtime.sigpanic()
    main.f+0x16 /Users/rsc/x.go:5
    	main.f()
    main.main+0x1c /Users/rsc/x.go:9
    	main.main()
    runtime.mainstart+0xf /Users/rsc/g/go/src/pkg/runtime/amd64/asm.s:77
    	runtime.mainstart()
    runtime.goexit /Users/rsc/g/go/src/pkg/runtime/proc.c:149
    	runtime.goexit()
    
    R=r
    CC=golang-dev
    https://golang.org/cl/4036042
    12307008
golden.out 2.73 KB