-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Build error with -fsanitize=address,undefined -O0 #868
Comments
Looks like a clang bug to me. If it needs more registers for its own usage, its free to save something onto the stack to get enough for the assembly. Looks like there a number of unresolved reports of similar in their bug tracker: https://bugs.llvm.org/buglist.cgi?quicksearch=%22inline%20assembly%20requires%20more%20registers%20than%20available%22%20 You can disable assembly in this library or presumably use different compiler flags to avoid the issue. |
Got it, thanks. |
I remember when writing this code originally it was hard to not run out of registers, and initially it needed |
Fwiw, you see essentially the same error with Can I ask why you compile with see #846 (comment) where I ran into the same issue. |
(void)strlen(s); There's a good chance that will be optimized away with Similarly other code may be elided too when using optimization (according to any logic the compiler deems appropriate) so I occasionally run things with Aggressive optimizations like OSS-Fuzz strikes a balance by compiling everything with |
Set env:
(This is a valid combination of compile flags that works with any other project)
Then
./configure
and build:Tested with Clang 11 and latest repository checkout on Linux 64 bit.
The text was updated successfully, but these errors were encountered: