Open vanhauser-thc opened 2 weeks ago
FYI @smoelius (maybe you can point a knowledge dev to this issue, with this many issues in this tracker maybe this one is buried fast otherwise)
Nice debugging!
maybe you can point a knowledge dev to this issue
@nikic Please forgive me for pinging you, but this issue reminds me of https://github.com/rust-lang/rust/issues/121889, which I think you fixed. Is there any insight you could offer here?
LLVM plugins are currently only supported on platforms that use the LLVM dylib, rather than linking LLVM statically into librustc_driver. I believe this is currently only the case on x86_64-unknown-linux-gnu.
@nikic thanks for the clarification. So this limitation is known. Is there an issue or project item for that that we can follow to see once this also works for non intel Linux?
It looks like we currently don't have a tracking issue for this option, so I filed https://github.com/rust-lang/rust/issues/127577.
Thank you, @nikic!
This issue prevents using the effective afl.rs (AFL++) plugins for fuzzing in Rust on ARM64 platforms.
The nightly rustc allows for loading LLVM plugins with
-Z llvm-plugins=/path/to/plugin
.This works without problems on Linux x86_x64, however on ARM64 - both Linux and MacOS - this fails with symbols not being resolvable.
How to reproduce:
wget http://apt.llvm.org/llvm.sh ; sudo bash ./llvm.sh 18
Macos:brew install llvm
+ setting up the PATH to prefer clang/clang++ from brew and not xlangOn Linux x86_x64 this works:
On ARM64 Ubuntu and MacOS this both fails:
After a lot of debugging, the reason seems to be that on Linux x86_x64 the following library is present:
libLLVM-18-rust-1.81.0-nightly.so
But on ARM64 rust nightly installation this is missing. So this might be the reason for this issue.