Skip to content

[9.0 parity 1/7] fix(nondet): log float as Map2Check 9.0 does (FLOAT 16, %.9g) - #47

Draft
GuilhermeBn198 wants to merge 1 commit into
developfrom
port/nondet-float
Draft

GuilhermeBn198 wants to merge 1 commit into
developfrom
port/nondet-float

Conversation

@GuilhermeBn198

Copy link
Copy Markdown
Collaborator

Part of bringing Map2Check 9.0 (hbgit/Map2Check PR #73) onto the Rust runtime. 9.0 kept fixing the C runtime after the cutover snapshot, and once develop links only this library, those fixes would silently stop applying. Measured on the merged build before any port: 18 of 30 Cover-Error probes confirmed by TestCov against 23 with the C runtime.

What

float rows of klee_log.csv are FLOAT 16 printed with %.9g, as Map2Check 9.0 writes them (they were DOUBLE 15 with %lf). Six fixed decimals print 1e-30 as 0, a different input, and the 9.0 test-suite writer copies the value column verbatim into <input>. c_float reproduces glibc's %.9g; the test pins it to glibc 2.35 output for 22 bit patterns (subnormals, extremes, signed nan/inf).

Measured

With the Map2Check side (float in the pass's type table): the 5 Floats probes go from 0% TestCov coverage (FAILED claimed, empty or wrong <input>) to 5/5 confirmed; on the 33 Floats Cover-Error tasks, every FAILED so far is confirmed (17 of the 22 finished; 5 UNKNOWN at 300 s on a loaded host).

Tests

cargo test (with and without libfuzzer,wasm) and cargo clippy --all-targets --features libfuzzer,wasm pass; KLEE bitcode builds with rustc 1.72.1.

Stack (merge in this order; each PR targets the previous branch):

  1. port/nondet-float → develop
  2. port/assume-prune → port/nondet-float
  3. port/nondet-types → port/assume-prune
  4. port/afl-zero-tail → port/nondet-types
  5. port/klee-log-cap → port/afl-zero-tail
  6. port/seed-replay-log → port/klee-log-cap
  7. port/check-cstring → port/seed-replay-log (also carries the CHANGELOG entry)

Then tag v1.1.0-rc2 and bump the pin in Map2Check (scripts/runtime/*); the Map2Check side is the stack on feat/9.0-merge-develop of hbgit/Map2Check.

Before leaving draft: the commits are not signed yet (this repo requires verified signatures). Re-sign with git rebase --exec "git commit --amend --no-edit -S" develop on the top branch and force-push the stack.

A float row went out as a DOUBLE (15) printed with %lf. Six fixed decimals
print 1e-30 as 0 -- a different input -- and the Map2Check 9.0 test-suite
writer copies the value column verbatim into <input>, so the suite does not
replay the violation. 9.0 gave float its own type, FLOAT 16, printed with
%.9g, which round-trips every f32 (issue #74 of Map2Check).

c_float reproduces glibc's %.9g; the test pins it to glibc 2.35 output for
22 bit patterns (subnormals, the extremes, nan/inf with their sign).
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