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
MIR validation accepts a nonexistent field on Box and reaches LLVM with undef #1127
with check test/behavior/behav_box_drop.w --validate-all --dump-mir accepted an invalid field projection on f86cae9. with test then failed LLVM verification:
Both operands to ICmp instruction are not of the same type!
%19 = icmp eq i32 undef, %str ...
MIR in test_box_drops_payload_at_scope_exit contained _11 = binop(eq, copy _2.id, copy _10) with _2: Box[BoxDropGuard]. The actual field is on the Box payload and requires a dereference projection.
The lowering bug is fixed in the Phase 0 branch by having lower_expr_place use the existing shared lower_field_access implementation. Exact LLDB proof: lower_field_base_place+196, kind 19, type 435, place 14; branch +204 exits without unwrapping the Box. Caller chain: lower_expr_place+288, lower_observer_probe_arg+148, lower_bin_op+1272.
The remaining validator gap: validate each projected field against its actual base type and reject a nonexistent field or inconsistent result type before LLVM emission. Add a malformed-MIR fixture for this shape and verify the corrected _2.*.id form succeeds. LLVM's validator caught this; the MIR validator did not.
Triage 2026-10-25, with v0.15.3.0 (main a261b65): does not reproduce. The remaining validator gap is closed by the D65 phase 3 field-place audit (0f0d76b, #2012): mir_field_place_verdict (src/MirCore.w) refuses a field projection whose base is "ty X in MIR, ty Y after Sema's autoderef", which is the Box-without-deref shape here. test/behavior/behav_box_drop.w passes in the suites.
Activity
ehartford commentedon Oct 25, 2026
Triage 2026-10-25,
with v0.15.3.0(main a261b65): does not reproduce. The remaining validator gap is closed by the D65 phase 3 field-place audit (0f0d76b, #2012):mir_field_place_verdict(src/MirCore.w) refuses a field projection whose base is "ty X in MIR, ty Y after Sema's autoderef", which is the Box-without-deref shape here.test/behavior/behav_box_drop.wpasses in the suites.