oracle_hip leaks a traceback for non-integer dispatch sizes #12314
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by malekaifa on 2026-10-28T09:12:16Z.
What happens
tools/hw-oracle/oracle_hip.py::main() converts positional THREADS and OUT_DWORDS with raw int() before the existing dispatch-range validation. On exact current main
cccdaa2734, malformed numeric text exits 1 with a raw ValueError traceback.Reproductions that require neither HIP nor valid input files:
Both fail at threads, out_dwords = int(threads), int(out_dwords) with ValueError: invalid literal for int() and a traceback. As a control, numeric but out-of-range THREADS=0 already exits through argparse with code 2 and the clean dispatch-range diagnostic.
Expected behavior
Malformed THREADS or OUT_DWORDS text should be reported through the same controlled argparse CLI boundary as invalid numeric ranges: exit code 2, concise diagnostic, and no traceback, before any HIP runtime or input-file work.
Proposed scope
Ownership / overlap check
A live scan of all 1,364 open PRs found no PR touching tools/hw-oracle/oracle_hip.py. PR #12084 shares only tools/hw-oracle/test_hw_oracle.py; its patch adds a separate SourceEncodingTests class for hw_oracle.assemble() and does not touch HipOracleTests or oracle_hip.main(). Targeted issue/PR searches found no existing owner for this malformed-dispatch behavior.
Prepared branch: fix/oracle-hip-invalid-dispatch
AI-assisted: yes (OpenAI Codex)