Closed hajimehoshi closed 9 months ago
I think I could reproduce this on my local machine:
'c. hajimehoshi@Hajimes-MacBook-Pro.local
,xNMM. -------------------------------------
.OMMMMo OS: macOS 14.2.1 23C71 arm64
OMMM0, Host: Mac15,6
.;loddo:' loolloddol;. Kernel: 23.2.0
cKMMMMMMMMMMNWMMMMMMMMMM0: Uptime: 5 days, 12 hours, 21 mins
.KMMMMMMMMMMMMMMMMMMMMMMMWd. Packages: 77 (brew)
XMMMMMMMMMMMMMMMMMMMMMMMX. Shell: zsh 5.9
;MMMMMMMMMMMMMMMMMMMMMMMM: Resolution: 1800x1169
:MMMMMMMMMMMMMMMMMMMMMMMM: DE: Aqua
.MMMMMMMMMMMMMMMMMMMMMMMMX. WM: Quartz Compositor
kMMMMMMMMMMMMMMMMMMMMMMMMWd. WM Theme: Blue (Light)
.XMMMMMMMMMMMMMMMMMMMMMMMMMMk Terminal: tmux
.XMMMMMMMMMMMMMMMMMMMMMMMMK. CPU: Apple M3 Pro
kMMMMMMMMMMMMMMMMMMMMMMd GPU: Apple M3 Pro
;KMMMMMMMWXXWMMMMMMMk. Memory: 3227MiB / 18432MiB
.cooc,. .,coo:.
CGO_ENABLED=1 GOARCH=amd64 go1.22rc2 test ./... -count=1
? github.com/ebitengine/purego/examples/libc [no test files]
? github.com/ebitengine/purego/examples/objc [no test files]
? github.com/ebitengine/purego/internal/buildtest [no test files]
? github.com/ebitengine/purego/internal/cgo [no test files]
? github.com/ebitengine/purego/internal/fakecgo [no test files]
? github.com/ebitengine/purego/internal/strings [no test files]
ok github.com/ebitengine/purego 2.520s
SIGBUS: bus error
PC=0xc000091ea0 m=0 sigcode=2 addr=0xc000091ea0
signal arrived during cgo execution
goroutine 1 gp=0xc0000061c0 m=0 mp=0x6030d40 [syscall]:
runtime.cgocall(0x5edad40, 0xc000091ce0)
/Users/hajimehoshi/sdk/go1.22rc2/src/runtime/cgocall.go:157 +0x4b fp=0xc00002d090 sp=0xc00002d058 pc=0x5dcff8b
github.com/ebitengine/purego.RegisterFunc.func4({0xc00008a320?, 0x3?, 0x3?})
/Users/hajimehoshi/purego/func.go:272 +0xb31 fp=0xc00002d478 sp=0xc00002d090 pc=0x5ed8691
reflect.callReflect(0xc0001208a0, 0xc00002d9d0, 0xc00002d8a8, 0xc00002d8b0)
/Users/hajimehoshi/sdk/go1.22rc2/src/reflect/value.go:782 +0x555 fp=0xc00002d858 sp=0xc00002d478 pc=0x5e74ab5
reflect.callReflect(0xc0001208a0, 0xc00002d9d0, 0xc00002d8a8, 0xc00002d8b0)
<autogenerated>:1 +0x45 fp=0xc00002d888 sp=0xc00002d858 pc=0x5e796e5
reflect.makeFuncStub()
/Users/hajimehoshi/sdk/go1.22rc2/src/reflect/asm_amd64.s:47 +0x6e fp=0xc00002d9d0 sp=0xc00002d888 pc=0x5e7906e
github.com/ebitengine/purego/objc.ID.Send(...)
/Users/hajimehoshi/purego/objc/objc_runtime_darwin.go:94
github.com/ebitengine/purego/objc_test.ExampleRegisterClass()
/Users/hajimehoshi/purego/objc/objc_runtime_darwin_test.go:68 +0x2a6 fp=0xc00002db10 sp=0xc00002d9d0 pc=0x5ee00c6
testing.runExample({{0x5ee49d6, 0x14}, 0x5f52d18, {0x5ee1008, 0x4}, 0x0})
/Users/hajimehoshi/sdk/go1.22rc2/src/testing/run_example.go:63 +0x2de fp=0xc00002dc08 sp=0xc00002db10 pc=0x5e97d5e
testing.runExamples(0x5f55540?, {0x602bb40, 0x4, 0x1?})
/Users/hajimehoshi/sdk/go1.22rc2/src/testing/example.go:40 +0x126 fp=0xc00002dca0 sp=0xc00002dc08 pc=0x5e93746
testing.(*M).Run(0xc0001241e0)
/Users/hajimehoshi/sdk/go1.22rc2/src/testing/testing.go:2029 +0x75d fp=0xc00002ded0 sp=0xc00002dca0 pc=0x5e9db5d
main.main()
_testmain.go:57 +0x16c fp=0xc00002df50 sp=0xc00002ded0 pc=0x5ee0c2c
runtime.main()
/Users/hajimehoshi/sdk/go1.22rc2/src/runtime/proc.go:271 +0x29d fp=0xc00002dfe0 sp=0xc00002df50 pc=0x5e054bd
runtime.goexit({})
/Users/hajimehoshi/sdk/go1.22rc2/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc00002dfe8 sp=0xc00002dfe0 pc=0x5e3a4a1
goroutine 2 gp=0xc000006c40 m=nil [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
/Users/hajimehoshi/sdk/go1.22rc2/src/runtime/proc.go:402 +0xce fp=0xc000054fa8 sp=0xc000054f88 pc=0x5e0590e
runtime.goparkunlock(...)
/Users/hajimehoshi/sdk/go1.22rc2/src/runtime/proc.go:408
runtime.forcegchelper()
/Users/hajimehoshi/sdk/go1.22rc2/src/runtime/proc.go:326 +0xb3 fp=0xc000054fe0 sp=0xc000054fa8 pc=0x5e05773
runtime.goexit({})
/Users/hajimehoshi/sdk/go1.22rc2/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc000054fe8 sp=0xc000054fe0 pc=0x5e3a4a1
created by runtime.init.6 in goroutine 1
/Users/hajimehoshi/sdk/go1.22rc2/src/runtime/proc.go:314 +0x1a
goroutine 3 gp=0xc000007180 m=nil [GC sweep wait]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
/Users/hajimehoshi/sdk/go1.22rc2/src/runtime/proc.go:402 +0xce fp=0xc000055780 sp=0xc000055760 pc=0x5e0590e
runtime.goparkunlock(...)
/Users/hajimehoshi/sdk/go1.22rc2/src/runtime/proc.go:408
runtime.bgsweep(0xc000080000)
/Users/hajimehoshi/sdk/go1.22rc2/src/runtime/mgcsweep.go:278 +0x94 fp=0xc0000557c8 sp=0xc000055780 pc=0x5df0514
runtime.gcenable.gowrap1()
/Users/hajimehoshi/sdk/go1.22rc2/src/runtime/mgc.go:203 +0x25 fp=0xc0000557e0 sp=0xc0000557c8 pc=0x5de4e65
runtime.goexit({})
/Users/hajimehoshi/sdk/go1.22rc2/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc0000557e8 sp=0xc0000557e0 pc=0x5e3a4a1
created by runtime.gcenable in goroutine 1
/Users/hajimehoshi/sdk/go1.22rc2/src/runtime/mgc.go:203 +0x66
goroutine 4 gp=0xc000007340 m=nil [GC scavenge wait]:
runtime.gopark(0xc000080000?, 0x5f15af8?, 0x1?, 0x0?, 0xc000007340?)
/Users/hajimehoshi/sdk/go1.22rc2/src/runtime/proc.go:402 +0xce fp=0xc000055f78 sp=0xc000055f58 pc=0x5e0590e
runtime.goparkunlock(...)
/Users/hajimehoshi/sdk/go1.22rc2/src/runtime/proc.go:408
runtime.(*scavengerState).park(0x60303c0)
/Users/hajimehoshi/sdk/go1.22rc2/src/runtime/mgcscavenge.go:425 +0x49 fp=0xc000055fa8 sp=0xc000055f78 pc=0x5dedf09
runtime.bgscavenge(0xc000080000)
/Users/hajimehoshi/sdk/go1.22rc2/src/runtime/mgcscavenge.go:653 +0x3c fp=0xc000055fc8 sp=0xc000055fa8 pc=0x5dee49c
runtime.gcenable.gowrap2()
/Users/hajimehoshi/sdk/go1.22rc2/src/runtime/mgc.go:204 +0x25 fp=0xc000055fe0 sp=0xc000055fc8 pc=0x5de4e05
runtime.goexit({})
/Users/hajimehoshi/sdk/go1.22rc2/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc000055fe8 sp=0xc000055fe0 pc=0x5e3a4a1
created by runtime.gcenable in goroutine 1
/Users/hajimehoshi/sdk/go1.22rc2/src/runtime/mgc.go:204 +0xa5
goroutine 18 gp=0xc000104700 m=nil [finalizer wait]:
runtime.gopark(0xc000054648?, 0x5dd9185?, 0xa8?, 0x1?, 0x5f51340?)
/Users/hajimehoshi/sdk/go1.22rc2/src/runtime/proc.go:402 +0xce fp=0xc000054620 sp=0xc000054600 pc=0x5e0590e
runtime.runfinq()
/Users/hajimehoshi/sdk/go1.22rc2/src/runtime/mfinal.go:194 +0x107 fp=0xc0000547e0 sp=0xc000054620 pc=0x5de3ea7
runtime.goexit({})
/Users/hajimehoshi/sdk/go1.22rc2/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc0000547e8 sp=0xc0000547e0 pc=0x5e3a4a1
created by runtime.createfing in goroutine 1
/Users/hajimehoshi/sdk/go1.22rc2/src/runtime/mfinal.go:164 +0x3d
goroutine 6 gp=0xc000007880 m=nil [IO wait]:
runtime.gopark(0x6?, 0xc000180000?, 0x0?, 0x80?, 0x0?)
/Users/hajimehoshi/sdk/go1.22rc2/src/runtime/proc.go:402 +0xce fp=0xc000056460 sp=0xc000056440 pc=0x5e0590e
runtime.netpollblock(0x5e43aa5?, 0x5dcfb66?, 0x0?)
/Users/hajimehoshi/sdk/go1.22rc2/src/runtime/netpoll.go:573 +0xf7 fp=0xc000056498 sp=0xc000056460 pc=0x5dff4f7
internal/poll.runtime_pollWait(0x4cdcce90, 0x72)
/Users/hajimehoshi/sdk/go1.22rc2/src/runtime/netpoll.go:345 +0x85 fp=0xc0000564b8 sp=0xc000056498 pc=0x5e35465
internal/poll.(*pollDesc).wait(0xc0000321e0?, 0xc000180000?, 0x1)
/Users/hajimehoshi/sdk/go1.22rc2/src/internal/poll/fd_poll_runtime.go:84 +0x27 fp=0xc0000564e0 sp=0xc0000564b8 pc=0x5e58867
internal/poll.(*pollDesc).waitRead(...)
/Users/hajimehoshi/sdk/go1.22rc2/src/internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Read(0xc0000321e0, {0xc000180000, 0x8000, 0x8000})
/Users/hajimehoshi/sdk/go1.22rc2/src/internal/poll/fd_unix.go:164 +0x27a fp=0xc000056578 sp=0xc0000564e0 pc=0x5e58e3a
os.(*File).read(...)
/Users/hajimehoshi/sdk/go1.22rc2/src/os/file_posix.go:29
os.(*File).Read(0xc000058020, {0xc000180000?, 0x5f28940?, 0x5e44501?})
/Users/hajimehoshi/sdk/go1.22rc2/src/os/file.go:118 +0x52 fp=0xc0000565b8 sp=0xc000056578 pc=0x5e59e12
os.(*fileWithoutWriteTo).Read(0x6026f50?, {0xc000180000?, 0x5ddecbf?, 0xc00011c158?})
<autogenerated>:1 +0x25 fp=0xc0000565e8 sp=0xc0000565b8 pc=0x5e5c405
io.copyBuffer({0x5f54228, 0xc000142660}, {0x5f54188, 0xc00011c158}, {0x0, 0x0, 0x0})
/Users/hajimehoshi/sdk/go1.22rc2/src/io/io.go:429 +0x191 fp=0xc000056660 sp=0xc0000565e8 pc=0x5e570b1
io.Copy(...)
/Users/hajimehoshi/sdk/go1.22rc2/src/io/io.go:388
os.genericWriteTo(0xc0000320c0?, {0x5f54228, 0xc000142660})
/Users/hajimehoshi/sdk/go1.22rc2/src/os/file.go:269 +0x58 fp=0xc0000566b0 sp=0xc000056660 pc=0x5e5a298
os.(*File).WriteTo(0x6026f30?, {0x5f54228?, 0xc000142660?})
/Users/hajimehoshi/sdk/go1.22rc2/src/os/file.go:247 +0x49 fp=0xc0000566d8 sp=0xc0000566b0 pc=0x5e5a1c9
io.copyBuffer({0x5f54228, 0xc000142660}, {0x5f54248, 0xc000058020}, {0x0, 0x0, 0x0})
/Users/hajimehoshi/sdk/go1.22rc2/src/io/io.go:411 +0x9d fp=0xc000056750 sp=0xc0000566d8 pc=0x5e56fbd
io.Copy(...)
/Users/hajimehoshi/sdk/go1.22rc2/src/io/io.go:388
testing.runExample.func1()
/Users/hajimehoshi/sdk/go1.22rc2/src/testing/run_example.go:37 +0x66 fp=0xc0000567e0 sp=0xc000056750 pc=0x5e97f86
runtime.goexit({})
/Users/hajimehoshi/sdk/go1.22rc2/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc0000567e8 sp=0xc0000567e0 pc=0x5e3a4a1
created by testing.runExample in goroutine 1
/Users/hajimehoshi/sdk/go1.22rc2/src/testing/run_example.go:35 +0x218
rax 0x20f16f460
rbx 0x6030d40
rcx 0x6030d40
rdx 0x6030d40
rdi 0xc00002d048
rsi 0x6030540
rbp 0x20f16f300
rsp 0x20f16f2c0
r8 0x5f38401
r9 0x0
r10 0xc0000127f8
r11 0x10
r12 0x0
r13 0x1
r14 0xc0000061c0
r15 0x3ffffffffff
rip 0xc000091ea0
rflags 0x212
cs 0x2b
fs 0x0
gs 0x0
FAIL github.com/ebitengine/purego/objc 0.380s
FAIL
Maybe is this duplicated with #193?
Yeah this does seem like a duplicate
https://github.com/hajimehoshi/purego/actions/runs/7643912138/job/20827022630
I failed to reproduce this on my local MacBook Pro 2023.