|
From: Shinichi N. <no...@ta...> - 2005-12-25 03:30:05
|
I'm trying to use valgrind 3.1.0 on Red Hat Linux 9.
When I use valgrind as below, valgrind returns "Permission denied"
error.
% valgrind --tool=memcheck PROG
valgrind: PROG: Permission denied
I can execute "PROG" without valgrind, of course.
I'm not the owner of "PROG". But the group execution permission
is active. I am belonging the group that "PROG" belongs, but the
group is not my primary group.
I checked valgrind source code, and probably I found a bug in
"coregrind/m_libcproc.c: VG_(getgroups)".
The source code should be as below. Is that right?
---->8-------->8-------->8-------->8-------->8-------->8-------->8----
--- coregrind/m_libcproc.c.orig 2005-11-25 21:36:21.000000000 +0900
+++ coregrind/m_libcproc.c 2005-12-22 11:21:06.000000000 +0900
@@ -406,11 +406,11 @@
sres = VG_(do_syscall2)(__NR_getgroups, size, (Addr)list16);
if (sres.isError)
return -1;
- if (sres.val != size)
+ if (sres.val > size)
return -1;
- for (i = 0; i < size; i++)
+ for (i = 0; i < sres.val; i++)
list[i] = (UInt)list16[i];
- return size;
+ return sres.val;
# elif defined(VGP_amd64_linux)
SysRes sres;
---->8-------->8-------->8-------->8-------->8-------->8-------->8----
---------------------------------
Shinichi NODA
no...@ta...
---------------------------------
|
|
From: Dirk M. <dm...@gm...> - 2006-01-02 18:05:24
|
On Sunday 25 December 2005 04:29, Shinichi Noda wrote: > I checked valgrind source code, and probably I found a bug in > "coregrind/m_libcproc.c: VG_(getgroups)". > The source code should be as below. Is that right? Please file a bugreport with the patch so that the patch isn't lost. See http://www.valgrind.org/support/bug_reports.html Dirk |
|
From: Tom H. <to...@co...> - 2006-01-02 18:17:12
|
In message <200...@gm...>
Dirk Mueller <dm...@gm...> wrote:
> On Sunday 25 December 2005 04:29, Shinichi Noda wrote:
>
> > I checked valgrind source code, and probably I found a bug in
> > "coregrind/m_libcproc.c: VG_(getgroups)".
> > The source code should be as below. Is that right?
>
> Please file a bugreport with the patch so that the patch isn't lost. See
> http://www.valgrind.org/support/bug_reports.html
I think it's already been committed hasn't it?
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: Julian S. <js...@ac...> - 2006-01-02 18:19:18
|
> Please file a bugreport with the patch so that the patch isn't lost. See > http://www.valgrind.org/support/bug_reports.html Patch already went in as r5445 (see docs/internals/3_1_BUGSTATUS.txt). What I'd really like to know is, is it a correct fix? I don't know enough about sys_getgroups to know. J |