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
(6) |
2
(3) |
3
|
4
(3) |
5
(10) |
6
(4) |
7
(5) |
|
8
(1) |
9
(3) |
10
(11) |
11
(18) |
12
(13) |
13
(4) |
14
(11) |
|
15
(12) |
16
(6) |
17
(1) |
18
(13) |
19
(14) |
20
(12) |
21
(3) |
|
22
(17) |
23
(18) |
24
(17) |
25
(24) |
26
(15) |
27
(7) |
28
(23) |
|
29
(31) |
|
|
|
|
|
|
|
From: Tom H. <th...@cy...> - 2004-02-29 03:09:45
|
Nightly build on standard ( Red Hat 7.2 ) started at 2004-02-29 03:00:02 GMT Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow corecheck/tests/fdleak_ipv4 (stderr) corecheck/tests/fdleak_open (stderr) corecheck/tests/fdleak_pipe (stderr) corecheck/tests/fdleak_socketpair (stderr) corecheck/tests/pth_atfork1 (stdout) corecheck/tests/pth_atfork1 (stderr) corecheck/tests/pth_cancel2 (stderr) corecheck/tests/pth_cvsimple (stdout) corecheck/tests/pth_cvsimple (stderr) corecheck/tests/pth_exit (stderr) corecheck/tests/res_search (stdout) helgrind/tests/inherit (stderr) memcheck/tests/badfree-2trace (stderr) memcheck/tests/execve (stderr) memcheck/tests/writev (stderr) none/tests/pth_blockedsig (stdout) none/tests/pth_blockedsig (stderr) none/tests/yield (stdout) none/tests/yield (stderr) |
|
From: Nicholas N. <nj...@ca...> - 2004-02-29 01:34:48
|
On Sun, 29 Feb 2004, Julian Seward wrote: > > I think all the other problems could be handled by allowing multiple > > expected outputs, as Julian suggested. I'll look into changing the > > script. The only question is if you have multiple acceptable outputs, if > > none of them match, which do you use to form the .diff file? I figure > > it can give a .diff for every acceptable output, eg. .diff, .diff2, > > .diff3... > > I'd vote for that, viz, one .diff file for each acceptable output. Done. N |
|
From: Nicholas N. <nj...@ca...> - 2004-02-29 01:34:37
|
CVS commit by nethercote:
Allow multiple .exp files, eg. foo.stderr.exp, foo.stderr.exp2; test will pass
as long as one matches.
M +48 -25 vg_regtest.in 1.19
--- valgrind/tests/vg_regtest.in #1.18:1.19
@@ -55,10 +55,10 @@
# always change, eg. process id numbers.
#
-# Expected stdout (filtered) is kept in <test>.stdout.exp. It can be missing
-# if it would be empty. Expected stderr (filtered) is kept in
-# <test>.stderr.exp.
+# Expected stdout (filtered) is kept in <test>.stdout.exp[0-9]? (can be more
+# than one expected output). It can be missing if it would be empty. Expected
+# stderr (filtered) is kept in <test>.stderr.exp[0-9]?.
#
# If results don't match, the output can be found in <test>.std<strm>.out,
-# and the diff between expected and actual in <test>.std<strm>.diff.
+# and the diff between expected and actual in <test>.std<strm>.diff[0-9]?.
#
# Notes on adding regression tests for a new tool are in
@@ -218,4 +218,37 @@
}
+# Compare output against expected output; it should match at least one of
+# them.
+sub do_diffs($$$$)
+{
+ my ($fullname, $name, $mid, $f_exps) = @_;
+
+ for my $f_exp (@$f_exps) {
+ (-r $f_exp) or die "Could not read `$f_exp'\n";
+
+ my $n = "";
+ if ($f_exp =~ /.*\.exp(\d?)/) {
+ $n = $1;
+ } else {
+ $n = "";
+ ($f_exp eq "/dev/null") or die "Unexpected .exp file: $f_exp\n";
+ }
+
+ #print("diff -C0 $f_exp $name.$mid.out > $name.$mid.diff$n\n");
+ mysystem("diff -C0 $f_exp $name.$mid.out > $name.$mid.diff$n");
+
+ if (not -s "$name.$mid.diff$n") {
+ # A match; remove .out and any previously created .diff files.
+ unlink("$name.$mid.out");
+ unlink(<$name.$mid.diff*>);
+ return;
+ }
+ }
+ # If we reach here, none of the .exp files matched.
+ print "*** $name failed ($mid) ***\n";
+ push(@failures, sprintf("%-40s ($mid)", "$fullname"));
+ $num_failures{$mid}++;
+}
+
sub do_one_test($$)
{
@@ -246,25 +279,15 @@
rename($tmp, "$name.stderr.out");
- # If stdout expected empty, .exp file might be missing so diff with
- # /dev/null
- my $stdout_exp = ( -r "$name.stdout.exp"
- ? "$name.stdout.exp"
- : "/dev/null" );
-
- my $stderr_exp = "$name.stderr.exp";
- (-r $stderr_exp) or die "Could not read `$stderr_exp'\n";
-
- mysystem("diff -C0 $stdout_exp $name.stdout.out > $name.stdout.diff");
- mysystem("diff -C0 $stderr_exp $name.stderr.out > $name.stderr.diff");
-
- for my $ext ("stdout", "stderr") {
- if (-s "$name.$ext.diff") {
- print "*** $name failed ($ext) ***\n";
- push(@failures, sprintf("%-40s ($ext)", "$fullname"));
- $num_failures{$ext}++;
- } else {
- unlink("$name.$ext.out", "$name.$ext.diff");
- }
- }
+
+ # Find all the .stdout.exp files. If none, use /dev/null.
+ my @stdout_exps = <$name.stdout.exp*>;
+ @stdout_exps = ( "/dev/null" ) if (0 == scalar @stdout_exps);
+
+ # Find all the .stderr.exp files. $name.stderr.exp must exist.
+ my @stderr_exps = <$name.stderr.exp*>;
+ (-r "$name.stderr.exp") or die "Could not read `$name.stderr.exp'\n";
+
+ do_diffs($fullname, $name, "stdout", \@stdout_exps);
+ do_diffs($fullname, $name, "stderr", \@stderr_exps);
$num_tests_done++;
}
|
|
From: Julian S. <js...@ac...> - 2004-02-29 01:03:52
|
> I think all the other problems could be handled by allowing multiple > expected outputs, as Julian suggested. I'll look into changing the > script. The only question is if you have multiple acceptable outputs, if > none of them match, which do you use to form the .diff file? I figure > it can give a .diff for every acceptable output, eg. .diff, .diff2, > .diff3... I'd vote for that, viz, one .diff file for each acceptable output. J |
|
From: Nicholas N. <nj...@ca...> - 2004-02-29 00:22:40
|
On Sat, 28 Feb 2004, Tom Hughes wrote: > The one in helgrind/tests/inherit is down to it failing to print > the "XXX We expect an error on inherit.c:48" message but I can't > quite work out where that comes from anyway. To be honest I don't > think I've ever seen that test pass anywhere. That confused me too. The test is meant to fail, the message is a "fixme" that indicates what the expected output should be, ie. Helgrind should give an error but it doesn't. The right way to handle this is to have a way of marking a test as a known failure; that way we don't get reports about it failing, but it's clearly marked as doing the wrong thing. > The fdleak_ failures are caused by the overnight tests being run from > cron and getting /dev/null as standard input which is explicitly left > alone by the filter script and hence the output doesn't match the > expected results which are designed for running from a terminal where > the terminal name would get filtered out. I understood that paragraph up to "standard input", but the rest lost me. How is the filter script interacting with /dev/null? How does the terminal name get filtered out? Sorry if I'm being dense. > + valgrind's libpthread.so: init_libc_tsd_keys: lock > + Please report this bug at: valgrind.kde.org > > Which is a bit odd, because from looking at the code it means that > the attempt to lock the mutex in init_libc_tsd_keys is failing for > some reason. Hmm, I don't know about that one. > > There is also a new assertion firing in some tests: > > > > + valgrind: vg_libpthread.c:... (pthread_cond_init): Assertion `sizeof(*cond) >= > > sizeof(vg_pthread_cond_t)' failed. > > > > Presumably pthread_cond_t is a bit smaller in glibc 2.2 or something. > > Indeed. Having checked, it looks like the padding was only added > to pthread_cond_t in recent glibc's. I've commented out the padding and committed the change. I don't imagine it will break anything, since those padding fields are unused by Valgrind. > Virtually every test on RH7.3 is failing with a series of errors > like this: > > + warning: line info addresses out of order at entry 939: 0x........ 0x........ > + warning: line info addresses out of order at entry 943: 0x........ 0x........ We could remove such lines using the basic filter. Or not spit out the warning if it's not important. I think all the other problems could be handled by allowing multiple expected outputs, as Julian suggested. I'll look into changing the script. The only question is if you have multiple acceptable outputs, if none of them match, which do you use to form the .diff file? I figure it can give a .diff for every acceptable output, eg. .diff, .diff2, .diff3... N |
|
From: Nicholas N. <nj...@ca...> - 2004-02-29 00:01:17
|
On Sat, 28 Feb 2004, Robert Walsh wrote: > > Any other show-stoppers? > > If your code overrides operator new(), then 73655 is going to bite you. > I don't know how common this is, but it's definitely stopping us from > using Valgrind on our compiler at the moment. Was that introduced with Jeremy's FV changes, ie. do 2.0.0/2.1.0 work ok? > I think I know how to fix this - I just haven't sat down and thought it > through yet. Drop me an email if you want to hear to gory details. I'd be interested to hear, and you might as well tell the group while you're at it? Actually, I'm not certain what the problem is -- if a program overrides new or new[], is the idea that Valgrind's new/new[] should *not* be called... but sometimes it is? N |
|
From: Nicholas N. <nj...@ca...> - 2004-02-28 23:38:59
|
CVS commit by nethercote: Clarify CVS instructions. M +2 -0 cvs.html 1.6 --- devel-home/valgrind/cvs.html #1.5:1.6 @@ -9,4 +9,6 @@ to check out the HEAD from our CVS repository; the <em>modulename</em> is <code>valgrind</code>. Note particularly the information about mirrors. +Once you have checked out the code, follow the instructions in the README +to install. <p> Or, you can <a href="http://webcvs.kde.org/cgi-bin/cvsweb.cgi/valgrind/"> |
|
From: Nicholas N. <nj...@ca...> - 2004-02-28 23:35:36
|
CVS commit by nethercote:
Adjust vg_pthread_cond_t so it works with an older glibc.
M +8 -3 vg_include.h 1.184
--- valgrind/coregrind/vg_include.h #1.183:1.184
@@ -672,8 +672,13 @@ typedef struct
struct _vg_pthread_fastlock __vg_c_lock; /* Protect against concurrent access */
/*_pthread_descr*/ void* __vg_c_waiting; /* Threads waiting on this condition */
+
+ // Nb: the following padding removed because it was missing from an
+ // earlier glibc, so the size test in the CONVERT macro was failing.
+ // --njn
+
// Padding ensures the size is 48 bytes
- char __vg_padding[48 - sizeof(struct _vg_pthread_fastlock)
+ /*char __vg_padding[48 - sizeof(struct _vg_pthread_fastlock)
- sizeof(void*) - sizeof(long long)];
- long long __vg_align;
+ long long __vg_align;*/
} vg_pthread_cond_t;
|
|
From: Dirk M. <mu...@kd...> - 2004-02-28 21:25:18
|
CVS commit by mueller:
adding suppressions for Redhat 7.2, patch by Tom Hughes
M +38 -15 glibc-2.2.supp 1.22
--- valgrind/glibc-2.2.supp #1.21:1.22
@@ -155,19 +155,27 @@
#-------- Data races
-#{
-# _dl_lookup_symbol/fixup/_dl_runtime_resolve
-# helgrind:Eraser
-# fun:_dl_lookup_symbol
-# fun:fixup
-# fun:_dl_runtime_resolve
-#}
-#
-#{
-# _dl_lookup_versioned_symbol/fixup/_dl_runtime_resolve
-# helgrind:Eraser
-# fun:_dl_lookup_versioned_symbol
-# fun:fixup
-# fun:_dl_runtime_resolve
-#}
+{
+ _dl_lookup_symbol/fixup/_dl_runtime_resolve
+ Helgrind:Eraser
+ fun:_dl_lookup_symbol
+ fun:fixup
+ fun:_dl_runtime_resolve
+}
+
+{
+ _dl_lookup_versioned_symbol/fixup/_dl_runtime_resolve
+ Helgrind:Eraser
+ fun:_dl_lookup_versioned_symbol
+ fun:fixup
+ fun:_dl_runtime_resolve
+}
+
+{
+ _dl_fini/exit/__libc_start_main
+ Helgrind:Eraser
+ fun:_dl_fini
+ fun:exit
+ fun:__libc_start_main
+}
#-------- Threading bugs?
@@ -335,4 +343,12 @@
fun:_dl_catch_error
}
+{
+ _dl_relocate_object/dl_main/_dl_sysdep_start/_dl_start_final(Cond)
+ Memcheck:Cond
+ fun:_dl_relocate_object
+ fun:dl_main
+ fun:_dl_sysdep_start
+ fun:_dl_start_final
+}
{
@@ -344,4 +360,11 @@
}
+{
+ _dl_init/ld-2.2.4.so(Cond)
+ Memcheck:Cond
+ fun:_dl_start
+ obj:/lib/ld-2.2.4.so
+}
+
#-------------------
{
|
|
From: Robert W. <rj...@du...> - 2004-02-28 20:58:13
|
> Any other show-stoppers? If your code overrides operator new(), then 73655 is going to bite you.=20 I don't know how common this is, but it's definitely stopping us from using Valgrind on our compiler at the moment. I think I know how to fix this - I just haven't sat down and thought it through yet. Drop me an email if you want to hear to gory details. Regards, Robert. --=20 Robert Walsh Amalgamated Durables, Inc. - "We don't make the things you buy." Email: rj...@du... |
|
From: Julian S. <js...@ac...> - 2004-02-28 19:19:59
|
[discussion of regtest failures] I suspect the regtest system would be more robust if we allowed multiple acceptable test results. What I mean is, instead of the required stderr output being in testname.stderr.exp, we also allow testname.stderr.exp1, testname.stderr.exp2, etc, and the test passes if the stderr matches any of these files. Ditto for the .stdout.exp files. This makes it robust against the problem where due to minor glibc differences etc in distros, fixing it on one disto breaks it on others -- which is the root cause I reckon of a lot of the breakage. Comments? J |
|
From: Tom H. <th...@cy...> - 2004-02-28 18:24:06
|
In message <Pin...@re...>
Nicholas Nethercote <nj...@ca...> wrote:
> Here are what I see as the current issues w.r.t a 2.1.1 release:
>
> - Dirk's ulimit problem: Dirk, did Jeremy's commit fix this?
It certainly looks like it is fixed here.
> - The stale/zombie thread problem: Any ideas on how to fix? Jeremy?
Well there is the fix posted to the users list, but it isn't
particularly nice.
> - Tom's regression failures: lots for the RH test boxes. Any ideas what
> is causing them, Tom?
I've been through these and posted some information and few patches.
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|
|
From: Tom H. <th...@cy...> - 2004-02-28 18:20:59
|
In message <E1A...@al...>
Tom Hughes <th...@cy...> wrote:
> Last 20 lines of log.verbose follow
>
> none/tests/insn_mmxext (stderr)
> none/tests/insn_sse (stderr)
> none/tests/map_unmap (stderr)
> none/tests/mremap (stderr)
> none/tests/munmap_exe (stderr)
> none/tests/pth_blockedsig (stderr)
> none/tests/rcl_assert (stderr)
> none/tests/rcrl (stderr)
> none/tests/readline1 (stderr)
> none/tests/resolv (stderr)
> none/tests/seg_override (stderr)
> none/tests/sha1_test (stderr)
> none/tests/shortpush (stderr)
> none/tests/shorts (stderr)
> none/tests/smc1 (stderr)
> none/tests/syscall-restart1 (stderr)
> none/tests/syscall-restart2 (stderr)
> none/tests/system (stderr)
> none/tests/yield (stderr)
Virtually every test on RH7.3 is failing with a series of errors
like this:
+ warning: line info addresses out of order at entry 939: 0x........ 0x........
+ warning: line info addresses out of order at entry 943: 0x........ 0x........
+ warning: line info addresses out of order at entry 1012: 0x........ 0x........
+ warning: line info addresses out of order at entry 1015: 0x........ 0x........
+ warning: line info addresses out of order at entry 1313: 0x........ 0x........
I seem to recall there was some discussion of those recently...
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|
|
From: Tom H. <th...@cy...> - 2004-02-28 18:19:57
|
In message <0aa...@lo...>
Tom Hughes <th...@cy...> wrote:
> There is also a new assertion firing in some tests:
>
> + valgrind: vg_libpthread.c:... (pthread_cond_init): Assertion `sizeof(*cond) >=
> sizeof(vg_pthread_cond_t)' failed.
>
> Presumably pthread_cond_t is a bit smaller in glibc 2.2 or something.
Indeed. Having checked, it looks like the padding was only added
to pthread_cond_t in recent glibc's. On RH7.2 and 7.3 we have this:
/* Conditions (not abstract because of PTHREAD_COND_INITIALIZER */
typedef struct
{
struct _pthread_fastlock __c_lock; /* Protect against concurrent access */
_pthread_descr __c_waiting; /* Threads waiting on this condition */
} pthread_cond_t;
but by RH8.0 it has become this:
typedef struct
{
struct _pthread_fastlock __c_lock; /* Protect against concurrent access */
_pthread_descr __c_waiting; /* Threads waiting on this condition */
char __padding[48 - sizeof (struct _pthread_fastlock)
- sizeof (_pthread_descr) - sizeof (__pthread_cond_align_t)];
__pthread_cond_align_t __align;
} pthread_cond_t;
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|
|
From: Tom H. <th...@cy...> - 2004-02-28 18:16:03
|
In message <E1A...@st...>
Tom Hughes <th...@cy...> wrote:
> Last 20 lines of log.verbose follow
>
> memcheck/tests/pushfpopf (stderr)
> memcheck/tests/realloc1 (stderr)
> memcheck/tests/realloc2 (stderr)
> memcheck/tests/realloc3 (stderr)
> memcheck/tests/sigaltstack (stderr)
> memcheck/tests/signal2 (stderr)
> memcheck/tests/supp1 (stderr)
> memcheck/tests/supp2 (stderr)
> memcheck/tests/suppfree (stderr)
> memcheck/tests/threadederrno (stderr)
> memcheck/tests/trivialleak (stderr)
> memcheck/tests/tronical (stderr)
> memcheck/tests/weirdioctl (stderr)
> memcheck/tests/writev (stderr)
> memcheck/tests/zeropage (stderr)
> none/tests/pth_blockedsig (stdout)
> none/tests/pth_blockedsig (stderr)
> none/tests/yield (stdout)
> none/tests/yield (stderr)
There are a number of failures here of this form:
***************
*** 2 ****
--- 3,7 ----
+ valgrind's libpthread.so: init_libc_tsd_keys: lock
+ Please report this bug at: valgrind.kde.org
Which is a bit odd, because from looking at the code it means that
the attempt to lock the mutex in init_libc_tsd_keys is failing for
some reason.
There are also a number that look something like this:
***************
*** 5 ****
! at 0x........: fcntl (in /...libc...)
--- 5 ----
! at 0x........: fcntl (../sysdeps/unix/sysv/linux/i386/fcntl.c:49)
Which are presumably caused by the C library having debugging symbols
in it for some reason.
Some are caused by a couple of rules being commented out in glibc-2.2.supp
for some reason - possibly due to a typo in the rules. A patch for that is
attached - it also adds a couple of new suppressions that are needed.
There is also a new assertion firing in some tests:
+ valgrind: vg_libpthread.c:... (pthread_cond_init): Assertion `sizeof(*cond) >=
sizeof(vg_pthread_cond_t)' failed.
Presumably pthread_cond_t is a bit smaller in glibc 2.2 or something.
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|
|
From: mindcrime <min...@in...> - 2004-02-28 17:27:08
|
Hi guys. My name is Rajesh and I am a student of Computer Sci in India. I want to write a valgrind like utility for Windows. I know I sound silly but How do I start? I am sorry if I am bothering u guys Yours, RajeshIndiatimes Email now powered by APIC Advantage. Help! HelpClick onthe image to chat with me |
|
From: Tom H. <th...@cy...> - 2004-02-28 17:22:54
|
In message <E1A...@du...>
Tom Hughes <to...@co...> wrote:
> == 126 tests, 15 stderr failures, 1 stdout failure =================
> corecheck/tests/fdleak_cmsg (stderr)
> corecheck/tests/fdleak_creat (stderr)
> corecheck/tests/fdleak_dup (stderr)
> corecheck/tests/fdleak_dup2 (stderr)
> corecheck/tests/fdleak_fcntl (stderr)
> corecheck/tests/fdleak_ipv4 (stderr)
> corecheck/tests/fdleak_open (stderr)
> corecheck/tests/fdleak_pipe (stderr)
> corecheck/tests/fdleak_socketpair (stderr)
> helgrind/tests/inherit (stderr)
> memcheck/tests/buflen_check (stderr)
> memcheck/tests/execve (stderr)
> memcheck/tests/fwrite (stderr)
> memcheck/tests/weirdioctl (stderr)
> memcheck/tests/writev (stderr)
> none/tests/exec-sigmask (stdout)
Most of these are failures of this form (the exact system call varies):
***************
*** 5 ****
! at 0x........: accept (in /...libc...)
--- 5 ----
! at 0x........: _dl_sysinfo_int80 (in /lib/ld-2.3.2.so)
This is down to the FC1 kernel/glibc combination making use of the sysinfo
page so that all system calls appear to occur in _dl_sysinfo_int80 but I did
think that Jeremy had put a hack in valgrind to make it back out to the next
function in that case when printing the stack trace.
The helgrind inherit test is as discussed in the RH 8 analysis and the
only other failure is none/tests/exec-sigmask which is reporting this:
***************
*** 0 ****
--- 1 ----
+ signal 32 missing from mask
I suspect something in glibc is removing signal 32 from the mask during
the exec or something, given that glibc uses that signal itself.
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|
|
From: Tom H. <th...@cy...> - 2004-02-28 17:16:58
|
In message <E1A...@au...> you wrote: > == 126 tests, 12 stderr failures, 0 stdout failures ================= > corecheck/tests/fdleak_cmsg (stderr) > corecheck/tests/fdleak_creat (stderr) > corecheck/tests/fdleak_dup (stderr) > corecheck/tests/fdleak_dup2 (stderr) > corecheck/tests/fdleak_fcntl (stderr) > corecheck/tests/fdleak_ipv4 (stderr) > corecheck/tests/fdleak_open (stderr) > corecheck/tests/fdleak_pipe (stderr) > corecheck/tests/fdleak_socketpair (stderr) > helgrind/tests/inherit (stderr) > massif/tests/true_html (stderr) > massif/tests/true_text (stderr) The fdleak_ failures are caused by the overnight tests being run from cron and getting /dev/null as standard input which is explicitly left alone by the filter script and hence the output doesn't match the expected results which are designed for running from a terminal where the terminal name would get filtered out. The helgrind inherit test is as I mentioned in the RH8 results, and the massif failures have already been discussed and have an open bug. Tom -- Tom Hughes (th...@cy...) Software Engineer, Cyberscience Corporation http://www.cyberscience.com/ |
|
From: Tom H. <th...@cy...> - 2004-02-28 17:02:37
|
In message <E1A...@gi...>
Tom Hughes <th...@cy...> wrote:
> == 126 tests, 17 stderr failures, 0 stdout failures =================
> corecheck/tests/fdleak_cmsg (stderr)
> corecheck/tests/fdleak_creat (stderr)
> corecheck/tests/fdleak_dup (stderr)
> corecheck/tests/fdleak_dup2 (stderr)
> corecheck/tests/fdleak_fcntl (stderr)
> corecheck/tests/fdleak_ipv4 (stderr)
> corecheck/tests/fdleak_open (stderr)
> corecheck/tests/fdleak_pipe (stderr)
> corecheck/tests/fdleak_socketpair (stderr)
> helgrind/tests/allok (stderr)
> helgrind/tests/deadlock (stderr)
> helgrind/tests/inherit (stderr)
> helgrind/tests/race (stderr)
> helgrind/tests/race2 (stderr)
> helgrind/tests/readshared (stderr)
> memcheck/tests/nanoleak (stderr)
> memcheck/tests/writev (stderr)
A number of these are down to a data races in _dl_lookup_versioned_symbol
which looks like something we already have a suppression for, but in a
slightly different place due to a different glibc version. A patch to
suppress these is attached.
Several others are down to this difference:
***************
*** 7 ****
! by 0x........: do__quit (vg_scheduler.c:...)
--- 7 ----
! by 0x........: ??? (vg_scheduler.c:...)
The one in helgrind/tests/inherit is down to it failing to print
the "XXX We expect an error on inherit.c:48" message but I can't
quite work out where that comes from anyway. To be honest I don't
think I've ever seen that test pass anywhere.
The one in memcheck/tests/nanoleak is because the leak is being
reported as a possible leak, not a definite leak so presumably it
is finding something looks like a pointer into the middle of the
block somewhere.
The last one is down to this, presumably due to a lack of symbols
in the C library on that system:
***************
*** 4 ****
! at 0x........: writev (in /...libc...)
--- 4 ----
! at 0x........: (within /lib/i686/libc-2.3.2.so)
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|
|
From: Nicholas N. <nj...@ca...> - 2004-02-28 16:28:36
|
Hi, Here are what I see as the current issues w.r.t a 2.1.1 release: - Dirk's ulimit problem: Dirk, did Jeremy's commit fix this? - The stale/zombie thread problem: Any ideas on how to fix? Jeremy? - Bug 69616, the glibc 2.3.3 pthreadtypes.h problem: I just committed a fix, which hopefully puts that behind us. - Tom's regression failures: lots for the RH test boxes. Any ideas what is causing them, Tom? I'd also like the FAQ to be updated and possibly rearranged, but that's not crucial. Any other show-stoppers? N |
|
From: Nicholas N. <nj...@ca...> - 2004-02-28 15:43:57
|
CVS commit by nethercote:
Some newer systems have a new version of pthreadtypes.h that comes from glibc
2.3.3, which is binary-compatible, but not source compatible with the old one,
which came from LinuxThreads. We were using the types defined in the old one,
which caused compilation errors on systems using the new one.
This commit introduces our own versions of these types. Our versions are laid
out identically to the LinuxThreads ones, but the field names are different.
We convert all pthread types to our versions before using them, so we don't
rely on the pthreadtypes.h types any more. Hopefully this will fix the
problem; I have three reports that it does. Let's see...
M +37 -1 vg_include.h 1.183
M +221 -77 vg_libpthread.c 1.145
M +80 -108 vg_scheduler.c 1.142
--- valgrind/coregrind/vg_include.h #1.182:1.183
@@ -645,4 +645,39 @@ extern Addr VG_(do_useseg) ( UInt seg_se
/* ---------------------------------------------------------------------
+ Exports of vg_libpthread.c
+ ------------------------------------------------------------------ */
+
+/* Replacements for pthread types, shared between vg_libpthread.c and
+ vg_scheduler.c. See comment in vg_libpthread.c above the other
+ vg_pthread_*_t types for a description of how these are used. */
+
+struct _vg_pthread_fastlock
+{
+ long int __vg_status; /* "Free" or "taken" or head of waiting list */
+ int __vg_spinlock; /* Used by compare_and_swap emulation. Also,
+ adaptive SMP lock stores spin count here. */
+};
+
+typedef struct
+{
+ int __vg_m_reserved; /* Reserved for future use */
+ int __vg_m_count; /* Depth of recursive locking */
+ /*_pthread_descr*/ void* __vg_m_owner; /* Owner thread (if recursive or errcheck) */
+ int __vg_m_kind; /* Mutex kind: fast, recursive or errcheck */
+ struct _vg_pthread_fastlock __vg_m_lock; /* Underlying fast lock */
+} vg_pthread_mutex_t;
+
+typedef struct
+{
+ struct _vg_pthread_fastlock __vg_c_lock; /* Protect against concurrent access */
+ /*_pthread_descr*/ void* __vg_c_waiting; /* Threads waiting on this condition */
+ // Padding ensures the size is 48 bytes
+ char __vg_padding[48 - sizeof(struct _vg_pthread_fastlock)
+ - sizeof(void*) - sizeof(long long)];
+ long long __vg_align;
+} vg_pthread_cond_t;
+
+
+/* ---------------------------------------------------------------------
Exports of vg_scheduler.c
------------------------------------------------------------------ */
@@ -703,5 +738,5 @@ typedef
the condition variable indicated by the .associated_cv field.
In all other cases, should be NULL. */
- void* /*pthread_mutex_t* */ associated_mx;
+ vg_pthread_mutex_t* associated_mx;
/* When .status == WaitCV, points to the condition variable I am
--- valgrind/coregrind/vg_libpthread.c #1.144:1.145
@@ -83,4 +83,86 @@
/* ---------------------------------------------------------------------
+ Our own definition of types that vary between LinuxThreads and NPTL.
+ ------------------------------------------------------------------ */
+
+/* Moving from LinuxThreads to NPTL, several crucial types (eg.
+ pthread_mutex_t, pthread_mutexattr_t, etc) in pthreadtypes.h were changed
+ in binary-compatible, but source-incompatible, ways. We can similarly
+ use any layout we want, so long as it's binary-compatible. However, we
+ can no longer use the LinuxThreads types, because they won't work on NPTL
+ systems. Thus, we have to introduce a layer of indirection, and define
+ our own versions of these types (vg_pthread_mutex_t, etc). NPTL does
+ pretty much the same thing, and it keeps many of its internal types
+ secret.
+
+ We can layout our types however we want, as long as we put the small
+ number of fields in the right place for binary compatibility (eg.
+ mutex->kind). To make life easy, our versions have the exact same layout
+ as the LinuxThreads ones; only the type names and field names are
+ different (they differ only by include "vg" at the start).
+
+ In our implementation of the pthread operations (pthread_mutex_lock(),
+ pthread_mutexattr_settype(), etc) we always cast the standard pthread
+ types to our own types, (eg. pthread_mutex_t --> vg_pthread_mutex_t),
+ before working with them.
+
+ Note that we have various mutexes (and condvars) in this file that have the
+ type pthread_mutex_t (and pthread_cond_t). That is fine, because they
+ are always only handled by calling the standard pthread functions (eg.
+ pthread_mutex_lock()) on them. Phew.
+
+ WARNING: as a result of all this, we should *never* access these standard
+ pthread types as is; they *must* be converted to the vg_pthread_foo_t
+ equivalent. It would be nice if this was enforced... (but compilation
+ on NPTL-only systems should fail if this rule isn't followed...?)
+*/
+
+#include <sched.h> // for 'struct __sched_param'
+
+typedef struct __vg_pthread_attr_s
+{
+ int __vg_detachstate;
+ int __vg_schedpolicy;
+ struct __sched_param __vg_schedparam;
+ int __vg_inheritsched;
+ int __vg_scope;
+ size_t __vg_guardsize;
+ int __vg_stackaddr_set;
+ void *__vg_stackaddr;
+ size_t __vg_stacksize;
+} vg_pthread_attr_t;
+
+typedef struct
+{
+ int __vg_mutexkind;
+} vg_pthread_mutexattr_t;
+
+typedef struct _vg_pthread_rwlock_t
+{
+ struct _vg_pthread_fastlock __vg_rw_lock; /* Lock to guarantee mutual exclusion */
+ int __vg_rw_readers; /* Number of readers */
+ /*_pthread_descr*/ void* __vg_rw_writer; /* Identity of writer, or NULL if none */
+ /*_pthread_descr*/ void* __vg_rw_read_waiting; /* Threads waiting for reading */
+ /*_pthread_descr*/ void* __vg_rw_write_waiting; /* Threads waiting for writing */
+ int __vg_rw_kind; /* Reader/Writer preference selection */
+ int __vg_rw_pshared; /* Shared between processes or not */
+} vg_pthread_rwlock_t;
+
+typedef struct
+{
+ int __vg_lockkind;
+ int __vg_pshared;
+} vg_pthread_rwlockattr_t;
+
+/* Converting pthread types to vg_pthread types. We always check that the
+ passed-in type is as big as ours, for safety. We also zero the pointer
+ to the original struct, to ensure we don't accidentally use it again. */
+
+#define CONVERT(foo, x, vg_x) \
+ my_assert(sizeof(*x) >= sizeof(vg_pthread_##foo##_t)); \
+ vg_x = (vg_pthread_##foo##_t*)x; \
+ x = 0; // ensure we don't accidentally use x again!
+
+/* ---------------------------------------------------------------------
Forwardses.
------------------------------------------------------------------ */
@@ -302,13 +384,20 @@ pthread_t pthread_self(void)
int pthread_attr_init(pthread_attr_t *attr)
{
+ vg_pthread_attr_t* vg_attr;
+ CONVERT(attr, attr, vg_attr);
+
/* Just initialise the fields which we might look at. */
- attr->__detachstate = PTHREAD_CREATE_JOINABLE;
+ vg_attr->__vg_detachstate = PTHREAD_CREATE_JOINABLE;
/* Linuxthreads sets this field to the value __getpagesize(), so I
guess the following is OK. */
- attr->__guardsize = VKI_BYTES_PER_PAGE; return 0;
+ vg_attr->__vg_guardsize = VKI_BYTES_PER_PAGE;
+ return 0;
}
int pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate)
{
+ vg_pthread_attr_t* vg_attr;
+ CONVERT(attr, attr, vg_attr);
+
if (detachstate != PTHREAD_CREATE_JOINABLE
&& detachstate != PTHREAD_CREATE_DETACHED) {
@@ -317,5 +406,5 @@ int pthread_attr_setdetachstate(pthread_
return EINVAL;
}
- attr->__detachstate = detachstate;
+ vg_attr->__vg_detachstate = detachstate;
return 0;
}
@@ -323,5 +412,8 @@ int pthread_attr_setdetachstate(pthread_
int pthread_attr_getdetachstate(const pthread_attr_t *attr, int *detachstate)
{
- *detachstate = attr->__detachstate;
+ vg_pthread_attr_t* vg_attr;
+ CONVERT(attr, attr, vg_attr);
+
+ *detachstate = vg_attr->__vg_detachstate;
return 0;
}
@@ -413,17 +506,20 @@ int pthread_getattr_np (pthread_t thread
int detached;
size_t limit;
+ vg_pthread_attr_t* vg_attr;
+ CONVERT(attr, attr, vg_attr);
+
ensure_valgrind("pthread_getattr_np");
kludged("pthread_getattr_np", NULL);
limit = VG_PTHREAD_STACK_SIZE - VG_AR_CLIENT_STACKBASE_REDZONE_SZB
- 1000; /* paranoia */
- attr->__detachstate = PTHREAD_CREATE_JOINABLE;
- attr->__schedpolicy = SCHED_OTHER;
- attr->__schedparam.sched_priority = 0;
- attr->__inheritsched = PTHREAD_EXPLICIT_SCHED;
- attr->__scope = PTHREAD_SCOPE_SYSTEM;
- attr->__guardsize = VKI_BYTES_PER_PAGE;
- attr->__stackaddr = NULL;
- attr->__stackaddr_set = 0;
- attr->__stacksize = limit;
+ vg_attr->__vg_detachstate = PTHREAD_CREATE_JOINABLE;
+ vg_attr->__vg_schedpolicy = SCHED_OTHER;
+ vg_attr->__vg_schedparam.sched_priority = 0;
+ vg_attr->__vg_inheritsched = PTHREAD_EXPLICIT_SCHED;
+ vg_attr->__vg_scope = PTHREAD_SCOPE_SYSTEM;
+ vg_attr->__vg_guardsize = VKI_BYTES_PER_PAGE;
+ vg_attr->__vg_stackaddr = NULL;
+ vg_attr->__vg_stackaddr_set = 0;
+ vg_attr->__vg_stacksize = limit;
VALGRIND_MAGIC_SEQUENCE(detached, (-1) /* default */,
VG_USERREQ__SET_OR_GET_DETACH,
@@ -431,5 +527,5 @@ int pthread_getattr_np (pthread_t thread
my_assert(detached == 0 || detached == 1);
if (detached)
- attr->__detachstate = PTHREAD_CREATE_DETACHED;
+ vg_attr->__vg_detachstate = PTHREAD_CREATE_DETACHED;
return 0;
}
@@ -464,7 +560,9 @@ int pthread_attr_getstacksize ( const pt
int pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy)
{
+ vg_pthread_attr_t* vg_attr;
+ CONVERT(attr, attr, vg_attr);
if (policy != SCHED_OTHER && policy != SCHED_FIFO && policy != SCHED_RR)
return EINVAL;
- attr->__schedpolicy = policy;
+ vg_attr->__vg_schedpolicy = policy;
return 0;
}
@@ -472,5 +570,7 @@ int pthread_attr_setschedpolicy(pthread_
int pthread_attr_getschedpolicy(const pthread_attr_t *attr, int *policy)
{
- *policy = attr->__schedpolicy;
+ vg_pthread_attr_t* vg_attr;
+ CONVERT(attr, attr, vg_attr);
+ *policy = vg_attr->__vg_schedpolicy;
return 0;
}
@@ -499,5 +599,7 @@ WEAK
int pthread_attr_getguardsize(const pthread_attr_t *attr, size_t *guardsize)
{
- *guardsize = attr->__guardsize;
+ vg_pthread_attr_t* vg_attr;
+ CONVERT(attr, attr, vg_attr);
+ *guardsize = vg_attr->__vg_guardsize;
return 0;
}
@@ -786,4 +888,6 @@ pthread_create (pthread_t *__restrict __
NewThreadInfo* info;
int gs;
+ vg_pthread_attr_t* __vg_attr;
+ CONVERT(attr, __attr, __vg_attr);
ensure_valgrind("pthread_create");
@@ -798,6 +902,6 @@ pthread_create (pthread_t *__restrict __
my_assert(info != NULL);
- if (__attr)
- info->attr__detachstate = __attr->__detachstate;
+ if (__vg_attr)
+ info->attr__detachstate = __vg_attr->__vg_detachstate;
else
info->attr__detachstate = PTHREAD_CREATE_JOINABLE;
@@ -984,5 +1088,7 @@ void _pthread_cleanup_pop_restore (struc
int __pthread_mutexattr_init(pthread_mutexattr_t *attr)
{
- attr->__mutexkind = PTHREAD_MUTEX_ERRORCHECK_NP;
+ vg_pthread_mutexattr_t* vg_attr;
+ CONVERT(mutexattr, attr, vg_attr);
+ vg_attr->__vg_mutexkind = PTHREAD_MUTEX_ERRORCHECK_NP;
return 0;
}
@@ -990,4 +1096,7 @@ int __pthread_mutexattr_init(pthread_mut
int __pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type)
{
+ vg_pthread_mutexattr_t* vg_attr;
+ CONVERT(mutexattr, attr, vg_attr);
+
switch (type) {
# ifndef GLIBC_2_1
@@ -1000,5 +1109,5 @@ int __pthread_mutexattr_settype(pthread_
case PTHREAD_MUTEX_RECURSIVE_NP:
case PTHREAD_MUTEX_ERRORCHECK_NP:
- attr->__mutexkind = type;
+ vg_attr->__vg_mutexkind = type;
return 0;
default:
@@ -1034,9 +1143,14 @@ int __pthread_mutex_init(pthread_mutex_t
const pthread_mutexattr_t *mutexattr)
{
- mutex->__m_count = 0;
- mutex->__m_owner = (_pthread_descr)VG_INVALID_THREADID;
- mutex->__m_kind = PTHREAD_MUTEX_ERRORCHECK_NP;
- if (mutexattr)
- mutex->__m_kind = mutexattr->__mutexkind;
+ vg_pthread_mutex_t* vg_mutex;
+ vg_pthread_mutexattr_t* vg_mutexattr;
+ CONVERT(mutex, mutex, vg_mutex);
+ CONVERT(mutexattr, mutexattr, vg_mutexattr);
+
+ vg_mutex->__vg_m_count = 0;
+ vg_mutex->__vg_m_owner = (/*_pthread_descr*/void*)VG_INVALID_THREADID;
+ vg_mutex->__vg_m_kind = PTHREAD_MUTEX_ERRORCHECK_NP;
+ if (vg_mutexattr)
+ vg_mutex->__vg_m_kind = vg_mutexattr->__vg_mutexkind;
return 0;
}
@@ -1046,9 +1160,11 @@ int __pthread_mutex_lock(pthread_mutex_t
{
int res;
+ vg_pthread_mutex_t* vg_mutex;
+ CONVERT(mutex, mutex, vg_mutex);
if (RUNNING_ON_VALGRIND) {
VALGRIND_MAGIC_SEQUENCE(res, 0 /* default */,
VG_USERREQ__PTHREAD_MUTEX_LOCK,
- mutex, 0, 0, 0);
+ vg_mutex, 0, 0, 0);
return res;
} else {
@@ -1056,7 +1172,7 @@ int __pthread_mutex_lock(pthread_mutex_t
if (0)
kludged("prehistoric lock", NULL);
- mutex->__m_owner = (_pthread_descr)1;
- mutex->__m_count = 1;
- mutex->__m_kind |= VG_PTHREAD_PREHISTORY;
+ vg_mutex->__vg_m_owner = (/*_pthread_descr*/void*)1;
+ vg_mutex->__vg_m_count = 1;
+ vg_mutex->__vg_m_kind |= VG_PTHREAD_PREHISTORY;
return 0; /* success */
}
@@ -1067,9 +1183,11 @@ int __pthread_mutex_trylock(pthread_mute
{
int res;
+ vg_pthread_mutex_t* vg_mutex;
+ CONVERT(mutex, mutex, vg_mutex);
if (RUNNING_ON_VALGRIND) {
VALGRIND_MAGIC_SEQUENCE(res, 0 /* default */,
VG_USERREQ__PTHREAD_MUTEX_TRYLOCK,
- mutex, 0, 0, 0);
+ vg_mutex, 0, 0, 0);
return res;
} else {
@@ -1077,7 +1195,7 @@ int __pthread_mutex_trylock(pthread_mute
if (0)
kludged("prehistoric trylock", NULL);
- mutex->__m_owner = (_pthread_descr)1;
- mutex->__m_count = 1;
- mutex->__m_kind |= VG_PTHREAD_PREHISTORY;
+ vg_mutex->__vg_m_owner = (/*_pthread_descr*/void*)1;
+ vg_mutex->__vg_m_count = 1;
+ vg_mutex->__vg_m_kind |= VG_PTHREAD_PREHISTORY;
return 0; /* success */
}
@@ -1088,9 +1206,11 @@ int __pthread_mutex_unlock(pthread_mutex
{
int res;
+ vg_pthread_mutex_t* vg_mutex;
+ CONVERT(mutex, mutex, vg_mutex);
if (RUNNING_ON_VALGRIND) {
VALGRIND_MAGIC_SEQUENCE(res, 0 /* default */,
VG_USERREQ__PTHREAD_MUTEX_UNLOCK,
- mutex, 0, 0, 0);
+ vg_mutex, 0, 0, 0);
return res;
} else {
@@ -1098,7 +1218,7 @@ int __pthread_mutex_unlock(pthread_mutex
if (0)
kludged("prehistoric unlock", NULL);
- mutex->__m_owner = 0;
- mutex->__m_count = 0;
- mutex->__m_kind &= ~VG_PTHREAD_PREHISTORY;
+ vg_mutex->__vg_m_owner = 0;
+ vg_mutex->__vg_m_count = 0;
+ vg_mutex->__vg_m_kind &= ~VG_PTHREAD_PREHISTORY;
return 0; /* success */
}
@@ -1108,18 +1228,20 @@ int __pthread_mutex_unlock(pthread_mutex
int __pthread_mutex_destroy(pthread_mutex_t *mutex)
{
+ vg_pthread_mutex_t* vg_mutex;
+ CONVERT(mutex, mutex, vg_mutex);
+
/* Valgrind doesn't hold any resources on behalf of the mutex, so no
need to involve it. */
- if (mutex->__m_count > 0) {
+ if (vg_mutex->__vg_m_count > 0) {
/* Oh, the horror. glibc's internal use of pthreads "knows"
that destroying a lock does an implicit unlock. Make it
explicit. */
- __pthread_mutex_unlock(mutex);
- pthread_error("pthread_mutex_destroy: "
- "mutex is still in use");
+ __pthread_mutex_unlock( (pthread_mutex_t*)vg_mutex );
+ pthread_error("pthread_mutex_destroy: mutex is still in use");
return EBUSY;
}
- mutex->__m_count = 0;
- mutex->__m_owner = (_pthread_descr)VG_INVALID_THREADID;
- mutex->__m_kind = PTHREAD_MUTEX_ERRORCHECK_NP;
+ vg_mutex->__vg_m_count = 0;
+ vg_mutex->__vg_m_owner = (/*_pthread_descr*/void*)VG_INVALID_THREADID;
+ vg_mutex->__vg_m_kind = PTHREAD_MUTEX_ERRORCHECK_NP;
return 0;
}
@@ -1145,5 +1267,7 @@ int pthread_cond_init( pthread_cond_t *c
const pthread_condattr_t *cond_attr)
{
- cond->__c_waiting = (_pthread_descr)VG_INVALID_THREADID;
+ vg_pthread_cond_t* vg_cond;
+ CONVERT(cond, cond, vg_cond);
+ vg_cond->__vg_c_waiting = (/*_pthread_descr*/void*)VG_INVALID_THREADID;
return 0;
}
@@ -1193,8 +1317,11 @@ int pthread_cond_wait(pthread_cond_t *co
{
int res;
+ vg_pthread_mutex_t* vg_mutex;
+ CONVERT(mutex, mutex, vg_mutex);
+
ensure_valgrind("pthread_cond_wait");
VALGRIND_MAGIC_SEQUENCE(res, 0 /* default */,
VG_USERREQ__PTHREAD_COND_WAIT,
- cond, mutex, 0, 0);
+ cond, vg_mutex, 0, 0);
return res;
}
@@ -1209,4 +1336,6 @@ int pthread_cond_timedwait ( pthread_con
unsigned long long int ull_ms_now_after_1970;
unsigned long long int ull_ms_end_after_1970;
+ vg_pthread_mutex_t* vg_mutex;
+ CONVERT(mutex, mutex, vg_mutex);
ensure_valgrind("pthread_cond_timedwait");
@@ -1230,5 +1359,5 @@ int pthread_cond_timedwait ( pthread_con
VALGRIND_MAGIC_SEQUENCE(res, 0 /* default */,
VG_USERREQ__PTHREAD_COND_TIMEDWAIT,
- cond, mutex, ms_end, 0);
+ cond, vg_mutex, ms_end, 0);
return res;
}
@@ -2658,7 +2787,7 @@ void init_vg_rwlock ( vg_rwlock_t* vg_rw
address of our version. Further, if the LinuxThreads version
appears to have been statically initialised, do the same to the one
- we allocate here. The pthread_rwlock_t.__rw_readers field is set
- to zero by PTHREAD_RWLOCK_INITIALIZER, so we take zero as meaning
- uninitialised and non-zero meaning initialised.
+ we allocate here. The vg_pthread_rwlock_t.__vg_rw_readers field is set
+ to zero by PTHREAD_RWLOCK_INITIALIZER (as are several other fields), so
+ we take zero as meaning uninitialised and non-zero meaning initialised.
*/
static vg_rwlock_t* rw_remap ( pthread_rwlock_t* orig )
@@ -2666,4 +2795,6 @@ static vg_rwlock_t* rw_remap ( pthread_r
int res, i;
vg_rwlock_t* vg_rwl;
+ vg_pthread_rwlock_t* vg_orig;
+
res = __pthread_mutex_lock(&rw_remap_mx);
my_assert(res == 0);
@@ -2689,8 +2820,9 @@ static vg_rwlock_t* rw_remap ( pthread_r
/* Initialise the shadow, if required. */
- if (orig->__rw_readers == 0) {
- orig->__rw_readers = 1;
+ CONVERT(rwlock, orig, vg_orig);
+ if (vg_orig->__vg_rw_readers == 0) {
+ vg_orig->__vg_rw_readers = 1;
init_vg_rwlock(vg_rwl);
- if (orig->__rw_kind == PTHREAD_RWLOCK_PREFER_READER_NP)
+ if (vg_orig->__vg_rw_kind == PTHREAD_RWLOCK_PREFER_READER_NP)
vg_rwl->prefer_w = 0;
}
@@ -2704,12 +2836,17 @@ int pthread_rwlock_init ( pthread_rwlock
{
vg_rwlock_t* rwl;
+ vg_pthread_rwlock_t* vg_orig;
+ vg_pthread_rwlockattr_t* vg_attr;
+ CONVERT(rwlock, orig, vg_orig);
+ CONVERT(rwlockattr, attr, vg_attr);
+
if (0) printf ("pthread_rwlock_init\n");
/* Force the remapper to initialise the shadow. */
- orig->__rw_readers = 0;
+ vg_orig->__vg_rw_readers = 0;
/* Install the lock preference; the remapper needs to know it. */
- orig->__rw_kind = PTHREAD_RWLOCK_DEFAULT_NP;
- if (attr)
- orig->__rw_kind = attr->__lockkind;
- rwl = rw_remap ( orig );
+ vg_orig->__vg_rw_kind = PTHREAD_RWLOCK_DEFAULT_NP;
+ if (vg_attr)
+ vg_orig->__vg_rw_kind = vg_attr->__vg_lockkind;
+ rwl = rw_remap ( (pthread_rwlock_t*)vg_orig );
return 0;
}
@@ -2960,7 +3100,8 @@ int
pthread_rwlockattr_init (pthread_rwlockattr_t *attr)
{
- attr->__lockkind = 0;
- attr->__pshared = PTHREAD_PROCESS_PRIVATE;
-
+ vg_pthread_rwlockattr_t* vg_attr;
+ CONVERT(rwlockattr, attr, vg_attr);
+ vg_attr->__vg_lockkind = 0;
+ vg_attr->__vg_pshared = PTHREAD_PROCESS_PRIVATE;
return 0;
}
@@ -2977,4 +3118,7 @@ int
pthread_rwlockattr_setpshared (pthread_rwlockattr_t *attr, int pshared)
{
+ vg_pthread_rwlockattr_t* vg_attr;
+ CONVERT(rwlockattr, attr, vg_attr);
+
if (pshared != PTHREAD_PROCESS_PRIVATE && pshared != PTHREAD_PROCESS_SHARED)
return EINVAL;
@@ -2984,5 +3128,5 @@ pthread_rwlockattr_setpshared (pthread_r
return ENOSYS;
- attr->__pshared = pshared;
+ vg_attr->__vg_pshared = pshared;
return 0;
--- valgrind/coregrind/vg_scheduler.c #1.141:1.142
@@ -1932,37 +1932,24 @@ void do__apply_in_new_thread ( ThreadId
-------------------------------------------------------- */
-/* pthread_mutex_t is a struct with at 5 words:
- typedef struct
- {
- int __m_reserved; -- Reserved for future use
- int __m_count; -- Depth of recursive locking
- _pthread_descr __m_owner; -- Owner thread (if recursive or errcheck)
- int __m_kind; -- Mutex kind: fast, recursive or errcheck
- struct _pthread_fastlock __m_lock; -- Underlying fast lock
- } pthread_mutex_t;
+/* vg_pthread_mutex_t is defined in vg_include.h.
- #define PTHREAD_MUTEX_INITIALIZER \
- {0, 0, 0, PTHREAD_MUTEX_TIMED_NP, __LOCK_INITIALIZER}
- # define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \
- {0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, __LOCK_INITIALIZER}
- # define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \
- {0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, __LOCK_INITIALIZER}
- # define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \
- {0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, __LOCK_INITIALIZER}
+ The initializers zero everything, except possibly the fourth word,
+ which in vg_pthread_mutex_t is the __vg_m_kind field. It gets set to one
+ of PTHREAD_MUTEX_{TIMED,RECURSIVE,ERRORCHECK,ADAPTIVE}_NP
How we use it:
- __m_kind never changes and indicates whether or not it is recursive.
+ __vg_m_kind never changes and indicates whether or not it is recursive.
- __m_count indicates the lock count; if 0, the mutex is not owned by
+ __vg_m_count indicates the lock count; if 0, the mutex is not owned by
anybody.
- __m_owner has a ThreadId value stuffed into it. We carefully arrange
+ __vg_m_owner has a ThreadId value stuffed into it. We carefully arrange
that ThreadId == 0 is invalid (VG_INVALID_THREADID), so that
statically initialised mutexes correctly appear
to belong to nobody.
- In summary, a not-in-use mutex is distinguised by having __m_owner
- == 0 (VG_INVALID_THREADID) and __m_count == 0 too. If one of those
+ In summary, a not-in-use mutex is distinguised by having __vg_m_owner
+ == 0 (VG_INVALID_THREADID) and __vg_m_count == 0 too. If one of those
conditions holds, the other should too.
@@ -1978,5 +1965,5 @@ void do__apply_in_new_thread ( ThreadId
/* Helper fns ... */
static
-void release_one_thread_waiting_on_mutex ( pthread_mutex_t* mutex,
+void release_one_thread_waiting_on_mutex ( vg_pthread_mutex_t* mutex,
Char* caller )
{
@@ -1994,11 +1981,11 @@ void release_one_thread_waiting_on_mutex
}
- VG_TRACK( post_mutex_unlock, (ThreadId)mutex->__m_owner, mutex );
+ VG_TRACK( post_mutex_unlock, (ThreadId)mutex->__vg_m_owner, mutex );
vg_assert(i <= VG_N_THREADS);
if (i == VG_N_THREADS) {
/* Nobody else is waiting on it. */
- mutex->__m_count = 0;
- mutex->__m_owner = VG_INVALID_THREADID;
+ mutex->__vg_m_count = 0;
+ mutex->__vg_m_owner = VG_INVALID_THREADID;
} else {
/* Notionally transfer the hold to thread i, whose
@@ -2006,5 +1993,5 @@ void release_one_thread_waiting_on_mutex
/* The .count is already == 1. */
vg_assert(VG_(threads)[i].associated_mx == mutex);
- mutex->__m_owner = (_pthread_descr)i;
+ mutex->__vg_m_owner = (/*_pthread_descr*/void*)i;
VG_(threads)[i].status = VgTs_Runnable;
VG_(threads)[i].associated_mx = NULL;
@@ -2025,5 +2012,5 @@ static
void do_pthread_mutex_lock( ThreadId tid,
Bool is_trylock,
- pthread_mutex_t* mutex )
+ vg_pthread_mutex_t* mutex )
{
Char msg_buf[100];
@@ -2050,5 +2037,5 @@ void do_pthread_mutex_lock( ThreadId tid
/* More paranoia ... */
- switch (mutex->__m_kind) {
+ switch (mutex->__vg_m_kind) {
# ifndef GLIBC_2_1
case PTHREAD_MUTEX_TIMED_NP:
@@ -2060,5 +2047,5 @@ void do_pthread_mutex_lock( ThreadId tid
case PTHREAD_MUTEX_RECURSIVE_NP:
case PTHREAD_MUTEX_ERRORCHECK_NP:
- if (mutex->__m_count >= 0) break;
+ if (mutex->__vg_m_count >= 0) break;
/* else fall thru */
default:
@@ -2069,6 +2056,6 @@ void do_pthread_mutex_lock( ThreadId tid
}
- if (mutex->__m_count > 0) {
- if (!VG_(is_valid_tid)((ThreadId)mutex->__m_owner)) {
+ if (mutex->__vg_m_count > 0) {
+ if (!VG_(is_valid_tid)((ThreadId)mutex->__vg_m_owner)) {
VG_(record_pthread_error)( tid,
"pthread_mutex_lock/trylock: mutex has invalid owner");
@@ -2078,13 +2065,13 @@ void do_pthread_mutex_lock( ThreadId tid
/* Someone has it already. */
- if ((ThreadId)mutex->__m_owner == tid) {
+ if ((ThreadId)mutex->__vg_m_owner == tid) {
/* It's locked -- by me! */
- if (mutex->__m_kind == PTHREAD_MUTEX_RECURSIVE_NP) {
+ if (mutex->__vg_m_kind == PTHREAD_MUTEX_RECURSIVE_NP) {
/* return 0 (success). */
- mutex->__m_count++;
+ mutex->__vg_m_count++;
SET_PTHREQ_RETVAL(tid, 0);
if (0)
VG_(printf)("!!!!!! tid %d, mx %p -> locked %d\n",
- tid, mutex, mutex->__m_count);
+ tid, mutex, mutex->__vg_m_count);
return;
} else {
@@ -2098,5 +2085,5 @@ void do_pthread_mutex_lock( ThreadId tid
/* Someone else has it; we have to wait. Mark ourselves
thusly. */
- /* GUARD: __m_count > 0 && __m_owner is valid */
+ /* GUARD: __vg_m_count > 0 && __vg_m_owner is valid */
if (is_trylock) {
/* caller is polling; so return immediately. */
@@ -2119,11 +2106,11 @@ void do_pthread_mutex_lock( ThreadId tid
} else {
/* Nobody owns it. Sanity check ... */
- vg_assert(mutex->__m_owner == VG_INVALID_THREADID);
+ vg_assert(mutex->__vg_m_owner == VG_INVALID_THREADID);
VG_TRACK ( pre_mutex_lock, tid, mutex );
/* We get it! [for the first time]. */
- mutex->__m_count = 1;
- mutex->__m_owner = (_pthread_descr)tid;
+ mutex->__vg_m_count = 1;
+ mutex->__vg_m_owner = (/*_pthread_descr*/void*)tid;
/* return 0 (success). */
@@ -2137,5 +2124,5 @@ void do_pthread_mutex_lock( ThreadId tid
static
void do_pthread_mutex_unlock ( ThreadId tid,
- pthread_mutex_t* mutex )
+ vg_pthread_mutex_t* mutex )
{
Char msg_buf[100];
@@ -2159,12 +2146,12 @@ void do_pthread_mutex_unlock ( ThreadId
/* If this was locked before the dawn of time, pretend it was
locked now so that it balances with unlocks */
- if (mutex->__m_kind & VG_PTHREAD_PREHISTORY) {
- mutex->__m_kind &= ~VG_PTHREAD_PREHISTORY;
- VG_TRACK( pre_mutex_lock, (ThreadId)mutex->__m_owner, mutex );
- VG_TRACK( post_mutex_lock, (ThreadId)mutex->__m_owner, mutex );
+ if (mutex->__vg_m_kind & VG_PTHREAD_PREHISTORY) {
+ mutex->__vg_m_kind &= ~VG_PTHREAD_PREHISTORY;
+ VG_TRACK( pre_mutex_lock, (ThreadId)mutex->__vg_m_owner, mutex );
+ VG_TRACK( post_mutex_lock, (ThreadId)mutex->__vg_m_owner, mutex );
}
/* More paranoia ... */
- switch (mutex->__m_kind) {
+ switch (mutex->__vg_m_kind) {
# ifndef GLIBC_2_1
case PTHREAD_MUTEX_TIMED_NP:
@@ -2176,5 +2163,5 @@ void do_pthread_mutex_unlock ( ThreadId
case PTHREAD_MUTEX_RECURSIVE_NP:
case PTHREAD_MUTEX_ERRORCHECK_NP:
- if (mutex->__m_count >= 0) break;
+ if (mutex->__vg_m_count >= 0) break;
/* else fall thru */
default:
@@ -2186,5 +2173,5 @@ void do_pthread_mutex_unlock ( ThreadId
/* Barf if we don't currently hold the mutex. */
- if (mutex->__m_count == 0) {
+ if (mutex->__vg_m_count == 0) {
/* nobody holds it */
VG_(record_pthread_error)( tid,
@@ -2194,5 +2181,5 @@ void do_pthread_mutex_unlock ( ThreadId
}
- if ((ThreadId)mutex->__m_owner != tid) {
+ if ((ThreadId)mutex->__vg_m_owner != tid) {
/* we don't hold it */
VG_(record_pthread_error)( tid,
@@ -2204,7 +2191,7 @@ void do_pthread_mutex_unlock ( ThreadId
/* If it's a multiply-locked recursive mutex, just decrement the
lock count and return. */
- if (mutex->__m_count > 1) {
- vg_assert(mutex->__m_kind == PTHREAD_MUTEX_RECURSIVE_NP);
- mutex->__m_count --;
+ if (mutex->__vg_m_count > 1) {
+ vg_assert(mutex->__vg_m_kind == PTHREAD_MUTEX_RECURSIVE_NP);
+ mutex->__vg_m_count --;
SET_PTHREQ_RETVAL(tid, 0); /* success */
return;
@@ -2213,6 +2200,6 @@ void do_pthread_mutex_unlock ( ThreadId
/* Now we're sure it is locked exactly once, and by the thread who
is now doing an unlock on it. */
- vg_assert(mutex->__m_count == 1);
- vg_assert((ThreadId)mutex->__m_owner == tid);
+ vg_assert(mutex->__vg_m_count == 1);
+ vg_assert((ThreadId)mutex->__vg_m_owner == tid);
/* Release at max one thread waiting on this mutex. */
@@ -2228,24 +2215,9 @@ void do_pthread_mutex_unlock ( ThreadId
-------------------------------------------------------- */
-/* The relevant native types are as follows:
- (copied from /usr/include/bits/pthreadtypes.h)
-
- -- Conditions (not abstract because of PTHREAD_COND_INITIALIZER
- typedef struct
- {
- struct _pthread_fastlock __c_lock; -- Protect against concurrent access
- _pthread_descr __c_waiting; -- Threads waiting on this condition
- } pthread_cond_t;
-
- -- Attribute for conditionally variables.
- typedef struct
- {
- int __dummy;
- } pthread_condattr_t;
-
- #define PTHREAD_COND_INITIALIZER {__LOCK_INITIALIZER, 0}
+/* The relevant type (vg_pthread_cond_t) is in vg_include.h.
- We don't use any fields of pthread_cond_t for anything at all.
- Only the identity of the CVs is important.
+ We don't use any fields of vg_pthread_cond_t for anything at all.
+ Only the identity of the CVs is important. (Actually, we initialise
+ __vg_c_waiting in pthread_cond_init() to VG_INVALID_THREADID.)
Linux pthreads supports no attributes on condition variables, so we
@@ -2257,6 +2229,6 @@ void do_pthread_cond_timedwait_TIMEOUT (
{
Char msg_buf[100];
- pthread_mutex_t* mx;
- pthread_cond_t* cv;
+ vg_pthread_mutex_t* mx;
+ vg_pthread_cond_t* cv;
vg_assert(VG_(is_valid_tid)(tid)
@@ -2268,13 +2240,13 @@ void do_pthread_cond_timedwait_TIMEOUT (
vg_assert(cv != NULL);
- if (mx->__m_owner == VG_INVALID_THREADID) {
+ if (mx->__vg_m_owner == VG_INVALID_THREADID) {
/* Currently unheld; hand it out to thread tid. */
- vg_assert(mx->__m_count == 0);
+ vg_assert(mx->__vg_m_count == 0);
VG_(threads)[tid].status = VgTs_Runnable;
SET_PTHREQ_RETVAL(tid, ETIMEDOUT); /* pthread_cond_wait return value */
VG_(threads)[tid].associated_cv = NULL;
VG_(threads)[tid].associated_mx = NULL;
- mx->__m_owner = (_pthread_descr)tid;
- mx->__m_count = 1;
+ mx->__vg_m_owner = (/*_pthread_descr*/void*)tid;
+ mx->__vg_m_count = 1;
VG_TRACK( post_mutex_lock, tid, mx );
@@ -2282,5 +2254,5 @@ void do_pthread_cond_timedwait_TIMEOUT (
if (VG_(clo_trace_pthread_level) >= 1) {
VG_(sprintf)(msg_buf,
- "pthread_cond_timedwai cv %p: TIMEOUT with mx %p",
+ "pthread_cond_timedwait cv %p: TIMEOUT with mx %p",
cv, mx );
print_pthread_event(tid, msg_buf);
@@ -2288,5 +2260,5 @@ void do_pthread_cond_timedwait_TIMEOUT (
} else {
/* Currently held. Make thread tid be blocked on it. */
- vg_assert(mx->__m_count > 0);
+ vg_assert(mx->__vg_m_count > 0);
VG_TRACK( pre_mutex_lock, tid, mx );
@@ -2297,5 +2269,5 @@ void do_pthread_cond_timedwait_TIMEOUT (
if (VG_(clo_trace_pthread_level) >= 1) {
VG_(sprintf)(msg_buf,
- "pthread_cond_timedwai cv %p: TIMEOUT -> BLOCK for mx %p",
+ "pthread_cond_timedwait cv %p: TIMEOUT -> BLOCK for mx %p",
cv, mx );
print_pthread_event(tid, msg_buf);
@@ -2306,5 +2278,5 @@ void do_pthread_cond_timedwait_TIMEOUT (
static
-void release_N_threads_waiting_on_cond ( pthread_cond_t* cond,
+void release_N_threads_waiting_on_cond ( vg_pthread_cond_t* cond,
Int n_to_release,
Char* caller )
@@ -2312,5 +2284,5 @@ void release_N_threads_waiting_on_cond (
Int i;
Char msg_buf[100];
- pthread_mutex_t* mx;
+ vg_pthread_mutex_t* mx;
while (True) {
@@ -2338,12 +2310,12 @@ void release_N_threads_waiting_on_cond (
VG_TRACK( pre_mutex_lock, i, mx );
- if (mx->__m_owner == VG_INVALID_THREADID) {
+ if (mx->__vg_m_owner == VG_INVALID_THREADID) {
/* Currently unheld; hand it out to thread i. */
- vg_assert(mx->__m_count == 0);
+ vg_assert(mx->__vg_m_count == 0);
VG_(threads)[i].status = VgTs_Runnable;
VG_(threads)[i].associated_cv = NULL;
VG_(threads)[i].associated_mx = NULL;
- mx->__m_owner = (_pthread_descr)i;
- mx->__m_count = 1;
+ mx->__vg_m_owner = (/*_pthread_descr*/void*)i;
+ mx->__vg_m_count = 1;
/* .m_edx already holds pth_cond_wait success value (0) */
@@ -2358,5 +2330,5 @@ void release_N_threads_waiting_on_cond (
} else {
/* Currently held. Make thread i be blocked on it. */
- vg_assert(mx->__m_count > 0);
+ vg_assert(mx->__vg_m_count > 0);
VG_(threads)[i].status = VgTs_WaitMX;
VG_(threads)[i].associated_cv = NULL;
@@ -2379,6 +2351,6 @@ void release_N_threads_waiting_on_cond (
static
void do_pthread_cond_wait ( ThreadId tid,
- pthread_cond_t *cond,
- pthread_mutex_t *mutex,
+ vg_pthread_cond_t *cond,
+ vg_pthread_mutex_t *mutex,
UInt ms_end )
{
@@ -2407,5 +2379,5 @@ void do_pthread_cond_wait ( ThreadId tid
/* More paranoia ... */
- switch (mutex->__m_kind) {
+ switch (mutex->__vg_m_kind) {
# ifndef GLIBC_2_1
case PTHREAD_MUTEX_TIMED_NP:
@@ -2417,5 +2389,5 @@ void do_pthread_cond_wait ( ThreadId tid
case PTHREAD_MUTEX_RECURSIVE_NP:
case PTHREAD_MUTEX_ERRORCHECK_NP:
- if (mutex->__m_count >= 0) break;
+ if (mutex->__vg_m_count >= 0) break;
/* else fall thru */
default:
@@ -2427,6 +2399,6 @@ void do_pthread_cond_wait ( ThreadId tid
/* Barf if we don't currently hold the mutex. */
- if (mutex->__m_count == 0 /* nobody holds it */
- || (ThreadId)mutex->__m_owner != tid /* we don't hold it */) {
+ if (mutex->__vg_m_count == 0 /* nobody holds it */
+ || (ThreadId)mutex->__vg_m_owner != tid /* we don't hold it */) {
VG_(record_pthread_error)( tid,
"pthread_cond_wait/timedwait: mutex is unlocked "
@@ -2459,5 +2431,5 @@ static
void do_pthread_cond_signal_or_broadcast ( ThreadId tid,
Bool broadcast,
- pthread_cond_t *cond )
+ vg_pthread_cond_t *cond )
{
Char msg_buf[100];
@@ -3011,6 +2983,6 @@ void do_client_request ( ThreadId tid )
case VG_USERREQ__PTHREAD_COND_WAIT:
do_pthread_cond_wait( tid,
- (pthread_cond_t *)(arg[1]),
- (pthread_mutex_t *)(arg[2]),
+ (vg_pthread_cond_t *)(arg[1]),
+ (vg_pthread_mutex_t *)(arg[2]),
0xFFFFFFFF /* no timeout */ );
break;
@@ -3018,6 +2990,6 @@ void do_client_request ( ThreadId tid )
case VG_USERREQ__PTHREAD_COND_TIMEDWAIT:
do_pthread_cond_wait( tid,
- (pthread_cond_t *)(arg[1]),
- (pthread_mutex_t *)(arg[2]),
+ (vg_pthread_cond_t *)(arg[1]),
+ (vg_pthread_mutex_t *)(arg[2]),
arg[3] /* timeout millisecond point */ );
break;
@@ -3027,5 +2999,5 @@ void do_client_request ( ThreadId tid )
tid,
False, /* signal, not broadcast */
- (pthread_cond_t *)(arg[1]) );
+ (vg_pthread_cond_t *)(arg[1]) );
break;
@@ -3034,5 +3006,5 @@ void do_client_request ( ThreadId tid )
tid,
True, /* broadcast, not signal */
- (pthread_cond_t *)(arg[1]) );
+ (vg_pthread_cond_t *)(arg[1]) );
break;
@@ -3277,6 +3249,6 @@ static
void scheduler_sanity ( void )
{
- pthread_mutex_t* mx;
- pthread_cond_t* cv;
+ vg_pthread_mutex_t* mx;
+ vg_pthread_cond_t* cv;
Int i;
struct timeout* top;
@@ -3317,7 +3289,7 @@ void scheduler_sanity ( void )
vg_assert(cv == NULL);
/* 1 */ vg_assert(mx != NULL);
- /* 2 */ vg_assert(mx->__m_count > 0);
- /* 3 */ vg_assert(VG_(is_valid_tid)((ThreadId)mx->__m_owner));
- /* 4 */ vg_assert((UInt)i != (ThreadId)mx->__m_owner);
+ /* 2 */ vg_assert(mx->__vg_m_count > 0);
+ /* 3 */ vg_assert(VG_(is_valid_tid)((ThreadId)mx->__vg_m_owner));
+ /* 4 */ vg_assert((UInt)i != (ThreadId)mx->__vg_m_owner);
} else
if (VG_(threads)[i].status == VgTs_WaitCV) {
|
|
From: Julian S. <js...@ac...> - 2004-02-28 12:34:55
|
My $0.02 is to commit it. If it turns out to be a Patch of Mass Destruction, the nightly scripts will soon tell us, and we can back it out. J On Monday 23 February 2004 14:00, Nicholas Nethercote wrote: > On Sun, 22 Feb 2004, Nicholas Nethercote wrote: > > It looks like upcoming glibc 2.3.3 will use a different version of > > pthreadtypes.h. This caused 69616 for Gentoo users who get a > > cutting-edge version, which breaks Valgrind. Note that this bug has 165 > > votes; the next highest one has 28 votes. > > > > I wrote a patch that seems to fix the problem. Basically, we were using > > [...] > > I'd appreciate someone else looking at the patch. Thanks. > > I didn't make it clear that the patch is in Bugzilla, see > bugs.kde.org/attachment.cgi?id=4618&action=view > > N > > > ------------------------------------------------------- > SF.Net is sponsored by: Speed Start Your Linux Apps Now. > Build and deploy apps & Web services for Linux with > a free DVD software kit from IBM. Click Now! > http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click > _______________________________________________ > Valgrind-developers mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-developers |
|
From: <js...@ac...> - 2004-02-28 04:09:50
|
Nightly build on phoenix ( SuSE 8.2 ) started at 2004-02-28 04:00:00 GMT Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow syscall-restart2: valgrind ./syscall-restart2 system: valgrind ./system yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 125 tests, 13 stderr failures, 0 stdout failures ================= corecheck/tests/as_mmap (stderr) corecheck/tests/fdleak_cmsg (stderr) corecheck/tests/fdleak_creat (stderr) corecheck/tests/fdleak_dup (stderr) corecheck/tests/fdleak_dup2 (stderr) corecheck/tests/fdleak_fcntl (stderr) corecheck/tests/fdleak_ipv4 (stderr) corecheck/tests/fdleak_open (stderr) corecheck/tests/fdleak_pipe (stderr) corecheck/tests/fdleak_socketpair (stderr) helgrind/tests/inherit (stderr) memcheck/tests/writev (stderr) memcheck/tests/zeropage (stderr) |
|
From: <js...@ac...> - 2004-02-28 03:54:15
|
Nightly build on nemesis ( SuSE 9.0 ) started at 2004-02-28 03:50:00 GMT Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow syscall-restart2: valgrind ./syscall-restart2 system: valgrind ./system yield: valgrind ./yield -- Finished tests in none/tests ---------------------------------------- == 125 tests, 13 stderr failures, 0 stdout failures ================= corecheck/tests/as_mmap (stderr) corecheck/tests/fdleak_cmsg (stderr) corecheck/tests/fdleak_creat (stderr) corecheck/tests/fdleak_dup (stderr) corecheck/tests/fdleak_dup2 (stderr) corecheck/tests/fdleak_fcntl (stderr) corecheck/tests/fdleak_ipv4 (stderr) corecheck/tests/fdleak_open (stderr) corecheck/tests/fdleak_pipe (stderr) corecheck/tests/fdleak_socketpair (stderr) helgrind/tests/inherit (stderr) memcheck/tests/writev (stderr) memcheck/tests/zeropage (stderr) |
|
From: Tom H. <to...@co...> - 2004-02-28 03:25:24
|
Nightly build on dunsmere ( Fedora Core 1 ) started at 2004-02-28 03:20:02 GMT Checking out source tree ... done Configuring ... done Building ... done Running regression tests ... done Last 20 lines of log.verbose follow -- Finished tests in none/tests ---------------------------------------- == 126 tests, 15 stderr failures, 1 stdout failure ================= corecheck/tests/fdleak_cmsg (stderr) corecheck/tests/fdleak_creat (stderr) corecheck/tests/fdleak_dup (stderr) corecheck/tests/fdleak_dup2 (stderr) corecheck/tests/fdleak_fcntl (stderr) corecheck/tests/fdleak_ipv4 (stderr) corecheck/tests/fdleak_open (stderr) corecheck/tests/fdleak_pipe (stderr) corecheck/tests/fdleak_socketpair (stderr) helgrind/tests/inherit (stderr) memcheck/tests/buflen_check (stderr) memcheck/tests/execve (stderr) memcheck/tests/fwrite (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/writev (stderr) none/tests/exec-sigmask (stdout) |