1
0
mirror of https://github.com/golang/go synced 2024-11-13 18:10:24 -07:00
go/test/golden.out
Russ Cox 03e9ea5b74 runtime: simplify stack traces
Make the stack traces more readable for new
Go programmers while preserving their utility for old hands.

- Change status number [4] to string.
- Elide frames in runtime package (internal details).
- Swap file:line and arguments.
- Drop 'created by' for main goroutine.
- Show goroutines in order of allocation:
  implies main goroutine first if nothing else.

There is no option to get the extra frames back.
Uncomment 'return 1' at the bottom of symtab.c.

$ 6.out
throw: all goroutines are asleep - deadlock!

goroutine 1 [chan send]:
main.main()
       /Users/rsc/g/go/src/pkg/runtime/x.go:22 +0x8a

goroutine 2 [select (no cases)]:
main.sel()
       /Users/rsc/g/go/src/pkg/runtime/x.go:11 +0x18
created by main.main
       /Users/rsc/g/go/src/pkg/runtime/x.go:19 +0x23

goroutine 3 [chan receive]:
main.recv(0xf8400010a0, 0x0)
       /Users/rsc/g/go/src/pkg/runtime/x.go:15 +0x2e
created by main.main
       /Users/rsc/g/go/src/pkg/runtime/x.go:20 +0x50

goroutine 4 [chan receive (nil chan)]:
main.recv(0x0, 0x0)
       /Users/rsc/g/go/src/pkg/runtime/x.go:15 +0x2e
created by main.main
       /Users/rsc/g/go/src/pkg/runtime/x.go:21 +0x66
$

$ 6.out index
panic: runtime error: index out of range

goroutine 1 [running]:
main.main()
        /Users/rsc/g/go/src/pkg/runtime/x.go:25 +0xb9
$

$ 6.out nil
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x22ca]

goroutine 1 [running]:
main.main()
        /Users/rsc/g/go/src/pkg/runtime/x.go:28 +0x211
$

$ 6.out panic
panic: panic

goroutine 1 [running]:
main.main()
        /Users/rsc/g/go/src/pkg/runtime/x.go:30 +0x101
$

R=golang-dev, qyzhai, n13m3y3r, r
CC=golang-dev
https://golang.org/cl/4907048
2011-08-22 23:26:39 -04:00

159 lines
2.7 KiB
Plaintext

== ./
=========== ./cmp2.go
panic: runtime error: comparing uncomparable type []int
=========== ./cmp3.go
panic: runtime error: comparing uncomparable type []int
=========== ./cmp4.go
panic: runtime error: hash of unhashable type []int
=========== ./cmp5.go
panic: runtime error: hash of unhashable type []int
=========== ./deferprint.go
printing: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
42 true false true +1.500000e+000 world 0x0 [0/0]0x0 0x0 0x0 255
=========== ./goprint.go
42 true false true +1.500000e+000 world 0x0 [0/0]0x0 0x0 0x0 255
=========== ./helloworld.go
hello, world
=========== ./peano.go
0! = 1
1! = 1
2! = 2
3! = 6
4! = 24
5! = 120
6! = 720
7! = 5040
8! = 40320
9! = 362880
=========== ./printbig.go
-9223372036854775808
9223372036854775807
=========== ./sigchld.go
survived SIGCHLD
=========== ./sinit.go
FAIL
=========== ./turing.go
Hello World!
== ken/
=========== ken/cplx0.go
(+5.000000e+000+6.000000e+000i)
(+5.000000e+000+6.000000e+000i)
(+5.000000e+000+6.000000e+000i)
(+5.000000e+000+6.000000e+000i)
=========== ken/cplx3.go
(+1.292308e+000-1.384615e-001i)
(+1.292308e+000-1.384615e-001i)
=========== ken/cplx4.go
c = (-5.000000-6.000000i)
c = (5.000000+6.000000i)
c = (5.000000+6.000000i)
c = (5.000000+6.000000i)
c = (5+6i)
c = (13+7i)
=========== ken/cplx5.go
(+5.000000e+000-5.000000e+000i)
(+5.000000e+000-5.000000e+000i)
(+5.000000e+000-5.000000e+000i)
(+5.000000e+000-5.000000e+000i)
(+5.000000e+000-5.000000e+000i)
(+5.000000e+000-5.000000e+000i)
(+5.000000e+000-5.000000e+000i)
=========== ken/intervar.go
print 1 bio 2 file 3 -- abc
=========== ken/label.go
100
=========== ken/rob1.go
9876543210
=========== ken/rob2.go
(defn foo (add 12 34))
=========== ken/simpprint.go
hello world
=========== ken/simpswitch.go
0out01out12out2aout34out4fiveout56out6aout78out89out9
=========== ken/string.go
abcxyz-abcxyz-abcxyz-abcxyz-abcxyz-abcxyz-abcxyz
== chan/
=========== chan/doubleselect.go
PASS
=========== chan/nonblock.go
PASS
== interface/
=========== interface/fail.go
panic: interface conversion: *main.S is not main.I: missing method Foo
=========== interface/returntype.go
panic: interface conversion: *main.S is not main.I2: missing method Name
== nilptr/
== syntax/
== fixedbugs/
=========== fixedbugs/bug027.go
hi
0 44444
1 3333
2 222
3 11
4 0
0 44444
1 3333
2 222
3 11
4 0
=========== fixedbugs/bug067.go
ok
=========== fixedbugs/bug070.go
outer loop top k 0
inner loop top i 0
do break
broke
=========== fixedbugs/bug093.go
M
=========== fixedbugs/bug113.go
panic: interface conversion: interface is int, not int32
=========== fixedbugs/bug148.go
2 3
panic: interface conversion: interface is main.T, not main.T
=========== fixedbugs/bug328.go
0x0
== bugs/