fix(ci): skip mimalloc FFI and disable isolation for Miri#621
fix(ci): skip mimalloc FFI and disable isolation for Miri#621anakrish merged 1 commit intomicrosoft:mainfrom
Conversation
anakrish
commented
Mar 11, 2026
- Add cfg(not(miri)) guards to mimalloc module, global allocator, and allocator-memory-limits code paths so Miri falls back to the default system allocator instead of calling unsupported FFI functions.
- Set MIRIFLAGS="-Zmiri-disable-isolation" in the workflow so tests that perform file I/O can run under Miri.
- Skip units/parse tests under Miri due to Float-vs-BigInt Number representation mismatch with Miri's soft-float emulation.
There was a problem hiding this comment.
Pull request overview
This PR adjusts allocator/memory-limit integration and CI settings so the crate can run under Miri by avoiding unsupported mimalloc FFI paths, relaxing Miri isolation for file I/O, and skipping a small set of known-incompatible YAML tests.
Changes:
- Guard mimalloc + allocator-memory-limits code paths with
not(miri)so Miri uses the default allocator and avoids unsupported FFI. - Update Miri GitHub Actions workflow to run tests with
MIRIFLAGS="-Zmiri-disable-isolation"for file I/O. - Skip specific YAML interpreter tests under Miri due to soft-float Number representation mismatches.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/memory_limits.rs | Disable allocator/memory-limit tests under Miri where mimalloc integration is unavailable. |
| src/value.rs | Avoid allocator-memory-limits revalidation path under Miri. |
| src/utils/limits/mod.rs | Disable memory-limits module + exports under Miri and provide no-op fallbacks. |
| src/tests/interpreter/mod.rs | Skip two known-failing YAML unit test files under Miri. |
| src/rvm/vm/machine.rs | Disable VM memory-limit checks/imports under Miri. |
| src/lib.rs | Hide allocator-memory-limits re-exports under Miri. |
| src/interpreter.rs | Disable interpreter memory-limit checks under Miri. |
| mimalloc/src/lib.rs | Prevent building/using mimalloc modules and global allocator under Miri. |
| .github/workflows/miri.yml | Configure Miri runs to disable isolation so file I/O tests can execute. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
- Add cfg(not(miri)) guards to mimalloc module, global allocator, and allocator-memory-limits code paths so Miri falls back to the default system allocator instead of calling unsupported FFI functions. - Set MIRIFLAGS="-Zmiri-disable-isolation" in the workflow so tests that perform file I/O can run under Miri. - Skip units/parse tests under Miri due to Float-vs-BigInt Number representation mismatch with Miri's soft-float emulation. Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.