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
The unit test recursive_generator_tests fails on some MSVC configurations. Specifically, it is the test "exceptions thrown from nested call can be caught by caller" seen here:
TEST_CASE("exceptions thrown from nested call can be caught by caller")
On MSVC 2022, it fails only in Release or RelWithDebInfo mode and only in C++20 mode.
On MSVC 2019, it fails only in Release or RelWithDebInfo mode and only in C++20 mode and only if I upgrade doctest to version 2.4.7.
See the following table for all tests which were done:
The output I get from that is (MSVC 2022, C++20, RelWithDebInfo, doctest 2.4.0):
windows@DESKTOP-N6Q8ACG MINGW64 ~/development/reproduce
$ git clone https://github.com/andreasbuhr/cppcoro
Cloning into 'cppcoro'...
remote: Enumerating objects: 3427, done.
remote: Counting objects: 100% (77/77), done.
remote: Compressing objects: 100% (43/43), done.
remote: Total 3427 (delta 27), reused 47 (delta 15), pack-reused 3350
Receiving objects: 100% (3427/3427), 1.30 MiB | 5.25 MiB/s, done.
Resolving deltas: 100% (2224/2224), done.
windows@DESKTOP-N6Q8ACG MINGW64 ~/development/reproduce
$ cd cppcoro
windows@DESKTOP-N6Q8ACG MINGW64 ~/development/reproduce/cppcoro (master)
$ git checkout 167571d68652d376b25378b3bb9c77f62c812136
Note: switching to '167571d68652d376b25378b3bb9c77f62c812136'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 167571d Add gcc 11 to CI
windows@DESKTOP-N6Q8ACG MINGW64 ~/development/reproduce/cppcoro ((167571d...))
$ mkdir build
windows@DESKTOP-N6Q8ACG MINGW64 ~/development/reproduce/cppcoro ((167571d...))
$ cd build
windows@DESKTOP-N6Q8ACG MINGW64 ~/development/reproduce/cppcoro/build ((167571d...))
$
C:\Users\windows\development\reproduce\cppcoro\build>cmake -GNinja -DBUILD_TESTING=ON -DCMAKE_CXX_STANDARD=20 -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
-- The CXX compiler identification is MSVC 19.32.31329.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.32.31326/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test _CXX_COROUTINES_SUPPORTS_MS_FLAG
-- Performing Test _CXX_COROUTINES_SUPPORTS_MS_FLAG - Success
-- Performing Test _CXX_COROUTINES_SUPPORTS_MS_HEAPELIDE_FLAG
-- Performing Test _CXX_COROUTINES_SUPPORTS_MS_HEAPELIDE_FLAG - Success
-- Performing Test _CXX_COROUTINES_SUPPORTS_TS_FLAG
-- Performing Test _CXX_COROUTINES_SUPPORTS_TS_FLAG - Failed
-- Performing Test _CXX_COROUTINES_SUPPORTS_CORO_FLAG
-- Performing Test _CXX_COROUTINES_SUPPORTS_CORO_FLAG - Failed
-- Looking for C++ include coroutine
-- Looking for C++ include coroutine - found
-- Performing Test _CXX_COROUTINES_FINAL_HEADER_COMPILES
-- Performing Test _CXX_COROUTINES_FINAL_HEADER_COMPILES - Success
-- Performing Test CXX_COROUTINES_NO_AWAIT_NEEDED
-- Performing Test CXX_COROUTINES_NO_AWAIT_NEEDED - Success
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - not found
-- Found Threads: TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/windows/development/reproduce/cppcoro/build
C:\Users\windows\development\reproduce\cppcoro\build>cmake --build . --parallel
[97/97] Linking CXX executable test\socket_tests.exe
C:\Users\windows\development\reproduce\cppcoro\build>ctest -R recursive --output-on-failure
Test project C:/Users/windows/development/reproduce/cppcoro/build
Start 12: recursive generator tests-default constructed recursive_generator is empty
1/13 Test #12: recursive generator tests-default constructed recursive_generator is empty .................... Passed 0.03 sec
Start 13: recursive generator tests-non-recursive use of recursive_generator
2/13 Test #13: recursive generator tests-non-recursive use of recursive_generator ............................ Passed 0.01 sec
Start 14: recursive generator tests-throw before first yield
3/13 Test #14: recursive generator tests-throw before first yield ............................................ Passed 0.01 sec
Start 15: recursive generator tests-throw after first yield
4/13 Test #15: recursive generator tests-throw after first yield ............................................. Passed 0.01 sec
Start 16: recursive generator tests-generator doesn't start executing until begin is called
5/13 Test #16: recursive generator tests-generator doesn't start executing until begin is called ............. Passed 0.01 sec
Start 17: recursive generator tests-destroying generator before completion destructs objects on stack
6/13 Test #17: recursive generator tests-destroying generator before completion destructs objects on stack ... Passed 0.01 sec
Start 18: recursive generator tests-simple recursive yield
7/13 Test #18: recursive generator tests-simple recursive yield .............................................. Passed 0.01 sec
Start 19: recursive generator tests-nested yield that yields nothing
8/13 Test #19: recursive generator tests-nested yield that yields nothing .................................... Passed 0.01 sec
Start 20: recursive generator tests-exception thrown from recursive call can be caught by caller
9/13 Test #20: recursive generator tests-exception thrown from recursive call can be caught by caller ........ Passed 0.01 sec
Start 21: recursive generator tests-exceptions thrown from nested call can be caught by caller
10/13 Test #21: recursive generator tests-exceptions thrown from nested call can be caught by caller ..........***Exception: SegFault 0.01 sec
[doctest] doctest version is "2.4.0"
[doctest] run with "--help" for options
===============================================================================
C:\Users\windows\development\reproduce\cppcoro\test\recursive_generator_tests.cpp(248):
TEST SUITE: recursive_generator
TEST CASE: exceptions thrown from nested call can be caught by caller
C:\Users\windows\development\reproduce\cppcoro\test\recursive_generator_tests.cpp(248): FATAL ERROR: test case CRASHED: SIGSEGV - Segmentation violation signal
===============================================================================
[doctest] test cases: 1 | 0 passed | 1 failed | 12 skipped
[doctest] assertions: 3 | 3 passed | 0 failed |
[doctest] Status: FAILURE!
Start 22: recursive generator tests-recursive iteration performance
11/13 Test #22: recursive generator tests-recursive iteration performance ..................................... Passed 0.02 sec
Start 23: recursive generator tests-usage in standard algorithms
12/13 Test #23: recursive generator tests-usage in standard algorithms ........................................ Passed 0.01 sec
Start 24: recursive generator tests-fmap operator
13/13 Test #24: recursive generator tests-fmap operator ....................................................... Passed 0.01 sec
92% tests passed, 1 tests failed out of 13
Total Test time (real) = 0.34 sec
The following tests FAILED:
21 - recursive generator tests-exceptions thrown from nested call can be caught by caller (SEGFAULT)
Errors while running CTest
The text was updated successfully, but these errors were encountered:
The unit test recursive_generator_tests fails on some MSVC configurations. Specifically, it is the test "exceptions thrown from nested call can be caught by caller" seen here:
cppcoro/test/recursive_generator_tests.cpp
Line 248 in 167571d
On MSVC 2022, it fails only in Release or RelWithDebInfo mode and only in C++20 mode.
On MSVC 2019, it fails only in Release or RelWithDebInfo mode and only in C++20 mode and only if I upgrade doctest to version 2.4.7.
See the following table for all tests which were done:
The callstack of the crash is
To reproduce with doctest 2.4.0, the following procedure worked for me
(sha 167571d is master branch at time of writing)
For testing with doctest 2.4.7, use sha 93f1417.
The output I get from that is (MSVC 2022, C++20, RelWithDebInfo, doctest 2.4.0):
The text was updated successfully, but these errors were encountered: