Skip to content

"fatal error: checkptr: converted pointer straddles multiple allocations" in crypto tests #8799

@calmh

Description

@calmh

Following test failure on Go 1.20, seems legit (seen it both on Linux and macOS)

fatal error: checkptr: converted pointer straddles multiple allocations
goroutine 27 [running]:
runtime.throw({0x17f3381?, 0x1214352?})
	/Users/runner/hostedtoolcache/go/1.20.1/x64/src/runtime/panic.go:1047 +0x5d fp=0xc0002df840 sp=0xc0002df810 pc=0x1088cfd
runtime.checkptrAlignment(0xc0002177f0?, 0x10?, 0x10?)
	/Users/runner/hostedtoolcache/go/1.20.1/x64/src/runtime/checkptr.go:26 +0x6c fp=0xc0002df860 sp=0xc0002df840 pc=0x10590ac
crypto/subtle.words(...)
	/Users/runner/hostedtoolcache/go/1.20.1/x64/src/crypto/subtle/xor_generic.go:49
crypto/subtle.xorBytes(0xc00009c94d, 0xc0000a6690, 0xc000217600, 0x3)
	/Users/runner/hostedtoolcache/go/1.20.1/x64/src/crypto/subtle/xor_generic.go:29 +0xb2 fp=0xc0002df8d0 sp=0xc0002df860 pc=0x12144d2
crypto/subtle.XORBytes({0xc00009c94d, 0x3, 0x0?}, {0xc0000a6690, 0x3, 0x10?}, {0xc000217600, 0x200, 0x2df45e8?})
	/Users/runner/hostedtoolcache/go/1.20.1/x64/src/crypto/subtle/xor.go:22 +0x92 fp=0xc0002df908 sp=0xc0002df8d0 pc=0x1214352
crypto/cipher.(*ctr).XORKeyStream(0xc0000cc3c0, {0xc00009c94d, 0x3, 0x3}, {0xc0000a6690, 0x3, 0x10})
	/Users/runner/hostedtoolcache/go/1.20.1/x64/src/crypto/cipher/ctr.go:90 +0x2e5 fp=0xc0002df9b8 sp=0xc0002df908 pc=0x1219d45
github.com/miscreant/miscreant%2ego.(*Cipher).Open(0xc0000b6380, {0x0, 0x0, 0x0}, {0xc0000a6680, 0x13, 0x20}, {0xc0002dfb10, 0x1, 0x1})
	/Users/runner/go/pkg/mod/github.com/miscreant/miscreant.go@v0.0.0-20200214223636-26d376326b75/siv.go:151 +0x35f fp=0xc0002dfa88 sp=0xc0002df9b8 pc=0x13eb63f
github.com/miscreant/miscreant%2ego.(*aead).Open(0xc00008d340, {0x0, 0x0, 0x0}, {0x0, 0x0, 0x0}, {0xc0000a6680, 0x13, 0x20}, ...)
	/Users/runner/go/pkg/mod/github.com/miscreant/miscreant.go@v0.0.0-20200214223636-26d376326b75/aead.go:105 +0x28e fp=0xc0002dfb68 sp=0xc0002dfa88 pc=0x13ea8ce
github.com/syncthing/syncthing/lib/protocol.decryptDeterministic({0xc0000a6680, 0x13, 0x20}, 0xc0002dfd50, {0x0, 0x0, 0x0})
	/Users/runner/work/syncthing/syncthing/lib/protocol/encryption.go:424 +0x102 fp=0xc0002dfc08 sp=0xc0002dfb68 pc=0x16c5462
github.com/syncthing/syncthing/lib/protocol.decryptName({0xc0000a02a0, 0x2f}, 0x0?)
	/Users/runner/work/syncthing/syncthing/lib/protocol/encryption.go:395 +0x97 fp=0xc0002dfc78 sp=0xc0002dfc08 pc=0x16c4ff7
github.com/syncthing/syncthing/lib/protocol.TestEnDecryptName(0xc000083520)
	/Users/runner/work/syncthing/syncthing/lib/protocol/encryption_test.go:62 +0x7a5 fp=0xc0002dfea8 sp=0xc0002dfc78 pc=0x16da405
testing.tRunner(0xc000083520, 0x1814818)
	/Users/runner/hostedtoolcache/go/1.20.1/x64/src/testing/testing.go:1576 +0x217 fp=0xc0002dffb0 sp=0xc0002dfea8 pc=0x11d0a57
testing.(*T).Run.func1()
	/Users/runner/hostedtoolcache/go/1.20.1/x64/src/testing/testing.go:1629 +0x48 fp=0xc0002dffe0 sp=0xc0002dffb0 pc=0x11d2568
runtime.goexit()
	/Users/runner/hostedtoolcache/go/1.20.1/x64/src/runtime/asm_amd64.s:1598 +0x1 fp=0xc0002dffe8 sp=0xc0002dffe0 pc=0x10c1161
created by testing.(*T).Run
	/Users/runner/hostedtoolcache/go/1.20.1/x64/src/testing/testing.go:1629 +0x806

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildIssues caused by or requiring changes to the build system (scripts or Docker image)frozen-due-to-ageIssues closed and untouched for a long time, together with being locked for discussion

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions