Skip to content

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

Closed
@adonovan

Description

@adonovan

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

Activity

added
ToolsThis label describes issues relating to any tools in the x/tools repository.
on Sep 5, 2024
added this to the Unreleased milestone on Sep 5, 2024
self-assigned this
on Sep 5, 2024
gopherbot

gopherbot commented on Sep 5, 2024

@gopherbot
Contributor

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

self-assigned this
on Sep 5, 2024
adonovan

adonovan commented on Sep 5, 2024

@adonovan
MemberAuthor

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...

added a commit that references this issue on Sep 6, 2024
gopherbot

gopherbot commented on Sep 10, 2024

@gopherbot
Contributor

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

added a commit that references this issue on Sep 10, 2024
b0f680c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

ToolsThis label describes issues relating to any tools in the x/tools repository.

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @timothy-king@adonovan@gopherbot@gabyhelp

      Issue actions

        x/tools/go/ssa: TestStdlib panics · Issue #69287 · golang/go