Skip to content

rustc -O doesn't work on ARM #10192

Closed
Closed
@chris-morgan

Description

@chris-morgan

Steps to reproduce:

  1. 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/.
  2. 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    O-ArmTarget: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 state

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions