fix nil receiver method dispatch checks#1885
Conversation
|
Updated this draft PR with commit Root cause: the initial nil receiver method-dispatch change guarded ordinary pointer dereferences too broadly, which shifted existing FileCheck output, while the real missing behavior was value-receiver dispatch through nil pointer/promoted embedded pointer paths that must panic under Go semantics. Fix: narrow the nil-deref guard to the method dispatch cases that need Go-compatible panic behavior and update the affected FileCheck expectations. Local verification reported from the worktree:
CI has been re-triggered on the new head; I will continue monitoring it. |
|
Update pushed to Root cause: the failed CI job was testing the GitHub PR merge commit, not just the branch head. Current Fix:
Local verification:
CI status: new head checks are running. The replacement for the failed job is |
|
CI update for head
|
Summary
ssa:wrapnilchkso value-receiver method wrappers panic on nil pointer receivers.test/gocoverage for promoted methods, method expressions/values, and interface calls on nil receivers.method.goandmethod5.goGOROOT xfails.Testing
go test ./cl -run 'TestCompileSmallNilDerefGuards|TestCompileLargeNilDerefInterfaceGuards|TestIsLargeNonPointerValue' -count=1go test ./test/go -run 'Test(Promoted|ValueReceiver|InterfaceCall)' -count=1./dev/llgo.sh test -run 'Test(Promoted|ValueReceiver|InterfaceCall)' ./test/gogo test ./test/goroot -count=1 -timeout 20m -run TestGoRoot -args -goroot "$(go env GOROOT)" -dirs . -case '^method\.go$' -xfail /tmp/llgo-no-xfail.yamlgo test ./test/goroot -count=1 -timeout 20m -run TestGoRoot -args -goroot "$(go env GOROOT)" -dirs . -case '^method5\.go$' -xfail /tmp/llgo-no-xfail.yamlgo test ./test/goroot -count=1 -timeout 20m -run TestGoRoot -args -goroot "$(go env GOROOT)" -dirs . -case '^method(5)?\.go$'GOROOT CI is slow/disabled, so this PR keeps stable coverage in
test/goand lists the exact targeted GOROOT commands above. I did not push any branch toxgo-dev/llgo; normal PR CI should run from the fork branch.