DF-5712 / run.log
== Part 1: kernel index/rindex vs libc strchr/strrchr == MISMATCH baseline str[0]="" ch=-256 kernel=-1 libc=0 MISMATCH baseline str[0]="" ch=-256 kernel=-1 libc=0 MISMATCH baseline str[0]="" ch= 256 kernel=-1 libc=0 MISMATCH baseline str[0]="" ch= 256 kernel=-1 libc=0 MISMATCH baseline str[1]="a" ch=-256 kernel=-1 libc=1 MISMATCH baseline str[1]="a" ch=-256 kernel=-1 libc=1 MISMATCH baseline str[1]="a" ch=-159 kernel=-1 libc=0 MISMATCH baseline str[1]="a" ch=-159 kernel=-1 libc=0 MISMATCH baseline str[1]="a" ch= 256 kernel=-1 libc=1 MISMATCH baseline str[1]="a" ch= 256 kernel=-1 libc=1 MISMATCH baseline str[2]="abc" ch=-256 kernel=-1 libc=3 MISMATCH baseline str[2]="abc" ch=-256 kernel=-1 libc=3 DIFF baseline: index 58 mismatches, rindex 58 mismatches BASELINE_TOTAL_MISMATCHES=116 == Part 2: ch==0 semantics (strchr/strrchr NUL tail) == CH0_SEMANTICS: OK — match libc exactly (0 bad) == Part 3: guard-page (pagesize=4096) == guard k_index '/' -> off 6 [no fault] guard k_rindex 'z' -> off 8 [no fault] guard k_index 0 -> off 9 (want 9) [no fault] guard k_rindex 0 -> off 9 (want 9) [no fault] guard k_index 'Q' -> NULL [no fault] guard NONUL k_index -> FAULT at guard page (contract demo, expected) GUARDPAGE_RESULT: byte-exact, halts at NUL (0 unexpected faults) == Part 4: patched (*u.p == (char)ch) differential == DIFF patched: index 0 mismatches, rindex 0 mismatches PATCHED_TOTAL_MISMATCHES=0 HARNESS_DONE