← Back to Pull requests

latx: honor pending exits on tunnel library returns #575

Open
rmjskhy opened this pull request with 19 lines diff across 1 files
View on GitHub
rmjskhy rmjskhy commented on Nov 23, 2026 07:50 UTC
Author

<h2><span>Summary / 变更说明</span></h2><p><span>UnixBench </span><code dir="ltr">dhry2reg</code><span> can hang when </span><code dir="ltr">SIGALRM</code><span> arrives while LATU is executing the host </span><code dir="ltr">strcmp</code><span>. The signal remains pending because the host library return jumps directly back into translated code, and the guest can continue looping without running its signal handler.</span></p><p><span>Check for a pending CPU exit request after the library return has updated the guest program counter and stack pointer. If an exit is pending, return to the dispatcher so it can deliver the signal. Ordinary returns keep the existing indirect jump.</span></p><h2><span>Validation / 验证</span></h2><p><span>Tested on a Loongson 3D6000 running Loongnix Server 23.3, with AVX enabled. The baseline was upstream </span><code dir="ltr">master</code><span> at </span><code dir="ltr">cf79c04a85</code><span>. For the patched binary, recompiled </span><code dir="ltr">tunnel-lib.c</code><span> and relinked using the same build objects.</span></p><div><div><div>
Test | Baseline | Patched
-- | -- | --
dhry2reg 1, AOT disabled, interleaved runs, 4-second timeout | 113/128 passed, 15 timed out | 128/128 passed
dhry2reg 10, default AOT settings, matching the reported test duration | Hang observed in the original run | 12/12 passed

</div></div></div><p><span>Validation covered the affected Dhrystone test. The full UnixBench suite was not rerun.</span></p><h2><span>Checklist / 检查项</span></h2><ul><li><input type="checkbox" disabled=""><span>I have read </span><code dir="ltr">CONTRIBUTING.md</code><span>. / 我已阅读 </span><code dir="ltr">CONTRIBUTING.md</code><span>。</span></li><li><input type="checkbox" disabled="" checked=""><span>Every commit contains a DCO sign-off (</span><code dir="ltr">git commit -s</code><span>). / 每个提交都包含 DCO 签署(</span><code dir="ltr">git commit -s</code><span>)。</span></li><li><input type="checkbox" disabled="" checked=""><span>I have included relevant build or test results, or explained why they are not applicable. / 我已提供相关构建或测试结果,或说明了不适用的原因。</span></li></ul>

Diff: 19 lines (+14 / -5) across 1 files Reviewer: None requested Review duration: 16390m
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.33) × (1 − Review Confidence (0.44)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.33 · 19 lines diff across 1 files
0.33
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: 10%
44%
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
Shallow Review Depth shallow_review_depth
0.344
Diff Size diff_size
0.179
No Reviewer Assigned no_reviewer_assigned
0.120
Real PR Conversation Timeline
1 item
"Review active on #575"
general weight: 0.35
Reviewers
None requested
Assignees
rmjskhy rmjskhy
Labels
risk: low confidence: 44.2% 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: 32.9% (LOW) · Higher = larger blast radius
32.9%
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: 44.2% · Lower = rushed or shallow review
44.2%
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: 18.4% · Safe to merge
18.4%