-
Notifications
You must be signed in to change notification settings - Fork 201
STATUS_ACCESS_VIOLATION in cranelift-codegen build script #900
Comments
No, just tested it on an older version before that LLVM update, and the |
This is the first report of such a problem, so I don't know what might be causing it. Are you able to run the build-script-build program in a debugger? It needs the |
To be honest all I have to debug it is Visual Studio, and I'm not well versed on how to use that with Rust. Given the if let Err(err) = meta::generate(&isas, &out_dir) {
eprintln!("Error: {}", err);
process::exit(1);
} so it got past the environment variable checks. |
I've narrowed it down to this chunk of code in for cc in &["eq", "ne", "ugt", "ult", "uge", "ule"] {
let w_cc = Literal::enumerator_for(intcc, cc);
widen.legalize(
def!(a = icmp_imm.int_ty(w_cc, b, c)),
vec![def!(x = uextend.I32(b)), def!(a = icmp_imm(w_cc, x, c))],
);
widen.legalize(
def!(a = icmp.int_ty(w_cc, b, c)),
vec![
def!(x = uextend.I32(b)),
def!(y = uextend.I32(c)),
def!(a = icmp.I32(w_cc, x, y)),
],
);
} |
Looks like a rustc compiler bug. Does it reproduce when using Rustc stable? Does it reproduce in all of your profiles with Rustc nightly? If you add print statements to this code to print what the cc code causing this is, does it still reproduce, and if so, what's the output? |
It does still occur on stable rustc 1.37.0. By adding some |
Huh. Oddly enough, this is the exact same code that is in https://github.com/CraneStation/cranelift/issues/896 |
ping @novacrazy, does it still happen with latest Rustc, out of curiosity? |
#63959 is still open. And a comment from yesterday there says that it is still reproducable. |
rust-lang/rust#63959 (comment) is solved and hopefully in the current Rust nightly. @novacrazy Can you try again please with the latest Rust nightly, and let us know if this is fixed? Thanks! |
I haven’t had time to check recently, but I will soon. JIT compilation is still very much on my radar. Given the details of the aforementioned LLVM bug, it makes sense that the error happened unexpectedly within a loop, so hopefully it will be fixed now. |
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. |
When attempting to add
cranelift
to a project of mine for use as a JIT compiler, I get:This seems to be caused by my build configuration in
Cargo.toml
: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"
, soznver1
.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 1The text was updated successfully, but these errors were encountered: