Skip to content

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

Closed

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/[email protected]/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/[email protected]/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

Activity

  1. added
    bug
    needs-triage
    on Feb 22, 2023
  2. greatroar commented on Apr 1, 2023

    @greatroar
    Contributor

    I think this is golang/go#59334, which was just fixed in the stdlib. In any case, it's harmless.

  3. reopened this on May 3, 2023
  4. calmh commented on May 3, 2023

    @calmh
    MemberAuthor

    Harmless or not this prevents running tests on 1.20 which is a build issue. :/

  5. added
    build
    and removed
    bug
    needs-triage
    on May 3, 2023
  6. added 3 commits that reference this issue on May 3, 2023
    1d6ebfb
    8de76a9
    1603f9d
  7. added this to the v1.23.5 milestone on May 9, 2023
  8. added a commit that references this issue on Jun 4, 2023
    0842a14
  9. added a commit that references this issue on Jan 28, 2024
    1103a27
  10. added
    frozen-due-to-age
    on May 8, 2024
  11. locked and limited conversation to collaborators on May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildfrozen-due-to-age

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions