You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(19) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
1
(9) |
2
(1) |
3
(1) |
|
4
(1) |
5
(1) |
6
(1) |
7
(1) |
8
(5) |
9
(9) |
10
(1) |
|
11
(1) |
12
(2) |
13
(10) |
14
(4) |
15
(1) |
16
|
17
(1) |
|
18
(1) |
19
(1) |
20
(8) |
21
(1) |
22
(2) |
23
|
24
|
|
25
|
26
(2) |
27
(15) |
28
(12) |
29
(9) |
30
(5) |
31
(5) |
|
From: Bart V. A. <bar...@gm...> - 2009-10-28 07:48:01
|
Nightly build on cellbuzz-native ( cellbuzz, ppc64, Fedora 7, native ) Started at 2009-10-28 02:22:56 EDT Ended at 2009-10-28 03:47:40 EDT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... done Regression test results follow == 449 tests, 46 stderr failures, 10 stdout failures, 0 post failures == memcheck/tests/deep_templates (stdout) memcheck/tests/leak-cases-full (stderr) memcheck/tests/leak-cases-summary (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/linux/sigqueue (stderr) memcheck/tests/linux/timerfd-syscall (stdout) memcheck/tests/linux-syscalls-2007 (stderr) memcheck/tests/origin5-bz2 (stderr) memcheck/tests/partiallydefinedeq (stderr) memcheck/tests/varinfo1 (stderr) memcheck/tests/varinfo2 (stderr) memcheck/tests/varinfo3 (stderr) memcheck/tests/varinfo4 (stderr) memcheck/tests/varinfo5 (stderr) memcheck/tests/varinfo6 (stderr) memcheck/tests/wrap8 (stdout) memcheck/tests/wrap8 (stderr) none/tests/empty-exe (stderr) none/tests/linux/mremap (stderr) none/tests/ppc32/jm-fp (stdout) none/tests/ppc32/jm-vmx (stdout) none/tests/ppc32/round (stdout) none/tests/ppc32/test_gx (stdout) none/tests/ppc64/jm-fp (stdout) none/tests/ppc64/jm-vmx (stdout) none/tests/ppc64/round (stdout) none/tests/shell_valid2 (stderr) none/tests/shell_valid3 (stderr) none/tests/shell_zerolength (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc22_exit_w_lock (stderr) helgrind/tests/tc23_bogus_condwait (stderr) drd/tests/tc23_bogus_condwait (stderr) exp-ptrcheck/tests/bad_percentify (stderr) exp-ptrcheck/tests/base (stderr) exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/fp (stderr) exp-ptrcheck/tests/globalerr (stderr) exp-ptrcheck/tests/hackedbz2 (stderr) exp-ptrcheck/tests/hp_bounds (stderr) exp-ptrcheck/tests/hp_dangle (stderr) exp-ptrcheck/tests/hsg (stderr) exp-ptrcheck/tests/justify (stderr) exp-ptrcheck/tests/partial_bad (stderr) exp-ptrcheck/tests/partial_good (stderr) exp-ptrcheck/tests/preen_invars (stderr) exp-ptrcheck/tests/pth_create (stderr) exp-ptrcheck/tests/pth_specific (stderr) exp-ptrcheck/tests/realloc (stderr) exp-ptrcheck/tests/stackerr (stderr) exp-ptrcheck/tests/strcpy (stderr) exp-ptrcheck/tests/supp (stderr) exp-ptrcheck/tests/tricky (stderr) exp-ptrcheck/tests/unaligned (stderr) exp-ptrcheck/tests/zero (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... done Regression test results follow == 448 tests, 45 stderr failures, 10 stdout failures, 0 post failures == memcheck/tests/deep_templates (stdout) memcheck/tests/leak-cases-full (stderr) memcheck/tests/leak-cases-summary (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/linux/timerfd-syscall (stdout) memcheck/tests/linux-syscalls-2007 (stderr) memcheck/tests/origin5-bz2 (stderr) memcheck/tests/partiallydefinedeq (stderr) memcheck/tests/varinfo1 (stderr) memcheck/tests/varinfo2 (stderr) memcheck/tests/varinfo3 (stderr) memcheck/tests/varinfo4 (stderr) memcheck/tests/varinfo5 (stderr) memcheck/tests/varinfo6 (stderr) memcheck/tests/wrap8 (stdout) memcheck/tests/wrap8 (stderr) none/tests/empty-exe (stderr) none/tests/linux/mremap (stderr) none/tests/ppc32/jm-fp (stdout) none/tests/ppc32/jm-vmx (stdout) none/tests/ppc32/round (stdout) none/tests/ppc32/test_gx (stdout) none/tests/ppc64/jm-fp (stdout) none/tests/ppc64/jm-vmx (stdout) none/tests/ppc64/round (stdout) none/tests/shell_valid2 (stderr) none/tests/shell_valid3 (stderr) none/tests/shell_zerolength (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc22_exit_w_lock (stderr) helgrind/tests/tc23_bogus_condwait (stderr) drd/tests/tc23_bogus_condwait (stderr) exp-ptrcheck/tests/bad_percentify (stderr) exp-ptrcheck/tests/base (stderr) exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/fp (stderr) exp-ptrcheck/tests/globalerr (stderr) exp-ptrcheck/tests/hackedbz2 (stderr) exp-ptrcheck/tests/hp_bounds (stderr) exp-ptrcheck/tests/hp_dangle (stderr) exp-ptrcheck/tests/hsg (stderr) exp-ptrcheck/tests/justify (stderr) exp-ptrcheck/tests/partial_bad (stderr) exp-ptrcheck/tests/partial_good (stderr) exp-ptrcheck/tests/preen_invars (stderr) exp-ptrcheck/tests/pth_create (stderr) exp-ptrcheck/tests/pth_specific (stderr) exp-ptrcheck/tests/realloc (stderr) exp-ptrcheck/tests/stackerr (stderr) exp-ptrcheck/tests/strcpy (stderr) exp-ptrcheck/tests/supp (stderr) exp-ptrcheck/tests/tricky (stderr) exp-ptrcheck/tests/unaligned (stderr) exp-ptrcheck/tests/zero (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Wed Oct 28 03:06:08 2009 --- new.short Wed Oct 28 03:47:40 2009 *************** *** 8,10 **** ! == 448 tests, 45 stderr failures, 10 stdout failures, 0 post failures == memcheck/tests/deep_templates (stdout) --- 8,10 ---- ! == 449 tests, 46 stderr failures, 10 stdout failures, 0 post failures == memcheck/tests/deep_templates (stdout) *************** *** 13,14 **** --- 13,15 ---- memcheck/tests/leak-cycle (stderr) + memcheck/tests/linux/sigqueue (stderr) memcheck/tests/linux/timerfd-syscall (stdout) |
|
From: Konstantin S. <kon...@gm...> - 2009-10-28 04:54:54
|
Any suggestion? On Thu, Oct 22, 2009 at 10:36 AM, Konstantin Serebryany < kon...@gm...> wrote: > -valgrind-users > +valgrind-developers > > I observe a situation where the number of invocations > of PRE(sys_epoll_wait) is greater than the number of invocations > of POST(sys_epoll_wait). > Is that expected? > > This is causing memcheck to think that memory passed to epoll_wait() as a > second parameter is left uninitialized... > > Thanks, > > --kcc > > > > > > On Tue, Oct 20, 2009 at 3:30 PM, Konstantin Serebryany < > kon...@gm...> wrote: > >> Hi, >> >> I am investigating a memcheck's report near a call to epoll_wait(). >> I am running my program (sorry, not small test case) with >> --trace-syscalls=yes. >> >> Usually I get this: >> SYSCALL[29628,125](232) sys_epoll_wait ( 62, 0x1540ca30, 1024, 1000 ) --> >> [async] ... >> SYSCALL[29628,125](232) ... [async] --> Success(0x0:0x0) >> I assume these two lines come from PRE(sys_epoll_wait) and >> POST(sys_epoll_wait). >> >> But sometimes I get this: >> SYSCALL[29628,156](232) sys_epoll_wait ( 96, 0x15948a30, 1024, 417 ) --> >> [async] ... >> SYSCALL[29628,156]( 15) sys_rt_sigreturn ( ) --> [pre-success] >> NoWriteResult >> >> So, POST(sys_epoll_wait) does not get called and memcheck thinks that the >> second parameter of epoll_wait is uninitialized. >> >> What does this sys_rt_sigreturn mean? Why POST(sys_epoll_wait) is not >> called? >> Any idea? >> >> Thanks, >> >> --kcc >> >> >> >> >> > |
|
From: Tom H. <th...@cy...> - 2009-10-28 03:50:40
|
Nightly build on vauxhall ( x86_64, Fedora 11 ) Started at 2009-10-28 03:20:07 GMT Ended at 2009-10-28 03:50:18 GMT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 541 tests, 8 stderr failures, 0 stdout failures, 0 post failures == memcheck/tests/linux/sigqueue (stderr) memcheck/tests/linux/stack_switch (stderr) memcheck/tests/long_namespace_xml (stderr) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc23_bogus_condwait (stderr) drd/tests/qt4_mutex (stderr) exp-ptrcheck/tests/bad_percentify (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 540 tests, 8 stderr failures, 0 stdout failures, 0 post failures == memcheck/tests/linux/stack_switch (stderr) memcheck/tests/long_namespace_xml (stderr) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc23_bogus_condwait (stderr) drd/tests/qt4_mutex (stderr) drd/tests/qt4_rwlock (stderr) exp-ptrcheck/tests/bad_percentify (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Wed Oct 28 03:35:19 2009 --- new.short Wed Oct 28 03:50:18 2009 *************** *** 8,10 **** ! == 540 tests, 8 stderr failures, 0 stdout failures, 0 post failures == memcheck/tests/linux/stack_switch (stderr) --- 8,11 ---- ! == 541 tests, 8 stderr failures, 0 stdout failures, 0 post failures == ! memcheck/tests/linux/sigqueue (stderr) memcheck/tests/linux/stack_switch (stderr) *************** *** 15,17 **** drd/tests/qt4_mutex (stderr) - drd/tests/qt4_rwlock (stderr) exp-ptrcheck/tests/bad_percentify (stderr) --- 16,17 ---- |
|
From: Tom H. <th...@cy...> - 2009-10-28 03:48:48
|
Nightly build on lloyd ( x86_64, Fedora 7 ) Started at 2009-10-28 03:05:05 GMT Ended at 2009-10-28 03:48:30 GMT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 531 tests, 2 stderr failures, 0 stdout failures, 0 post failures == memcheck/tests/linux/sigqueue (stderr) helgrind/tests/tc06_two_races_xml (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 530 tests, 1 stderr failure, 0 stdout failures, 0 post failures == helgrind/tests/tc06_two_races_xml (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Wed Oct 28 03:26:48 2009 --- new.short Wed Oct 28 03:48:30 2009 *************** *** 8,10 **** ! == 530 tests, 1 stderr failure, 0 stdout failures, 0 post failures == helgrind/tests/tc06_two_races_xml (stderr) --- 8,11 ---- ! == 531 tests, 2 stderr failures, 0 stdout failures, 0 post failures == ! memcheck/tests/linux/sigqueue (stderr) helgrind/tests/tc06_two_races_xml (stderr) |
|
From: Tom H. <th...@cy...> - 2009-10-28 03:36:22
|
Nightly build on mg ( x86_64, Fedora 9 ) Started at 2009-10-28 03:10:06 GMT Ended at 2009-10-28 03:36:00 GMT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 538 tests, 15 stderr failures, 0 stdout failures, 0 post failures == memcheck/tests/linux/sigqueue (stderr) cachegrind/tests/chdir (stderr) cachegrind/tests/clreq (stderr) cachegrind/tests/dlclose (stderr) cachegrind/tests/notpower2 (stderr) cachegrind/tests/wrap5 (stderr) cachegrind/tests/x86/fpu-28-108 (stderr) callgrind/tests/notpower2-hwpref (stderr) callgrind/tests/notpower2-use (stderr) callgrind/tests/notpower2-wb (stderr) callgrind/tests/notpower2 (stderr) callgrind/tests/simwork1 (stderr) callgrind/tests/simwork2 (stderr) callgrind/tests/simwork3 (stderr) helgrind/tests/tc06_two_races_xml (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 537 tests, 14 stderr failures, 0 stdout failures, 0 post failures == cachegrind/tests/chdir (stderr) cachegrind/tests/clreq (stderr) cachegrind/tests/dlclose (stderr) cachegrind/tests/notpower2 (stderr) cachegrind/tests/wrap5 (stderr) cachegrind/tests/x86/fpu-28-108 (stderr) callgrind/tests/notpower2-hwpref (stderr) callgrind/tests/notpower2-use (stderr) callgrind/tests/notpower2-wb (stderr) callgrind/tests/notpower2 (stderr) callgrind/tests/simwork1 (stderr) callgrind/tests/simwork2 (stderr) callgrind/tests/simwork3 (stderr) helgrind/tests/tc06_two_races_xml (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Wed Oct 28 03:23:10 2009 --- new.short Wed Oct 28 03:36:00 2009 *************** *** 8,10 **** ! == 537 tests, 14 stderr failures, 0 stdout failures, 0 post failures == cachegrind/tests/chdir (stderr) --- 8,11 ---- ! == 538 tests, 15 stderr failures, 0 stdout failures, 0 post failures == ! memcheck/tests/linux/sigqueue (stderr) cachegrind/tests/chdir (stderr) |
|
From: <sv...@va...> - 2009-10-27 21:43:01
|
Author: tom
Date: 2009-10-27 21:42:46 +0000 (Tue, 27 Oct 2009)
New Revision: 10912
Log:
Wire up inotify_init1 on ppc32-linux.
Modified:
trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c
Modified: trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c 2009-10-27 14:55:49 UTC (rev 10911)
+++ trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c 2009-10-27 21:42:46 UTC (rev 10912)
@@ -1867,7 +1867,7 @@
LINXY(__NR_epoll_create1, sys_epoll_create1), // 315
// (__NR_dup3, sys_ni_syscall) // 316
LINXY(__NR_pipe2, sys_pipe2), // 317
- // (__NR_inotify_init1, sys_ni_syscall) // 318
+ LINXY(__NR_inotify_init1, sys_inotify_init1), // 318
LINXY(__NR_perf_counter_open, sys_perf_counter_open) // 319
// (__NR_preadv, sys_ni_syscall) // 320
// (__NR_pwritev, sys_ni_syscall) // 321
|
|
From: Bart V. A. <bar...@gm...> - 2009-10-27 16:18:26
|
On Tue, Oct 27, 2009 at 4:47 PM, Tom Hughes <to...@co...> wrote: > On 27/10/09 15:22, Konstantin Serebryany wrote: > >> I have added a modified version of your test program to the repository >> and have filed this issue in bugzilla >> (https://bugs.kde.org/show_bug.cgi?id=212064). But I'm not sure that >> the proposed fix makes sense. The proposed modifications do not match >> the definitions in the kernel header files (<asm-generic/siginfo.h>). >> >> >> I took the code from /usr/include/bits/siginfo.h > > Which is a userland definition - valgrind deals with the system call > interface so need to work with kernel definitions. > > Basically somebody will need to work out what magic is going on between > glibc and the kernel that allows the two to have different expectations of > the size. The rt_sigqueueinfo wrapper in coregrind/m_syswrap/syswrap-linux.c contains a.o. the following statement: PRE_MEM_READ( "rt_sigqueueinfo(uinfo)", ARG3, sizeof(vki_siginfo_t) ); Apparently the size of the vki_siginfo_t structure defined in Valgrind's header files is larger than VKI_SI_MAX_SIZE. This doesn't make sense. I found the following comment in include/vki/vki-linux.h, of which I'm not sure that it is correct: ... // [[Nb: this type changed between 2.4 and 2.6, but not in a way that // affects Valgrind.]] typedef struct vki_siginfo { ... Bart. |
|
From: Tom H. <to...@co...> - 2009-10-27 15:47:46
|
On 27/10/09 15:22, Konstantin Serebryany wrote: > I have added a modified version of your test program to the repository > and have filed this issue in bugzilla > (https://bugs.kde.org/show_bug.cgi?id=212064). But I'm not sure that > the proposed fix makes sense. The proposed modifications do not match > the definitions in the kernel header files (<asm-generic/siginfo.h>). > > > I took the code from /usr/include/bits/siginfo.h Which is a userland definition - valgrind deals with the system call interface so need to work with kernel definitions. Basically somebody will need to work out what magic is going on between glibc and the kernel that allows the two to have different expectations of the size. Tom -- Tom Hughes (to...@co...) http://www.compton.nu/ |
|
From: Konstantin S. <kon...@gm...> - 2009-10-27 15:22:48
|
On Tue, Oct 27, 2009 at 5:32 PM, Bart Van Assche
<bar...@gm...>wrote:
> On Thu, Oct 22, 2009 at 6:56 AM, Konstantin Serebryany
> <kon...@gm...> wrote:
> > Hi,
> > Here is a small bug which leads to memcheck false positives on x86_64.
> > In short, sizeof(siginfo_t)==136, while it needs to be 128.
> > Would you mind fixing this (see patch below)?
> > Test:
> > $ cat sigqueue_test.c
> > #include <signal.h>
> > #include <syscall.h>
> > #include <string.h>
> > #include <stdlib.h>
> > #include <stdio.h>
> > int main() {
> > siginfo_t *si;
> > const size_t sz = sizeof(*si);
> > printf("sizeof(*si) = %lu\n", sz);
> > printf("%ld %ld %ld %ld\n",
> > (char*)&si->si_signo - (char*)si,
> > (char*)&si->si_errno - (char*)si,
> > (char*)&si->si_code - (char*)si,
> > (char*)&si->_sifields - (char*)si
> > );
> > si = malloc(sz);
> > memset(si, 0, sz);
> > si->si_signo = SIGWINCH;
> > si->si_code = SI_QUEUE;
> > si->si_pid = getpid();
> > si->si_uid = getuid();
> > syscall(__NR_rt_sigqueueinfo, getpid(), SIGWINCH, si);
> > return 0;
> > }
> > $ gcc -g sigqueue_test.c && ./a.out && ~/valgrind/trunk/inst/bin/valgrind
> > ./a.out
> > sizeof(*si) = 128
> > 0 4 8 16
> > ==13294== Memcheck, a memory error detector
> > ==13294== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
> > ==13294== Using Valgrind-3.6.0.SVN and LibVEX; rerun with -h for
> copyright
> > info
> > ==13294== Command: ./a.out
> > ==13294==
> > sizeof(*si) = 128
> > 0 4 8 16
> > ==13294== Syscall param rt_sigqueueinfo(uinfo) points to unaddressable
> > byte(s)
> > ==13294== at 0x4EE82E9: syscall (in /usr/grte/v1/lib64/libc-2.3.6.so)
> > ==13294== by 0x400750: main (sigqueue_test.c:24)
> > ==13294== Address 0x516a0c0 is 0 bytes after a block of size 128 alloc'd
> > ==13294== at 0x4C1BE27: malloc (vg_replace_malloc.c:195)
> > ==13294== by 0x4006DB: main (sigqueue_test.c:18)
> > ==13294==
> > ==13294==
> > ==13294== HEAP SUMMARY:
> > ==13294== in use at exit: 128 bytes in 1 blocks
> > ==13294== total heap usage: 1 allocs, 0 frees, 128 bytes allocated
> > ==13294==
> > ==13294== LEAK SUMMARY:
> > ==13294== definitely lost: 128 bytes in 1 blocks
> > ==13294== indirectly lost: 0 bytes in 0 blocks
> > ==13294== possibly lost: 0 bytes in 0 blocks
> > ==13294== still reachable: 0 bytes in 0 blocks
> > ==13294== suppressed: 0 bytes in 0 blocks
> > ==13294== Rerun with --leak-check=full to see details of leaked memory
> > ==13294==
> > ==13294== For counts of detected and suppressed errors, rerun with: -v
> > ==13294== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 5 from 5)
> >
> >
> > Fix (something like):
> > Index: include/vki/vki-linux.h
> > ===================================================================
> > --- include/vki/vki-linux.h (revision 10904)
> > +++ include/vki/vki-linux.h (working copy)
> > @@ -340,16 +340,17 @@
> > void __user *sival_ptr;
> > } vki_sigval_t;
> > -#ifndef __VKI_ARCH_SI_PREAMBLE_SIZE
> > -#define __VKI_ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int))
> > -#endif
> > -
> > #define VKI_SI_MAX_SIZE 128
> > #ifndef VKI_SI_PAD_SIZE
> > -#define VKI_SI_PAD_SIZE ((VKI_SI_MAX_SIZE -
> > __VKI_ARCH_SI_PREAMBLE_SIZE) / sizeof(int))
> > +# if defined (VGA_amd64) // or whatever is right for 64-bit arch.
> > +# define VKI_SI_PAD_SIZE ((VKI_SI_MAX_SIZE / sizeof (int)) - 4)
> > +# else
> > +# define VKI_SI_PAD_SIZE ((VKI_SI_MAX_SIZE / sizeof (int)) - 3)
> > +# endif
> > #endif
> > +
> > #ifndef __VKI_ARCH_SI_UID_T
> > #define __VKI_ARCH_SI_UID_T vki_uid_t
> > #endif
>
> I have added a modified version of your test program to the repository
> and have filed this issue in bugzilla
> (https://bugs.kde.org/show_bug.cgi?id=212064). But I'm not sure that
> the proposed fix makes sense. The proposed modifications do not match
> the definitions in the kernel header files (<asm-generic/siginfo.h>).
>
I took the code from /usr/include/bits/siginfo.h
>
> Bart.
>
|
|
From: <sv...@va...> - 2009-10-27 14:56:04
|
Author: bart
Date: 2009-10-27 14:55:49 +0000 (Tue, 27 Oct 2009)
New Revision: 10911
Log:
Enabled the rt_sigqueueinfo() system call for ppc64.
Modified:
trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c
Modified: trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c 2009-10-27 14:20:23 UTC (rev 10910)
+++ trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c 2009-10-27 14:55:49 UTC (rev 10911)
@@ -1355,7 +1355,7 @@
// _____(__NR_rt_sigpending, sys_rt_sigpending), // 175
LINXY(__NR_rt_sigtimedwait, sys_rt_sigtimedwait), // 176
-// _____(__NR_rt_sigqueueinfo, sys_rt_sigqueueinfo), // 177
+ LINXY(__NR_rt_sigqueueinfo, sys_rt_sigqueueinfo), // 177
// _____(__NR_rt_sigsuspend, sys_rt_sigsuspend), // 178
GENXY(__NR_pread64, sys_pread64), // 179
|
|
From: Bart V. A. <bar...@gm...> - 2009-10-27 14:32:22
|
On Thu, Oct 22, 2009 at 6:56 AM, Konstantin Serebryany
<kon...@gm...> wrote:
> Hi,
> Here is a small bug which leads to memcheck false positives on x86_64.
> In short, sizeof(siginfo_t)==136, while it needs to be 128.
> Would you mind fixing this (see patch below)?
> Test:
> $ cat sigqueue_test.c
> #include <signal.h>
> #include <syscall.h>
> #include <string.h>
> #include <stdlib.h>
> #include <stdio.h>
> int main() {
> siginfo_t *si;
> const size_t sz = sizeof(*si);
> printf("sizeof(*si) = %lu\n", sz);
> printf("%ld %ld %ld %ld\n",
> (char*)&si->si_signo - (char*)si,
> (char*)&si->si_errno - (char*)si,
> (char*)&si->si_code - (char*)si,
> (char*)&si->_sifields - (char*)si
> );
> si = malloc(sz);
> memset(si, 0, sz);
> si->si_signo = SIGWINCH;
> si->si_code = SI_QUEUE;
> si->si_pid = getpid();
> si->si_uid = getuid();
> syscall(__NR_rt_sigqueueinfo, getpid(), SIGWINCH, si);
> return 0;
> }
> $ gcc -g sigqueue_test.c && ./a.out && ~/valgrind/trunk/inst/bin/valgrind
> ./a.out
> sizeof(*si) = 128
> 0 4 8 16
> ==13294== Memcheck, a memory error detector
> ==13294== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
> ==13294== Using Valgrind-3.6.0.SVN and LibVEX; rerun with -h for copyright
> info
> ==13294== Command: ./a.out
> ==13294==
> sizeof(*si) = 128
> 0 4 8 16
> ==13294== Syscall param rt_sigqueueinfo(uinfo) points to unaddressable
> byte(s)
> ==13294== at 0x4EE82E9: syscall (in /usr/grte/v1/lib64/libc-2.3.6.so)
> ==13294== by 0x400750: main (sigqueue_test.c:24)
> ==13294== Address 0x516a0c0 is 0 bytes after a block of size 128 alloc'd
> ==13294== at 0x4C1BE27: malloc (vg_replace_malloc.c:195)
> ==13294== by 0x4006DB: main (sigqueue_test.c:18)
> ==13294==
> ==13294==
> ==13294== HEAP SUMMARY:
> ==13294== in use at exit: 128 bytes in 1 blocks
> ==13294== total heap usage: 1 allocs, 0 frees, 128 bytes allocated
> ==13294==
> ==13294== LEAK SUMMARY:
> ==13294== definitely lost: 128 bytes in 1 blocks
> ==13294== indirectly lost: 0 bytes in 0 blocks
> ==13294== possibly lost: 0 bytes in 0 blocks
> ==13294== still reachable: 0 bytes in 0 blocks
> ==13294== suppressed: 0 bytes in 0 blocks
> ==13294== Rerun with --leak-check=full to see details of leaked memory
> ==13294==
> ==13294== For counts of detected and suppressed errors, rerun with: -v
> ==13294== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 5 from 5)
>
>
> Fix (something like):
> Index: include/vki/vki-linux.h
> ===================================================================
> --- include/vki/vki-linux.h (revision 10904)
> +++ include/vki/vki-linux.h (working copy)
> @@ -340,16 +340,17 @@
> void __user *sival_ptr;
> } vki_sigval_t;
> -#ifndef __VKI_ARCH_SI_PREAMBLE_SIZE
> -#define __VKI_ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int))
> -#endif
> -
> #define VKI_SI_MAX_SIZE 128
> #ifndef VKI_SI_PAD_SIZE
> -#define VKI_SI_PAD_SIZE ((VKI_SI_MAX_SIZE -
> __VKI_ARCH_SI_PREAMBLE_SIZE) / sizeof(int))
> +# if defined (VGA_amd64) // or whatever is right for 64-bit arch.
> +# define VKI_SI_PAD_SIZE ((VKI_SI_MAX_SIZE / sizeof (int)) - 4)
> +# else
> +# define VKI_SI_PAD_SIZE ((VKI_SI_MAX_SIZE / sizeof (int)) - 3)
> +# endif
> #endif
> +
> #ifndef __VKI_ARCH_SI_UID_T
> #define __VKI_ARCH_SI_UID_T vki_uid_t
> #endif
I have added a modified version of your test program to the repository
and have filed this issue in bugzilla
(https://bugs.kde.org/show_bug.cgi?id=212064). But I'm not sure that
the proposed fix makes sense. The proposed modifications do not match
the definitions in the kernel header files (<asm-generic/siginfo.h>).
Bart.
|
|
From: <sv...@va...> - 2009-10-27 14:20:48
|
Author: bart
Date: 2009-10-27 14:20:23 +0000 (Tue, 27 Oct 2009)
New Revision: 10910
Log:
Added a modified version of the rt_sigqueue test program provided by Konstantin Serebryany.
Added:
trunk/memcheck/tests/linux/sigqueue.c
trunk/memcheck/tests/linux/sigqueue.stderr.exp
trunk/memcheck/tests/linux/sigqueue.vgtest
Modified:
trunk/memcheck/tests/linux/
trunk/memcheck/tests/linux/Makefile.am
Property changes on: trunk/memcheck/tests/linux
___________________________________________________________________
Name: svn:ignore
- *.stderr.diff
*.stderr.out
*.stdout.diff
*.stdout.out
.deps
brk
capget
lsframe1
lsframe2
Makefile
Makefile.in
stack_changes
stack_switch
timerfd-syscall
+ *.stderr.diff
*.stderr.out
*.stdout.diff
*.stdout.out
.deps
brk
capget
lsframe1
lsframe2
Makefile
Makefile.in
sigqueue
stack_changes
stack_switch
timerfd-syscall
Modified: trunk/memcheck/tests/linux/Makefile.am
===================================================================
--- trunk/memcheck/tests/linux/Makefile.am 2009-10-27 14:17:27 UTC (rev 10909)
+++ trunk/memcheck/tests/linux/Makefile.am 2009-10-27 14:20:23 UTC (rev 10910)
@@ -8,6 +8,7 @@
capget capget.stderr.exp \
lsframe1.vgtest lsframe1.stdout.exp lsframe1.stderr.exp \
lsframe2.vgtest lsframe2.stdout.exp lsframe2.stderr.exp \
+ sigqueue.vgtest sigqueue.stderr.exp \
stack_changes.stderr.exp stack_changes.stdout.exp \
stack_changes.stdout.exp2 stack_changes.vgtest \
stack_switch.stderr.exp stack_switch.vgtest \
@@ -19,6 +20,7 @@
capget \
lsframe1 \
lsframe2 \
+ sigqueue \
stack_changes \
stack_switch \
timerfd-syscall
Added: trunk/memcheck/tests/linux/sigqueue.c
===================================================================
--- trunk/memcheck/tests/linux/sigqueue.c (rev 0)
+++ trunk/memcheck/tests/linux/sigqueue.c 2009-10-27 14:20:23 UTC (rev 10910)
@@ -0,0 +1,30 @@
+#include <signal.h>
+#include <string.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <syscall.h>
+#include <unistd.h>
+
+int main()
+{
+ siginfo_t *si;
+ const size_t sz = sizeof(*si);
+
+ fprintf(stderr, "sizeof(*si) = %zu\n", sz);
+ fprintf(stderr, "%zd %zd %zd %zd\n",
+ offsetof(siginfo_t, si_signo),
+ offsetof(siginfo_t, si_errno),
+ offsetof(siginfo_t, si_code),
+ offsetof(siginfo_t, _sifields)
+ );
+ si = calloc(1, sz);
+ si->si_signo = SIGWINCH;
+ si->si_code = SI_QUEUE;
+ si->si_pid = getpid();
+ si->si_uid = getuid();
+ syscall(__NR_rt_sigqueueinfo, getpid(), SIGWINCH, si);
+ free(si);
+ fprintf(stderr, "Done.\n");
+ return 0;
+}
Added: trunk/memcheck/tests/linux/sigqueue.stderr.exp
===================================================================
--- trunk/memcheck/tests/linux/sigqueue.stderr.exp (rev 0)
+++ trunk/memcheck/tests/linux/sigqueue.stderr.exp 2009-10-27 14:20:23 UTC (rev 10910)
@@ -0,0 +1,13 @@
+
+sizeof(*si) = 128
+0 4 8 16
+Done.
+
+HEAP SUMMARY:
+ in use at exit: 0 bytes in 0 blocks
+ total heap usage: 1 allocs, 1 frees, 128 bytes allocated
+
+For a detailed leak analysis, rerun with: --leak-check=full
+
+For counts of detected and suppressed errors, rerun with: -v
+ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Added: trunk/memcheck/tests/linux/sigqueue.vgtest
===================================================================
--- trunk/memcheck/tests/linux/sigqueue.vgtest (rev 0)
+++ trunk/memcheck/tests/linux/sigqueue.vgtest 2009-10-27 14:20:23 UTC (rev 10910)
@@ -0,0 +1 @@
+prog: sigqueue
|
|
From: <sv...@va...> - 2009-10-27 14:17:41
|
Author: tom
Date: 2009-10-27 14:17:27 +0000 (Tue, 27 Oct 2009)
New Revision: 10909
Log:
Add support for the inotify_init1 system call, based on patches
from Dodji Seketeli and Jakub Jelinek. Fixes #202315.
Modified:
trunk/coregrind/m_syswrap/priv_syswrap-linux.h
trunk/coregrind/m_syswrap/syswrap-amd64-linux.c
trunk/coregrind/m_syswrap/syswrap-linux.c
trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c
trunk/coregrind/m_syswrap/syswrap-x86-linux.c
Modified: trunk/coregrind/m_syswrap/priv_syswrap-linux.h
===================================================================
--- trunk/coregrind/m_syswrap/priv_syswrap-linux.h 2009-10-27 09:31:39 UTC (rev 10908)
+++ trunk/coregrind/m_syswrap/priv_syswrap-linux.h 2009-10-27 14:17:27 UTC (rev 10909)
@@ -117,6 +117,7 @@
DECL_TEMPLATE(linux, sys_get_mempolicy);
DECL_TEMPLATE(linux, sys_inotify_init);
+DECL_TEMPLATE(linux, sys_inotify_init1);
DECL_TEMPLATE(linux, sys_inotify_add_watch);
DECL_TEMPLATE(linux, sys_inotify_rm_watch);
Modified: trunk/coregrind/m_syswrap/syswrap-amd64-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-amd64-linux.c 2009-10-27 09:31:39 UTC (rev 10908)
+++ trunk/coregrind/m_syswrap/syswrap-amd64-linux.c 2009-10-27 14:17:27 UTC (rev 10909)
@@ -1375,7 +1375,7 @@
LINXY(__NR_epoll_create1, sys_epoll_create1), // 291
// (__NR_dup3, sys_ni_syscall) // 292
LINXY(__NR_pipe2, sys_pipe2), // 293
- // (__NR_inotify_init1, sys_ni_syscall) // 294
+ LINXY(__NR_inotify_init1, sys_inotify_init1), // 294
// (__NR_preadv, sys_ni_syscall) // 295
// (__NR_pwritev, sys_ni_syscall) // 296
Modified: trunk/coregrind/m_syswrap/syswrap-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-linux.c 2009-10-27 09:31:39 UTC (rev 10908)
+++ trunk/coregrind/m_syswrap/syswrap-linux.c 2009-10-27 14:17:27 UTC (rev 10909)
@@ -1526,6 +1526,24 @@
}
}
+PRE(sys_inotify_init1)
+{
+ PRINT("sys_inotify_init ( %ld )", ARG1);
+ PRE_REG_READ1(long, "inotify_init", int, flag);
+}
+
+POST(sys_inotify_init1)
+{
+ vg_assert(SUCCESS);
+ if (!ML_(fd_allowed)(RES, "inotify_init", tid, True)) {
+ VG_(close)(RES);
+ SET_STATUS_Failure( VKI_EMFILE );
+ } else {
+ if (VG_(clo_track_fds))
+ ML_(record_fd_open_nameless) (tid, RES);
+ }
+}
+
PRE(sys_inotify_add_watch)
{
PRINT( "sys_inotify_add_watch ( %ld, %#lx, %lx )", ARG1,ARG2,ARG3);
Modified: trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c 2009-10-27 09:31:39 UTC (rev 10908)
+++ trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c 2009-10-27 14:17:27 UTC (rev 10909)
@@ -1507,7 +1507,7 @@
LINXY(__NR_epoll_create1, sys_epoll_create1), // 315
// (__NR_dup3, sys_ni_syscall) // 316
LINXY(__NR_pipe2, sys_pipe2), // 317
- // (__NR_inotify_init1, sys_ni_syscall) // 318
+ LINXY(__NR_inotify_init1, sys_inotify_init1), // 318
LINXY(__NR_perf_counter_open, sys_perf_counter_open) // 319
// (__NR_preadv, sys_ni_syscall) // 320
// (__NR_pwritev, sys_ni_syscall) // 321
Modified: trunk/coregrind/m_syswrap/syswrap-x86-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-x86-linux.c 2009-10-27 09:31:39 UTC (rev 10908)
+++ trunk/coregrind/m_syswrap/syswrap-x86-linux.c 2009-10-27 14:17:27 UTC (rev 10909)
@@ -2254,7 +2254,7 @@
// (__NR_dup3, sys_ni_syscall) // 330
LINXY(__NR_pipe2, sys_pipe2), // 331
- // (__NR_inotify_init1, sys_ni_syscall) // 332
+ LINXY(__NR_inotify_init1, sys_inotify_init1), // 332
// (__NR_preadv, sys_ni_syscall) // 333
// (__NR_pwritev, sys_ni_syscall) // 334
|
|
From: <sv...@va...> - 2009-10-27 09:31:55
|
Author: tom
Date: 2009-10-27 09:31:39 +0000 (Tue, 27 Oct 2009)
New Revision: 10908
Log:
Add epoll_ctl, epoll_pwait and epoll_wait to exp-ptrcheck. Fixes #207668.
Modified:
trunk/exp-ptrcheck/h_main.c
Modified: trunk/exp-ptrcheck/h_main.c
===================================================================
--- trunk/exp-ptrcheck/h_main.c 2009-10-27 09:19:26 UTC (rev 10907)
+++ trunk/exp-ptrcheck/h_main.c 2009-10-27 09:31:39 UTC (rev 10908)
@@ -2208,6 +2208,9 @@
ADD(0, __NR_dup2);
ADD(0, __NR_epoll_create);
ADD(0, __NR_epoll_create1);
+ ADD(0, __NR_epoll_ctl);
+ ADD(0, __NR_epoll_pwait);
+ ADD(0, __NR_epoll_wait);
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);
|
|
From: <sv...@va...> - 2009-10-27 09:19:43
|
Author: tom
Date: 2009-10-27 09:19:26 +0000 (Tue, 27 Oct 2009)
New Revision: 10907
Log:
Add support for the perf_counter_open system call. Fixes #211498.
Modified:
trunk/coregrind/m_syswrap/priv_syswrap-linux.h
trunk/coregrind/m_syswrap/syswrap-amd64-linux.c
trunk/coregrind/m_syswrap/syswrap-linux.c
trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c
trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c
trunk/coregrind/m_syswrap/syswrap-x86-linux.c
trunk/include/vki/vki-linux.h
Modified: trunk/coregrind/m_syswrap/priv_syswrap-linux.h
===================================================================
--- trunk/coregrind/m_syswrap/priv_syswrap-linux.h 2009-10-27 09:01:43 UTC (rev 10906)
+++ trunk/coregrind/m_syswrap/priv_syswrap-linux.h 2009-10-27 09:19:26 UTC (rev 10907)
@@ -47,6 +47,7 @@
DECL_TEMPLATE(linux, sys_mount);
DECL_TEMPLATE(linux, sys_oldumount);
DECL_TEMPLATE(linux, sys_umount);
+DECL_TEMPLATE(linux, sys_perf_counter_open);
// POSIX, but various sub-cases differ between Linux and Darwin.
DECL_TEMPLATE(linux, sys_fcntl);
Modified: trunk/coregrind/m_syswrap/syswrap-amd64-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-amd64-linux.c 2009-10-27 09:01:43 UTC (rev 10906)
+++ trunk/coregrind/m_syswrap/syswrap-amd64-linux.c 2009-10-27 09:19:26 UTC (rev 10907)
@@ -1374,13 +1374,13 @@
LINX_(__NR_eventfd2, sys_eventfd2), // 290
LINXY(__NR_epoll_create1, sys_epoll_create1), // 291
// (__NR_dup3, sys_ni_syscall) // 292
- LINXY(__NR_pipe2, sys_pipe2) // 293
+ LINXY(__NR_pipe2, sys_pipe2), // 293
// (__NR_inotify_init1, sys_ni_syscall) // 294
// (__NR_preadv, sys_ni_syscall) // 295
// (__NR_pwritev, sys_ni_syscall) // 296
// (__NR_rt_tgsigqueueinfo, sys_ni_syscall) // 297
- // (__NR_perf_counter_open, sys_ni_syscall) // 298
+ LINXY(__NR_perf_counter_open, sys_perf_counter_open) // 298
};
const UInt ML_(syscall_table_size) =
Modified: trunk/coregrind/m_syswrap/syswrap-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-linux.c 2009-10-27 09:01:43 UTC (rev 10906)
+++ trunk/coregrind/m_syswrap/syswrap-linux.c 2009-10-27 09:19:26 UTC (rev 10907)
@@ -2392,6 +2392,30 @@
PRE_MEM_READ( "stime(t)", ARG1, sizeof(vki_time_t) );
}
+PRE(sys_perf_counter_open)
+{
+ PRINT("sys_perf_counter_open ( %#lx, %ld, %ld, %ld, %ld )",
+ ARG1,ARG2,ARG3,ARG4,ARG5);
+ PRE_REG_READ5(long, "perf_counter_open",
+ struct vki_perf_counter_attr *, attr,
+ vki_pid_t, pid, int, cpu, int, group_fd,
+ unsigned long, flags);
+ PRE_MEM_READ( "perf_counter_open(attr)",
+ ARG1, sizeof(struct vki_perf_counter_attr) );
+}
+
+POST(sys_perf_counter_open)
+{
+ vg_assert(SUCCESS);
+ if (!ML_(fd_allowed)(RES, "perf_counter_open", tid, True)) {
+ VG_(close)(RES);
+ SET_STATUS_Failure( VKI_EMFILE );
+ } else {
+ if (VG_(clo_track_fds))
+ ML_(record_fd_open_nameless)(tid, RES);
+ }
+}
+
/* ---------------------------------------------------------------------
utime wrapper
------------------------------------------------------------------ */
Modified: trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c 2009-10-27 09:01:43 UTC (rev 10906)
+++ trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c 2009-10-27 09:19:26 UTC (rev 10907)
@@ -1866,9 +1866,9 @@
LINX_(__NR_eventfd2, sys_eventfd2), // 314
LINXY(__NR_epoll_create1, sys_epoll_create1), // 315
// (__NR_dup3, sys_ni_syscall) // 316
- LINXY(__NR_pipe2, sys_pipe2) // 317
+ LINXY(__NR_pipe2, sys_pipe2), // 317
// (__NR_inotify_init1, sys_ni_syscall) // 318
- // (__NR_perf_counter_open, sys_ni_syscall) // 319
+ LINXY(__NR_perf_counter_open, sys_perf_counter_open) // 319
// (__NR_preadv, sys_ni_syscall) // 320
// (__NR_pwritev, sys_ni_syscall) // 321
// (__NR_rt_tgsigqueueinfo, sys_ni_syscall) // 322
Modified: trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c 2009-10-27 09:01:43 UTC (rev 10906)
+++ trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c 2009-10-27 09:19:26 UTC (rev 10907)
@@ -1506,9 +1506,9 @@
LINX_(__NR_eventfd2, sys_eventfd2), // 314
LINXY(__NR_epoll_create1, sys_epoll_create1), // 315
// (__NR_dup3, sys_ni_syscall) // 316
- LINXY(__NR_pipe2, sys_pipe2) // 317
+ LINXY(__NR_pipe2, sys_pipe2), // 317
// (__NR_inotify_init1, sys_ni_syscall) // 318
- // (__NR_perf_counter_open, sys_ni_syscall) // 319
+ LINXY(__NR_perf_counter_open, sys_perf_counter_open) // 319
// (__NR_preadv, sys_ni_syscall) // 320
// (__NR_pwritev, sys_ni_syscall) // 321
// (__NR_rt_tgsigqueueinfo, sys_ni_syscall) // 322
Modified: trunk/coregrind/m_syswrap/syswrap-x86-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-x86-linux.c 2009-10-27 09:01:43 UTC (rev 10906)
+++ trunk/coregrind/m_syswrap/syswrap-x86-linux.c 2009-10-27 09:19:26 UTC (rev 10907)
@@ -2253,13 +2253,13 @@
LINXY(__NR_epoll_create1, sys_epoll_create1), // 329
// (__NR_dup3, sys_ni_syscall) // 330
- LINXY(__NR_pipe2, sys_pipe2) // 331
+ LINXY(__NR_pipe2, sys_pipe2), // 331
// (__NR_inotify_init1, sys_ni_syscall) // 332
// (__NR_preadv, sys_ni_syscall) // 333
// (__NR_pwritev, sys_ni_syscall) // 334
// (__NR_rt_tgsigqueueinfo, sys_ni_syscall) // 335
- // (__NR_perf_counter_open, sys_ni_syscall) // 336
+ LINXY(__NR_perf_counter_open, sys_perf_counter_open) // 336
};
const UInt ML_(syscall_table_size) =
Modified: trunk/include/vki/vki-linux.h
===================================================================
--- trunk/include/vki/vki-linux.h 2009-10-27 09:01:43 UTC (rev 10906)
+++ trunk/include/vki/vki-linux.h 2009-10-27 09:19:26 UTC (rev 10907)
@@ -2570,7 +2570,58 @@
union vki_iwreq_data u;
};
+/*--------------------------------------------------------------------*/
+// From linux-2.6.31.5/include/linux/perf_counter.h
+/*--------------------------------------------------------------------*/
+struct vki_perf_counter_attr {
+
+ /*
+ * Major type: hardware/software/tracepoint/etc.
+ */
+ __vki_u32 type;
+
+ /*
+ * Size of the attr structure, for fwd/bwd compat.
+ */
+ __vki_u32 size;
+
+ /*
+ * Type specific configuration information.
+ */
+ __vki_u64 config;
+
+ union {
+ __vki_u64 sample_period;
+ __vki_u64 sample_freq;
+ };
+
+ __vki_u64 sample_type;
+ __vki_u64 read_format;
+
+ __vki_u64 disabled : 1, /* off by default */
+ inherit : 1, /* children inherit it */
+ pinned : 1, /* must always be on PMU */
+ exclusive : 1, /* only group on PMU */
+ exclude_user : 1, /* don't count user */
+ exclude_kernel : 1, /* ditto kernel */
+ exclude_hv : 1, /* ditto hypervisor */
+ exclude_idle : 1, /* don't count when idle */
+ mmap : 1, /* include mmap data */
+ comm : 1, /* include comm data */
+ freq : 1, /* use freq, not period */
+ inherit_stat : 1, /* per task counts */
+ enable_on_exec : 1, /* next exec enables */
+ task : 1, /* trace fork/exit */
+
+ __reserved_1 : 50;
+
+ __vki_u32 wakeup_events; /* wakeup every n events */
+ __vki_u32 __reserved_2;
+
+ __vki_u64 __reserved_3;
+};
+
#endif // __VKI_LINUX_H
/*--------------------------------------------------------------------*/
|
|
From: <sv...@va...> - 2009-10-27 09:01:53
|
Author: tom
Date: 2009-10-27 09:01:43 +0000 (Tue, 27 Oct 2009)
New Revision: 10906
Log:
Update linux system calls lists to match 2.6.31.5 kernel.
Modified:
trunk/coregrind/m_syswrap/syswrap-amd64-linux.c
trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c
trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c
trunk/coregrind/m_syswrap/syswrap-x86-linux.c
trunk/include/vki/vki-scnums-amd64-linux.h
trunk/include/vki/vki-scnums-ppc32-linux.h
trunk/include/vki/vki-scnums-ppc64-linux.h
trunk/include/vki/vki-scnums-x86-linux.h
Modified: trunk/coregrind/m_syswrap/syswrap-amd64-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-amd64-linux.c 2009-10-26 16:14:04 UTC (rev 10905)
+++ trunk/coregrind/m_syswrap/syswrap-amd64-linux.c 2009-10-27 09:01:43 UTC (rev 10906)
@@ -1376,6 +1376,11 @@
// (__NR_dup3, sys_ni_syscall) // 292
LINXY(__NR_pipe2, sys_pipe2) // 293
// (__NR_inotify_init1, sys_ni_syscall) // 294
+
+ // (__NR_preadv, sys_ni_syscall) // 295
+ // (__NR_pwritev, sys_ni_syscall) // 296
+ // (__NR_rt_tgsigqueueinfo, sys_ni_syscall) // 297
+ // (__NR_perf_counter_open, sys_ni_syscall) // 298
};
const UInt ML_(syscall_table_size) =
Modified: trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c 2009-10-26 16:14:04 UTC (rev 10905)
+++ trunk/coregrind/m_syswrap/syswrap-ppc32-linux.c 2009-10-27 09:01:43 UTC (rev 10906)
@@ -1868,6 +1868,10 @@
// (__NR_dup3, sys_ni_syscall) // 316
LINXY(__NR_pipe2, sys_pipe2) // 317
// (__NR_inotify_init1, sys_ni_syscall) // 318
+ // (__NR_perf_counter_open, sys_ni_syscall) // 319
+ // (__NR_preadv, sys_ni_syscall) // 320
+ // (__NR_pwritev, sys_ni_syscall) // 321
+ // (__NR_rt_tgsigqueueinfo, sys_ni_syscall) // 322
};
const UInt ML_(syscall_table_size) =
Modified: trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c 2009-10-26 16:14:04 UTC (rev 10905)
+++ trunk/coregrind/m_syswrap/syswrap-ppc64-linux.c 2009-10-27 09:01:43 UTC (rev 10906)
@@ -1508,6 +1508,10 @@
// (__NR_dup3, sys_ni_syscall) // 316
LINXY(__NR_pipe2, sys_pipe2) // 317
// (__NR_inotify_init1, sys_ni_syscall) // 318
+ // (__NR_perf_counter_open, sys_ni_syscall) // 319
+ // (__NR_preadv, sys_ni_syscall) // 320
+ // (__NR_pwritev, sys_ni_syscall) // 321
+ // (__NR_rt_tgsigqueueinfo, sys_ni_syscall) // 322
};
const UInt ML_(syscall_table_size) =
Modified: trunk/coregrind/m_syswrap/syswrap-x86-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-x86-linux.c 2009-10-26 16:14:04 UTC (rev 10905)
+++ trunk/coregrind/m_syswrap/syswrap-x86-linux.c 2009-10-27 09:01:43 UTC (rev 10906)
@@ -2255,6 +2255,11 @@
// (__NR_dup3, sys_ni_syscall) // 330
LINXY(__NR_pipe2, sys_pipe2) // 331
// (__NR_inotify_init1, sys_ni_syscall) // 332
+ // (__NR_preadv, sys_ni_syscall) // 333
+ // (__NR_pwritev, sys_ni_syscall) // 334
+
+ // (__NR_rt_tgsigqueueinfo, sys_ni_syscall) // 335
+ // (__NR_perf_counter_open, sys_ni_syscall) // 336
};
const UInt ML_(syscall_table_size) =
Modified: trunk/include/vki/vki-scnums-amd64-linux.h
===================================================================
--- trunk/include/vki/vki-scnums-amd64-linux.h 2009-10-26 16:14:04 UTC (rev 10905)
+++ trunk/include/vki/vki-scnums-amd64-linux.h 2009-10-27 09:01:43 UTC (rev 10906)
@@ -376,6 +376,10 @@
#define __NR_dup3 292
#define __NR_pipe2 293
#define __NR_inotify_init1 294
+#define __NR_preadv 295
+#define __NR_pwritev 296
+#define __NR_rt_tgsigqueueinfo 297
+#define __NR_perf_counter_open 298
#endif /* __VKI_SCNUMS_AMD64_LINUX_H */
Modified: trunk/include/vki/vki-scnums-ppc32-linux.h
===================================================================
--- trunk/include/vki/vki-scnums-ppc32-linux.h 2009-10-26 16:14:04 UTC (rev 10905)
+++ trunk/include/vki/vki-scnums-ppc32-linux.h 2009-10-27 09:01:43 UTC (rev 10906)
@@ -361,6 +361,10 @@
#define __NR_dup3 316
#define __NR_pipe2 317
#define __NR_inotify_init1 318
+#define __NR_perf_counter_open 319
+#define __NR_preadv 320
+#define __NR_pwritev 321
+#define __NR_rt_tgsigqueueinfo 322
#endif /* __VKI_SCNUMS_PPC32_LINUX_H */
Modified: trunk/include/vki/vki-scnums-ppc64-linux.h
===================================================================
--- trunk/include/vki/vki-scnums-ppc64-linux.h 2009-10-26 16:14:04 UTC (rev 10905)
+++ trunk/include/vki/vki-scnums-ppc64-linux.h 2009-10-27 09:01:43 UTC (rev 10906)
@@ -353,6 +353,10 @@
#define __NR_dup3 316
#define __NR_pipe2 317
#define __NR_inotify_init1 318
+#define __NR_perf_counter_open 319
+#define __NR_preadv 320
+#define __NR_pwritev 321
+#define __NR_rt_tgsigqueueinfo 322
#endif /* __VKI_SCNUMS_PPC64_LINUX_H */
Modified: trunk/include/vki/vki-scnums-x86-linux.h
===================================================================
--- trunk/include/vki/vki-scnums-x86-linux.h 2009-10-26 16:14:04 UTC (rev 10905)
+++ trunk/include/vki/vki-scnums-x86-linux.h 2009-10-27 09:01:43 UTC (rev 10906)
@@ -367,6 +367,10 @@
#define __NR_dup3 330
#define __NR_pipe2 331
#define __NR_inotify_init1 332
+#define __NR_preadv 333
+#define __NR_pwritev 334
+#define __NR_rt_tgsigqueueinfo 335
+#define __NR_perf_counter_open 336
#endif /* __VKI_SCNUMS_X86_LINUX_H */
|
|
From: Alexander P. <gl...@go...> - 2009-10-27 08:58:46
|
Nightly build on mcgrind ( Darwin 9.7.0 i386 ) Started at 2009-10-27 09:06:02 MSK Ended at 2009-10-27 09:52:12 MSK Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 433 tests, 22 stderr failures, 1 stdout failure, 0 post failures == memcheck/tests/null_socket (stdout) memcheck/tests/origin5-bz2 (stderr) memcheck/tests/varinfo1 (stderr) memcheck/tests/varinfo2 (stderr) memcheck/tests/varinfo3 (stderr) memcheck/tests/varinfo4 (stderr) memcheck/tests/varinfo5 (stderr) memcheck/tests/varinfo6 (stderr) none/tests/async-sigs (stderr) none/tests/faultstatus (stderr) none/tests/pth_blockedsig (stderr) helgrind/tests/hg03_inherit (stderr) helgrind/tests/hg04_race (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/rwlock_race (stderr) helgrind/tests/tc01_simple_race (stderr) helgrind/tests/tc05_simple_race (stderr) helgrind/tests/tc06_two_races (stderr) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc16_byterace (stderr) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc23_bogus_condwait (stderr) -- Alexander Potapenko Software Engineer Google Moscow |
|
From: Tom H. <th...@cy...> - 2009-10-27 03:49:59
|
Nightly build on vauxhall ( x86_64, Fedora 11 ) Started at 2009-10-27 03:20:05 GMT Ended at 2009-10-27 03:49:35 GMT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 540 tests, 6 stderr failures, 0 stdout failures, 0 post failures == memcheck/tests/linux/stack_switch (stderr) memcheck/tests/long_namespace_xml (stderr) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc23_bogus_condwait (stderr) exp-ptrcheck/tests/bad_percentify (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 540 tests, 7 stderr failures, 0 stdout failures, 0 post failures == memcheck/tests/linux/stack_switch (stderr) memcheck/tests/long_namespace_xml (stderr) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc23_bogus_condwait (stderr) drd/tests/qt4_semaphore (stderr) exp-ptrcheck/tests/bad_percentify (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Oct 27 03:34:55 2009 --- new.short Tue Oct 27 03:49:35 2009 *************** *** 8,10 **** ! == 540 tests, 7 stderr failures, 0 stdout failures, 0 post failures == memcheck/tests/linux/stack_switch (stderr) --- 8,10 ---- ! == 540 tests, 6 stderr failures, 0 stdout failures, 0 post failures == memcheck/tests/linux/stack_switch (stderr) *************** *** 14,16 **** helgrind/tests/tc23_bogus_condwait (stderr) - drd/tests/qt4_semaphore (stderr) exp-ptrcheck/tests/bad_percentify (stderr) --- 14,15 ---- |
|
From: Tom H. <th...@cy...> - 2009-10-27 03:49:01
|
Nightly build on lloyd ( x86_64, Fedora 7 ) Started at 2009-10-27 03:05:07 GMT Ended at 2009-10-27 03:48:43 GMT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 530 tests, 1 stderr failure, 1 stdout failure, 0 post failures == helgrind/tests/tc06_two_races_xml (stderr) drd/tests/pth_detached_sem (stdout) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 530 tests, 1 stderr failure, 0 stdout failures, 0 post failures == helgrind/tests/tc06_two_races_xml (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Oct 27 03:26:55 2009 --- new.short Tue Oct 27 03:48:43 2009 *************** *** 8,11 **** ! == 530 tests, 1 stderr failure, 0 stdout failures, 0 post failures == helgrind/tests/tc06_two_races_xml (stderr) --- 8,12 ---- ! == 530 tests, 1 stderr failure, 1 stdout failure, 0 post failures == helgrind/tests/tc06_two_races_xml (stderr) + drd/tests/pth_detached_sem (stdout) |
|
From: Tom H. <th...@cy...> - 2009-10-27 03:36:11
|
Nightly build on mg ( x86_64, Fedora 9 ) Started at 2009-10-27 03:10:05 GMT Ended at 2009-10-27 03:35:49 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 537 tests, 14 stderr failures, 0 stdout failures, 0 post failures == cachegrind/tests/chdir (stderr) cachegrind/tests/clreq (stderr) cachegrind/tests/dlclose (stderr) cachegrind/tests/notpower2 (stderr) cachegrind/tests/wrap5 (stderr) cachegrind/tests/x86/fpu-28-108 (stderr) callgrind/tests/notpower2-hwpref (stderr) callgrind/tests/notpower2-use (stderr) callgrind/tests/notpower2-wb (stderr) callgrind/tests/notpower2 (stderr) callgrind/tests/simwork1 (stderr) callgrind/tests/simwork2 (stderr) callgrind/tests/simwork3 (stderr) helgrind/tests/tc06_two_races_xml (stderr) |
|
From: <sv...@va...> - 2009-10-26 16:14:19
|
Author: bart
Date: 2009-10-26 16:14:04 +0000 (Mon, 26 Oct 2009)
New Revision: 10905
Log:
Removed the restriction that the size argument of drd_pre_mem_read_asciiz()
should be less than 4096 bytes. This function is called a.o. for the path
argument of the open() system call. This path can be longer than 4096 bytes.
Should fix bug #211941.
Modified:
trunk/drd/drd_main.c
Modified: trunk/drd/drd_main.c
===================================================================
--- trunk/drd/drd_main.c 2009-10-20 18:13:26 UTC (rev 10904)
+++ trunk/drd/drd_main.c 2009-10-26 16:14:04 UTC (rev 10905)
@@ -260,8 +260,6 @@
p++;
size++;
}
- // To do: find out what a reasonable upper limit on 'size' is.
- tl_assert(size < 4096);
if (size > 0)
{
DRD_(trace_load)(a, size);
|
|
From: Konstantin S. <kon...@gm...> - 2009-10-26 09:20:31
|
On Wed, Oct 21, 2009 at 1:54 AM, Julian Seward <js...@ac...> wrote: > On Wednesday 14 October 2009, Konstantin Serebryany wrote: > > On Wed, Oct 14, 2009 at 4:05 PM, Julian Seward <js...@ac...> wrote: > > > On Wednesday 14 October 2009, Konstantin Serebryany wrote: > > > > > I did not think about opening this file for the duration of the > > > > > run... > > > : > > > :) > > > : > > > > > I need to check the occupied memory very often so that the tool can > > > > > > ^^^^^^^^^^ > > > > > > Actually, you only need to check it when the process' mappings change, > > > or when sbrk happens, since that's the only way(s) the process can > > > acquire more memory. No need for spin-style polling. > > > > > > So .. get your tool to monitor the "new_mem_mmap" and "die_mem_mmap" > > > > This will notify me when the client program does mmap/brk. Right? > > Yes. > > > But I also need to watch for mmap/brk of valgrind itself. Is it possible? > > Hmm, good point. I didn't think of that. Not sure that's easily possible. > How about this Plan B: Get the scheduler to notify you of start/stop > of running of client code (probably you already do): > > void VG_(track_start_client_code)( > void(*f)(ThreadId tid, ULong blocks_dispatched) > ); > void VG_(track_stop_client_code)( > void(*f)(ThreadId tid, ULong blocks_dispatched) > ); > > and look at 'blocks_dispatched'. Whenever that changes by (eg) > more than one million, re-read /proc/self/whatever etc. > Maybe... But that's not any different from what I do know (read /proc/self every N-th event of some kind). --kcc > > J > |
|
From: Konstantin S. <kon...@gm...> - 2009-10-22 07:36:52
|
-valgrind-users+valgrind-developers I observe a situation where the number of invocations of PRE(sys_epoll_wait) is greater than the number of invocations of POST(sys_epoll_wait). Is that expected? This is causing memcheck to think that memory passed to epoll_wait() as a second parameter is left uninitialized... Thanks, --kcc On Tue, Oct 20, 2009 at 3:30 PM, Konstantin Serebryany < kon...@gm...> wrote: > Hi, > I am investigating a memcheck's report near a call to epoll_wait(). > I am running my program (sorry, not small test case) with > --trace-syscalls=yes. > > Usually I get this: > SYSCALL[29628,125](232) sys_epoll_wait ( 62, 0x1540ca30, 1024, 1000 ) --> > [async] ... > SYSCALL[29628,125](232) ... [async] --> Success(0x0:0x0) > I assume these two lines come from PRE(sys_epoll_wait) and > POST(sys_epoll_wait). > > But sometimes I get this: > SYSCALL[29628,156](232) sys_epoll_wait ( 96, 0x15948a30, 1024, 417 ) --> > [async] ... > SYSCALL[29628,156]( 15) sys_rt_sigreturn ( ) --> [pre-success] > NoWriteResult > > So, POST(sys_epoll_wait) does not get called and memcheck thinks that the > second parameter of epoll_wait is uninitialized. > > What does this sys_rt_sigreturn mean? Why POST(sys_epoll_wait) is not > called? > Any idea? > > Thanks, > > --kcc > > > > > |
|
From: Konstantin S. <kon...@gm...> - 2009-10-22 05:56:46
|
Hi,
Here is a small bug which leads to memcheck false positives on x86_64.
In short, sizeof(siginfo_t)==136, while it needs to be 128.
Would you mind fixing this (see patch below)?
Test:
$ cat sigqueue_test.c
#include <signal.h>
#include <syscall.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
int main() {
siginfo_t *si;
const size_t sz = sizeof(*si);
printf("sizeof(*si) = %lu\n", sz);
printf("%ld %ld %ld %ld\n",
(char*)&si->si_signo - (char*)si,
(char*)&si->si_errno - (char*)si,
(char*)&si->si_code - (char*)si,
(char*)&si->_sifields - (char*)si
);
si = malloc(sz);
memset(si, 0, sz);
si->si_signo = SIGWINCH;
si->si_code = SI_QUEUE;
si->si_pid = getpid();
si->si_uid = getuid();
syscall(__NR_rt_sigqueueinfo, getpid(), SIGWINCH, si);
return 0;
}
$ gcc -g sigqueue_test.c && ./a.out && ~/valgrind/trunk/inst/bin/valgrind
./a.out
sizeof(*si) = 128
0 4 8 16
==13294== Memcheck, a memory error detector
==13294== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==13294== Using Valgrind-3.6.0.SVN and LibVEX; rerun with -h for copyright
info
==13294== Command: ./a.out
==13294==
sizeof(*si) = 128
0 4 8 16
==13294== Syscall param rt_sigqueueinfo(uinfo) points to unaddressable
byte(s)
==13294== at 0x4EE82E9: syscall (in /usr/grte/v1/lib64/libc-2.3.6.so)
==13294== by 0x400750: main (sigqueue_test.c:24)
==13294== Address 0x516a0c0 is 0 bytes after a block of size 128 alloc'd
==13294== at 0x4C1BE27: malloc (vg_replace_malloc.c:195)
==13294== by 0x4006DB: main (sigqueue_test.c:18)
==13294==
==13294==
==13294== HEAP SUMMARY:
==13294== in use at exit: 128 bytes in 1 blocks
==13294== total heap usage: 1 allocs, 0 frees, 128 bytes allocated
==13294==
==13294== LEAK SUMMARY:
==13294== definitely lost: 128 bytes in 1 blocks
==13294== indirectly lost: 0 bytes in 0 blocks
==13294== possibly lost: 0 bytes in 0 blocks
==13294== still reachable: 0 bytes in 0 blocks
==13294== suppressed: 0 bytes in 0 blocks
==13294== Rerun with --leak-check=full to see details of leaked memory
==13294==
==13294== For counts of detected and suppressed errors, rerun with: -v
==13294== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 5 from 5)
Fix (something like):
Index: include/vki/vki-linux.h
===================================================================
--- include/vki/vki-linux.h (revision 10904)
+++ include/vki/vki-linux.h (working copy)
@@ -340,16 +340,17 @@
void __user *sival_ptr;
} vki_sigval_t;
-#ifndef __VKI_ARCH_SI_PREAMBLE_SIZE
-#define __VKI_ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int))
-#endif
-
#define VKI_SI_MAX_SIZE 128
#ifndef VKI_SI_PAD_SIZE
-#define VKI_SI_PAD_SIZE ((VKI_SI_MAX_SIZE -
__VKI_ARCH_SI_PREAMBLE_SIZE) / sizeof(int))
+# if defined (VGA_amd64) // or whatever is right for 64-bit arch.
+# define VKI_SI_PAD_SIZE ((VKI_SI_MAX_SIZE / sizeof (int)) - 4)
+# else
+# define VKI_SI_PAD_SIZE ((VKI_SI_MAX_SIZE / sizeof (int)) - 3)
+# endif
#endif
+
#ifndef __VKI_ARCH_SI_UID_T
#define __VKI_ARCH_SI_UID_T vki_uid_t
#endif
Thanks,
--kcc
|
|
From: Alexander P. <gl...@go...> - 2009-10-21 07:55:41
|
Nightly build on mcgrind ( Darwin 9.7.0 i386 ) Started at 2009-10-21 09:06:01 MSD Ended at 2009-10-21 09:46:09 MSD Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 433 tests, 22 stderr failures, 1 stdout failure, 0 post failures == memcheck/tests/null_socket (stdout) memcheck/tests/origin5-bz2 (stderr) memcheck/tests/varinfo1 (stderr) memcheck/tests/varinfo2 (stderr) memcheck/tests/varinfo3 (stderr) memcheck/tests/varinfo4 (stderr) memcheck/tests/varinfo5 (stderr) memcheck/tests/varinfo6 (stderr) none/tests/async-sigs (stderr) none/tests/faultstatus (stderr) none/tests/pth_blockedsig (stderr) helgrind/tests/hg03_inherit (stderr) helgrind/tests/hg04_race (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/rwlock_race (stderr) helgrind/tests/tc01_simple_race (stderr) helgrind/tests/tc05_simple_race (stderr) helgrind/tests/tc06_two_races (stderr) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc16_byterace (stderr) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc23_bogus_condwait (stderr) -- Alexander Potapenko Software Engineer Google Moscow |