Skip to content

fix nil/bounds/make panic semantics#1915

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

fix nil/bounds/make panic semantics#1915
cpunion wants to merge 1 commit into
xgo-dev:mainfrom
cpunion:codex/goroot-fixedbugs-panic-coverage

Conversation

@cpunion
Copy link
Copy Markdown
Collaborator

@cpunion cpunion commented May 24, 2026

Summary

  • make runtime panics carry runtime.Error values and add indexed bounds panic helpers
  • check make(chan) negative/overflow sizes before allocation
  • preserve nil-deref ordering for field address and pointer load paths while keeping nil array pointer len/range semantics
  • add stable test/go coverage for fixedbugs bug273, issue63657, issue65417, issue72844, issue72860, and issue75327

GOROOT xfail updates

Removed darwin/arm64 xfails only for locally verified passing cases:

  • fixedbugs/bug273.go
  • fixedbugs/issue63657.go
  • fixedbugs/issue65417.go
  • fixedbugs/issue72844.go (go1.25/go1.26)
  • fixedbugs/issue72860.go (go1.25/go1.26)
  • fixedbugs/issue75327.go (go1.26)

Left recover/defer cases and still-failing cases out of this PR: issue4066.go, issue73916*.go, issue19040.go, issue23837.go, issue37975.go. Linux xfails remain because this worktree only verified darwin/arm64.

Tests

  • /opt/homebrew/Cellar/go/1.26.0/libexec/bin/go test ./ssa ./cl -run 'TestSkipUnusedArrayDeref|TestIsLargeNonPointerValue|TestCompileLargeNilDerefInterfaceGuards' -count=1\n- /opt/homebrew/Cellar/go/1.26.0/libexec/bin/go test ./test/go -run 'TestMakeSliceAndChanPanics|TestNilAddressCalculationPanicsAfterPriorSideEffects|TestNilLoadBeforeBoolShortCircuitPanics|TestGenericUnsafeSizeofIndexPanics|TestIndexBoundsPanicTextIncludesLength|TestRangeOverNilArrayPointer|TestLenOfNilArrayPointer' -count=1\n- /tmp/llgo-fixedbugs-panic test ./test/go -run 'TestMakeSliceAndChanPanics|TestNilAddressCalculationPanicsAfterPriorSideEffects|TestNilLoadBeforeBoolShortCircuitPanics|TestGenericUnsafeSizeofIndexPanics|TestIndexBoundsPanicTextIncludesLength|TestRangeOverNilArrayPointer|TestLenOfNilArrayPointer' -count=1\n- /opt/homebrew/Cellar/go/1.26.0/libexec/bin/go test ./test/go -count=1\n- small GOROOT batches with empty xfail for Go 1.24.11, Go 1.25.7, and Go 1.26.0 over fixedbugs/(bug273|issue63657|issue65417|issue72844|issue72860|issue75327).go\n- Go 1.26.0 same small GOROOT batch with the default xfail file after deletion\n

@cpunion cpunion force-pushed the codex/goroot-fixedbugs-panic-coverage branch 7 times, most recently from 01b131f to 31efe5a Compare May 24, 2026 16:15
@cpunion cpunion force-pushed the codex/goroot-fixedbugs-panic-coverage branch from 31efe5a to ccdf043 Compare May 24, 2026 16:26
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.

1 participant