What version of Go are you using (go version)?
$ go version
go version go1.18rc1 darwin/amd64
Does this issue reproduce with the latest release?
gotip playground also fails
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/andrew/Library/Caches/go-build"
GOENV="/Users/andrew/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/andrew/Go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/andrew/Go:/Users/andrew/Dropbox/suneido_tests"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/Users/andrew/sdk/go1.18rc1"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/Users/andrew/sdk/go1.18rc1/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.18rc1"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/andrew/Dropbox/gsuneido18/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/dc/0y3gfqnn56g6pd8d3_b5wz300000gn/T/go-build1447860490=/tmp/go-build -gno-record-gcc-switches -fno-common"
GOROOT/bin/go version: go version go1.17.7 darwin/amd64
GOROOT/bin/go tool compile -V: compile version go1.18rc1
uname -v: Darwin Kernel Version 21.3.0: Wed Jan 5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_X86_64
ProductName: macOS
ProductVersion: 12.2.1
BuildVersion: 21D62
lldb --version: lldb-1205.0.27.3
Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55)
What did you do?
https://gotipplay.golang.org/p/Gg7oSlfPoHI
What did you expect to see?
no error
What did you see instead?
It appears to fail on: if x.Equal(xe, ye) {
Although if you comment out the following append line, then it passes.
In the gotip playground it gives:
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x4b1501]
On my Mac it gives:
runtime: unexpected return pc for runtime.sigpanic
=== RUN TestIntersectSS
xe [1]
ye [2 3]
x [[1]]
runtime: unexpected return pc for runtime.sigpanic called from 0x1127eda
stack: frame={sp:0xc00007cd80, fp:0xc00007cdd0} stack=[0xc00007c000,0xc00007d000)
0x000000c00007cc80: 0x000000c00007cc88 0x0000000001032580
0x000000c00007cc90: 0x0000000001047c76 0x000000c00007cd80
0x000000c00007cca0: 0x000000c000138340 0x0000000000000000
0x000000c00007ccb0: 0x000000c00007cd70 0x0000000001032d46
0x000000c00007ccc0: 0x0000000000000001 0x0000000001101da0
0x000000c00007ccd0: 0x000000c000104078 0x000000c0000240a0
0x000000c00007cce0: 0x0000000000000000 0x0000000000000000
0x000000c00007ccf0: 0x000000000107d6c0 0x000000c000104060
0x000000c00007cd00: 0x000000c00007ccf0 0x000000c00007cd70
0x000000c00007cd10: 0x0000000001068b5e 0x000000c000104060
0x000000c00007cd20: 0x000000c00007cd48 0x000000c000138360
0x000000c00007cd30: 0x000000c000138340 0x0000000000000000
0x000000c00007cd40: 0x0000000001102ac0 0x00000000011f2ca0
0x000000c00007cd50: 0x0000000000000000 0x0000000000000000
0x000000c00007cd60: 0x0000000000000000 0x0000000000000000
0x000000c00007cd70: 0x000000c00007cdc0 0x0000000001047c76
0x000000c00007cd80: <0x0000000001102ac0 0x00000000011f2ca0
0x000000c00007cd90: 0x0000000000000008 0x000000c00007cdc0
0x000000c00007cda0: 0x0000000000000008 0x000000c000103110
0x000000c00007cdb0: 0x0000000000000000 0x0000000000000000
0x000000c00007cdc0: 0x000000c00007cef8 !0x0000000001127eda
0x000000c00007cdd0: >0x0000000001149620 0x000000c00000e018
0x000000c00007cde0: 0x000000c00007ce98 0x0000000000000002
0x000000c00007cdf0: 0x0000000000000002 0x0000000000000000
0x000000c00007ce00: 0x00000000010b2a80 0x00000000011d40c8
0x000000c00007ce10: 0x0000000000000000 0x0000000000000000
0x000000c00007ce20: 0x0000000000000002 0x0000000000000002
0x000000c00007ce30: 0x0000000000000001 0x0000000000000001
0x000000c00007ce40: 0x0000000000000000 0x0000000000000000
0x000000c00007ce50: 0x0000000000000000 0x000000c0000162c0
0x000000c00007ce60: 0x000000c0000162b8 0x000000c00007cf48
0x000000c00007ce70: 0x000000c00000c090 0x000000c00000c090
0x000000c00007ce80: 0x000000c000088f10 0x0000000000000001
0x000000c00007ce90: 0x0000000000000001 0x00000000010fcd00
0x000000c00007cea0: 0x0000000001148d80 0x0000000001101da0
0x000000c00007ceb0: 0x000000c00000c0d8 0x00000000010fcd00
0x000000c00007cec0: 0x0000000001148d70 0x00000000010fab00
fatal error: unknown caller pc
runtime stack:
runtime.throw({0x111ff47?, 0x11e4180?})
/Users/andrew/sdk/go1.18rc1/src/runtime/panic.go:992 +0x71
runtime.gentraceback(0xc000138340?, 0x10648df?, 0xc00007cbe8?, 0x11fbde0?, 0x0, 0x0, 0x7fffffff, 0x7ff7bfeff468, 0x20?, 0x0)
/Users/andrew/sdk/go1.18rc1/src/runtime/traceback.go:254 +0x1a36
runtime.addOneOpenDeferFrame.func1()
/Users/andrew/sdk/go1.18rc1/src/runtime/panic.go:599 +0x6b
runtime.systemstack()
/Users/andrew/sdk/go1.18rc1/src/runtime/asm_amd64.s:469 +0x49
goroutine 4 [running]:
runtime.systemstack_switch()
/Users/andrew/sdk/go1.18rc1/src/runtime/asm_amd64.s:436 fp=0xc00007cc80 sp=0xc00007cc78 pc=0x1060880
runtime.addOneOpenDeferFrame(0x1?, 0x1101da0?, 0xc000104078?)
/Users/andrew/sdk/go1.18rc1/src/runtime/panic.go:598 +0x69 fp=0xc00007ccc0 sp=0xc00007cc80 pc=0x1032529
panic({0x1102ac0, 0x11f2ca0})
/Users/andrew/sdk/go1.18rc1/src/runtime/panic.go:798 +0x106 fp=0xc00007cd80 sp=0xc00007ccc0 pc=0x1032d46
runtime: unexpected return pc for runtime.sigpanic called from 0x1127eda
stack: frame={sp:0xc00007cd80, fp:0xc00007cdd0} stack=[0xc00007c000,0xc00007d000)
0x000000c00007cc80: 0x000000c00007cc88 0x0000000001032580 <runtime.addOneOpenDeferFrame.func1+0x0000000000000000>
0x000000c00007cc90: 0x0000000001047c76 <runtime.sigpanic+0x0000000000000336> 0x000000c00007cd80
0x000000c00007cca0: 0x000000c000138340 0x0000000000000000
0x000000c00007ccb0: 0x000000c00007cd70 0x0000000001032d46 <runtime.gopanic+0x0000000000000106>
0x000000c00007ccc0: 0x0000000000000001 0x0000000001101da0
0x000000c00007ccd0: 0x000000c000104078 0x000000c0000240a0
0x000000c00007cce0: 0x0000000000000000 0x0000000000000000
0x000000c00007ccf0: 0x000000000107d6c0 <internal/poll.(*FD).Write.func1+0x0000000000000000> 0x000000c000104060
0x000000c00007cd00: 0x000000c00007ccf0 0x000000c00007cd70
0x000000c00007cd10: 0x0000000001068b5e <sync.(*Pool).pin+0x000000000000001e> 0x000000c000104060
0x000000c00007cd20: 0x000000c00007cd48 0x000000c000138360
0x000000c00007cd30: 0x000000c000138340 0x0000000000000000
0x000000c00007cd40: 0x0000000001102ac0 0x00000000011f2ca0
0x000000c00007cd50: 0x0000000000000000 0x0000000000000000
0x000000c00007cd60: 0x0000000000000000 0x0000000000000000
0x000000c00007cd70: 0x000000c00007cdc0 0x0000000001047c76 <runtime.sigpanic+0x0000000000000336>
0x000000c00007cd80: <0x0000000001102ac0 0x00000000011f2ca0
0x000000c00007cd90: 0x0000000000000008 0x000000c00007cdc0
0x000000c00007cda0: 0x0000000000000008 0x000000c000103110
0x000000c00007cdb0: 0x0000000000000000 0x0000000000000000
0x000000c00007cdc0: 0x000000c00007cef8 !0x0000000001127eda
0x000000c00007cdd0: >0x0000000001149620 0x000000c00000e018
0x000000c00007cde0: 0x000000c00007ce98 0x0000000000000002
0x000000c00007cdf0: 0x0000000000000002 0x0000000000000000
0x000000c00007ce00: 0x00000000010b2a80 <testing.tRunner+0x0000000000000000> 0x00000000011d40c8
0x000000c00007ce10: 0x0000000000000000 0x0000000000000000
0x000000c00007ce20: 0x0000000000000002 0x0000000000000002
0x000000c00007ce30: 0x0000000000000001 0x0000000000000001
0x000000c00007ce40: 0x0000000000000000 0x0000000000000000
0x000000c00007ce50: 0x0000000000000000 0x000000c0000162c0
0x000000c00007ce60: 0x000000c0000162b8 0x000000c00007cf48
0x000000c00007ce70: 0x000000c00000c090 0x000000c00000c090
0x000000c00007ce80: 0x000000c000088f10 0x0000000000000001
0x000000c00007ce90: 0x0000000000000001 0x00000000010fcd00
0x000000c00007cea0: 0x0000000001148d80 0x0000000001101da0
0x000000c00007ceb0: 0x000000c00000c0d8 0x00000000010fcd00
0x000000c00007cec0: 0x0000000001148d70 0x00000000010fab00
runtime.panicmem(...)
/Users/andrew/sdk/go1.18rc1/src/runtime/panic.go:220
runtime.sigpanic()
/Users/andrew/sdk/go1.18rc1/src/runtime/signal_unix.go:818 +0x336 fp=0xc00007cdd0 sp=0xc00007cd80 pc=0x1047c76
created by testing.(*T).Run
/Users/andrew/sdk/go1.18rc1/src/testing/testing.go:1486 +0x35f
goroutine 1 [chan receive]:
testing.(*T).Run(0xc000138000, {0x111f5f4?, 0xa93fd983ba5?}, 0x1127d00)
/Users/andrew/sdk/go1.18rc1/src/testing/testing.go:1487 +0x37a
testing.runTests.func1(0xc000100450?)
/Users/andrew/sdk/go1.18rc1/src/testing/testing.go:1839 +0x6e
testing.tRunner(0xc000138000, 0xc000131cd8)
/Users/andrew/sdk/go1.18rc1/src/testing/testing.go:1439 +0x102
testing.runTests(0xc000116140?, {0x11f2f40, 0x1, 0x1}, {0x128c108?, 0x40?, 0x11fb6e0?})
/Users/andrew/sdk/go1.18rc1/src/testing/testing.go:1837 +0x457
testing.(*M).Run(0xc000116140)
/Users/andrew/sdk/go1.18rc1/src/testing/testing.go:1719 +0x5d9
main.main()
_testmain.go:47 +0x1aa
FAIL github.com/apmckinlay/gsuneido/util/generic/bug 0.352s
What version of Go are you using (
go version)?Does this issue reproduce with the latest release?
gotip playground also fails
What operating system and processor architecture are you using (
go env)?go envOutputWhat did you do?
https://gotipplay.golang.org/p/Gg7oSlfPoHI
What did you expect to see?
no error
What did you see instead?
It appears to fail on:
if x.Equal(xe, ye) {Although if you comment out the following append line, then it passes.
In the gotip playground it gives:
On my Mac it gives:
runtime: unexpected return pc for runtime.sigpanic=== RUN TestIntersectSS xe [1] ye [2 3] x [[1]] runtime: unexpected return pc for runtime.sigpanic called from 0x1127eda stack: frame={sp:0xc00007cd80, fp:0xc00007cdd0} stack=[0xc00007c000,0xc00007d000) 0x000000c00007cc80: 0x000000c00007cc88 0x0000000001032580 0x000000c00007cc90: 0x0000000001047c76 0x000000c00007cd80 0x000000c00007cca0: 0x000000c000138340 0x0000000000000000 0x000000c00007ccb0: 0x000000c00007cd70 0x0000000001032d46 0x000000c00007ccc0: 0x0000000000000001 0x0000000001101da0 0x000000c00007ccd0: 0x000000c000104078 0x000000c0000240a0 0x000000c00007cce0: 0x0000000000000000 0x0000000000000000 0x000000c00007ccf0: 0x000000000107d6c0 0x000000c000104060 0x000000c00007cd00: 0x000000c00007ccf0 0x000000c00007cd70 0x000000c00007cd10: 0x0000000001068b5e 0x000000c000104060 0x000000c00007cd20: 0x000000c00007cd48 0x000000c000138360 0x000000c00007cd30: 0x000000c000138340 0x0000000000000000 0x000000c00007cd40: 0x0000000001102ac0 0x00000000011f2ca0 0x000000c00007cd50: 0x0000000000000000 0x0000000000000000 0x000000c00007cd60: 0x0000000000000000 0x0000000000000000 0x000000c00007cd70: 0x000000c00007cdc0 0x0000000001047c76 0x000000c00007cd80: <0x0000000001102ac0 0x00000000011f2ca0 0x000000c00007cd90: 0x0000000000000008 0x000000c00007cdc0 0x000000c00007cda0: 0x0000000000000008 0x000000c000103110 0x000000c00007cdb0: 0x0000000000000000 0x0000000000000000 0x000000c00007cdc0: 0x000000c00007cef8 !0x0000000001127eda 0x000000c00007cdd0: >0x0000000001149620 0x000000c00000e018 0x000000c00007cde0: 0x000000c00007ce98 0x0000000000000002 0x000000c00007cdf0: 0x0000000000000002 0x0000000000000000 0x000000c00007ce00: 0x00000000010b2a80 0x00000000011d40c8 0x000000c00007ce10: 0x0000000000000000 0x0000000000000000 0x000000c00007ce20: 0x0000000000000002 0x0000000000000002 0x000000c00007ce30: 0x0000000000000001 0x0000000000000001 0x000000c00007ce40: 0x0000000000000000 0x0000000000000000 0x000000c00007ce50: 0x0000000000000000 0x000000c0000162c0 0x000000c00007ce60: 0x000000c0000162b8 0x000000c00007cf48 0x000000c00007ce70: 0x000000c00000c090 0x000000c00000c090 0x000000c00007ce80: 0x000000c000088f10 0x0000000000000001 0x000000c00007ce90: 0x0000000000000001 0x00000000010fcd00 0x000000c00007cea0: 0x0000000001148d80 0x0000000001101da0 0x000000c00007ceb0: 0x000000c00000c0d8 0x00000000010fcd00 0x000000c00007cec0: 0x0000000001148d70 0x00000000010fab00 fatal error: unknown caller pcruntime stack:
runtime.throw({0x111ff47?, 0x11e4180?})
/Users/andrew/sdk/go1.18rc1/src/runtime/panic.go:992 +0x71
runtime.gentraceback(0xc000138340?, 0x10648df?, 0xc00007cbe8?, 0x11fbde0?, 0x0, 0x0, 0x7fffffff, 0x7ff7bfeff468, 0x20?, 0x0)
/Users/andrew/sdk/go1.18rc1/src/runtime/traceback.go:254 +0x1a36
runtime.addOneOpenDeferFrame.func1()
/Users/andrew/sdk/go1.18rc1/src/runtime/panic.go:599 +0x6b
runtime.systemstack()
/Users/andrew/sdk/go1.18rc1/src/runtime/asm_amd64.s:469 +0x49
goroutine 4 [running]:
runtime.systemstack_switch()
/Users/andrew/sdk/go1.18rc1/src/runtime/asm_amd64.s:436 fp=0xc00007cc80 sp=0xc00007cc78 pc=0x1060880
runtime.addOneOpenDeferFrame(0x1?, 0x1101da0?, 0xc000104078?)
/Users/andrew/sdk/go1.18rc1/src/runtime/panic.go:598 +0x69 fp=0xc00007ccc0 sp=0xc00007cc80 pc=0x1032529
panic({0x1102ac0, 0x11f2ca0})
/Users/andrew/sdk/go1.18rc1/src/runtime/panic.go:798 +0x106 fp=0xc00007cd80 sp=0xc00007ccc0 pc=0x1032d46
runtime: unexpected return pc for runtime.sigpanic called from 0x1127eda
stack: frame={sp:0xc00007cd80, fp:0xc00007cdd0} stack=[0xc00007c000,0xc00007d000)
0x000000c00007cc80: 0x000000c00007cc88 0x0000000001032580 <runtime.addOneOpenDeferFrame.func1+0x0000000000000000>
0x000000c00007cc90: 0x0000000001047c76 <runtime.sigpanic+0x0000000000000336> 0x000000c00007cd80
0x000000c00007cca0: 0x000000c000138340 0x0000000000000000
0x000000c00007ccb0: 0x000000c00007cd70 0x0000000001032d46 <runtime.gopanic+0x0000000000000106>
0x000000c00007ccc0: 0x0000000000000001 0x0000000001101da0
0x000000c00007ccd0: 0x000000c000104078 0x000000c0000240a0
0x000000c00007cce0: 0x0000000000000000 0x0000000000000000
0x000000c00007ccf0: 0x000000000107d6c0 <internal/poll.(*FD).Write.func1+0x0000000000000000> 0x000000c000104060
0x000000c00007cd00: 0x000000c00007ccf0 0x000000c00007cd70
0x000000c00007cd10: 0x0000000001068b5e <sync.(*Pool).pin+0x000000000000001e> 0x000000c000104060
0x000000c00007cd20: 0x000000c00007cd48 0x000000c000138360
0x000000c00007cd30: 0x000000c000138340 0x0000000000000000
0x000000c00007cd40: 0x0000000001102ac0 0x00000000011f2ca0
0x000000c00007cd50: 0x0000000000000000 0x0000000000000000
0x000000c00007cd60: 0x0000000000000000 0x0000000000000000
0x000000c00007cd70: 0x000000c00007cdc0 0x0000000001047c76 <runtime.sigpanic+0x0000000000000336>
0x000000c00007cd80: <0x0000000001102ac0 0x00000000011f2ca0
0x000000c00007cd90: 0x0000000000000008 0x000000c00007cdc0
0x000000c00007cda0: 0x0000000000000008 0x000000c000103110
0x000000c00007cdb0: 0x0000000000000000 0x0000000000000000
0x000000c00007cdc0: 0x000000c00007cef8 !0x0000000001127eda
0x000000c00007cdd0: >0x0000000001149620 0x000000c00000e018
0x000000c00007cde0: 0x000000c00007ce98 0x0000000000000002
0x000000c00007cdf0: 0x0000000000000002 0x0000000000000000
0x000000c00007ce00: 0x00000000010b2a80 <testing.tRunner+0x0000000000000000> 0x00000000011d40c8
0x000000c00007ce10: 0x0000000000000000 0x0000000000000000
0x000000c00007ce20: 0x0000000000000002 0x0000000000000002
0x000000c00007ce30: 0x0000000000000001 0x0000000000000001
0x000000c00007ce40: 0x0000000000000000 0x0000000000000000
0x000000c00007ce50: 0x0000000000000000 0x000000c0000162c0
0x000000c00007ce60: 0x000000c0000162b8 0x000000c00007cf48
0x000000c00007ce70: 0x000000c00000c090 0x000000c00000c090
0x000000c00007ce80: 0x000000c000088f10 0x0000000000000001
0x000000c00007ce90: 0x0000000000000001 0x00000000010fcd00
0x000000c00007cea0: 0x0000000001148d80 0x0000000001101da0
0x000000c00007ceb0: 0x000000c00000c0d8 0x00000000010fcd00
0x000000c00007cec0: 0x0000000001148d70 0x00000000010fab00
runtime.panicmem(...)
/Users/andrew/sdk/go1.18rc1/src/runtime/panic.go:220
runtime.sigpanic()
/Users/andrew/sdk/go1.18rc1/src/runtime/signal_unix.go:818 +0x336 fp=0xc00007cdd0 sp=0xc00007cd80 pc=0x1047c76
created by testing.(*T).Run
/Users/andrew/sdk/go1.18rc1/src/testing/testing.go:1486 +0x35f
goroutine 1 [chan receive]:
testing.(*T).Run(0xc000138000, {0x111f5f4?, 0xa93fd983ba5?}, 0x1127d00)
/Users/andrew/sdk/go1.18rc1/src/testing/testing.go:1487 +0x37a
testing.runTests.func1(0xc000100450?)
/Users/andrew/sdk/go1.18rc1/src/testing/testing.go:1839 +0x6e
testing.tRunner(0xc000138000, 0xc000131cd8)
/Users/andrew/sdk/go1.18rc1/src/testing/testing.go:1439 +0x102
testing.runTests(0xc000116140?, {0x11f2f40, 0x1, 0x1}, {0x128c108?, 0x40?, 0x11fb6e0?})
/Users/andrew/sdk/go1.18rc1/src/testing/testing.go:1837 +0x457
testing.(*M).Run(0xc000116140)
/Users/andrew/sdk/go1.18rc1/src/testing/testing.go:1719 +0x5d9
main.main()
_testmain.go:47 +0x1aa
FAIL github.com/apmckinlay/gsuneido/util/generic/bug 0.352s