Leave foreign libc errno constants residual - #1979
Conversation
A host libc value is not the target's. EAGAIN is 35 on macOS and 11 on Linux and wasm, so the fold is not baked into JIT artefacts. Assisted-by: Grok
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review. WalkthroughThe change removes the fallback that folded unresolved ChangesConstant folding
Priority: ⬆️ High Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to Unharvested errno constants remain residual rather than embedding host values in target artifacts; no actionable merge-blocking risk is identified. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 ast-grep (0.45.3)majit/majit-translate/src/front/mir.rsast-grep timed out on this file Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. A rabbit checks each errno sign Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a077271228
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -9653,7 +9655,6 @@ impl<'a> Lowering<'a> { | |||
| return None; | |||
| } | |||
| named_const_fold_for_path(&gd.item_meta.name_path()) | |||
There was a problem hiding this comment.
Lower libc errno reads with target constants
When a JIT candidate reads a foreign libc errno constant (for example, rsocket_rffi::error_is_would_block reads EAGAIN/EWOULDBLOCK), its opaque NamedConst initializer is not in the harvested folds, so this now returns None. resolve_place consequently emits a zero-argument FunctionPath for the constant, but there is no callable accessor registered for libc constants; the flowspace adapter rejects that path as "not registered in CallRegistry" and Skip-classifies the enclosing graph to the legacy walker. This avoids folding the host value, but it makes the affected target-specific interpreter paths non-JITtable rather than preserving them; provide a target-aware constant/read representation instead.
AGENTS.md reference: AGENTS.md:L29-L32
Useful? React with 👍 / 👎.
🤖 Codex parity reviewStatic analysis of this diff vs the local RPython/PyPy sources (commit a077271). Files in the reviewed diffCodex did not produce a report (exit 1). Last log lines: |
A host
libcerrno value is not the target's.EAGAINis 35 on macOS and 11 on Linux and wasm, so an opaquelibcNamedConststays a residual read instead of a foldedConstInt.This answers the P1 on #1974.
Assisted-by: Grok
Summary by CodeRabbit
libcerrno values when target-specific values are unavailable, avoiding incorrect results across platforms.