Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
07f6510
jit-trace: classify `_operator.index` on an int operand as replay-safe
youknowone Aug 20, 2026
83d9076
jit: admit LIST_APPEND in a FOR_ITER body that also contains a call
youknowone Aug 21, 2026
e55b510
check.py: refuse a --no-build run whose artefacts predate the sources
youknowone Aug 20, 2026
28e99fd
check.py: key the --no-build freshness gate on input content, not mtime
youknowone Aug 20, 2026
d352657
check.py: derive the build-input set from the tree alone
youknowone Aug 20, 2026
6eea7bf
jit-trace: source a branch-guard kept slot from the guard pc's own co…
youknowone Aug 21, 2026
9d8d478
interpreter: force the caller frame in type()'s __module__ fill
youknowone Aug 21, 2026
e2d74fc
check.py: count untracked inputs, re-read the digest per build, and b…
youknowone Aug 21, 2026
4a9c4e1
jit, bench: say which of LIST_APPEND and its body is admitted uncondi…
youknowone Aug 21, 2026
e2f7813
bench: record type_name_surrogate_reject's dynasm and cranelift jit-s…
youknowone Aug 21, 2026
29d604d
bench: record pickle_terminal_raise_resume's wasm loops_aborted at th…
youknowone Aug 21, 2026
199b750
parity: halve re_jit_call_resume's trip count
youknowone Aug 21, 2026
908a2bc
check.py: frame each file's content in the build-input digest, and ga…
youknowone Aug 21, 2026
7a54a68
object: cite rutf8's upstream members by symbol alone
youknowone Aug 22, 2026
a33f5f2
jit-trace: resolve a blackhole codepoint index through the string's i…
youknowone Aug 22, 2026
a0b4b99
object: port rutf8's check_utf8 and move the invalid-byte predicates …
youknowone Aug 22, 2026
8ca197c
pickle, marshal, time: check bytes from outside the runtime with chec…
youknowone Aug 22, 2026
9b9d43c
bytes.hex: read a separator's ASCII test off its WTF-8 payload
youknowone Aug 22, 2026
cd8db33
_json: bound scanstring's and scan_once's index by the code point count
youknowone Aug 22, 2026
351f1a3
parity: add utf8_check_untrusted_bytes
youknowone Aug 22, 2026
d6579ff
object: keep the crate's scan in wtf8_from_bytes, restoring only its …
youknowone Aug 22, 2026
8d5cca6
bytes.fromhex: read the hex scan off the WTF-8 payload
youknowone Aug 22, 2026
e5fee43
codecs: take allow_surrogates as an argument instead of deriving it
youknowone Aug 22, 2026
c3ef9ef
codecs: try the check before the state machine, as str_decode_utf8 does
youknowone Aug 22, 2026
7263668
bytes.decode: stop copying the codec name, the error mode and the fold
youknowone Aug 22, 2026
4fa594c
rustfmt
youknowone Aug 22, 2026
9955b59
gate-triage: stop naming the retired FOR_ITER gate in a live section
youknowone Aug 22, 2026
edaaaa2
check.py: fail open when the root manifest cannot be read
youknowone Aug 22, 2026
7a20d34
marshal, pickle: report the byte the surrogatepass validator stopped at
youknowone Aug 22, 2026
af6f843
codecs: narrow the surrogate allowance to a complete encoded surrogate
youknowone Aug 22, 2026
e8cfdcb
jit-trace: keep a guard-owned stack slot's NULL register value
youknowone Aug 22, 2026
2d6b9a0
object: pin the invariant surrogate_bytes is read under
youknowone Aug 22, 2026
cb032e9
Revert "jit-trace: keep a guard-owned stack slot's NULL register value"
youknowone Aug 22, 2026
a9b24a2
object: drop the unused mut on the agreement test's probe closure
youknowone Aug 22, 2026
31ecb68
jit-trace: refuse a blackhole item index that does not convert to an …
youknowone Aug 22, 2026
409ca9f
bench: record the two fixtures at the size and gate counting main now…
youknowone Aug 22, 2026
8d8c71b
jit-trace: carry an in-flight FOR_ITER item through an aborted sub-walk
youknowone Aug 22, 2026
41b6a53
jit-trace: test the blackhole item index conversion
youknowone Aug 22, 2026
4ea6c20
check.py: fingerprint files a member crate embeds from outside the me…
youknowone Aug 22, 2026
734ed07
check.py: check the wasm module the runner will load on the build path
youknowone Aug 22, 2026
3930eed
check.py: fingerprint the build recipe, and refuse to vouch for a bui…
youknowone Aug 22, 2026
27c15e7
check.py: require a selfcheck run to have compiled a loop
youknowone Aug 22, 2026
744986c
check.py: resolve a relative LLBC override from the package whose bui…
youknowone Aug 22, 2026
495a884
bench: document the selfcheck JIT floor and its opt-out
youknowone Aug 22, 2026
19c381e
bench: record pickle_terminal_raise_resume's wasm guard_failures on t…
youknowone Aug 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions pyre/bench/synth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,21 @@ opt into the same directory's self-checking mode:
# pyre-check: selfcheck
```

Such a fixture must exit successfully and print `PASS`. It is still discovered
by both runners; `check_synthetic.py` runs it only when `--pyre` is supplied.
A backend lacking a required mechanism can be scoped out in `check.py` with
`# pyre-check: skip-backends=wasm` followed by a comment explaining the missing
mechanism.
Such a fixture must exit successfully, print `PASS`, and have compiled at
least one loop. The last of those is what stops an interpreted run from
satisfying a guard written about compiled code: the assertion holds either way,
so without it the fixture would keep passing if the shape it guards stopped
reaching the JIT. A fixture whose invariant is not about compiled code says so
with

```python
# pyre-check: selfcheck-interpreted
```

followed by a comment saying why, and is then graded on the exit status and the
marker alone.

A selfcheck fixture is still discovered by both runners; `check_synthetic.py`
runs it only when `--pyre` is supplied. A backend lacking a required mechanism
can be scoped out in `check.py` with `# pyre-check: skip-backends=wasm`
followed by a comment explaining the missing mechanism.
40 changes: 40 additions & 0 deletions pyre/bench/synth/foriter_operator_index_replay_regression.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# pyre-check: selfcheck
# `operator.index(x)` reaches `space.index`, whose first test is
# `is_int_or_long`: an int is returned as-is, before any `__index__` lookup, so
# that call runs no user code and is replay-safe. Every other argument
# dispatches through `__index__`, which IS user code — so the replay-safe class
# must observe the argument, not merely pin the callable.
#
# `helper` is admitted into the surrounding FOR_ITER body. The trailing opaque
# `id` call makes the first inline sub-walk abort and replay `helper`. The int
# call is the arm being admitted; the object call must stay opaque. Admitting
# the object call too would let the replay run `__index__` a second time, and
# `hits` would read N + 1.

from operator import index as _index

N = 5000
hits = [0]


class C:
def __index__(self) -> int:
hits[0] += 1
return 3


def helper(obj, n):
a = _index(n)
b = _index(obj)
id(obj)
return a + b


obj = C()
total = 0
for _ in range(N):
total += helper(obj, 1)

assert hits[0] == N, f"__index__ ran {hits[0]} times, expected {N}"
assert total == 4 * N, f"total {total}, expected {4 * N}"
Comment thread
coderabbitai[bot] marked this conversation as resolved.
print("PASS")
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ fbw_rolled_back_with_effects=0
fbw_store_journal_rollback_failed=0
field_pos_attached_misplaced=0
field_pos_spec_misplaced=0
guard_failures=1
guard_failures=18
internal_compile_panics=0
loops_aborted=0
loops_compiled=4
loops_aborted=1
loops_compiled=5
retraces_compiled=0
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
bridges_compiled=4
bridges_compiled=7
descr_set_absent=0
descr_set_ambiguous=0
descr_set_stale_absent=0
Expand All @@ -8,7 +8,7 @@ fbw_rolled_back_with_effects=0
fbw_store_journal_rollback_failed=0
field_pos_attached_misplaced=0
field_pos_spec_misplaced=0
guard_failures=1001
guard_failures=1403
internal_compile_panics=0
loops_aborted=0
loops_compiled=2
Expand Down
4 changes: 2 additions & 2 deletions pyre/bench/synth/list_append_virtual_payload.dynasm.jitstats
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
bridges_compiled=4
bridges_compiled=7
descr_set_absent=0
descr_set_ambiguous=0
descr_set_stale_absent=0
Expand All @@ -8,7 +8,7 @@ fbw_rolled_back_with_effects=0
fbw_store_journal_rollback_failed=0
field_pos_attached_misplaced=0
field_pos_spec_misplaced=0
guard_failures=1001
guard_failures=1403
internal_compile_panics=0
loops_aborted=0
loops_compiled=2
Expand Down
4 changes: 2 additions & 2 deletions pyre/bench/synth/list_append_virtual_payload.wasm.jitstats
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
bridges_compiled=4
bridges_compiled=7
descr_set_absent=0
descr_set_ambiguous=0
descr_set_stale_absent=0
Expand All @@ -8,7 +8,7 @@ fbw_rolled_back_with_effects=0
fbw_store_journal_rollback_failed=0
field_pos_attached_misplaced=0
field_pos_spec_misplaced=0
guard_failures=1001
guard_failures=1403
internal_compile_panics=0
loops_aborted=0
loops_compiled=2
Expand Down
5 changes: 3 additions & 2 deletions pyre/bench/synth/list_to_tuple_star.cranelift.jitstats
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ fbw_rolled_back_with_effects=0
fbw_store_journal_rollback_failed=0
field_pos_attached_misplaced=0
field_pos_spec_misplaced=0
guard_failures=0
guard_failures=1
internal_compile_panics=0
loops_aborted=0
loops_compiled=0
loops_compiled=1
retraces_compiled=0
5 changes: 3 additions & 2 deletions pyre/bench/synth/list_to_tuple_star.dynasm.jitstats
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ fbw_rolled_back_with_effects=0
fbw_store_journal_rollback_failed=0
field_pos_attached_misplaced=0
field_pos_spec_misplaced=0
guard_failures=0
guard_failures=1
internal_compile_panics=0
loops_aborted=0
loops_compiled=0
loops_compiled=1
retraces_compiled=0
5 changes: 3 additions & 2 deletions pyre/bench/synth/list_to_tuple_star.wasm.jitstats
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ fbw_rolled_back_with_effects=0
fbw_store_journal_rollback_failed=0
field_pos_attached_misplaced=0
field_pos_spec_misplaced=0
guard_failures=0
guard_failures=1
internal_compile_panics=0
loops_aborted=0
loops_compiled=0
loops_compiled=1
retraces_compiled=0
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ fbw_rolled_back_with_effects=0
fbw_store_journal_rollback_failed=0
field_pos_attached_misplaced=0
field_pos_spec_misplaced=0
guard_failures=2
guard_failures=13
internal_compile_panics=0
loops_aborted=0
loops_compiled=3
retraces_compiled=0
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ fbw_rolled_back_with_effects=0
fbw_store_journal_rollback_failed=0
field_pos_attached_misplaced=0
field_pos_spec_misplaced=0
guard_failures=2
guard_failures=13
internal_compile_panics=0
loops_aborted=0
loops_compiled=3
retraces_compiled=0
3 changes: 2 additions & 1 deletion pyre/bench/synth/mapdict_frozen_unboxing_fold.wasm.jitstats
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ fbw_rolled_back_with_effects=0
fbw_store_journal_rollback_failed=0
field_pos_attached_misplaced=0
field_pos_spec_misplaced=0
guard_failures=2
guard_failures=13
internal_compile_panics=0
loops_aborted=0
loops_compiled=3
retraces_compiled=0
2 changes: 2 additions & 0 deletions pyre/bench/synth/oserror_errno_fields_regression.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# pyre-check: selfcheck
# pyre-check: selfcheck-interpreted
# The invariant is interpreter-level, so the run compiles no loop.
# pyre-check: skip-backends=wasm
# The wasm guest has no os/filesystem support used by this fixture.
# A failed syscall raises the errno-specific OSError subclass with
Expand Down
6 changes: 3 additions & 3 deletions pyre/bench/synth/pickle_terminal_raise_resume.wasm.jitstats
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ fbw_rolled_back_with_effects=0
fbw_store_journal_rollback_failed=0
field_pos_attached_misplaced=0
field_pos_spec_misplaced=0
guard_failures=318
guard_failures=335
internal_compile_panics=0
loops_aborted=8
loops_compiled=69
loops_aborted=9
loops_compiled=70
retraces_compiled=0
2 changes: 2 additions & 0 deletions pyre/bench/synth/posix_replace_regression.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# pyre-check: selfcheck
# pyre-check: selfcheck-interpreted
# The invariant is interpreter-level, so the run compiles no loop.
# pyre-check: skip-backends=wasm
# The wasm guest has no filesystem support used by this fixture.
# os.replace(src, dst) renames over an existing destination in one step and
Expand Down
9 changes: 5 additions & 4 deletions pyre/bench/synth/surrogate_class_kwargs.cranelift.jitstats
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ descr_set_absent=0
descr_set_ambiguous=0
descr_set_stale_absent=0
fbw_blackhole_adopted_multi_frame=0
fbw_blackhole_adopted_single_frame=0
fbw_blackhole_adopted_single_frame=14
fbw_rolled_back_with_effects=0
fbw_store_journal_rollback_failed=0
field_pos_attached_misplaced=0
field_pos_spec_misplaced=0
guard_failures=0
guard_failures=2159
internal_compile_panics=0
loops_aborted=0
loops_compiled=3
loops_aborted=14
loops_compiled=4
retraces_compiled=0
9 changes: 5 additions & 4 deletions pyre/bench/synth/surrogate_class_kwargs.dynasm.jitstats
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ descr_set_absent=0
descr_set_ambiguous=0
descr_set_stale_absent=0
fbw_blackhole_adopted_multi_frame=0
fbw_blackhole_adopted_single_frame=0
fbw_blackhole_adopted_single_frame=14
fbw_rolled_back_with_effects=0
fbw_store_journal_rollback_failed=0
field_pos_attached_misplaced=0
field_pos_spec_misplaced=0
guard_failures=0
guard_failures=2159
internal_compile_panics=0
loops_aborted=0
loops_compiled=3
loops_aborted=14
loops_compiled=4
retraces_compiled=0
9 changes: 5 additions & 4 deletions pyre/bench/synth/surrogate_class_kwargs.wasm.jitstats
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ descr_set_absent=0
descr_set_ambiguous=0
descr_set_stale_absent=0
fbw_blackhole_adopted_multi_frame=0
fbw_blackhole_adopted_single_frame=0
fbw_blackhole_adopted_single_frame=14
fbw_rolled_back_with_effects=0
fbw_store_journal_rollback_failed=0
field_pos_attached_misplaced=0
field_pos_spec_misplaced=0
guard_failures=0
guard_failures=2159
internal_compile_panics=0
loops_aborted=0
loops_compiled=3
loops_aborted=14
loops_compiled=4
retraces_compiled=0
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
bridges_compiled=1
bridges_compiled=0
descr_set_absent=0
descr_set_ambiguous=0
descr_set_stale_absent=0
fbw_blackhole_adopted_multi_frame=0
fbw_blackhole_adopted_single_frame=0
fbw_blackhole_adopted_single_frame=1
fbw_rolled_back_with_effects=0
fbw_store_journal_rollback_failed=0
field_pos_attached_misplaced=0
field_pos_spec_misplaced=0
guard_failures=201
guard_failures=17799
internal_compile_panics=0
loops_aborted=0
loops_aborted=1
loops_compiled=2
retraces_compiled=0
9 changes: 5 additions & 4 deletions pyre/bench/synth/type_name_surrogate_reject.dynasm.jitstats
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
bridges_compiled=1
bridges_compiled=0
descr_set_absent=0
descr_set_ambiguous=0
descr_set_stale_absent=0
fbw_blackhole_adopted_multi_frame=0
fbw_blackhole_adopted_single_frame=0
fbw_blackhole_adopted_single_frame=1
fbw_rolled_back_with_effects=0
fbw_store_journal_rollback_failed=0
field_pos_attached_misplaced=0
field_pos_spec_misplaced=0
guard_failures=201
guard_failures=17799
internal_compile_panics=0
loops_aborted=0
loops_aborted=1
loops_compiled=2
retraces_compiled=0
5 changes: 3 additions & 2 deletions pyre/bench/synth/type_name_surrogate_reject.wasm.jitstats
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ descr_set_absent=0
descr_set_ambiguous=0
descr_set_stale_absent=0
fbw_blackhole_adopted_multi_frame=0
fbw_blackhole_adopted_single_frame=0
fbw_blackhole_adopted_single_frame=1
fbw_rolled_back_with_effects=0
fbw_store_journal_rollback_failed=0
field_pos_attached_misplaced=0
field_pos_spec_misplaced=0
guard_failures=201
internal_compile_panics=0
loops_aborted=0
loops_aborted=1
loops_compiled=2
retraces_compiled=0
Loading
Loading