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
{{ message }}
Repository navigation
validate-all and audit:all are silent when a body's parameter locals disagree with its signature (call argument types unchecked) #1735
The deep-debugging tools stayed silent on a direct call whose argument types do not match the callee body's parameter locals.
Found on branch gen-push-fixes (#1724): the generator constructor for a gen mut fn tick(times: i32) allocated a temporary between its parameter locals, so times was read from a &Counter slot and the loop ran zero times. with check --validate-all printed validate-all: ok and with analyze … audit:all reported violations=0. MIR dump:
fn Counter.tick {
_1: ty236 // self
_2: ty971 // a temp (&Counter) — but n_params = 2, so this is parameter 2
_3: ty3 // times
The typed validator checks a GENERIC_CALL's missing borrow (mir_validate_call_missing_borrow) and indirect-call arity, but never compares a direct call's argument operand types with the callee body's local_type_ids[1..=n_params], nor a body's parameter locals with its own signature's parameter types.
Expected: validate-all fails on a body whose parameter locals disagree with its signature (or a call whose arguments disagree with its callee's parameters), naming the body and parameter. The constructor bug itself is fixed in 06957a94 on gen-push-fixes; the tool gap remains.
Activity
D69: generic generator functions and generator methods (Fixes #1724)
D69: generic generator functions and generator methods (Fixes #1724)
D69: generic generator functions and generator methods (Fixes #1724)
D69: generic generator functions and generator methods (Fixes #1724)
D69 follow-ups: generic and method gen fn, comprehensions and goto ov…
validate-all: a body's parameter locals are checked against its Sema …
Ownership: D72 liveness byte, D73 assignment-as-read, validator leak/…