-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
rustc crashes with segmentation fault in 1.73.0 #116668
Comments
Backtrace from a rustc build, tip of master with LLVM assertions and Rust debug assertions. No assertion of any kind is hit, we still segfault.
|
|
Here's the config I'm using: profile = "compiler"
change-id = 115898
[llvm]
assertions = true
download-ci-llvm = true
[rust]
incremental = false
debug = true
[build]
sanitizers = true Am I missing something to enable sanitizers in LLVM? |
Sorry, I'm actually not sure about the exact behavior of sanitizers here. |
It's probably obvious, but I managed to bisect it to Edit: managed to finish the bisection. searched nightlies: from nightly-2023-07-07 to nightly-2023-10-13 bisected with cargo-bisect-rustc v0.6.7Host triple: x86_64-unknown-linux-gnu cargo bisect-rustc --preserve -- build --release --no-default-features -F parking_lot --bin qdrant |
Minimizing this is proving to be quite difficult, but I managed to pinpoint a change. In impl OperationDurationsAggregator {
pub fn new() -> Arc<Mutex<Self>> {
Arc::new(Mutex::new(Self {
ok_count: 0,
fail_count: 0,
timings: todo!(), //[0.; AVG_DATASET_LEN],
timing_index: 0,
timing_loops: 0,
min_value: None,
max_value: None,
last_response_date: Some(Utc::now().round_subsecs(2)),
}))
}
} Interestingly, while trying to go from
I'm not nearly enough of an LLVM expert to understand if this is relevant, but I thought I'd include it in the event it is. |
WG-prioritization assigning priority (Zulip discussion). @rustbot label -I-prioritize +P-high cc @nikic |
Preliminary reduction: ; RUN: opt -S -passes=gvn < %s
define void @ham() {
bb:
br label %bb1
bb1: ; preds = %bb5, %bb
%phi = phi i64 [ 0, %bb ], [ %add, %bb5 ]
%phi2 = phi ptr [ null, %bb ], [ %select, %bb5 ]
%icmp = icmp eq i64 %phi, 0
br i1 %icmp, label %bb8, label %bb3
bb3: ; preds = %bb1
%zext = zext i16 poison to i64
%sub = sub nsw i64 0, %zext
%getelementptr = getelementptr inbounds { { { { ptr, i64 }, i64 } }, i64 }, ptr null, i64 %sub
%add = add i64 %phi, -1
%icmp4 = icmp eq ptr %getelementptr, null
br i1 %icmp4, label %bb8, label %bb5
bb5: ; preds = %bb3
%load = load i64, ptr %phi2, align 8
%load6 = load i64, ptr null, align 8
%icmp7 = icmp ugt i64 %load, %load6
%select = select i1 %icmp7, ptr %phi2, ptr null
br label %bb1
bb8: ; preds = %bb3, %bb1
%load9 = load i64, ptr %phi2, align 8
%mul = mul i64 %load9, 0
%getelementptr10 = getelementptr inbounds ptr, ptr null, i64 29
%getelementptr11 = getelementptr inbounds ptr, ptr null, i64 27
unreachable
} |
Upstream issue: llvm/llvm-project#69301 |
This consistently fails with (signal: 11, SIGSEGV: invalid memory reference) for me on 1.73.0 (stable-aarch64-apple-darwin) #[test]
fn test_sigsegv() {
let data:[f32; 1000*1000] = vec![1.0; 1000*1000]
.try_into()
.expect("Wrong matrix size!");
} |
@kuzemchik Can you please file a separate issue for that? It doesn't look related to this one. |
Update to LLVM 17.0.4 Fixes rust-lang#116668. Fixes rust-lang#116941. Fixes rust-lang#116976. r? `@cuviper`
Update to LLVM 17.0.4 Fixes rust-lang#116668. Fixes rust-lang#116941. Fixes rust-lang#116976. r? `@cuviper`
When I compile a project with rust 1.73.0 on linux, I get a segmentation fault error.
When I compile it with 1.72.1 all is well.
How to reproduce
on linux
If reproduced, you should get this error
If I do the same, but use 1.72.1, all is well.
The text was updated successfully, but these errors were encountered: