bheisler / criterion.rs

Statistics-driven benchmarking library for Rust
Apache License 2.0
4.31k stars 292 forks source link

Status access violation with rust 1.70 #696

Open pawanjay176 opened 1 year ago

pawanjay176 commented 1 year ago

Getting a weird error when running benchmarks for a cryptography library (https://github.com/ethereum/c-kzg-4844) . The library contains rust bindings to c code.

I have made a reproducible example in a separate repo that imports the bindings https://github.com/pawanjay176/ckzg_test

The error only happens on windows with rust 1.70. The exact same code runs fine with rust 1.69 on windows.

On running cargo bench

Benchmarking verify_kzg_proof: Warming up for 3.0000 serror: bench failed, to rerun pass --bench kzg_benches

Caused by:
  process didn't exit successfully: D:\SyncData\Work\Testing\ckzg_test\target\release\deps\kzg_benches-b68c7764f8cc238d.exe --bench (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)

Running the debugger on the benches shows the crash happening here photo_2023-06-15_17-40-10

Also note that the error vanishes on running the benches with opt-level == 0. I think that this seems more like a rust issue than a criterion issue, but just wanted to check if I'm missing something obvious with the benches. Any pointers would be helpful.

Thanks!