Test size_match_layout in regressions.cpp fails on i586/i686 #57
Open
Description
Commit Hash
Expected Behavior
make -k test
should be successful
Actual Behavior
The test size_match_layout fails on i586/i686:
[ RUN ] regression_tests.size_match_layout
/tmp/function2/test/regressions.cpp:62: Failure
Expected equality of these values:
sizeof(fn)
Which is: 48
fu2::detail::object_size::value
Which is: 32
[ FAILED ] regression_tests.size_match_layout (0 ms)
Steps to Reproduce
I cloned the repo (commit - 2d3a878) and was building on Slackware 15.0 (32bit)
$ mkdir build && (cd build && cmake .. && make && make -k test)
-- The CXX compiler identification is GNU 11.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/function2/build
[ 5%] Building CXX object test/CMakeFiles/function2_playground.dir/playground.cpp.o
[ 11%] Linking CXX executable function2_playground
[ 11%] Built target function2_playground
[ 16%] Building CXX object test/CMakeFiles/gtest.dir/googletest/googletest/src/gtest-all.cc.o
In file included from /tmp/function2/test/googletest/googletest/src/gtest-all.cc:43:
/tmp/function2/test/googletest/googletest/src/gtest-death-test.cc: In function ‘bool testing::internal::StackGrowsDown()’:
/tmp/function2/test/googletest/googletest/src/gtest-death-test.cc:1012:24: warning: ‘dummy’ may be used uninitialized [-Wmaybe-uninitialized]
1012 | StackLowerThanAddress(&dummy, &result);
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/tmp/function2/test/googletest/googletest/src/gtest-death-test.cc:1002:13: note: by argument 1 of type ‘const void*’ to ‘void testing::internal::StackLowerThanAddress(const void*, bool*)’ declared here
1002 | static void StackLowerThanAddress(const void* ptr, bool* result) {
| ^~~~~~~~~~~~~~~~~~~~~
/tmp/function2/test/googletest/googletest/src/gtest-death-test.cc:1010:7: note: ‘dummy’ declared here
1010 | int dummy;
| ^~~~~
[ 22%] Building CXX object test/CMakeFiles/gtest.dir/googletest/googletest/src/gtest_main.cc.o
[ 27%] Linking CXX static library libgtest.a
[ 27%] Built target gtest
[ 33%] Building CXX object test/CMakeFiles/function2_tests.dir/assign-and-constructible-test.cpp.o
[ 38%] Building CXX object test/CMakeFiles/function2_tests.dir/build-test.cpp.o
[ 44%] Building CXX object test/CMakeFiles/function2_tests.dir/empty-function-call-test.cpp.o
[ 50%] Building CXX object test/CMakeFiles/function2_tests.dir/functionality-test.cpp.o
[ 55%] Building CXX object test/CMakeFiles/function2_tests.dir/noexcept-test.cpp.o
[ 61%] Building CXX object test/CMakeFiles/function2_tests.dir/self-containing-test.cpp.o
[ 66%] Building CXX object test/CMakeFiles/function2_tests.dir/standard-compliant-test.cpp.o
[ 72%] Building CXX object test/CMakeFiles/function2_tests.dir/type-test.cpp.o
[ 77%] Building CXX object test/CMakeFiles/function2_tests.dir/multi-signature-test.cpp.o
[ 83%] Building CXX object test/CMakeFiles/function2_tests.dir/regressions.cpp.o
/tmp/function2/test/regressions.cpp: In function ‘fu2::unique_function<void()> issue_14_create()’:
/tmp/function2/test/regressions.cpp:137:19: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
137 | return std::move(func);
| ~~~~~~~~~^~~~~~
/tmp/function2/test/regressions.cpp:137:19: note: remove ‘std::move’ call
[ 88%] Building CXX object test/CMakeFiles/function2_tests.dir/view-test.cpp.o
[ 94%] Building CXX object test/CMakeFiles/function2_tests.dir/overload-test.cpp.o
[100%] Linking CXX executable function2_tests
[100%] Built target function2_tests
Running tests...
Test project /tmp/function2/build
Start 1: function2-unit-tests
1/1 Test #1: function2-unit-tests .............***Failed 0.01 sec
0% tests passed, 1 tests failed out of 1
Total Test time (real) = 0.01 sec
The following tests FAILED:
1 - function2-unit-tests (Failed)
Errors while running CTest
Output from these tests are in: /tmp/function2/build/Testing/Temporary/LastTest.log
Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.
make: *** [Makefile:112: test] Error 8
Your Environment
- OS: Slackware 15.0 (i586)
- Compiler and version: GCC 11.2.0
- Standard library (if non default): glibc-2.33
I also tried this in a debian docker container (docker run --rm -it --platform linux/386 debian:10 ...
) and it failed the same test, so do not think this is Slackware related.
I also checked this on alpine 32bit, and the test does pass there - though this is with musl - docker run --rm -it --platform linux/386 alpine:3.16 ...
The test also passes on Slackwarearm-15.0, which is 32bit armv7.
Metadata
Assignees
Labels
No labels