open-source-parsers / open-source-parsers/jsoncpp
APP eventually crash when using libjsoncpp.so.24, help!!!
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 8.9k
- Forks
- 2.7k
- Avg merge
- 31m
- Merged PRs (30d)
- 1
Description
Describe the bug
eventually crash as:
*** Error in `./app': corrupted size vs. prev_size: 0x00007fd93c0049e0 ***
======= Backtrace: =========
/usr/lib64/libc.so.6(+0x80ba7)[0x7fd94519fba7]
/usr/lib64/libc.so.6(+0x8248b)[0x7fd9451a148b]
/usr/lib64/libc.so.6(__libc_malloc+0x4c)[0x7fd9451a46fc]
/usr/lib64/libstdc++.so.6(_Znwm+0x1d)[0x7fd945a6418d]
/usr/local/lib64/libjsoncpp.so.24(ZNSt8_Rb_treeIN4Json5Value8CZStringESt4pairIKS2_S1_ESt10_Select1stIS5_ESt4lessIS2_ESaIS5_EE7_M_copyINSB_11_Alloc_nodeEEEPSt13_Rb_tree_nodeIS5_EPKSF_PSt18_Rb_tree_node_baseRT+0x87)[0x7fd9468ce6f7]
/usr/local/lib64/libjsoncpp.so.24(ZNSt8_Rb_treeIN4Json5Value8CZStringESt4pairIKS2_S1_ESt10_Select1stIS5_ESt4lessIS2_ESaIS5_EE7_M_copyINSB_11_Alloc_nodeEEEPSt13_Rb_tree_nodeIS5_EPKSF_PSt18_Rb_tree_node_baseRT+0x120)[0x7fd9468ce790]
/usr/local/lib64/libjsoncpp.so.24(ZNSt8_Rb_treeIN4Json5Value8CZStringESt4pairIKS2_S1_ESt10_Select1stIS5_ESt4lessIS2_ESaIS5_EE7_M_copyINSB_11_Alloc_nodeEEEPSt13_Rb_tree_nodeIS5_EPKSF_PSt18_Rb_tree_node_baseRT+0x100)[0x7fd9468ce770]
/usr/local/lib64/libjsoncpp.so.24(ZNSt8_Rb_treeIN4Json5Value8CZStringESt4pairIKS2_S1_ESt10_Select1stIS5_ESt4lessIS2_ESaIS5_EE7_M_copyINSB_11_Alloc_nodeEEEPSt13_Rb_tree_nodeIS5_EPKSF_PSt18_Rb_tree_node_baseRT+0x120)[0x7fd9468ce790]
/usr/local/lib64/libjsoncpp.so.24(ZN4Json5Value10dupPayloadERKS0+0xef)[0x7fd9468cbf4f]
/usr/local/lib64/libjsoncpp.so.24(ZN4Json5ValueC1ERKS0+0x19)[0x7fd9468cbfd9]
/usr/local/lib64/libjsoncpp.so.24(ZNSt8_Rb_treeIN4Json5Value8CZStringESt4pairIKS2_S1_ESt10_Select1stIS5_ESt4lessIS2_ESaIS5_EE7_M_copyINSB_11_Alloc_nodeEEEPSt13_Rb_tree_nodeIS5_EPKSF_PSt18_Rb_tree_node_baseRT+0x47)[0x7fd9468ce6b7]
/usr/local/lib64/libjsoncpp.so.24(ZN4Json5Value10dupPayloadERKS0+0xef)[0x7fd9468cbf4f]
/usr/local/lib64/libjsoncpp.so.24(ZN4Json5ValueC1ERKS0+0x19)[0x7fd9468cbfd9]
/usr/local/lib64/libjsoncpp.so.24(ZNSt8_Rb_treeIN4Json5Value8CZStringESt4pairIKS2_S1_ESt10_Select1stIS5_ESt4lessIS2_ESaIS5_EE7_M_copyINSB_11_Alloc_nodeEEEPSt13_Rb_tree_nodeIS5_EPKSF_PSt18_Rb_tree_node_baseRT+0x47)[0x7fd9468ce6b7]
/usr/local/lib64/libjsoncpp.so.24(ZN4Json5Value10dupPayloadERKS0+0xef)[0x7fd9468cbf4f]
/usr/local/lib64/libjsoncpp.so.24(ZN4Json5ValueC1ERKS0+0x19)[0x7fd9468cbfd9]
/usr/local/lib64/libjsoncpp.so.24(ZNSt8_Rb_treeIN4Json5Value8CZStringESt4pairIKS2_S1_ESt10_Select1stIS5_ESt4lessIS2_ESaIS5_EE7_M_copyINSB_11_Alloc_nodeEEEPSt13_Rb_tree_nodeIS5_EPKSF_PSt18_Rb_tree_node_baseRT+0x47)[0x7fd9468ce6b7]
/usr/local/lib64/libjsoncpp.so.24(ZN4Json5Value10dupPayloadERKS0+0xef)[0x7fd9468cbf4f]
/usr/local/lib64/libjsoncpp.so.24(ZN4Json5ValueC1ERKS0+0x19)[0x7fd9468cbfd9]
To Reproduce
accidental occurance
eventually crash
Expected behavior
what should i do, this is my app or json or libc problem?
Desktop (please complete the following information):
centos 7
intel cpu
** mycode
Json::Value data;
data = Json::objectValue;
if (type == "json") {
Json::Value result = Json::arrayValue;
for (auto i : myResult) {
result.append(i);
}
data["json"].append(result);
} else {
std::string result;
for (auto i : myResult) {
result += std::to_string(i) + " ";
}
data["txt"].append(result);
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named. Start with the supplied stack trace and the shown Json::Value construction on CentOS 7, then reduce the accidental crash to a reproducible case. Done means establishing whether the fault is in the application, jsoncpp, or libc and documenting a minimal reproducer or actionable diagnosis.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100