Skip to content

fix(ci): skip mimalloc FFI and disable isolation for Miri#621

Merged
anakrish merged 1 commit intomicrosoft:mainfrom
anakrish:miri
Mar 11, 2026
Merged

fix(ci): skip mimalloc FFI and disable isolation for Miri#621
anakrish merged 1 commit intomicrosoft:mainfrom
anakrish:miri

Conversation

@anakrish
Copy link
Collaborator

  • 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.

@anakrish anakrish changed the title Fix Miri CI: skip mimalloc FFI and disable isolation fix(ci): skip mimalloc FFI and disable isolation for Miri Mar 11, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@anakrish anakrish merged commit ee3dff9 into microsoft:main Mar 11, 2026
58 checks passed
@anakrish anakrish deleted the miri branch March 11, 2026 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants