-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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] build fails with libstdc++ 12.1.0 #1398
Comments
I'm 99% sure it's an GCC/libstdc++ bug. Could you reduce the reproducer further, down to a single 10-line function? |
Yes, something like this. clang 14 with libc++ and VS 2022 look fine. I've added two scripts to the repo, which build the project and the library itself inside a Docker container. You can run those on a linux host, if you've Docker installed. When building |
Looks like it builds on Ubuntu 22.04 with the provided 12.0. |
Which "provided" g++ do you mean? The CI still fails with g++ 12.1.0 (and the latest Ubuntu): https://github.com/jdoubleu/googlebenchmark-issue-1398/runs/6794168005?check_suite_focus=true |
There is 12.0 package in Ubuntu 22.04 that's probably the prerelease one. |
You were right! It's a bug in gcc 12+. See the following tickets: |
Describe the bug
When I compile the Google benchmark library with g++ 12.1 (using libstdc++ 12.1) in C++20 mode, I get the following error:
System
Which OS, compiler, and compiler version are you using:
To reproduce
I've prepared a repository to reproduce the issue: https://github.com/jdoubleu/googlebenchmark-issue-1398
You can checkout the build output from the CI here: https://github.com/jdoubleu/googlebenchmark-issue-1398/runs/6505920315?check_suite_focus=true
Steps to reproduce the behavior:
Expected behavior
The library compiles with the latest gcc version (including libstdc++).
Additional context
Interestingly, I get a similar error when compiling
googletest
. However, the build doesn't fail (see).The error looks like some sort of an underflow in
__builtin_memcpy(void*, const void*, long unsigned int)
(notice the "accessing 9223372036854775810 or more bytes"). Since it is called fromstd::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_S_copy(_CharT*, const _CharT*, size_type)
, it may have something to do with Unicode used withstd::string
?The text was updated successfully, but these errors were encountered: