Skip to content

large displacement gets silently truncated #138905

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sarah-quinones opened this issue May 7, 2025 · 0 comments
Open

large displacement gets silently truncated #138905

sarah-quinones opened this issue May 7, 2025 · 0 comments

Comments

@sarah-quinones
Copy link

void foo() {
    __asm__ __volatile__ ("lea rax, [0x567804444444]");
}

expected result: compilation error

actual result: compiles down to

0000000000000000 <foo>:
   0:   55                      push   rbp
   1:   48 89 e5                mov    rbp,rsp
   4:   48 8d 04 25 44 44 44    lea    rax,ds:0x4444444
   b:   04
   c:   5d                      pop    rbp
   d:   c3                      ret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants