linux – 如何运行valgrind到一个具有超级用户位的进程?

linux – 如何运行valgrind到一个具有超级用户位的进程?,第1张

概述我按如下方式运行valgrind: – /usr/local / bin / valgrind“process_name” 在执行之后它给我跟随错误 ==21731====21731== Warning: Can't execute setuid/setgid executable: ==21731== Possible workaround: remove --trace-children= 我按如下方式运行valgrind: –

/usr/local / bin / valgrind“process_name”

在执行之后它给我跟随错误

==21731====21731== Warning: Can't execute setuID/setgID executable: ==21731== Possible workaround: remove --trace-children=yes,if in effect==21731==valgrind: "process name": Permission denIEd

我的valgrind许可如下: –
-r-sr-xr-x /usr/local / bin / valgrind

我的流程许可如下: –
-r-sr-xr-x“process_name”

平台:linux VMliNUX3 2.6.9-78.0.22.ELsmp(RHEL)

Valgrind版本:valgrind-3.5.0

任何有关这方面的帮助将不胜感激

解决方法 对于开发FUSE文件系统的人来说,这是一个永久性的问题. This link may help(在单个答案中合并太多了).解决方法包括及时更换fusermount,以及(取决于)valgrind的一些其他选项,以防止它跟踪儿童.

事实上,如果你在valgrind下运行我的FS,你得到这个输出(是的,有足够的人有这个问题,我实际上在启动时检测到valgrind并显示链接):

root@tower:~ # valgrind xsfs /xs==9479== Memcheck,a memory error detector.==9479== copyright (C) 2002-2008,and GNU GPL'd,by Julian Seward et al.==9479== Using libVEX rev 1884,a library for dynamic binary translation.==9479== copyright (C) 2004-2008,by OpenWorks LLP.==9479== Using valgrind-3.4.1,a dynamic binary instrumentation framework.==9479== copyright (C) 2000-2008,by Julian Seward et al.==9479== For more details,rerun with: -v==9479==******** Valgrind has been detected by xsfs******** If you have difficultIEs getting xsfs to work under Valgrind,******** see the following thread:******** http://www.nabble.com/valgrind-and-fuse-file-systems-td13112112.HTML******** SleePing for 5 seconds so this doesn't fly by ....

最简单的方法是在以root身份运行的一次性VM中进行所有调试,您可以放弃setuID位,然后完成它.确保您测试代码没有任何泄漏或违规,它很容易测试任何不使用保险丝的链接库代码.把你的构建从’valgrind-clean’移开并注意你已经在文档中完成了.

然后,从valgrind / valgrind.h中取出一些内容来检测它,并显示一条短消息,指出那些未来仍然运行它的人.解决它的黑客需要根合作,坦率地说,在沙箱中也更容易完成.

在setuID位开启的情况下拒绝在valgrind下运行也很容易,如果他们真的想要这样做,就会显示一个有用的信息让人们关闭它.

总结

以上是内存溢出为你收集整理的linux – 如何运行valgrind到一个具有超级用户位的进程?全部内容,希望文章能够帮你解决linux – 如何运行valgrind到一个具有超级用户位的进程?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/1047593.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-25
下一篇 2022-05-25

发表评论

登录后才能评论

评论列表(0条)

保存