Valgrind报告写错误?为什么?

时间:2013-02-22 07:08:13

标签: c++ valgrind

当运行Valgrind的memcheck时,偶尔valgrind报告错误如下:

==2745== Memcheck, a memory error detector
==2745== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==2745== Using Valgrind-3.6.0 and LibVEX; rerun with -h for copyright info
==2745== Command: ./HSFramework
==2745== 
==2745== Invalid write of size 8
==2745==    at 0x3B81C097C0: do_lookup_x (in /lib64/ld-2.12.so)
==2745==    by 0x1C31032D: ???
==2745==    by 0x3B81C09E19: _dl_lookup_symbol_x (in /lib64/ld-2.12.so)
==2745==  Address 0x7feffee78 is on thread 1's stack
==2745== 

platform: Linux 2.6.32-220.el6.x86_64  x86_64 x86_64 x86_64 GNU/Linux

此错误报告中没有关于我的代码的线索。 我不知道这个错误报告 什么原因会导致这个错误?

2 个答案:

答案 0 :(得分:0)

这意味着do_lookup_x函数执行了无效的写访问。该函数是runtime library的一部分(并且不太可能是问题的起源)。我会联系HSFramework的作者,看看他们是否可以像你一样运行valgrind来解决这个问题

答案 1 :(得分:0)

此错误表示您在do_lookup_x中获得缓冲区溢出,如果您的源代码可以查看或与我们共享。

http://valgrind.org/docs/manual/quick-start.html