Repository navigation
Morrow v2.4.21
Region-escape hardening: indirect escapes through calls, containers, effects, and C
callback registration are now rejected, and lexical handler scopes capture outer
variables correctly.
Fixes
- Interprocedural region summaries. Region tags propagate through callees that
return a parameter, store through a destination parameter, or insert into a
container. Transitive wrapper chains participate in the same summaries. - Branch aliases are preserved. A region alias is not dropped when one branch of
anifreassigns it to another value; both paths are over-approximated. - Effect-operation parameters are checked. Handler-arm summaries are compared
againstperformarguments, so a handler that stores a region pointer through an
effect destination parameter is rejected. - Lexical handler capture fixed. Handler bodies now see outer function locals;
previously the scope-copy loop iterated a broken occupancy length. - C callback registration is rejected with a region pointer. Direct patterns
such asregister_cb(cb, region_ptr)produce
Region Escape Violation: region-scoped value passed to C callback registration.
Arbitrary C retention and unsupported indirect function-pointer calls remain
documented boundaries. - Documentation and audit updated. C1 is marked done for supported paths;
tests, fixed point, and the reproducible verification report reflect the new
state.
Regression coverage
New negative controls, all verified to pass on v2.4.20 and rejected now:
region_indirect_return.mwregion_indirect_store.mwregion_indirect_container.mwregion_indirect_wrapper.mwregion_indirect_branch_alias.mwregion_indirect_effect.mwregion_callback_escape.mw
Positive controls cover read-only helpers, region-local containers, read-only
effects, and handler-body capture of outer variables.
Verification
forge test: 31 positive suites + 27 compile-fail suites passed- Self-hosting fixed point:
B313880F4B87AA55867C88E3BC343EE5CE2AF7541674970DC6D039D3ED087DAF - stage2/stage3 binaries byte-identical (640000 bytes)
- Release pipeline rebuilds all examples, benchmarks, archives, checksums, and the
release page entry.