Skip to content

Conversation

@thaJeztah
Copy link
Contributor

Running tests on go1.22 or up resulted in a panic. After testing new versions of the module, it looks like v0.13.0 is the lowest version that fixes this issue. I was not able to find the fix, but this is the diff between 0.12 and 0.13;

=== FAIL: assert/cmd/gty-migrate-from-testify TestRun (unknown)
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=0x0 pc=0x69b46f]

goroutine 26 [running]:
go/types.(*Checker).handleBailout(0xc0001ec400, 0xc00056bc10)
        /usr/local/go/src/go/types/check.go:367 +0x88
panic({0x7e1600?, 0xb549e0?})
        /usr/local/go/src/runtime/panic.go:770 +0x132
go/types.(*StdSizes).Sizeof(0x0, {0x8f2298, 0xb597a0})
        /usr/local/go/src/go/types/sizes.go:228 +0x30f
go/types.(*Config).sizeof(...)
        /usr/local/go/src/go/types/sizes.go:333
go/types.representableConst.func1({0x8f2298?, 0xb597a0?})
        /usr/local/go/src/go/types/const.go:76 +0x9e
go/types.representableConst({0x8f46a8, 0xb4c080}, 0xc0001ec400, 0xb597a0, 0xc00056a828)
        /usr/local/go/src/go/types/const.go:92 +0x192
go/types.(*Checker).representation(0xc0001ec400, 0xc0000cd340, 0xb597a0)
        /usr/local/go/src/go/types/const.go:256 +0x65
go/types.(*Checker).implicitTypeAndValue(0xc0001ec400, 0xc0000cd340, {0x8f2298, 0xb597a0})
        /usr/local/go/src/go/types/expr.go:375 +0x2d7
go/types.(*Checker).assignment(0xc0001ec400, 0xc0000cd340, {0x8f2298, 0xb597a0}, {0x8562d9, 0x10})
        /usr/local/go/src/go/types/assignments.go:52 +0x2e5
go/types.(*Checker).initVar(0xc0001ec400, 0xc00080cea0, 0xc0000cd340, {0x8562d9, 0x10})
        /usr/local/go/src/go/types/assignments.go:163 +0x3b2
go/types.(*Checker).initVars(0xc0001ec400, {0xc00029c0e0, 0x1, 0xc000182778?}, {0xc0006400b0, 0xc00019cd98?, 0x5ca910480cf0dcad?}, {0x8f3b60, 0xc000648680})
        /usr/local/go/src/go/types/assignments.go:382 +0x638
go/types.(*Checker).stmt(0xc0001ec400, 0x0, {0x8f3b60, 0xc000648680})
        /usr/local/go/src/go/types/stmt.go:524 +0x1fc5
go/types.(*Checker).stmtList(0xc0001ec400, 0x0, {0xc0006400c0?, 0x0?, 0x0?})
        /usr/local/go/src/go/types/stmt.go:121 +0x85
go/types.(*Checker).funcBody(0xc0001ec400, 0x8f2298?, {0xc00060c1e4?, 0xb597a0?}, 0xc0000cd2c0, 0xc00064c600, {0x0?, 0x0?})
        /usr/local/go/src/go/types/stmt.go:41 +0x331
go/types.(*Checker).funcDecl.func1()
        /usr/local/go/src/go/types/decl.go:852 +0x3a
go/types.(*Checker).processDelayed(0xc0001ec400, 0x0)
        /usr/local/go/src/go/types/check.go:467 +0x162
go/types.(*Checker).checkFiles(0xc0001ec400, {0xc000286140, 0x2, 0x2})
        /usr/local/go/src/go/types/check.go:411 +0x1cc
go/types.(*Checker).Files(...)
        /usr/local/go/src/go/types/check.go:372
golang.org/x/tools/go/packages.(*loader).loadPackage(0xc0001fc700, 0xc0004de330)
        /go/pkg/mod/golang.org/x/[email protected]/go/packages/packages.go:1037 +0x932
golang.org/x/tools/go/packages.(*loader).loadRecursive.func1()
        /go/pkg/mod/golang.org/x/[email protected]/go/packages/packages.go:847 +0x1a9
sync.(*Once).doSlow(0x0?, 0x0?)
        /usr/local/go/src/sync/once.go:74 +0xc2
sync.(*Once).Do(...)
        /usr/local/go/src/sync/once.go:65
golang.org/x/tools/go/packages.(*loader).loadRecursive(0x0?, 0x0?)
        /go/pkg/mod/golang.org/x/[email protected]/go/packages/packages.go:835 +0x4a
golang.org/x/tools/go/packages.(*loader).loadRecursive.func1.1(0x0?)
        /go/pkg/mod/golang.org/x/[email protected]/go/packages/packages.go:842 +0x26
created by golang.org/x/tools/go/packages.(*loader).loadRecursive.func1 in goroutine 24
        /go/pkg/mod/golang.org/x/[email protected]/go/packages/packages.go:841 +0x94

DONE 280 tests, 1 skipped, 1 failure in 35.246s

Running tests on go1.22 or up resulted in a panic. After testing new
versions of the module, it looks like v0.13.0 is the lowest version
that fixes this issue. I was not able to find the fix, but this is the
diff between 0.12 and 0.13;

- golang/tools@v0.12.0...v0.13.0

```
=== FAIL: assert/cmd/gty-migrate-from-testify TestRun (unknown)
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=0x0 pc=0x69b46f]

goroutine 26 [running]:
go/types.(*Checker).handleBailout(0xc0001ec400, 0xc00056bc10)
        /usr/local/go/src/go/types/check.go:367 +0x88
panic({0x7e1600?, 0xb549e0?})
        /usr/local/go/src/runtime/panic.go:770 +0x132
go/types.(*StdSizes).Sizeof(0x0, {0x8f2298, 0xb597a0})
        /usr/local/go/src/go/types/sizes.go:228 +0x30f
go/types.(*Config).sizeof(...)
        /usr/local/go/src/go/types/sizes.go:333
go/types.representableConst.func1({0x8f2298?, 0xb597a0?})
        /usr/local/go/src/go/types/const.go:76 +0x9e
go/types.representableConst({0x8f46a8, 0xb4c080}, 0xc0001ec400, 0xb597a0, 0xc00056a828)
        /usr/local/go/src/go/types/const.go:92 +0x192
go/types.(*Checker).representation(0xc0001ec400, 0xc0000cd340, 0xb597a0)
        /usr/local/go/src/go/types/const.go:256 +0x65
go/types.(*Checker).implicitTypeAndValue(0xc0001ec400, 0xc0000cd340, {0x8f2298, 0xb597a0})
        /usr/local/go/src/go/types/expr.go:375 +0x2d7
go/types.(*Checker).assignment(0xc0001ec400, 0xc0000cd340, {0x8f2298, 0xb597a0}, {0x8562d9, 0x10})
        /usr/local/go/src/go/types/assignments.go:52 +0x2e5
go/types.(*Checker).initVar(0xc0001ec400, 0xc00080cea0, 0xc0000cd340, {0x8562d9, 0x10})
        /usr/local/go/src/go/types/assignments.go:163 +0x3b2
go/types.(*Checker).initVars(0xc0001ec400, {0xc00029c0e0, 0x1, 0xc000182778?}, {0xc0006400b0, 0xc00019cd98?, 0x5ca910480cf0dcad?}, {0x8f3b60, 0xc000648680})
        /usr/local/go/src/go/types/assignments.go:382 +0x638
go/types.(*Checker).stmt(0xc0001ec400, 0x0, {0x8f3b60, 0xc000648680})
        /usr/local/go/src/go/types/stmt.go:524 +0x1fc5
go/types.(*Checker).stmtList(0xc0001ec400, 0x0, {0xc0006400c0?, 0x0?, 0x0?})
        /usr/local/go/src/go/types/stmt.go:121 +0x85
go/types.(*Checker).funcBody(0xc0001ec400, 0x8f2298?, {0xc00060c1e4?, 0xb597a0?}, 0xc0000cd2c0, 0xc00064c600, {0x0?, 0x0?})
        /usr/local/go/src/go/types/stmt.go:41 +0x331
go/types.(*Checker).funcDecl.func1()
        /usr/local/go/src/go/types/decl.go:852 +0x3a
go/types.(*Checker).processDelayed(0xc0001ec400, 0x0)
        /usr/local/go/src/go/types/check.go:467 +0x162
go/types.(*Checker).checkFiles(0xc0001ec400, {0xc000286140, 0x2, 0x2})
        /usr/local/go/src/go/types/check.go:411 +0x1cc
go/types.(*Checker).Files(...)
        /usr/local/go/src/go/types/check.go:372
golang.org/x/tools/go/packages.(*loader).loadPackage(0xc0001fc700, 0xc0004de330)
        /go/pkg/mod/golang.org/x/[email protected]/go/packages/packages.go:1037 +0x932
golang.org/x/tools/go/packages.(*loader).loadRecursive.func1()
        /go/pkg/mod/golang.org/x/[email protected]/go/packages/packages.go:847 +0x1a9
sync.(*Once).doSlow(0x0?, 0x0?)
        /usr/local/go/src/sync/once.go:74 +0xc2
sync.(*Once).Do(...)
        /usr/local/go/src/sync/once.go:65
golang.org/x/tools/go/packages.(*loader).loadRecursive(0x0?, 0x0?)
        /go/pkg/mod/golang.org/x/[email protected]/go/packages/packages.go:835 +0x4a
golang.org/x/tools/go/packages.(*loader).loadRecursive.func1.1(0x0?)
        /go/pkg/mod/golang.org/x/[email protected]/go/packages/packages.go:842 +0x26
created by golang.org/x/tools/go/packages.(*loader).loadRecursive.func1 in goroutine 24
        /go/pkg/mod/golang.org/x/[email protected]/go/packages/packages.go:841 +0x94

DONE 280 tests, 1 skipped, 1 failure in 35.246s
```

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah
Copy link
Contributor Author

@dnephin @vdemeester PTAL 🤗

Copy link
Member

@dnephin dnephin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@dnephin dnephin merged commit 631f6c8 into gotestyourself:main Aug 24, 2024
@thaJeztah thaJeztah deleted the bump_go_tools branch August 24, 2024 06:47
Crown0815 pushed a commit to Crown0815/forgejo-runner-windows that referenced this pull request May 21, 2025
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [gotest.tools/v3](https://github.com/gotestyourself/gotest.tools) | require | patch | `v3.5.1` -> `v3.5.2` |

---

### Release Notes

<details>
<summary>gotestyourself/gotest.tools (gotest.tools/v3)</summary>

### [`v3.5.2`](https://github.com/gotestyourself/gotest.tools/releases/tag/v3.5.2)

[Compare Source](gotestyourself/gotest.tools@v3.5.1...v3.5.2)

#### What's Changed

-   assert: ensure message is always displayed & fix under bazel by [@&#8203;cstrahan](https://github.com/cstrahan) in gotestyourself/gotest.tools#276
-   go.mod: golang.org/x/tools v0.13.0 for go1.22+ compatibility by [@&#8203;thaJeztah](https://github.com/thaJeztah) in gotestyourself/gotest.tools#282
-   poll: Continue(): use format.Message for formatting by [@&#8203;thaJeztah](https://github.com/thaJeztah) in gotestyourself/gotest.tools#279
-   fix TestFromDirSymlink on Windows due to missing drive-letter by [@&#8203;thaJeztah](https://github.com/thaJeztah) in gotestyourself/gotest.tools#283
-   Fix various linting issues and minor bugs by [@&#8203;thaJeztah](https://github.com/thaJeztah) in gotestyourself/gotest.tools#280
-   fix badges in readme, gofmt, and minor linting fix by [@&#8203;thaJeztah](https://github.com/thaJeztah) in gotestyourself/gotest.tools#284
-   circleci: add go1.21, go1.22, go1.23, and update golangci-lint to v1.60.3 by [@&#8203;thaJeztah](https://github.com/thaJeztah) in gotestyourself/gotest.tools#285
-   assert, assert/cmp: un-deprecate assert.ErrorType for now by [@&#8203;thaJeztah](https://github.com/thaJeztah) in gotestyourself/gotest.tools#286

#### New Contributors

-   [@&#8203;cstrahan](https://github.com/cstrahan) made their first contribution in gotestyourself/gotest.tools#276

**Full Changelog**: gotestyourself/gotest.tools@v3.5.1...v3.5.2

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMTIuMCIsInVwZGF0ZWRJblZlciI6IjM5LjI1Mi4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/524
Co-authored-by: Renovate Bot <[email protected]>
Co-committed-by: Renovate Bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants