Closed
Description
In the file json.hpp in handle_value(Value&& v) an
Unhandled exception at 0x00007FF6D51C2CB8 in test-cbor.exe: 0xC00000FD: Stack overflow (parameters: 0x0000000000000001, 0x0000004760A69FF8).
is thrown when debugging the test-cbor project in Visual Studio 2019 16.7.7 compiled with /std:c++17 or with /c++latest
This occures, because of recursive function calls: from_cbor, sax_parse, parse_cbor_internal, get_cbor_object, parse_cbor_internal, ...
Please describe the steps to reproduce the issue.
- unzip json-3.9.1.zip
shell cd json-3.9.1
mkdir build
cd build
cmake .. -DJSON_BuildTests=On -D JSON_Install:BOOL=OFF -D JSON_ImplicitConversions:BOOL=OFF -DCMAKE_CXX_FLAGS="/std:c++17"
- In test\download_test_data.vcxproj replace all
cpp test -d json_test_data ||
withcpp if not exist json_test_data
- Open nlohmann_json.sln in Visual Studio 2019 16.7.7
- Right click test-cbor and select "Set as Startup Project" in the context menu
- Switch configuration to Debug
- Execute Build\Build solution (F7)
- Execute Debug\Start Debugging (F5)
What is the expected behavior?
No stack overflow
And what is the actual behavior instead?
Stack overflow
Which compiler and operating system are you using?
- Compiler: Visual Studio 2019 16.7.7 Prof.
- Operating system: Windows 10 2004 Pro
Which version of the library did you use?
- latest release version 3.9.1 (zip file)