rust-lang / rust-lang/rust

1.95 beta regression: "displacement ... is not within [-2147483648, 2147483647]"

Open
#153,852 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-inline-assembly A-LLVM C-bug regression-from-stable-to-stable S-has-bisection S-has-mcve T-compiler
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Regression found by the 1.95 beta crater run.

[INFO] [stdout] error: displacement 3614090360 is not within [-2147483648, 2147483647]
[INFO] [stdout]   --> src/main.rs:51:10
[INFO] [stdout]    |
[INFO] [stdout] 51 |         "lea {a:e}, [{a} + {r10} + 0xd76aa478]",
[INFO] [stdout]    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]    |
[INFO] [stdout] note: instantiated into assembly here
[INFO] [stdout]   --> <inline asm>:13:10
[INFO] [stdout]    |
[INFO] [stdout] 13 | lea eax, [rax + r11 + 0xd76aa478]
[INFO] [stdout]    |          ^
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error: displacement 3905402710 is not within [-2147483648, 2147483647]
[INFO] [stdout]   --> src/main.rs:62:10
[INFO] [stdout]    |
[INFO] [stdout] 62 |         "lea {d:e}, [{d} + {r10} + 0xe8c7b756]",
[INFO] [stdout]    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]    |
[INFO] [stdout] note: instantiated into assembly here
[INFO] [stdout]   --> <inline asm>:22:10
[INFO] [stdout]    |
[INFO] [stdout] 22 | lea esi, [rsi + r11 + 0xe8c7b756]
[INFO] [stdout]    |          ^

(multiple similar errors omitted for brevity)

https://crater-reports.s3.amazonaws.com/beta-1.95-3/1.95.0-beta.3/gh/magniff.md5sum-rs-openssl/log.txt

Contributor guide

Open the contributing guide

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 linked crater log and inspect the inline-assembly cases in src/main.rs at lines 51 and 62, especially the reported displacement values. Trace how the compiler handles these operands and compare the other similar errors omitted from the report. Done means the affected 1.95 beta cases no longer produce the reported displacement diagnostics.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.