mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
chore: ignore miri on global allocators
error: unsupported operation: can't call foreign function `_rjem_malloc` on OS `linux`
--> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/jemallocator-0.5.0/src/lib.rs:104:13
|
104 | ffi::malloc(layout.size())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ can't call foreign function `_rjem_malloc` on OS `linux`
|
= help: this is likely not a bug in the program; it indicates that the program performed an operation that the interpreter does not support
= note: BACKTRACE:
= note: inside `<jemallocator::Jemalloc as std::alloc::GlobalAlloc>::alloc` at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/jemallocator-0.5.0/src/lib.rs:104:13: 104:39
note: inside `_::__rg_alloc`
--> tasks/benchmark/src/main.rs:13:16
|
12 | #[global_allocator]
| ------------------- in this procedural macro expansion
13 | static GLOBAL: jemallocator::Jemalloc = jemallocator::Jemalloc;
| ^^^^^^^^^^^^^^^^^^^^^^
= note: this error originates in the attribute macro `global_allocator` (in Nightly builds, run with -Z macro-backtrace for more info)
This commit is contained in:
parent
636a974686
commit
bf76f6d8b6
2 changed files with 4 additions and 0 deletions
|
|
@ -1,7 +1,9 @@
|
|||
#[cfg_attr(miri, ignore)]
|
||||
#[cfg(not(target_env = "msvc"))]
|
||||
#[global_allocator]
|
||||
static GLOBAL: jemallocator::Jemalloc = jemallocator::Jemalloc;
|
||||
|
||||
#[cfg_attr(miri, ignore)]
|
||||
#[cfg(target_os = "windows")]
|
||||
#[global_allocator]
|
||||
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
||||
|
|
|
|||
|
|
@ -8,10 +8,12 @@ use oxc_benchmark::get_code;
|
|||
use oxc_parser::Parser;
|
||||
use pico_args::Arguments;
|
||||
|
||||
#[cfg_attr(miri, ignore)]
|
||||
#[cfg(not(target_env = "msvc"))]
|
||||
#[global_allocator]
|
||||
static GLOBAL: jemallocator::Jemalloc = jemallocator::Jemalloc;
|
||||
|
||||
#[cfg_attr(miri, ignore)]
|
||||
#[cfg(target_os = "windows")]
|
||||
#[global_allocator]
|
||||
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
||||
|
|
|
|||
Loading…
Reference in a new issue