tests: pre-translate the tb in arm_movr12_hang - #2385
Open
retrocpugeek wants to merge 1 commit into
Open
Conversation
The 500us timeout covered code generation as well as execution, so the test flaked on the macos-14 x86_64 wheel job. Pre-build the tb and raise the timeout to 10ms to absorb scheduler stalls; a pre-built tb drops the `until` exit, so svc plus an intr hook stops emulation in-band instead. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
retrocpugeek
force-pushed
the
fix/movr12-hang-flake
branch
from
August 11, 2026 12:02
bafb457 to
4d52461
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the intermittent
arm_movr12_hangfailure on themacos-14 - x86_64wheel job (#2383). The 500us timeout bounded TCG code generation as well as execution, and cold codegen is most of that window.Pre-translate the block with
uc_ctl_request_cacheso the timeout bounds execution only. A pre-built tb does not carry theuntilexit, so the block now ends insvcand aUC_HOOK_INTRhook stops emulation in-band.The timeout is also raised to 10ms to cover the risk of a scheduler preemption stalling the thread mid-window. Load is not required for this: the worst off-CPU stall measured on an idle 16-core box was 627 µs, already past the old 500 µs bound, and it reaches tens of ms under contention.
Measured under 2x CPU oversubscription, 1000 runs each: 2.50% failures before, 0% after.
Approach suggested by @PhilippTakacs in #2383.