-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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]: Constexpr expansion compilation error with GCC's UndefinedBehaviorSanitizer #1634
Comments
Same issue here. |
@derekmauro can somebody from abseil look at it please, it blocks our development. We use google quiche that uses abseil, but we build it by gcc with undefined behavior sanitizer and it results into this bug. |
For a temporary workaround, I used clang for sanitizer builds. |
Unfortunately, t's not an option in our environment. |
Sorry, this issue is not a priority for me at the moment. |
Is there any update on this? Is it an abseil issue or a GCC issue? |
|
A bug of gcc yet abseil may need some workaround to avoid considering it is such a fundamental library |
I had to disable sanitizer checks, which is a bad idea, but I'm not sure what else we can do... |
Describe the issue
When building abseil with GCC with
-fsanitize=undefined
, the following compilation error occurs:This code producing the error has been introduced with commit 4c7e7c7.
The error does not occur when building with no sanitizer or when building with
-fsanitize=address
or-fsanitize=thread
.This seems to be a known GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71962
Steps to reproduce the problem
Isolated expression from the method where the error occurs (
absl::container_internal::hash_policy_traits::get_hash_slot_fn<Hash>()
) with-std=gnu++17 -fsanitize=undefined
: https://godbolt.org/z/8bEazf6e5What version of Abseil are you using?
7bd9ff9
What operating system and version are you using?
Ubuntu 20.04.6 LTS
What compiler and version are you using?
GCC 9.4.0
Also tested with GCC 13.2 on linked godbolt.
What build system are you using?
cmake 3.16.3
Additional context
No response
The text was updated successfully, but these errors were encountered: