Debug LLVM + -Z time-llvm-passes
asserts compiling simplest program.
#48329
Labels
A-LLVM
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
For context, I was trying to add PGO support to rustc, and I was adding a couple LLVM passes for profile info generation and usage, and the only thing I managed to do is crashing rustc under LLVM, or that my changes did nothing, so I built with debug LLVM to check whether I was doing something obviously wrong. Furthermore, I wanted to see if the passes I was adding were actually being executed, thus I tried
-Z time-llvm-passes
.For the record, I am hitting release crashes underThese assertions reproduce without any change on 16362c7.llvm::SelectionDAGISel
with my changes (without-Z time-llvm-passes
), so I suspect this is a more serious issue than "LLVM uses a static hashmap to store timing info".On a rustc compiled with the following
config.toml
(comments stripped for brevity):Compiled from 16362c7, with:
Given a
t.rs
file like:Building it with:
Asserts with:
I need to compile a slightly more complex file to be able to catch it under rr, but the stack is:
The threads are doing:
Thread 1:
Thread 2:
Thread 3 is the crashing thread, with the first stack.
Thread 4:
Thread 5:
Thread 6 is running the same LLVM pass:
Thread 7:
Thread 8:
Thread 9:
The text was updated successfully, but these errors were encountered: