Skip to content

Sweep: let a case declare a backend it cannot pass (#23779), and correct my false g07 claim - #23812

Merged
PurHur merged 2 commits into
masterfrom
test/differential-skip-marker
Jul 27, 2026
Merged

PurHur merged 2 commits into
masterfrom
test/differential-skip-marker

Conversation

@PurHur

@PurHur PurHur commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Why

The AOT differential sweep cannot function as a gate while cases that exercise unimplemented
features sit in it failing forever. Three such cases are mine, from #23754.

The mechanism

An opt-in marker with a mandatory reason:

// @differential-skip-aot: print_r() JIT helper requires Runtime->vm from thin standalone init (#9190 / #23540)

The reason prints with the skip and the summary reports the skipped count, so a skip can never be
silent:

skip    g02_print_r.php    print_r() JIT helper requires Runtime->vm from thin standalone init (#9190 / #23540)

29/52 match Zend (aot backend, 3 skipped)

AGENTS.md documents it with the warning attached — only for genuinely unsupported features, never
to silence a real defect, because a skip marker is the cheap green of §4 wearing a different hat.
It also now records that --aot is not green (27/53 when first run end-to-end, #23779), so its
raw count is not a pass/fail signal.

Cases marked

case reason
g01_var_dump var_dump() of string/bool/null needs Runtime->vm (#23540)
g02_print_r print_r() needs Runtime->vm (#9190 / #23540)
e29_var_dump_indent var_dump() of arrays needs Runtime->vm (#23540)
g07_incdec_resource_provenance different — a real defect, #23811

The first three are unsupported features. g07 is not: it fails AOT because of a genuine bug,
and the marker says so explicitly and tells you not to read it as "this shape works under AOT". It
is skipped rather than deleted so that removing the marker restores an AOT guard the moment #23811
lands.

Correcting a false claim of mine

#23781 states g07 "passes VM and AOT". That was wrong. I created the file while the sweep I
cited was already running, so its case list had been globbed before the file existed — g07
appears in neither section of that log. I read "absent from the failure list" as "passed".

Re-measured with the case genuinely included: VM passes, AOT fails. And the AOT failure is not
caused by #23781 — with lib/ reverted to 544d1dca9 the same program dies rc=134/SIGABRT with
no output at all, versus wrong-but-partial output after. The fix un-masked pre-existing breakage.
Filed as #23811 (integer rendered as Resource id #N when its value collides with a live handle,
plus a mis-evaluated decrement). Full correction posted on #23781.

Gates

No lib/ changes.

… mine (#23779)

The AOT differential sweep cannot work as a gate while cases that exercise unimplemented features
sit in it failing forever. `g01_var_dump`, `g02_print_r` and `e29_var_dump_indent` — all added by me
in #23754 — dump non-scalars, which thin standalone AOT does not support. They emit an explicit
diagnostic naming #23540 / #9190 and will fail `--aot` regardless of compiler state. That is my
defect: they were written as VM guards without considering the other backend.

Adds an opt-in marker carrying a mandatory reason:

    // @differential-skip-aot: print_r() JIT helper requires Runtime->vm from thin standalone init (#9190 / #23540)

The reason is printed with the skip, and the summary line reports the skipped count, so a skip can
never be silent. AGENTS.md documents it with the obvious warning attached: use it only for
genuinely unsupported features, never to silence a real defect — a skip marker is the cheap green
of §4 wearing a different hat.

Verified in php-compiler:22.04-dev:

- VM:  55/55 match Zend, exit 0, and **zero skips fired** — the marker is backend-specific, so the
  three cases still gate the VM path exactly as before.
- AOT: 29/52 match, 3 skipped, exit 23 (was 27 failing before the skips and before #23792 landed).

AGENTS.md also now records that `--aot` is not green (27/53 when first run end-to-end, #23779), so
its raw count is not a pass/fail signal — compare failing case NAMES against master, as with the
compliance suites.

No lib/ changes.
I claimed in #23781 that g07 "passes VM and AOT". That was false. The file was created while the
sweep run I cited was already in progress, so the case list had been globbed before it existed —
g07 appears in neither section of that log. I read "absent from the failure list" as "passed",
which is the empty-result-set-is-not-a-pass trap in AGENTS.md §4.

Corrected on the PR. What is actually true, re-measured today with the case genuinely included:

- VM:  passes (listed explicitly as `ok`)
- AOT: fails — renders the integer 2 as "Resource id #2" because its value collides with a live
  fopen() handle id, mis-evaluates `$n=0; $n--; $n--;` as 0 rather than -2, and then truncates

That AOT failure is a real defect, now #23811, and it is *not* caused by #23483's fix — with lib/
reverted to 544d1dc the same program dies rc=134/SIGABRT with no output at all, so the fix
un-masked pre-existing breakage rather than causing it.

Marked skip-aot with the reason pointing at #23811, and the comment says explicitly not to read the
marker as "this shape works under AOT". Deleting the case would lose a guard that already earned
its keep: it was written to catch integers colliding with handle ids, and that is exactly what it
caught.
@PurHur
PurHur merged commit fa63155 into master Jul 27, 2026
@PurHur
PurHur deleted the test/differential-skip-marker branch July 27, 2026 21:18
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.

2 participants