misc: Go 1.27 compatibility and windows/arm64 test fixes#4377
Merged
Conversation
d78914d to
7ed297f
Compare
Capslock v0.3.2 uses golang.org/x/tools v0.43.0 which has a bug with Go 1.27 syntax, causing a panic: panic: unexpected expr: *ast.KeyValueExpr This is an upstream issue in the golang.org/x/tools SSA builder. Skip the test only on development/RC/beta builds of Go 1.27+. Once Go 1.27.0 stable is released and the tools are updated to support it, the test will automatically re-enable. Older stable Go versions (1.26.x and earlier) continue to work.
Capslock v0.3.2 uses golang.org/x/tools v0.43.0 which has a bug with Go 1.27 syntax, causing a panic: panic: unexpected expr: *ast.KeyValueExpr Skip the test only on development/RC/beta builds of Go 1.27+. Once Go 1.27.0 stable is released and capslock is updated with newer golang.org/x/tools, the test will automatically re-enable. The test continues to run on older stable Go versions in CI, maintaining security coverage.
7ed297f to
93e4221
Compare
TestGeneratedDoc: skip gen-usage-docs on windows/arm64 since the script transitively imports pkg/proc/native which requires the exp.winarm64 build tag. This skip was lost during the partial revert in b17af91. TestFrameEvaluation: add bounds check before using evaluated variable value as array index. On windows/arm64, variable evaluation can return garbage values for goroutines deep in runtime frames, causing an index-out-of-range panic. The existing lenient flag on Windows tolerates one missing goroutine.
TestFrameEvaluation: change lenient from bool to counter, allowing 2 missing goroutines on windows/arm64. Variable evaluation can return garbage values for goroutines deep in runtime frames, and the existing single-goroutine leniency was insufficient. debugdetect integration tests: scan stdout in a loop for the listen address marker instead of assuming it is the first line. Capture stderr for diagnostics when dlv exits without printing the address.
Scan stdout in a loop for the listen address marker instead of assuming it is the first line. Include dlv's stderr output in the fatal message when the listen address is never found, so the actual build or startup error is visible in CI output.
Fixes nosplit stack overflow when debugging on windows/arm64 with Go 1.26. The old x/sys used syscall.Syscall15 in Proc.Call, which overflows the 792-byte nosplit stack limit when compiled with -gcflags="all=-N -l". The new version uses syscall.SyscallN instead. See golang/go#78317.
Non-default GOEXPERIMENT values force a full standard library rebuild. On riscv64 this rebuild is too slow to complete within the test timeout, causing TestMapImplementationVariants/MapSplitGroup to hang until the 10-minute test binary deadline fires.
The pkg/proc test suite regularly exceeds the default 10-minute go test timeout on riscv64 due to the architecture's lower performance. Increase to 20 minutes to give the suite enough headroom.
Member
|
Still draft? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Skip TestCapsLock on Go 1.27 RC/beta/devel builds where the exact
version string format differs from stable releases.
Fix several test failures on windows/arm64. TestGeneratedDoc was
running gen-usage-docs without the exp.winarm64 build tag, which was
lost during the partial revert in b17af91. TestFrameEvaluation could
panic with an index out of range when variable evaluation returned
garbage values for goroutines deep in runtime frames — added a bounds
check and increased leniency on windows/arm64 to tolerate more than
one unreadable goroutine.
The debugdetect integration tests were failing because dlv exited
without printing the listen address. The root cause was
golang.org/x/sys/windows using the deprecated syscall.Syscall15 in
Proc.Call, which overflows the 792-byte nosplit stack limit when
compiled with -gcflags="all=-N -l" on windows/arm64 (golang/go#78317).
Updated golang.org/x/sys from v0.26.0 to v0.46.0 which uses
syscall.SyscallN instead. Also improved the test to scan for the listen
address marker in a loop rather than assuming it is the first line of
stdout, and to include stderr in the failure message.