mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
fix(ci): skip mimalloc FFI and disable isolation for Miri (#621)
- 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>
This commit is contained in:
committed by
GitHub
parent
b8e15f46f3
commit
ee3dff9a3d
@@ -6,7 +6,7 @@
|
||||
#![allow(dead_code)]
|
||||
|
||||
mod error;
|
||||
#[cfg(feature = "allocator-memory-limits")]
|
||||
#[cfg(all(feature = "allocator-memory-limits", not(miri)))]
|
||||
mod memory;
|
||||
mod time;
|
||||
|
||||
@@ -14,7 +14,7 @@ mod time;
|
||||
pub use error::LimitError;
|
||||
|
||||
#[allow(unused_imports)]
|
||||
#[cfg(feature = "allocator-memory-limits")]
|
||||
#[cfg(all(feature = "allocator-memory-limits", not(miri)))]
|
||||
pub use memory::{
|
||||
check_global_memory_limit, enforce_memory_limit, flush_thread_memory_counters,
|
||||
global_memory_limit, set_global_memory_limit, set_thread_flush_threshold_override,
|
||||
@@ -34,19 +34,19 @@ pub use time::acquire_limits_test_lock;
|
||||
#[allow(unused_imports)]
|
||||
pub use time::{set_time_source, TimeSourceRegistrationError};
|
||||
|
||||
#[cfg(feature = "allocator-memory-limits")]
|
||||
#[cfg(all(feature = "allocator-memory-limits", not(miri)))]
|
||||
#[inline]
|
||||
pub fn check_memory_limit_if_needed() -> core::result::Result<(), LimitError> {
|
||||
memory::check_memory_limit_if_needed()
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "allocator-memory-limits"))]
|
||||
#[cfg(any(miri, not(feature = "allocator-memory-limits")))]
|
||||
#[inline]
|
||||
pub const fn enforce_memory_limit() -> core::result::Result<(), LimitError> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "allocator-memory-limits"))]
|
||||
#[cfg(any(miri, not(feature = "allocator-memory-limits")))]
|
||||
#[inline]
|
||||
pub const fn check_memory_limit_if_needed() -> core::result::Result<(), LimitError> {
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user