Bug 244009 - exp-ptrcheck unknown syscalls in analyzing lighttpd (patch supplied)
Summary: exp-ptrcheck unknown syscalls in analyzing lighttpd (patch supplied)
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: sgcheck (show other bugs)
Version: 3.5.0
Platform: Gentoo Packages Linux
: NOR minor
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-09 09:55 UTC by Tom Regner
Modified: 2012-08-10 14:04 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Regner 2010-07-09 09:55:09 UTC
Version:           3.5.0
OS:                Linux

epoll_ctl, epoll_wait, sendfile, sendgroups are missing from setup_post_syscall_table for Linux - as they all don't return pointers i simply added them at alphabeticaly halfway fitting places.

here is the patch that if applied allows to inspect lighttpd:

--- valgrind-3.5.0.orig/exp-ptrcheck/h_main.c   2009-08-19 15:36:41.000000000 +0200
+++ valgrind-3.5.0/exp-ptrcheck/h_main.c        2010-07-08 17:53:43.000000000 +0200
@@ -2211,6 +2211,8 @@
       ADD(0, __NR_execve); /* presumably we see this because the call failed? */
       ADD(0, __NR_exit); /* hmm, why are we still alive? */
       ADD(0, __NR_exit_group);
+      ADD(0, __NR_epoll_ctl);
+      ADD(0, __NR_epoll_wait);
       ADD(0, __NR_fadvise64);
       ADD(0, __NR_fallocate);
       ADD(0, __NR_fchmod);
@@ -2353,6 +2355,7 @@
 #     if defined(__NR_sendto)
       ADD(0, __NR_sendto);
 #     endif
+      ADD(0, __NR_sendfile);
 #     if defined(__NR_sendmsg)
       ADD(0, __NR_sendmsg);
 #     endif
@@ -2364,6 +2367,7 @@
       ADD(0, __NR_setfsgid);
       ADD(0, __NR_setfsuid);
       ADD(0, __NR_setgid);
+      ADD(0, __NR_setgroups);
       ADD(0, __NR_setitimer);
       ADD(0, __NR_setpgid);
       ADD(0, __NR_setpriority);


Reproducible: Always

Steps to Reproduce:
Simply start valgrind --tool=exp-ptrcheck lighttpd - it'l bail out every time with "the impossible happend"...



I don't know if it's necessary to protect the new ADD-Lines with #if defined(...) / #endif - so maybe the patch is incomplete - but the changes are
Comment 1 Julian Seward 2010-07-21 12:04:42 UTC
epoll_ctl/_wait are already fixed in the trunk.  I just
committed the others as part of r11216.  Thanks.