← Back to Pull requests

LATX, fix: Persist delayed integer flag recovery in TB search tables #558

Open
xiezyang opened this pull request with 971 lines diff across 10 files
View on GitHub
xiezyang xiezyang commented on Nov 12, 2026 03:11 UTC
Author

Summary / 变更说明

Fix signal recovery for hot-AOT translated blocks after shared mappings
select parallel execution.

Recovery previously scanned tb->s_data->ir1, which is temporary translation
storage shared by ordinary and recovered blocks. It may be absent or belong
to another block, causing a nested host fault and an incorrect guest fault
address.

  • Encode delayed CMP/TEST/BT operations, operand widths and TEST register

  • aliasing in the existing per-instruction search table.
  • Activate recovery metadata only after the comparison completes.

  • Restore flags from saved host operands without accessing translation-time

  • IR1 data.
  • Preserve CCOp and pending YMM upper-zero metadata for x86_64 and i386.

  • Add no host instructions to the normal execution path.

  • Reject incompatible old AOT caches using the existing build identity.

  • Add x86_64/i386 fixtures checking fault address, guest PC, defined flags,

  • register state and natural retry after restoring page permissions.

    Validation / 验证

    Rebased onto master at c8a4e1e5603.

    The rebased commit has exactly the same source tree as the validated
    candidate 10988d3ebf7. The following runtime results are from that candidate,
    not a separate rerun of the rebased commit.

    Environment: LoongArch new-world Linux, LATX_SOFTFPU=0.

  • x86_64 and i386 O1 builds with AOT and AVX optimizations: passed.

  • meson test -C build --suite lat-pr-fast --print-errorlogs:

  • 52/52 passed, no skips.
  • Affected integration tests: 10 groups passed directly. One additional AVX

  • group initially failed because Clang could not assemble an existing
    fixture; it passed using hash-verified prebuilt guest binaries.
  • Both guest architectures: unpatched binaries failed all six confirmed

  • hot-AOT loads with the wrong fault address; patched binaries passed all
    six confirmed loads.
  • JIT, cold AOT, old-cache rejection and unchanged cache contents across

  • repeated hot runs: passed.
  • git range-diff: patch unchanged after rebase.

  • git diff --check: passed.
  • The old-world signal ABI was tested before this rebase, but was not rerun
    for this candidate.

    Checklist / 检查项

  • I have read CONTRIBUTING.md. / 我已阅读 CONTRIBUTING.md。

  • Every commit contains a DCO sign-off (git commit -s). /

  • 每个提交都包含 DCO 签署(git commit -s)。
  • I have included relevant build or test results, or explained why they

  • are not applicable. /
    我已提供相关构建或测试结果,或说明了不适用的原因。

    Diff: 971 lines (+773 / -198) across 10 files Reviewer: ganjue66da Review duration: 32483m
    All Vouch review confidence checks passed
    Residual risk 0.32 = Change Risk (0.56) × (1 − Review Confidence (0.43)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.56 · 971 lines diff across 10 files
    0.56
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    42%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.400
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 item
    "Review active on #558"
    general weight: 0.35
    Reviewers
    Assignees
    xiezyang xiezyang
    Labels
    risk: low confidence: 43.0% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 56.2% (MEDIUM) · Higher = larger blast radius
    56.2%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 43.0% · Lower = rushed or shallow review
    43.0%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 32.1% · Safe to merge
    32.1%