From a0bf8f8271bb56cd78b24b66d29b728cc63e414c Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Mon, 26 Jan 2009 00:09:08 +0000 Subject: [PATCH] Minor refinements: * h_main.c: handle a few more syscalls * exp-ptrcheck.supp: ignore errors in glibc's getenv -- is highly optimised * pc_common.c: fix small error in error message printing --> 3_4_BRANCH git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9061 --- exp-ptrcheck.supp | 6 ++++++ exp-ptrcheck/h_main.c | 12 ++++++++++++ exp-ptrcheck/pc_common.c | 2 +- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/exp-ptrcheck.supp b/exp-ptrcheck.supp index 7842a17166..2b51ca3c9b 100644 --- a/exp-ptrcheck.supp +++ b/exp-ptrcheck.supp @@ -42,3 +42,9 @@ obj:/*lib*/ld-2.*so* obj:/*lib*/ld-2.*so* } + +{ + I think this is glibc's ultra optimised getenv doing 2 byte reads + exp-ptrcheck:SorG + fun:getenv +} diff --git a/exp-ptrcheck/h_main.c b/exp-ptrcheck/h_main.c index 8d93793724..9c71f3700c 100644 --- a/exp-ptrcheck/h_main.c +++ b/exp-ptrcheck/h_main.c @@ -2215,6 +2215,7 @@ static void setup_post_syscall_table ( void ) ADD(0, __NR_fcntl64); # endif ADD(0, __NR_fdatasync); + ADD(0, __NR_flock); ADD(0, __NR_fstat); # if defined(__NR_fstat64) ADD(0, __NR_fstat64); @@ -2269,6 +2270,7 @@ static void setup_post_syscall_table ( void ) ADD(0, __NR_inotify_init); ADD(0, __NR_inotify_rm_watch); ADD(0, __NR_ioctl); // ioctl -- assuming no pointers returned + ADD(0, __NR_ioprio_get); ADD(0, __NR_kill); ADD(0, __NR_link); # if defined(__NR_listen) @@ -2281,6 +2283,7 @@ static void setup_post_syscall_table ( void ) # endif ADD(0, __NR_madvise); ADD(0, __NR_mkdir); + ADD(0, __NR_mlock); ADD(0, __NR_mprotect); ADD(0, __NR_munmap); // die_mem_munmap already called, segment remove); ADD(0, __NR_nanosleep); @@ -2312,6 +2315,15 @@ static void setup_post_syscall_table ( void ) ADD(0, __NR_sched_setscheduler); ADD(0, __NR_sched_yield); ADD(0, __NR_select); +# if defined(__NR_semctl) + ADD(0, __NR_semctl); +# endif +# if defined(__NR_semget) + ADD(0, __NR_semget); +# endif +# if defined(__NR_semop) + ADD(0, __NR_semop); +# endif # if defined(__NR_sendto) ADD(0, __NR_sendto); # endif diff --git a/exp-ptrcheck/pc_common.c b/exp-ptrcheck/pc_common.c index b72d2fc0f9..8f9bef6c67 100644 --- a/exp-ptrcheck/pc_common.c +++ b/exp-ptrcheck/pc_common.c @@ -397,7 +397,7 @@ void pc_pp_Error ( Error* err ) VG_(pp_ExeContext)( VG_(get_error_where)(err) ); VG_(message)(Vg_UserMsg, " Address %#lx is %ld bytes inside a " - "%ld-byte block alloc'd", + "%ld-byte block free'd", lo, lo-Seg__addr(seglo), Seg__size(seglo) ); VG_(pp_ExeContext)(Seg__where(seglo)); -- 2.47.3