-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Turn on the mem-unaligned feature for bpf targets #440
Conversation
Fixes the following LLVM segfault: Error: e: 05:02:06 [ERROR] fatal error: "Cannot select: 0x55e970a357d0: i64,ch = AtomicLoad<(load unordered (s64) from %ir.45)> 0x55e970410be8, 0x55e970a358a0\n 0x55e970a358a0: i64,ch = CopyFromReg 0x55e970410be8, Register:i64 %19\n 0x55e970a35490: i64 = Register %19\nIn function: memcpy" PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace. Stack dump: 0. Running pass 'Function Pass Manager' on module 'unroll-loop'. 1. Running pass 'BPF DAG->DAG Pattern Instruction Selection' on function '@memcpy'
9d6d0b7
to
1e3ed77
Compare
Ping? [sorry to pester you! nightly has been broken for a week now and bpf is tier3 so only works with nightly 😅] |
Oops, this slipped off my review queue. |
I'm happy to merge this, but a proper fix is being discussed in #441. |
@alessandrod How did you test your changes? I have a fix locally for #441. Unfortunately I can't get
|
You can't do this sadly, as cargo creates a virtual manifest when building std and so won't apply the patch. This is something that bothers me so much I'd be willing to fix it, but I don't understand enough of the cargo internals (yet!). I patched my local rustc and did have to wrestle a bit with it to make it compile. |
…bpf, r=Mark-Simulacrum Bump compiler-builtins to 0.1.53 Fixes a LLVM crash with the bpf targets, see rust-lang/compiler-builtins#440
LLVM started segfaulting with bpf-linker and rustc nightly since rustc bumped compiler-builtins in rust-lang/rust@88f1bf7 (see https://github.com/aya-rs/bpf-linker/runs/4276632485?check_suite_focus=true).
This is the LLVM error:
Without
mem-unaligned
the mem functions emit atomic loads which aren't supported by the BPF target in LLVM.