-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Test fail due to SEGFAULT using GNU 9.3.0 #3506
Comments
Without seeing the constructor for the |
This is the
in which the member initializer assigns a pointer and sets the Following is also the SEGFAULT stack trace generated by the
This is also the link to the test file which can be built and executed, but I am not sure that Compiler Explorer can support GTest for reproducing the same situation. |
The segfault seems to be in the Log member function, which is only passed objects constructed that are not related to googletest, making me think it's likely unrelated to googletest. Given that, I'm going to close this. If you find evidence that the crash is related to googletest, please reopen. Runing the code with something like Address Sanitizer might be instructive. |
I have added a new test to my project as follows which caused a segmentation fault while running 'ctest' command:
at this part of the code:
The code has been compiled in the Debug mode via GCC 9.3.0 x86-64 Linux-GNU. I even disabled the PTHREADS using gtest_disable_pthreads option, but it did not solve the issue. Following is the link to my CMakeLists:
https://github.com/langroodi/Adaptive-AUTOSAR/blob/master/CMakeLists.txt
When I changed the compiler type in my pipeline from GCC to Clang 10.0 the issue disappeared. The whole project build workspace is generated by CMake 3.16.
I am still using this commit:
8d51ffd
of Google Test without using any object mocking. So, I am not sure the issue is solved in the newer commit or not. Or maybe there is a error in my code.
If you need more information, I would be happy to provide that.
The text was updated successfully, but these errors were encountered: