[valgrind] 不能用 -static 编译
2008-07-18 17:49:46| 分类:
valgrind
| 标签:
|举报
|字号大中小 订阅
如果使用 -static 参数,则编译出来的程序 valgrind 一启动就会:
==6008== Invalid read of size 4
==6008== at 0x804839C: _init_tls (in /home/kasicass/project/san3/valgrind_able/run/a.out)
==6008== by 0x8048116: _start (in /home/kasicass/project/san3/valgrind_able/run/a.out)
==6008== by 0x0: ???
==6008== Address 0xB00ECF92 is not stack'd, malloc'd or free'd
想来可能是 -static 后,很多函数都 link 到 a.out 了,valrind hook 到了错误的东西。
具体没研究下去,有空研究下 why ~~~
评论这张
转发至微博
转发至微博
评论