rust-ffi-checker icon indicating copy to clipboard operation
rust-ffi-checker copied to clipboard

Analysis fail... error: Invalid record

Open shinmao opened this issue 2 years ago • 4 comments

After I executed the command, it fails

$cargo clean; path/to/cargo-ffi-checker ffi-checker
+ "/path/rust-ffi-checker/target/debug/analyzer"
error: Invalid record

I can't find any error handling that show Invalid record as the message in the source code of ffi-checker; therefore, don't have any clues to debug. Does anyone have idea?

shinmao avatar Apr 04 '23 01:04 shinmao

I have same problem

ydongyeon avatar Jun 01 '23 08:06 ydongyeon

@UNI20171384 I didn't solved the problem at the time, but I got some information from author.

I think the "invalid record" error may be caused by mixing different versions of LLVM. By default, the Rust compiler (rustc) is statically linked with its own LLVM, while FFIChecker is compiled and linked with the LLVM installed in your system. FFIChecker may not successfully decode the LLVM bitcode generated by your rustc. When I developed FFIChecker, I used rustc nightly-2021-12-05, which used LLVM 13.0.

Could you share the solution here if you figure it out;)

shinmao avatar Jun 02 '23 18:06 shinmao

@shinmao Thank you for your sharing ! I'll let your know if I figure out solution

ydongyeon avatar Jun 04 '23 06:06 ydongyeon