Stream: git-cranelift

Topic: cranelift / Issue #900 STATUS_ACCESS_VIOLATION in craneli...


view this post on Zulip GitHub (Dec 25 2019 at 00:48):

novacrazy commented on Issue #900:

I think this has been fixed by that LLVM patch. It's extremely odd that it was still failing before the LLVM 9 upgrade back in August, but oh well. The SimpleJIT example compiles and runs fine now.

view this post on Zulip GitHub (Dec 25 2019 at 00:48):

novacrazy closed Issue #900:

When attempting to add cranelift to a project of mine for use as a JIT compiler, I get:

error: failed to run custom build command for `cranelift-codegen v0.38.0`

Caused by:
  process didn't exit successfully: `F:\code\projects\active\untitled\target\debug\build\cranelift-codegen-c6b973378c2b1052\build-script-build` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)
--- stdout
cargo:rerun-if-changed=C:\Users\novacrazy\.cargo\registry\src\github.com-1ecc6299db9ec823\cranelift-codegen-0.38.0\build.rs

warning: build failed, waiting for other jobs to finish...
error: build failed

This seems to be caused by my build configuration in Cargo.toml:

<details>

[profile.dev]
debug = true
opt-level = 2
incremental = false
debug-assertions = true
codegen-units = 32

[profile.release]
opt-level = 3
debug = true # helps with profiling
lto = 'fat'
incremental = false
debug-assertions = false
codegen-units = 1

[profile.bench]
opt-level = 3
debug = false
lto = 'fat'
debug-assertions = false
incremental = false
codegen-units = 1

</details>

which upon adding to the SimpleJIT demo config causes the same STATUS_ACCESS_VIOLATION

I'm on Windows 10 Pro for Workstations with a AMD Zen 1 Threadripper 1950X, compiling with RUSTFLAGS = "-C target-cpu=native", so znver1.

Compiling without target-cpu=native seems to work, but I kind of use that...

So it's a mix of those config options and target-cpu=native.

I'm using rustc 1.38.0-nightly (60960a260 2019-08-12), which is after an LLVM update known to cause issues on Zen 1


Last updated: Dec 23 2024 at 13:07 UTC