Skip to content
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

[Bug]: error: ran out of registers during register allocation with -fsanitize=address and -target armv7-unknown-linux #98222

Open
appujee opened this issue Jul 9, 2024 · 3 comments

Comments

@appujee
Copy link
Contributor

appujee commented Jul 9, 2024

The code is pretty big as I haven't spent enough time reducing it. But the repro test case can be found here:

https://godbolt.org/z/WafcG8G95

$ clang++ -std=c++20 -target armv7-unknown-linux -fsanitize=address -mllvm -asan-use-stack-safety=0

@appujee
Copy link
Contributor Author

appujee commented Jul 9, 2024

Related discussion in android/ndk#2030

@llvmbot
Copy link
Collaborator

llvmbot commented Jul 9, 2024

@llvm/issue-subscribers-backend-arm

Author: None (appujee)

The code is pretty big as I haven't spent enough time reducing it. But the repro test case can be found here:

https://godbolt.org/z/WafcG8G95

$ clang++ -std=c++20 -target armv7-unknown-linux -fsanitize=address -mllvm -asan-use-stack-safety=0

@ostannard
Copy link
Collaborator

Reduced down to this, which gives the same error with -asan-use-stack-safety=0 and -asan-use-stack-safety=1:

template <class b> b *addressof(b &);

void bc() {
  _Atomic(long long) bd;
  __c11_atomic_store(addressof(bd), 0, 0);
}

void m_fn2(long long p1) { bc(); }
$ /work/llvm/build/bin/clang  -std=c++20 -target armv7-unknown-linux -fsanitize=address -c out-of-regs.cpp
clang: warning: unknown platform, assuming -mfloat-abi=soft
clang: warning: unknown platform, assuming -mfloat-abi=soft
clang: warning: unknown platform, assuming -mfloat-abi=soft
error: ran out of registers during register allocation
1 error generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants