-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
building fails with '-DENABLE_TESTING=ON' #4407
Comments
open happens with the release, not debug mode. seems to be some issue with the compiler. |
For the first issue with __builtin_memcpy, passing a character sequence like "abcdef", as in the benchmark, into cord's or icord's writer() triggers the compiler to warn possible problems like stringop-overread or array out-of-bound. Can be fixed by first converting the character sequence into a std::string, and then pass the std::string to the writer(). BTW, the code looks fine to me. it's just that gcc-11 warns of potential problems. |
For the second problem, the definitions for the class apache::thrift::Cpp2Ops's methods are written in some header files that are not included in the tests. |
* convert character sequences into std::string to avoid potential out-of-bound erros in memcpy. * add missing header files in two test cases. Co-authored-by: Sophie <[email protected]> Co-authored-by: Cheng Xuntao <[email protected]> Co-authored-by: Sophie <[email protected]>
Please check the FAQ documentation before raising an issue
Describe the bug (required)
(1) BENCHMARK_RELATIVE(cord_1k_mix, iters) and BENCHMARK_RELATIVE(icord_1k_mix, iters) block the build with the following errors:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:33: error: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ reading between 1 and 1024 bytes from a region of size 0 [-Werror=stringop-overread]
(2) src/common/datatypes/test/ValueTest.cpp
Your Environments (required)
How To Reproduce(required)
Steps to reproduce the behavior:
rm -rf build
mkdir build
cd build
cmake
-DENABLE_TESTING=ON
-DCMAKE_BUILD_TYPE=Release
..
make -j32
make install
Expected behavior
Additional context
The text was updated successfully, but these errors were encountered: