|
From: Mayank R. <mr...@gm...> - 2011-03-29 16:02:59
|
Hi, *Environment: 32 bit Valgrind (3.4) on FreeBSD 6.x* We have a requirement that the application we run uses a specific UID which is different from the original application. When we run the application with valgrind to detect memory leaks, the application runs with the uid as that of the valgrind. i.e. if valgrind runs as root, the application will run as root (but we do not want my application to run as root). Is there a way where I can run valgrind and my application with different uids? Since the application needs to run with a specific uid, we got valgrind to run with a specific uid (non-root) but we see a difference in behavior when we run this with non-root user - the memory analysis fails since the below mentioned redirections do not happen in this case - --69021:1:signals extending a stack base 0xbebed000 down by 4096 --69021-- REDIR: 0x31cd28 (calloc) redirected to 0x1d564 (calloc) --69021:1:mallocfr newSuperblock at 0x364000 (pszB 4194288) owner CLIENT/client --69021-- REDIR: 0x2bc104 (malloc) redirected to 0x1bd54 (malloc) --69021-- REDIR: 0x31fd04 (memcpy) redirected to 0x1e2f0 (memcpy) --69021-- REDIR: 0x31fcc4 (memset) redirected to 0x1ea88 (memset) --69021-- REDIR: 0x312250 (strchr) redirected to 0x1dc6c (strchr) Search on the net revealed some issues with using Valgrind with effective user id. Are there any such known issues (this version 3.4)? if so how do we get around them. Thanks, Mayank |