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 is silent on a direct call to an unresolvable CK_FN symbol with the source arguments dropped (#1635's MIR passed as ok) #1639
— a TK_CALL whose callee is a CK_FN const for symbol r, a symbol with no signature, no MIR body and no generic declaration, with the source call's ONE argument dropped (call_arg_counts == 0). with check --validate-all reported validate-all: ok; only codegen failed (FATAL: unhandled MirIntrinsic.GENERIC_CALL sym=r).
validate_typed_mir_body (src/MirCore.w) has mir_validate_indirect_call_arity for fn-typed callee operands, but a direct CK_FN callee is checked against nothing: not that the symbol has a signature or a body in the module, not that the argument count matches the source call (call_ast_node is recorded and the AST arity is known). The builtin branch in MirLower's NK_CALL dispatch ("Unresolved bare function — route through gen_call", the bu_ branch near src/MirLower.w:15106) is what emits these zero-argument calls for embed_file/src/etc., which is why a naive "every CK_FN callee has a signature" rule can't land without either (a) MirLower tagging that branch's calls with a distinct intrinsic/marker the validator can allow-list, or (b) the codegen builtin table being consultable from the validator.
Ask: make --validate-all (and analyze audit:mir) reject a TK_CALL to a CK_FN symbol that the module cannot resolve (no sig, no body, no generic node, not a tagged builtin), and reject a direct call whose call_arg_counts is smaller than the recorded call AST node's argument count when the callee is not variadic.
Activity
MirLower: a call through a let-alias of a non-Copy fn field calls the…
MirLower: a call through a let-alias of a non-Copy fn field calls the…
MirCore: validate-all rejects a `const fn` callee that is no function…
test/internals: planted fixtures for audit:resolution and the unknown…
MirCore: validate-all rejects a `const fn` callee that is no function…
test/internals: planted fixtures for audit:resolution and the unknown…
analyze: audit:resolution phase 1 — every MIR callee agrees with Sema…
Sema: one arity rule for every call; method calls are checked (#1973)
Sema: one arity check for every call path (#1973); owned ?? / unwrap_…
An intrinsic call's tag goes on its own call, set before its terminat…
An intrinsic call's tag goes on its own call, set before its terminat…
An intrinsic call's tag goes on its own call, set before its terminat…
An intrinsic call's tag goes on its own call, set before its terminat…
Cancellation: indirect callees that may suspend get the cancelled-ret…