> The version I use is valgrind-3.7.0.SVN.
> The operation system is Fedora 12. The output of "uname -a" is the following:
> Linux localhost.localdomain 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov
> 7 21:25:57 EST
Thank you for supplying those details. On Fedora 12 i686, syscall 330 is dup3:
----- /usr/include/asm/unistd.h ==> unistd_32.h:
#define __NR_dup3 330
So running valgrind on the following complete program should give the same error
as running valgrind on your httpd:
----- dup3.c
#include <unistd.h>
int main()
{
return dup3(0, 5, 0);
}
-----
[This follows the general debugging principle of trying to reproduce
the error using a test program that is a short and simple as possible.]
However it works for me on Fedora 14 with valgrind-3.8.0.SVN; see below.
Does it work for you on Fedora 12 with valgrind-3.7.0.SVN ?
-----
$ gcc -m32 -g -o ./dup3 dup3.c
$ valgrind --tool=none ./dup3
==10750== Nulgrind, the minimal Valgrind tool
==10750== Copyright (C) 2002-2011, and GNU GPL'd, by Nicholas Nethercote.
==10750== Using Valgrind-3.8.0.SVN and LibVEX; rerun with -h for copyright info
==10750== Command: .../dup3
==10750==
==10750==
$
-----
Please try the valgrind option "--trace-syscalls=yes", which prints out
system calls onto stderr as it executes:
valgrind --tool=none --trace-syscalls=yes ./bin/httpd -k start
What are the last few syscalls printed by the above command?
Using the dup3 program, I see:
----- valgrind --tool=none --trace-syscalls=yes ./dup3
[snip]
SYSCALL[10752,1](243) sys_set_thread_area ( 0xfea750a0 ) --> [pre-success]
Success(0x0:0x0)
SYSCALL[10752,1](125) sys_mprotect ( 0x4c1ca000, 8192, 1 )[sync] -->
Success(0x0:0x0)
SYSCALL[10752,1](125) sys_mprotect ( 0x4c042000, 4096, 1 )[sync] -->
Success(0x0:0x0)
SYSCALL[10752,1]( 91) sys_munmap ( 0x400d000, 101301 )[sync] -->
Success(0x0:0x0)
SYSCALL[10752,1](330) sys_dup3 ( 0, 5, 0 )[sync] --> Success(0x0:0x5)
SYSCALL[10752,1](252) exit_group( 5 ) --> [pre-success] Success(0x0:0x0)
==10752==
$
-----
For independent confirmation that syscall 330 is dup3, you can use strace:
strace -o strace.out valgrind --trace-syscalls=yes ./dup3
Then look in file strace.out, and compare the sequence of system calls
with what valgrind reports on stderr.
--
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users