You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In hidden_ref.cpp, -c bad is parsed by atoi as zero and then replaced with the prompt length at line 150. Likewise, -ngl bad becomes zero GPU layers and -t bad selects the default thread count. With otherwise valid arguments, invalid input runs inference and writes a completed reference set. Parse the entire integer with strtol, reject conversion and range errors by name, and use the checked conversion for every numeric option.
This is fixed on main by 7ed1967 ("refset: a nemotron id, completion count, or oracle numeric option that does not parse is refused"). tools/ref/hidden_ref.cpp no longer uses atoi for these options: -c, -ub, -ngl and -t go through parse_i32 (lines 86 to 92 on main), and a value that does not parse makes it return 2 before any inference runs. So -c bad, -ngl bad and -t bad are refused instead of becoming 0 or the default. Closing.
Activity
tools, refset: the oracle harnesses share one input and output contra…
tools, refset: the oracle harnesses share one input and output contra…
tools, refset: the oracle harnesses share one input and output contra…
tools, refset: the oracle harnesses share one input and output contra…
tools, refset: the oracle harnesses share one input and output contra…
juliankang4 commentedon Oct 16, 2026
This is fixed on main by 7ed1967 ("refset: a nemotron id, completion count, or oracle numeric option that does not parse is refused").
tools/ref/hidden_ref.cppno longer usesatoifor these options:-c,-ub,-ngland-tgo throughparse_i32(lines 86 to 92 on main), and a value that does not parse makes it return 2 before any inference runs. So-c bad,-ngl badand-t badare refused instead of becoming 0 or the default. Closing.