Open cebtenzzre opened 6 years ago
If the nativejson binary is run from certain directories (such as the root of the repository), ReadFiles fails twice: https://github.com/miloyip/nativejson-benchmark/blob/2d4e633eac404625a04dd77c0bfb53712ccb3ecd/src/main.cpp#L1238 So testJsons has length 0 and capacity 0. That makes testJsons.front() invalid, as no memory has been allocated for the vector yet. So here: https://github.com/miloyip/nativejson-benchmark/blob/2d4e633eac404625a04dd77c0bfb53712ccb3ecd/src/main.cpp#L726 A null pointer is dereferenced, causing a segfault.
ReadFiles
testJsons.front()
If the nativejson binary is run from certain directories (such as the root of the repository),
ReadFiles
fails twice: https://github.com/miloyip/nativejson-benchmark/blob/2d4e633eac404625a04dd77c0bfb53712ccb3ecd/src/main.cpp#L1238 So testJsons has length 0 and capacity 0. That makestestJsons.front()
invalid, as no memory has been allocated for the vector yet. So here: https://github.com/miloyip/nativejson-benchmark/blob/2d4e633eac404625a04dd77c0bfb53712ccb3ecd/src/main.cpp#L726 A null pointer is dereferenced, causing a segfault.