Skip to content

cl: report makeslice len/cap panic before indexing#1919

Draft
cpunion wants to merge 1 commit into
xgo-dev:mainfrom
cpunion:codex/goroot-fixedbugs-makeslice-panic
Draft

cl: report makeslice len/cap panic before indexing#1919
cpunion wants to merge 1 commit into
xgo-dev:mainfrom
cpunion:codex/goroot-fixedbugs-makeslice-panic

Conversation

@cpunion
Copy link
Copy Markdown
Collaborator

@cpunion cpunion commented May 24, 2026

Fixes the fixedbugs/issue37975 makeslice panic-text group.

Changes:

  • checks dynamic makeslice len/cap before constructing the slice so cap/len errors are reported at make time
  • adds stable test/go coverage for makeslice len/cap panic text
  • removes verified xfail entries for fixedbugs/issue37975.go

Local verification from the worker:

  • go test ./test/go -run TestMakeSlicePanicText -count=1
  • go test ./cl -run 'TestIntVal|TestIsAllocVargs' -count=1\n- go test ./ssa -run Test -count=1\n- go run ./cmd/llgo run $(go env GOROOT)/test/fixedbugs/issue37975.go\n- go run ./cmd/llgo test -run TestMakeSlicePanicText ./test/go\n- go run ./cmd/llgo test -run 'Test(MakeSlicePanicText|FullSliceBoundsPanicText)' ./test/go\n- go test ./cl -run TestRunAndTestFromTestrt -count=1\n- Go 1.24/1.25/1.26 TestGoRootRunCases for fixedbugs/issue37975.go with empty xfail\n\nGC/liveness/finalizer/goroutine cases are intentionally untouched.

@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 88.57143% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cl/compile.go 88.57% 2 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

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.

2 participants