cmd/compile: missing panic on nil pointer-to-empty-struct dereference #23837
Labels
FrozenDueToAge
NeedsFix
The path to resolution is known, but the work has not been done.
release-blocker
Milestone
I expect this program should panic, but it doesn't:
For comparison:
Changing f to
func f(p, q *struct{ f struct{} }) bool { return p.f == q.f }
causes a panic. It appears "checknotnil" checks for both of these were added to walkexpr in d3c758d, but then the OIND case was removed as "redundant" in aa0439b.gccgo doesn't panic on either of these.
/cc @griesemer @ianlancetaylor
The text was updated successfully, but these errors were encountered: