小编web*_*usa的帖子

Valgrind调试日志:大小为8的读取无效

最近我决定用valgrind调试我的应用程序.我已经解决了很多错误,但不能解决这个问题.

==12205== Invalid read of size 8
==12205==    at 0x37E1864C40: std::_Rb_tree_increment(std::_Rb_tree_node_base*) (in /usr/lib64/libstdc++.so.6.0.8)
==12205==    by 0x40393C: readConfig(std::string) (stl_tree.h:257)
==12205==    by 0x4058BE: main (application.cpp:42)
==12205==  Address 0x5589b88 is 24 bytes inside a block of size 48 free'd
==12205==    at 0x4A05A33: operator delete(void*) (vg_replace_malloc.c:346)
==12205==    by 0x4067AD: std::_Rb_tree<std::string, std::pair<std::string const, std::string>, std::_Select1st<std::pair<std::string const, std::string> >, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > >::erase(std::_Rb_tree_iterator<std::pair<std::string const, std::string> >, std::_Rb_tree_iterator<std::pair<std::string const, std::string> >) (new_allocator.h:94)
==12205==    by 0x406841: std::_Rb_tree<std::string, std::pair<std::string const, std::string>, std::_Select1st<std::pair<std::string const, std::string> >, std::less<std::string>, std::allocator<std::pair<std::string …
Run Code Online (Sandbox Code Playgroud)

c++ valgrind

2
推荐指数
1
解决办法
7649
查看次数

标签 统计

c++ ×1

valgrind ×1