Skip to content

[9.0 parity 8/8] fix(output): own file for TARGET-REACHED (KLEE state race) - #54

Draft
GuilhermeBn198 wants to merge 1 commit into
port/check-cstringfrom
port/property-before-abort
Draft

GuilhermeBn198 wants to merge 1 commit into
port/check-cstringfrom
port/property-before-abort

Conversation

@GuilhermeBn198

@GuilhermeBn198 GuilhermeBn198 commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Found while running Map2Check 9.0's integration regressions on the merged build (hbgit/Map2Check#78 + ports). Not a 9.0 port: a race of this runtime under KLEE that the 9.0 frontend exposes.

What

Under KLEE every state writes the same native map2check_property through external calls, and KLEE switches states between batches of instructions. Traced with strace: the violating state renames TARGET-REACHED into place, then, while it formats its aux files and before its abort halts the search, a state that ended normally renames its own NONE over it. The frontend reads NONE → UNKNOWN on a reachable target. SD-20's temp-file + rename keeps the file whole, not the violation; rewriting the file right before the abort (first attempt) still loses the race.

The other violations already have a file of their own (_deref, _free, _assert, _overflow, ...), which no normally-ending state writes. TARGET-REACHED now has one too, map2check_property_target (same text). Map2Check reads it before map2check_property (hbgit/Map2Check port/target-property-file). SD-20 and the TARGET-REACHED golden document the difference from the C runtime.

Measured

9.0's integration section 13 (--nondet-generator symex, with and without --slice): UNKNOWN with v1.1.0-rc1 and with #47-#53 (map2check_property = NONE); FAILED with this change and the frontend side, 3/3 (map2check_property still NONE, map2check_property_target = TARGET-REACHED).

Tests

cargo test (both feature sets) and clippy pass; unit test and golden updated for the extra file.

Stack: after #53; merge order #47 → #54, then the Map2Check side. Commits not signed yet (see #47).

Under KLEE every state writes the same native map2check_property through
external calls, and KLEE switches states between batches of instructions. A
state that ended normally renamed its NONE over the violation while the
violating state was still writing its aux files, before its abort halted
the search, so a reachable target came back UNKNOWN (Map2Check 9.0's
integration section 13, a two-step reactive loop; traced with strace). The
rename of SD-20 keeps the file whole, not the violation.

The other violations already had a file of their own, which no state that
ends normally writes. TARGET-REACHED now has map2check_property_target, with
the same text; Map2Check reads it before map2check_property. SD-20 and the
TARGET-REACHED golden say so (a difference from the C runtime).
@GuilhermeBn198
GuilhermeBn198 force-pushed the port/property-before-abort branch from ebe846a to 82f2014 Compare October 22, 2026 05:00
@GuilhermeBn198 GuilhermeBn198 changed the title [9.0 parity 8/8] fix(termination): rewrite the property file right before the abort [9.0 parity 8/8] fix(output): own file for TARGET-REACHED (KLEE state race) Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant