8000 ir: stop sanity checking invalid range iterator by dajiaohuang · Pull Request #1815 · dominikh/go-tools · GitHub
[go: up one dir, main page]

Skip to content

ir: stop sanity checking invalid range iterator - #1815

Closed
dajiaohuang wants to merge 2 commits into
dominikh:masterfrom
dajiaohuang:fix/1815-sanity-next-guard
Closed

dajiaohuang wants to merge 2 commits into
dominikh:masterfrom
dajiaohuang:fix/1815-sanity-next-guard

Conversation

@dajiaohuang
@dajiaohuang dajiaohuang commented Oct 1, 2026 •
Copy link
Copy Markdown

When sanity checking a malformed Next instruction whose Iter is not an *Range, report the invariant violation and stop checking that instruction. Continuing to inspect rng.X dereferences a nil pointer and panics instead of returning a failed sanity check.

Validation: static control-flow review and git diff --check. No tests were added or run.

@dajiaohuang
Copy link
Copy Markdown
Author

Withdrawing after reassessing necessity. The actual range builder supplies a Range iterator; no supported source input or real transformation has been established that reaches the malformed Next case addressed here. Sanity checking is an internal debugging pass and production callers already deliberately panic on a failed check. The isolated invalid-IR case does not establish a necessary repair to actual supported use. This withdrawal does not claim that the malformed representation is valid or that every debugging diagnostic is correct.

@dajiaohuang dajiaohuang closed this Oct 8, 2026
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

0