Closed
Description
Steps to reproduce:
- Take a build of rustc for ARM (specifically, gnueabi; gnueabihf is untested and may or may not exhibit this problem). Luqman has one you can use at http://luqman.ca/rust-builds/.
- Attempt to compile something with optimisations, e.g.
echo 'fn main(){}' | rustc - -O
.
This fails altogether:
Stack dump:
0. Running pass 'Function Pass Manager' on module 'rust_out.rc'.
1. Running pass 'Machine Common Subexpression Elimination' on function '@main'
Segmentation fault
A more complex example is building chris-morgan/rust-http@e909dfb; in this case it fails in a different way:
rustc: /scratch/laden/rust/src/llvm/include/llvm/ADT/ScopedHashTable.h:238: llvm::ScopedHashTableScope<K, V, KInfo, AllocatorTy>::~ScopedHashTableScope() [with K = llvm::Value*, V = std::pair<llvm::Value*, unsigned int>, KInfo = llvm::DenseMapInfo<llvm::Value*>, AllocatorTy = llvm::RecyclingAllocator<llvm::BumpPtrAllocator, llvm::ScopedHashTableVal<llvm::Value*, std::pair<llvm::Value*, unsigned int> >, 20u, 4u>]: Assertion `HT.TopLevelMap[ThisEntry->getKey()] == ThisEntry &&"Scope imbalance!"' failed.
Stack dump:
0. Running pass 'Early CSE' on function '@"_ZN6client7request13RequestWriter3new18url_to_socket_addr19h3ff5b73b6544aal7ag11v0.1$x2dpreE"'
Aborted
I believe these are LLVM bugs rather than rustc bugs, but at the least Rust is triggering them. Should I be reporting them in LLVM?