Fix nil deref checks for address expressions#1896
Draft
cpunion wants to merge 4 commits into
Draft
Conversation
Collaborator
Author
|
Updated head: 8595dbe Root cause:
Fix:
Local tests:
|
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Collaborator
Author
|
Update for fixedbugs/issue38496.go (commit 315b17e):
Local validation:
Note: direct |
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.
Summary
runtime.Error.nilptr.go.typeparam/mdempsky/16.goremains xfailed for ssa: panic with runtime type assertion errors #1892;nil.goremains xfailed because the reproduced failure is nil channel/goroutine behavior;devirtualization_nil_panics.goremains xfailed because the current go1.26 failure reachesruntime.CallersFramesand panicstodoafter recovering the nil panic.test/gocoverage for generic nil interface method calls, nil interface method expressions, nil array-pointer slicing, and large-offset nil field reads.typeparam/issue51521.goandnilptr.go.Validation
go test ./test/go -count=1go run ./cmd/llgo test -run TestNilPanicValuesAreRuntimeErrors ./test/gogo test ./test/goroot -count=1 -run TestGoRootRunCases -v -args -goroot "$(go env GOROOT)" -dirs .,typeparam -case '^(nil\.go|nilptr\.go|nilptr2\.go|typeparam/issue51521\.go)$' -directive-mode runlikego test ./test/goroot -count=1 -run TestGoRootRunCases -v -args -goroot "$(go env GOROOT)" -dirs .,typeparam -case '^(nil\.go|nilptr\.go|nilptr2\.go|typeparam/issue51521\.go)$' -directive-mode runlike -xfail /tmp/llgo-empty-xfail.yaml(expectednil.gofailure;nilptr2.goandtypeparam/issue51521.gopass)go test ./test/goroot -count=1 -run TestGoRootRunCases -v -args -goroot "$(go env GOROOT)" -dirs typeparam/mdempsky -case '^typeparam/mdempsky/16\.go$' -directive-mode runlike(expected xfail retained for ssa: panic with runtime type assertion errors #1892)go test ./test/goroot -count=1 -run TestGoRootRunCases -v -args -goroot /opt/homebrew/Cellar/go/1.26.0/libexec -dirs . -case '^devirtualization_nil_panics\.go$' -directive-mode runlike -xfail /tmp/llgo-empty-xfail.yaml(expected non-nil-scopepanic: todofromruntime.CallersFrames)go test ./test/goroot -count=1 -run TestGoRootRunCases -v -args -goroot /opt/homebrew/Cellar/go/1.26.0/libexec -dirs . -case '^devirtualization_nil_panics\.go$' -directive-mode runlike(expected xfail retained)go test ./ssa -count=1go test ./cl -count=1Notes
nilptr.gois build-tag excluded on local darwin/arm64 with Go 1.24, so this PR covers its root causes withtest/goand removes the linux xfail for CI coverage.go test ./runtime/internal/runtime -count=1andgo test ./runtime/... -count=1are not directly runnable in this module layout becauseruntime/...is outside the main module package path.