You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've also encountered similar problems if the name of the vector is long, but I am having troubles making a minimal reproducible example for this case.
EDIT:
It turns out that merely initializing "long" vectors causes segmentation faults. What's going on here? For example, the following test will seg fault.
# Note: CMake support is community-based. The maintainers do not use CMake
# internally.
cmake_minimum_required(VERSION 3.13)
project(googletest-distribution)
set(GOOGLETEST_VERSION 1.14.0)
if(NOT CYGWIN AND NOT MSYS AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL QNX)
set(CMAKE_CXX_EXTENSIONS OFF)
endif()
enable_testing()
include(CMakeDependentOption)
include(GNUInstallDirs)
# Note that googlemock target already builds googletest.
option(BUILD_GMOCK "Builds the googlemock subproject" ON)
option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON)
option(GTEST_HAS_ABSL "Use Abseil and RE2. Requires Abseil and RE2 to be separately added to the build." OFF)
if(BUILD_GMOCK)
add_subdirectory( googlemock )
else()
add_subdirectory( googletest )
endif()
[jose@agrajag googletest]$ vi CMakeLists.txt
[jose@agrajag googletest]$ cat CMakeLists.txt
# Note: CMake support is community-based. The maintainers do not use CMake
# internally.
cmake_minimum_required(VERSION 3.13)
project(googletest-distribution)
set(GOOGLETEST_VERSION 1.14.0)
if(NOT CYGWIN AND NOT MSYS AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL QNX)
set(CMAKE_CXX_EXTENSIONS OFF)
endif()
enable_testing()
include(CMakeDependentOption)
include(GNUInstallDirs)
# Note that googlemock target already builds googletest.
option(BUILD_GMOCK "Builds the googlemock subproject" ON)
option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON)
option(GTEST_HAS_ABSL "Use Abseil and RE2. Requires Abseil and RE2 to be separately added to the build." OFF)
if(BUILD_GMOCK)
add_subdirectory( googlemock )
else()
add_subdirectory( googletest )
endif()
What version of GoogleTest are you using?
1.14
What operating system and version are you using?
Linux: AlmaLinux 8.5 (Arctic Sphynx)
What compiler and version are you using?
gcc version 8.5.0 20210514 (Red Hat 8.5.0-4) (GCC)
What build system are you using?
cmake version 3.20.2
Additional context
No response
The text was updated successfully, but these errors were encountered:
Describe the issue
When looping through the elements of a vector and testing each value, if the vector is too long and the test fails, a segmentation fault will occur.
Here are two basic tests to reproduce the problem. The first one will fail but not seg fault. Thew later will seg fault.
I've also encountered similar problems if the name of the vector is long, but I am having troubles making a minimal reproducible example for this case.
EDIT:
It turns out that merely initializing "long" vectors causes segmentation faults. What's going on here? For example, the following test will seg fault.
Steps to reproduce the problem
Here's my
CMakeLists.txt
What version of GoogleTest are you using?
1.14
What operating system and version are you using?
Linux: AlmaLinux 8.5 (Arctic Sphynx)
What compiler and version are you using?
gcc version 8.5.0 20210514 (Red Hat 8.5.0-4) (GCC)
What build system are you using?
cmake version 3.20.2
Additional context
No response
The text was updated successfully, but these errors were encountered: