Giter VIP home page Giter VIP logo

Comments (4)

unknowntrojan avatar unknowntrojan commented on May 23, 2024

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.

jamesmth avatar jamesmth commented on May 23, 2024

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 with rustc -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.

unknowntrojan avatar unknowntrojan commented on May 23, 2024

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.

jamesmth avatar jamesmth commented on May 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.