Re: HELP/Hint: valgrind error message

Paul FLOYD <[email protected]>
Newsgroups gmane.comp.debugging.valgrind
Message-ID <1369521919.3854.1589534380840.JavaMail.www@wwinf1f33>
 
> Message du 15/05/20 10:22
> De : "Kunal Chauhan" 


> ==6660== Warning: Can't execute setuid/setgid/setcap executable: ./lte_tr069
> ==6660== Possible workaround: remove --trace-children=yes, if in effect
> ==6660==
> valgrind: ./lte_tr069: Permission denied


Hi

The problem is that your application (or something that your application is executing) is trying to switch user, group or capabilities. This is likely to interfere with the workings of Valgrind. As an 
example of this, Valgrind often needs to open new log files. This may fail if Valgrind has switched user/group/caps. 

This is more likely to happen if you are running Valgrind on a wrapper script and using the --trace-children=yes. For instance you might be on a system where utilities like 'basename' and 
'dirname' are security hardened. If they are used in your wrapper this could result in the problem you are seeing.

Alternatively, if you are not using a wrapper, then the best workaround is to have some special Valgrind handling in your executable. See http://valgrind.org/docs/manual/manual-core-
adv.html#manual-core-adv.clientreq

So you could write some code like

if (!RUNNING_ON_VALGRIND)
{
// your setcap calls
}

A+
Paul



_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.