Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/go/ssa: TestStdlib panics #69287

Closed
adonovan opened this issue Sep 5, 2024 · 4 comments
Closed

x/tools/go/ssa: TestStdlib panics #69287

adonovan opened this issue Sep 5, 2024 · 4 comments
Assignees
Labels
Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@adonovan
Copy link
Member

adonovan commented Sep 5, 2024

This test evidently hasn't been run by the builders in a long time:

xtools$ git co master
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
xtools$ go test ./go/ssa/ -run=Std
--- FAIL: TestStdlib (6.95s)
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=0x2 addr=0xf0 pc=0x1048ea1e4]

goroutine 34 [running]:
testing.tRunner.func1.2({0x1049afea0, 0x104c01010})
	/Users/adonovan/w/goroot/src/testing/testing.go:1706 +0x1bc
testing.tRunner.func1()
	/Users/adonovan/w/goroot/src/testing/testing.go:1709 +0x334
panic({0x1049afea0?, 0x104c01010?})
	/Users/adonovan/w/goroot/src/runtime/panic.go:785 +0x124
golang.org/x/tools/go/ssa_test.srcFunctions.func1(0x1049ac720?)
	/Users/adonovan/w/xtools/go/ssa/stdlib_test.go:187 +0xb4
golang.org/x/tools/go/ssa_test.srcFunctions(0x14021c52000, {0x1401c07c008, 0x27c, 0x148?})
	/Users/adonovan/w/xtools/go/ssa/stdlib_test.go:199 +0x14c
golang.org/x/tools/go/ssa_test.testLoad(0x14000126700, 0x1f4, {0x1400015a500, 0x2, 0x2})
	/Users/adonovan/w/xtools/go/ssa/stdlib_test.go:111 +0x330
golang.org/x/tools/go/ssa_test.TestStdlib(0x14000126700)
	/Users/adonovan/w/xtools/go/ssa/stdlib_test.go:44 +0x64
testing.tRunner(0x14000126700, 0x104a0e730)
	/Users/adonovan/w/goroot/src/testing/testing.go:1764 +0xe4
created by testing.(*T).Run in goroutine 1
	/Users/adonovan/w/goroot/src/testing/testing.go:1823 +0x364
FAIL	golang.org/x/tools/go/ssa	7.341s
@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Sep 5, 2024
@gopherbot gopherbot added this to the Unreleased milestone Sep 5, 2024
@adonovan adonovan self-assigned this Sep 5, 2024
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/610938 mentions this issue: go/ssa: skip failing test

@timothy-king timothy-king self-assigned this Sep 5, 2024
@adonovan
Copy link
Member Author

adonovan commented Sep 5, 2024

Seems like the srcFunctions traversal in TestStdlib is calling Program.FuncValue on the type symbol for the lockedOSThread function in the cmd/cgo/internal/test package, yet no ssa.Package was created for it. If it was a method that would make sense since methods and wrappers from dependencies can be mentioned by type information and synthesized from types alone, but lockedOSThread is a function. Very odd. Investigation continues...

gopherbot pushed a commit to golang/tools that referenced this issue Sep 6, 2024
Updates golang/go#69287

Change-Id: I1312d3ceb40ce0f899008730cf4bbfde04c2b648
Reviewed-on: https://go-review.googlesource.com/c/tools/+/610938
Reviewed-by: Zvonimir Pavlinovic <zpavlinovic@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/612044 mentions this issue: go/ssa: reenable TestStdlib

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

4 participants