rust-lang / rust-lang/hashbrown

Causes LLVM Error when used in an executable that gets compiled with "+soft-float"

Open
#306 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
3k
Forks
358
Avg merge
11h 57m
Merged PRs (30d)
2

Description

Hi there! I discovered this error originally in the fontdue crate (https://github.com/mooman219/fontdue/issues/98#issuecomment-1011092396) and created a Rust bug report yesterday (https://github.com/rust-lang/rust/issues/92760). In the meantime, I found out that the error originates in this library, which is a dependency of fontdue.

Minimal example to reproduce:

fn main() {
    let _book_reviews = hashbrown::HashMap::<(), ()>::new();
}

Compile with $ cargo rustc --bin bug -- -C target-feature=+soft-float,-sse,-sse2,-x87
Causes a broken compilation and LLVM ERROR: Do not know how to split this operator's operand!

The bug happens with multiple Rust versions, stable and nightly.

I try to further enclose the actual problem and trace it down to a specific Rust pattern or so. Maybe there will be an easy way to work-a-round this bug in this crate (maybe via a cargo feature) until this bug gets closed in Rustc or LLVM?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the minimal HashMap example in the issue and run the given cargo rustc command using the listed target features. Compare the failure across Rust versions and review the linked fontdue and Rust reports to determine whether hashbrown-specific behavior is involved. Done means the failure is isolated to a reproducible hashbrown issue or a documented workaround is identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.