-
Notifications
You must be signed in to change notification settings - Fork 99
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
"(signal: 11, SIGSEGV: invalid memory reference)" when compiling regex crate on recent nightlies #267
Comments
Repro
[package]
name = "regex-on-sgx-bug-repro"
version = "0.1.0"
edition = "2018"
[dependencies]
regex = { version = "1" }
cargo build --target=x86_64-fortanix-unknown-sgx --release
|
Quick debug:
Stack trace:
|
With debug symbols and asserts: Failure:
|
Crashes on line below because MBB is empty and you can't use back on that (nothing to get reference to).
Easiest fix is to add an empty() check and raise a PR for that. Will make the change and kick off another build (takes a couple of hours) and will discuss raising a PR on Monday. (hopefully nothing else crashes) |
this is already fixed upstream in LLVM - https://github.com/llvm/llvm-project/blob/master/llvm/lib/Target/X86/X86LoadValueInjectionRetHardening.cpp so we need to request rust-lang to update/cherry pick llvm/llvm-project@0505181#diff-f97bb92de5266622718828396fed70cd |
Update llvm-project to latest origin/rustc/10.0-2020-05-05 commit which includes LVI segfault fix when building fortanix/rust-sgx#267 And a few earlier commits.
Update llvm-project to latest origin/rustc/10.0-2020-05-05 commit which includes LVI segfault fix when building fortanix/rust-sgx#267 And a few earlier commits.
Update llvm-project to latest origin/rustc/10.0-2020-05-05 commit which includes LVI segfault fix when building fortanix/rust-sgx#267 And a few earlier commits.
Update llvm-project to latest origin/rustc/10.0-2020-05-05 commit which includes LVI segfault fix when building fortanix/rust-sgx#267 And a few earlier commits.
Update llvm-project to latest origin/rustc/10.0-2020-05-05 commit which includes LVI segfault fix when building fortanix/rust-sgx#267 And a few earlier commits.
Update llvm-project to latest origin/rustc/10.0-2020-05-05 commit which includes LVI segfault fix when building fortanix/rust-sgx#267 And a few earlier commits.
Update llvm-project to latest origin/rustc/10.0-2020-05-05 commit which includes LVI segfault fix when building fortanix/rust-sgx#267 And a few earlier commits.
Update llvm-project to latest origin/rustc/10.0-2020-05-05 commit which includes LVI segfault fix when building fortanix/rust-sgx#267 And a few earlier commits.
Fixed with:
Note: 'rustup update' does not yet pick up latest rustc as there are missing components in latest nightly. Force update might be needed or just waiting for a newer build. |
After the LVI hardening PR landed on June 8 2020 the rustc nightlies fail to compile the regex crate for the
x86_64-fortanix-unknown-sgx
target in our project.I have tested with
nightly-2020-06-07
(fails) andnightly-2020-06-09
(compiles).Will update with a minimal repro. The regex crate on its own compiles just fine, so it's likely a specific set of features.
The text was updated successfully, but these errors were encountered: