bheisler / iai

Experimental one-shot benchmarking/profiling harness for Rust
Apache License 2.0
586 stars 24 forks source link

`failed to allocate a guard page` on FreeBSD #8

Closed asomers closed 3 years ago

asomers commented 3 years ago

Whenever I try to run any Rust program with Cachegrind on FreeBSD, it panics with the message thread '<unnamed>' panicked at 'failed to allocate a guard page', library/std/src/sys/unix/thread.rs:364:17. It seems that Cachegrind's tricky memory tricks interfere with Rust's tricky memory tricks. Is there a way at compile-time to disable the guard page allocation? If so, iai should use it.

bheisler commented 3 years ago

Unfortunately, even if such an option exists, Iai has no control over compilation. This is a bug for std or rustc, not Iai.