Memory is corrupted by json-cpp 0.5.0 in following configuration:
I used MSVC 2008.
# define JSON_VALUE_USE_INTERNAL_MAP 1
// # define JSON_USE_SIMPLE_INTERNAL_ALLOCATOR 1
JSON_VALUE_USE_INTERNAL_MAP is necessary for me to make getMemberNames() return names sorted as in json data (see bug ID: 3014601)
Defining JSON_USE_SIMPLE_INTERNAL_ALLOCATOR to 1 removes problem.
Way to reproduce:
I took json data with simple structure, but long text valus (whole json size: 30K).
I parsed that json in a loop.
After parsing 130-150 times program crashes during occasional CRT heap check.
Log in to post a comment.