Comments (4)
After some more investigation, it appears to be a null ptr deref in PassManager::run.
I compiled rustc myself, and using that version compiled in both debug and release mode, the pass ran just fine. Maybe a slight difference in LLVM version is causing the issue?
from llvm-plugin-rs.
Hello,
I investigated a bit and couldn't manage to reproduce the error. I tried several recent nightly versions and the hello-world
example worked just fine.
You should make sure that:
- The
rustc
version uses LLVM-15 (can be checked withrustc -vV
) - The example plugin links (at runtime) to the same LLVM binary as
rustc
. This can be enforced by creating a symlink before compiling your crate with the plugin:
$ NIGHTLY="2022-08-10" # replace with the version you want to check
$ rustup install "nightly-$NIGHTLY" --profile=minimal
$ RUSTC=$(rustc +nightly-$NIGHTLY -V | awk '{ print $2 }')
$ ln -s "$HOME/.rustup/toolchains/nightly-$NIGHTLY-x86_64-unknown-linux-gnu/lib/libLLVM-15-rust-$RUSTC.so" libLLVM-15.so
$ LD_LIBRARY_PATH=. cargo "+nightly-$NIGHTLY" b
Could you provide me with the exact version of the compiler where the SIGSEGV occurs?
from llvm-plugin-rs.
the version that crashes for me is "rustc 1.68.0-nightly (935dc0721 2022-12-19)". I tried the symlink but even then the SIGSEGV still occurs (probably linker shenanigans). It's probably a mismatched LLVM version, the version the crashing rustc uses is 15.0.6, while my system's libraries are on 15.0.7. This is probably why compiling rustc myself fixes the issues.
from llvm-plugin-rs.
That's probably it. I'm closing the issue since there is not much to be done about it.
from llvm-plugin-rs.
Related Issues (7)
- `opt` failure on Windows with LLVM-10
- Enforce use of `LLVM_SYS_*_PREFIX` when `LLVM_PLUGIN_PREFIX` is specified
- Test `plugin5` failing on Windows with LLVM-10
- [question] is there a way to register the custom pass in inkwell's passmanager? HOT 2
- CI failing for job `LLVM 10 MacOS`
- Segmentation fault llvm-16 (caused by insert_basic_block_after?)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from llvm-plugin-rs.