Repository navigation
mask-risc tests: count allocations per thread in borrowed_alloc and oracle_alloc - #1354
Conversation
…racle_alloc borrowed_alloc failed in CI on #1349's head with 900 stray bytes. Its counter was a process-global AtomicUsize, and libtest's own threads allocate while the measured window is open. Under CPU load the unchanged binary failed 1 run in 300 locally with CI's -C target-cpu=x86-64-v3; nothing in mask-risc had changed. Both files now use the thread-local Cell counter that fused_ternlog, fused_terminal and program_collapse already use. Every measured window runs on the test thread, so the count is exact. After the change: 0 failures in 300 runs of each binary under the same load. A planted 8-byte allocation inside borrowed_alloc's window still turns it red (80 bytes), and both can-it-fire probes are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MHMvKHLhM6xwRswKY4s6vY
|
Warning Review limit reachedYour organization has reached its usage spending cap. Adjust your spending cap in the billing tab. Next included review available in 7 minutes. View limit detailsLimit details: You’ve used the included review currently available. Your 66 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (2)
Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. Comment |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: dc2696fa-3079-401c-ae5e-e1e3d059cbe6) |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Problem
borrowed_allocfailed in the Rust Teststestjob on #1349's head (run 37450481656):#1349 did not touch mask-risc.
Cause
The test measures allocations with a process-global
AtomicUsize. libtest keeps its own threads running while the test body runs, and those threads can allocate while the measured window is open.no_alloc.rshad already recorded the same contamination at 790 bytes.I reproduced it locally with CI's
-C target-cpu=x86-64-v3, so this is not a SIMD-tier issue. The unchanged binary failed 1 run in 300 under CPU load (6 ×yes).Fix
borrowed_alloc.rsandoracle_alloc.rsnow use the thread-localCellcounter thatfused_ternlog.rs,fused_terminal.rsandprogram_collapse.rsalready use. Every measured window runs on the test thread, so counting only that thread is exact. The module docs that described the counter as process-global are updated.Verification
borrowed_alloc's measured window turns the test red (80 bytes reported). Both existing can-it-fire probes are unchanged and pass.cargo test,clippy -D warningsand fmt are clean forlance-graph-mask-risc.Scope: test-only; no library code changes.
🤖 Generated with Claude Code
https://claude.ai/code/session_01MHMvKHLhM6xwRswKY4s6vY
Generated by Claude Code