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
(32) |
2
(22) |
3
(47) |
4
(29) |
5
(18) |
6
(16) |
|
7
(21) |
8
(29) |
9
(23) |
10
(68) |
11
(20) |
12
(17) |
13
(17) |
|
14
(27) |
15
(26) |
16
(21) |
17
(13) |
18
(19) |
19
(29) |
20
(13) |
|
21
(9) |
22
(8) |
23
(29) |
24
(56) |
25
(21) |
26
(46) |
27
(33) |
|
28
(25) |
29
(41) |
30
(35) |
31
(28) |
|
|
|
|
From: <sv...@va...> - 2005-08-14 23:52:36
|
Author: njn
Date: 2005-08-15 00:52:32 +0100 (Mon, 15 Aug 2005)
New Revision: 4414
Log:
wibble
Modified:
trunk/coregrind/m_oset.c
Modified: trunk/coregrind/m_oset.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_oset.c 2005-08-14 23:00:57 UTC (rev 4413)
+++ trunk/coregrind/m_oset.c 2005-08-14 23:52:32 UTC (rev 4414)
@@ -601,8 +601,6 @@
Int ch;
AvlNode* n;
=20
- vg_assert(t && t->root);
-
if (!t->root->left) {
if (!t->root->right) {
t->root =3D NULL;
|
|
From: <sv...@va...> - 2005-08-14 23:01:02
|
Author: njn
Date: 2005-08-15 00:00:57 +0100 (Mon, 15 Aug 2005)
New Revision: 4413
Log:
Trim some fat; removing this assertion makes Remove() about 5% faster.
Modified:
trunk/coregrind/m_oset.c
Modified: trunk/coregrind/m_oset.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_oset.c 2005-08-14 22:43:53 UTC (rev 4412)
+++ trunk/coregrind/m_oset.c 2005-08-14 23:00:57 UTC (rev 4413)
@@ -358,10 +358,8 @@
// Returns True if the depth of the tree has grown.
static Bool avl_insert(AvlTree* t, AvlNode* n)
{
- Int cmpres;
+ Int cmpres =3D cmp_key_root(t, n);
=20
- cmpres =3D cmp_key_root(t, n);
-
if (cmpres < 0) {
// Insert into the left subtree.
if (t->root->left) {
@@ -517,12 +515,8 @@
static Bool avl_remove(AvlTree* t, AvlNode* n)
{
Bool ch;
- Int cmpres;
+ Int cmpres =3D cmp_key_root(t, n);
=20
- vg_assert(t && t->root);
- =20
- cmpres =3D cmp_key_root(t, n);
-
if (cmpres < 0) {
// Remove from the left subtree
vg_assert(t->root->left);
|
|
From: <sv...@va...> - 2005-08-14 22:43:56
|
Author: njn
Date: 2005-08-14 23:43:53 +0100 (Sun, 14 Aug 2005)
New Revision: 4412
Log:
Add a thorough unit test for m_oset. Note that this is Memcheck
testing code that's part of Valgrind, which is a good thing.
Added:
trunk/memcheck/tests/oset_test.c
trunk/memcheck/tests/oset_test.stderr.exp
trunk/memcheck/tests/oset_test.stdout.exp
Modified:
trunk/memcheck/tests/Makefile.am
Modified: trunk/memcheck/tests/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/tests/Makefile.am 2005-08-14 22:14:55 UTC (rev 4411)
+++ trunk/memcheck/tests/Makefile.am 2005-08-14 22:43:53 UTC (rev 4412)
@@ -59,6 +59,7 @@
new_override.stderr.exp new_override.stdout.exp new_override.vgtest \
null_socket.stderr.exp null_socket.vgtest \
overlap.stderr.exp overlap.stdout.exp overlap.vgtest \
+ oset_test.stderr.exp oset_test.stdout.exp oset_test.vgtest \
partiallydefinedeq.vgtest partiallydefinedeq.stderr.exp \
partiallydefinedeq.stdout.exp \
pointer-trace.vgtest \
@@ -102,7 +103,7 @@
match-overrun \
memalign_test memalign2 memcmptest mempool mmaptest \
nanoleak new_nothrow \
- null_socket overlap \
+ null_socket oset_test overlap \
partiallydefinedeq \
pointer-trace \
post-syscall \
@@ -115,12 +116,13 @@
writev zeropage
=20
=20
-AM_CPPFLAGS =3D -I$(top_srcdir) -I$(top_srcdir)/include -I$(top_builddir=
)/include -I@VEX_DIR@/pub
+AM_CPPFLAGS =3D -I$(top_srcdir) -I$(top_srcdir)/include -I$(top_srcdir)/=
coregrind -I$(top_builddir)/include -I@VEX_DIR@/pub
AM_CFLAGS =3D $(WERROR) -Winline -Wall -Wshadow -g=20
AM_CXXFLAGS =3D $(AM_CFLAGS)
=20
# Extra stuff for C tests
memcmptest_CFLAGS =3D $(AM_CFLAGS) -fno-builtin-memcmp
+oset_test_CFLAGS =3D -DVGA_$(VG_ARCH) -DVGO_$(VG_OS) -DVGP_$(VG_PLATFORM=
)
# Don't allow GCC to inline memcpy(), because then we can't intercept it
overlap_CFLAGS =3D $(AM_CFLAGS) -fno-builtin-memcpy
str_tester_CFLAGS =3D $(AM_CFLAGS) -Wno-shadow
Added: trunk/memcheck/tests/oset_test.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/tests/oset_test.c 2005-08-14 22:14:55 UTC (rev 4411)
+++ trunk/memcheck/tests/oset_test.c 2005-08-14 22:43:53 UTC (rev 4412)
@@ -0,0 +1,361 @@
+
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "pub_core_basics.h"
+#include "pub_core_libcbase.h"
+#include "pub_core_libcassert.h"
+#include "pub_core_libcprint.h"
+
+// I need this to avoid some signedness warnings, not sure why
+#define Char char
+
+// Crudely redirect various VG_(foo)() functions to their libc equivalen=
ts.
+#undef vg_assert
+#define vg_assert(e) assert(e)
+#undef vg_assert2
+#define vg_assert2(e, fmt, args...) assert(e)
+
+#define vgPlain_printf printf
+#define vgPlain_memset memset
+#define vgPlain_memcpy memcpy
+#define vgPlain_random random
+
+#include "coregrind/m_oset.c"
+
+#define NN 1000 // Size of OSets being created
+
+//----------------------------------------------------------------------=
-----
+// Int example
+//----------------------------------------------------------------------=
-----
+
+// This example shows that an element can be a single value (in this cas=
e an
+// Int), in which case the element is also the key.
+
+__attribute__((unused))
+static Char *intToStr(void *p)
+{
+ static char buf[16];
+ sprintf(buf, "%d", *(Int*)p);
+ return buf;
+}
+
+__attribute__((unused))
+static Int intCmp(void* vkey, void* velem)
+{
+ return *(Int*)vkey - *(Int*)velem;
+}
+
+void example1(void)
+{
+ Int i, v, n, prev;
+ Int* vs[NN];
+ Int *pv;
+
+ // Create a static OSet of Ints. This one uses fast (built-in)
+ // comparisons.
+ OSet* oset1 =3D VG_(OSet_Create)(0,
+ NULL,
+ (void*)malloc, free);
+
+ // Try some operations on an empty OSet to ensure they don't screw up=
.
+ vg_assert( ! VG_(OSet_Contains)(oset1, &v) );
+ vg_assert( ! VG_(OSet_Lookup)(oset1, &v) );
+ vg_assert( ! VG_(OSet_Remove)(oset1, &v) );
+ vg_assert( ! VG_(OSet_Next)(oset1) );
+ vg_assert( 0 =3D=3D VG_(OSet_Size)(oset1) );
+
+ // Create some elements, with gaps (they're all even) but no dups,
+ // and shuffle them randomly.
+ for (i =3D 0; i < NN; i++) {
+ vs[i] =3D VG_(OSet_AllocNode)(oset1, sizeof(Int));
+ *(vs[i]) =3D 2*i;
+ }
+ for (i =3D 0; i < NN; i++) {
+ Int r1 =3D random() % NN;
+ Int r2 =3D random() % NN;
+ Int* tmp=3D vs[r1];
+ vs[r1] =3D vs[r2];
+ vs[r2] =3D tmp;
+ }
+
+ // Insert the elements
+ for (i =3D 0; i < NN; i++) {
+ VG_(OSet_Insert)(oset1, vs[i]);
+ }
+
+ // Check the size
+ vg_assert( NN =3D=3D VG_(OSet_Size)(oset1) );
+
+ // Check we can find all the elements we inserted
+ for (i =3D 0; i < NN; i++) {
+ assert( VG_(OSet_Contains)(oset1, vs[i]) );
+ }
+
+ // Check we cannot find elements we did not insert, below, within (od=
d
+ // numbers), and above the inserted elements.
+ v =3D -1;
+ assert( ! VG_(OSet_Contains)(oset1, &v) );
+ for (i =3D 0; i < NN; i++) {
+ v =3D *(vs[i]) + 1;
+ assert( ! VG_(OSet_Contains)(oset1, &v) );
+ }
+ v =3D NN*2;
+ assert( ! VG_(OSet_Contains)(oset1, &v) );
+
+ // Check we can find all the elements we inserted, and the right valu=
es
+ // are returned.
+ for (i =3D 0; i < NN; i++) {
+ assert( vs[i] =3D=3D VG_(OSet_Lookup)(oset1, vs[i]) );
+ }
+
+ // Check that we can iterate over the OSet elements in sorted order, =
and
+ // there is the right number of them.
+ n =3D 0;
+ pv =3D NULL;
+ prev =3D -1;
+ VG_(OSet_ResetIter)(oset1);
+ while ( (pv =3D VG_(OSet_Next)(oset1)) ) {
+ Int curr =3D *pv;
+ assert(prev < curr);=20
+ prev =3D curr;
+ n++;
+ }
+ assert(NN =3D=3D n);
+ vg_assert( ! VG_(OSet_Next)(oset1) );
+ vg_assert( ! VG_(OSet_Next)(oset1) );
+
+ // Check that we can remove half of the elements, and that their valu=
es
+ // are as expected.
+ for (i =3D 0; i < NN; i +=3D 2) {
+ assert( pv =3D VG_(OSet_Remove)(oset1, vs[i]) );
+ assert( pv =3D=3D vs[i] );
+ }
+
+ // Check the size
+ vg_assert( NN/2 =3D=3D VG_(OSet_Size)(oset1) );
+
+ // Check we can find the remaining elements (with the right values).
+ for (i =3D 1; i < NN; i +=3D 2) {
+ assert( pv =3D VG_(OSet_Lookup)(oset1, vs[i]) );
+ assert( pv =3D=3D vs[i] );
+ }
+
+ // Check we cannot find any of the elements we removed.
+ for (i =3D 0; i < NN; i +=3D 2) {
+ assert( ! VG_(OSet_Contains)(oset1, vs[i]) );
+ }
+
+ // Check that we can remove the remaining half of the elements, and t=
hat
+ // their values are as expected.
+ for (i =3D 1; i < NN; i +=3D 2) {
+ assert( pv =3D VG_(OSet_Remove)(oset1, vs[i]) );
+ assert( pv =3D=3D vs[i] );
+ }
+
+ // Try some more operations on the empty OSet to ensure they don't sc=
rew up.
+ vg_assert( ! VG_(OSet_Contains)(oset1, &v) );
+ vg_assert( ! VG_(OSet_Lookup)(oset1, &v) );
+ vg_assert( ! VG_(OSet_Remove)(oset1, &v) );
+ vg_assert( ! VG_(OSet_Next)(oset1) );
+ vg_assert( 0 =3D=3D VG_(OSet_Size)(oset1) );
+
+ // Free a few elements
+ VG_(OSet_FreeNode)(oset1, vs[0]);
+ VG_(OSet_FreeNode)(oset1, vs[1]);
+ VG_(OSet_FreeNode)(oset1, vs[2]);
+
+ // Re-insert remaining elements, to give OSet_Destroy something to wo=
rk with.
+ for (i =3D 3; i < NN; i++) {
+ VG_(OSet_Insert)(oset1, vs[i]);
+ }
+
+ // Print the list
+ OSet_Print(oset1, "foo", intToStr);
+
+ // Destroy the OSet
+ VG_(OSet_Destroy)(oset1);
+}
+
+
+//----------------------------------------------------------------------=
-----
+// Struct example
+//----------------------------------------------------------------------=
-----
+
+// This element shows that a key can be in the middle of the element, an=
d
+// be of arbitrary size and even span multiple (contiguous) fields. It
+// also demonstrates how an OSet can be used to implement a list of
+// non-overlapping intervals.
+
+typedef struct {
+ Int b1;
+ Addr first;
+ Addr last;
+ Int b2;
+}
+Block;
+
+__attribute__((unused))
+static Char *blockToStr(void *p)
+{
+ static char buf[32];
+ Block* b =3D (Block*)p;
+ sprintf(buf, "<(%d) %lu..%lu (%d)>", b->b1, b->first, b->last, b->b2)=
;
+ return buf;
+}
+
+static Int blockCmp(void* vkey, void* velem)
+{
+ Addr key =3D *(Addr*)vkey;
+ Block* elem =3D (Block*)velem;
+
+ assert(elem->first <=3D elem->last);
+ if (key < elem->first) return -1;
+ if (key > elem->last) return 1;
+ return 0;
+}
+
+void example2(void)
+{
+ Int i, n;
+ Addr a;
+ Block* vs[NN];
+ Block v, prev;
+ Block *pv;
+
+ // Create a dynamic OSet of Blocks. This one uses slow (custom)
+ // comparisons.
+ OSet* oset2 =3D VG_(OSet_Create)(offsetof(Block, first),
+ blockCmp,
+ (void*)malloc, free);
+
+ // Try some operations on an empty OSet to ensure they don't screw up=
.
+ vg_assert( ! VG_(OSet_Contains)(oset2, &v) );
+ vg_assert( ! VG_(OSet_Lookup)(oset2, &v) );
+ vg_assert( ! VG_(OSet_Remove)(oset2, &v) );
+ vg_assert( ! VG_(OSet_Next)(oset2) );
+ vg_assert( 0 =3D=3D VG_(OSet_Size)(oset2) );
+
+ // Create some inputs, with gaps -- intervals are 1..3, 11..13, ... -=
- but
+ // no dups, and shuffle them randomly.
+ for (i =3D 0; i < NN; i++) {
+ vs[i] =3D VG_(OSet_AllocNode)(oset2, sizeof(Block));
+ vs[i]->b1 =3D i;
+ vs[i]->first =3D i*10 + 1;
+ vs[i]->last =3D vs[i]->first + 2;
+ vs[i]->b2 =3D i+1;
+ }
+ for (i =3D 0; i < NN; i++) {
+ Int r1 =3D random() % NN;
+ Int r2 =3D random() % NN;
+ Block* tmp =3D vs[r1];
+ vs[r1] =3D vs[r2];
+ vs[r2] =3D tmp;
+ }
+
+ // Insert the elements
+ for (i =3D 0; i < NN; i++) {
+ VG_(OSet_Insert)(oset2, vs[i]);
+ }
+
+ // Check the size
+ vg_assert( NN =3D=3D VG_(OSet_Size)(oset2) );
+
+ // Check we can find all the elements we inserted, within the full ra=
nge
+ // of each Block.
+ for (i =3D 0; i < NN; i++) {
+ a =3D vs[i]->first + 0; assert( VG_(OSet_Contains)(oset2, &a) )=
;
+ a =3D vs[i]->first + 1; assert( VG_(OSet_Contains)(oset2, &a) )=
;
+ a =3D vs[i]->first + 2; assert( VG_(OSet_Contains)(oset2, &a) )=
;
+ }
+
+ // Check we cannot find elements we did not insert, below and above t=
he
+ // ranges of the inserted elements.
+ a =3D 0;
+ assert( ! VG_(OSet_Contains)(oset2, &a) );
+ for (i =3D 0; i < NN; i++) {
+ a =3D vs[i]->first - 1; assert( ! VG_(OSet_Contains)(oset2, &a)=
);
+ a =3D vs[i]->first + 3; assert( ! VG_(OSet_Contains)(oset2, &a)=
);
+ }
+
+ // Check we can find all the elements we inserted, and the right valu=
es
+ // are returned.
+ for (i =3D 0; i < NN; i++) {
+ a =3D vs[i]->first + 0; assert( vs[i] =3D=3D VG_(OSet_Lookup)(o=
set2, &a) );
+ a =3D vs[i]->first + 1; assert( vs[i] =3D=3D VG_(OSet_Lookup)(o=
set2, &a) );
+ a =3D vs[i]->first + 2; assert( vs[i] =3D=3D VG_(OSet_Lookup)(o=
set2, &a) );
+ }
+
+ // Check that we can iterate over the OSet elements in sorted order, =
and
+ // there is the right number of them.
+ n =3D 0;
+ pv =3D NULL;
+ prev.last =3D 0;
+ VG_(OSet_ResetIter)(oset2);
+ while ( (pv =3D VG_(OSet_Next)(oset2)) ) {
+ Block curr =3D *pv;
+ assert(prev.last < curr.first);=20
+ prev =3D curr;
+ n++;
+ }
+ assert(NN =3D=3D n);
+ vg_assert( ! VG_(OSet_Next)(oset2) );
+ vg_assert( ! VG_(OSet_Next)(oset2) );
+
+ // Check that we can remove half of the elements, and that their valu=
es
+ // are as expected.
+ for (i =3D 0; i < NN; i +=3D 2) {
+ a =3D vs[i]->first; assert( vs[i] =3D=3D VG_(OSet_Remove)(oset2=
, &a) );
+ }
+
+ // Check the size
+ vg_assert( NN/2 =3D=3D VG_(OSet_Size)(oset2) );
+
+ // Check we can find the remaining elements (with the right values).
+ for (i =3D 1; i < NN; i +=3D 2) {
+ a =3D vs[i]->first + 0; assert( vs[i] =3D=3D VG_(OSet_Lookup)(o=
set2, &a) );
+ a =3D vs[i]->first + 1; assert( vs[i] =3D=3D VG_(OSet_Lookup)(o=
set2, &a) );
+ a =3D vs[i]->first + 2; assert( vs[i] =3D=3D VG_(OSet_Lookup)(o=
set2, &a) );
+ }
+
+ // Check we cannot find any of the elements we removed.
+ for (i =3D 0; i < NN; i +=3D 2) {
+ a =3D vs[i]->first + 0; assert( ! VG_(OSet_Contains)(oset2, &a)=
);
+ a =3D vs[i]->first + 1; assert( ! VG_(OSet_Contains)(oset2, &a)=
);
+ a =3D vs[i]->first + 2; assert( ! VG_(OSet_Contains)(oset2, &a)=
);
+ }
+
+ // Check that we can remove the remaining half of the elements, and t=
hat
+ // their values are as expected.
+ for (i =3D 1; i < NN; i +=3D 2) {
+ a =3D vs[i]->first; assert( vs[i] =3D=3D VG_(OSet_Remove)(oset2=
, &a) );
+ }
+
+ // Try some more operations on the empty OSet to ensure they don't sc=
rew up.
+ vg_assert( ! VG_(OSet_Contains)(oset2, &v) );
+ vg_assert( ! VG_(OSet_Lookup)(oset2, &v) );
+ vg_assert( ! VG_(OSet_Remove)(oset2, &v) );
+ vg_assert( ! VG_(OSet_Next)(oset2) );
+ vg_assert( 0 =3D=3D VG_(OSet_Size)(oset2) );
+
+ // Re-insert all elements, to give OSet_Destroy something to work wit=
h.
+ for (i =3D 0; i < NN; i++) {
+ VG_(OSet_Insert)(oset2, vs[i]);
+ }
+
+ // Destroy the OSet
+ VG_(OSet_Destroy)(oset2);
+}
+
+//----------------------------------------------------------------------=
-
+// main()
+//----------------------------------------------------------------------=
-
+
+int main(void)
+{
+ example1();
+ example2();
+ return 0;
+}
Added: trunk/memcheck/tests/oset_test.stderr.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Added: trunk/memcheck/tests/oset_test.stdout.exp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/tests/oset_test.stdout.exp 2005-08-14 22:14:55 UTC (re=
v 4411)
+++ trunk/memcheck/tests/oset_test.stdout.exp 2005-08-14 22:43:53 UTC (re=
v 4412)
@@ -0,0 +1,999 @@
+-- start foo ----------------
+.. .. .. .. .. .. .. .. .. .. 1998
+.. .. .. .. .. .. .. .. .. 1996
+.. .. .. .. .. .. .. .. .. .. 1994
+.. .. .. .. .. .. .. .. 1992
+.. .. .. .. .. .. .. .. .. 1990
+.. .. .. .. .. .. .. 1988
+.. .. .. .. .. .. .. .. .. 1986
+.. .. .. .. .. .. .. .. .. .. 1984
+.. .. .. .. .. .. .. .. 1982
+.. .. .. .. .. .. .. .. .. 1980
+.. .. .. .. .. .. 1978
+.. .. .. .. .. .. .. .. .. .. 1976
+.. .. .. .. .. .. .. .. .. 1974
+.. .. .. .. .. .. .. .. .. .. 1972
+.. .. .. .. .. .. .. .. 1970
+.. .. .. .. .. .. .. .. .. 1968
+.. .. .. .. .. .. .. 1966
+.. .. .. .. .. .. .. .. .. .. 1964
+.. .. .. .. .. .. .. .. .. 1962
+.. .. .. .. .. .. .. .. .. .. 1960
+.. .. .. .. .. .. .. .. .. .. .. 1958
+.. .. .. .. .. .. .. .. 1956
+.. .. .. .. .. .. .. .. .. 1954
+.. .. .. .. .. .. .. .. .. .. 1952
+.. .. .. .. .. 1950
+.. .. .. .. .. .. .. .. .. .. 1948
+.. .. .. .. .. .. .. .. .. 1946
+.. .. .. .. .. .. .. .. .. .. 1944
+.. .. .. .. .. .. .. .. 1942
+.. .. .. .. .. .. .. .. .. 1940
+.. .. .. .. .. .. .. .. .. .. 1938
+.. .. .. .. .. .. .. 1936
+.. .. .. .. .. .. .. .. .. 1934
+.. .. .. .. .. .. .. .. .. .. 1932
+.. .. .. .. .. .. .. .. 1930
+.. .. .. .. .. .. .. .. .. 1928
+.. .. .. .. .. .. 1926
+.. .. .. .. .. .. .. .. .. 1924
+.. .. .. .. .. .. .. .. .. .. 1922
+.. .. .. .. .. .. .. .. 1920
+.. .. .. .. .. .. .. .. .. 1918
+.. .. .. .. .. .. .. 1916
+.. .. .. .. .. .. .. .. .. .. 1914
+.. .. .. .. .. .. .. .. .. 1912
+.. .. .. .. .. .. .. .. .. .. 1910
+.. .. .. .. .. .. .. .. 1908
+.. .. .. .. .. .. .. .. .. 1906
+.. .. .. .. 1904
+.. .. .. .. .. .. .. .. .. 1902
+.. .. .. .. .. .. .. .. 1900
+.. .. .. .. .. .. .. .. .. 1898
+.. .. .. .. .. .. .. 1896
+.. .. .. .. .. .. .. .. .. .. 1894
+.. .. .. .. .. .. .. .. .. 1892
+.. .. .. .. .. .. .. .. .. .. 1890
+.. .. .. .. .. .. .. .. 1888
+.. .. .. .. .. .. .. .. .. 1886
+.. .. .. .. .. .. 1884
+.. .. .. .. .. .. .. .. .. 1882
+.. .. .. .. .. .. .. .. 1880
+.. .. .. .. .. .. .. .. .. 1878
+.. .. .. .. .. .. .. .. .. .. 1876
+.. .. .. .. .. .. .. 1874
+.. .. .. .. .. .. .. .. .. 1872
+.. .. .. .. .. .. .. .. .. .. 1870
+.. .. .. .. .. .. .. .. 1868
+.. .. .. .. .. .. .. .. .. 1866
+.. .. .. .. .. 1864
+.. .. .. .. .. .. .. .. .. 1862
+.. .. .. .. .. .. .. .. 1860
+.. .. .. .. .. .. .. 1858
+.. .. .. .. .. .. .. .. 1856
+.. .. .. .. .. .. 1854
+.. .. .. .. .. .. .. .. 1852
+.. .. .. .. .. .. .. .. .. 1850
+.. .. .. .. .. .. .. 1848
+.. .. .. .. .. .. .. .. .. 1846
+.. .. .. .. .. .. .. .. 1844
+.. .. .. .. .. .. .. .. .. 1842
+.. .. .. 1840
+.. .. .. .. .. .. .. .. .. 1838
+.. .. .. .. .. .. .. .. .. .. 1836
+.. .. .. .. .. .. .. .. 1834
+.. .. .. .. .. .. .. .. .. 1832
+.. .. .. .. .. .. .. 1830
+.. .. .. .. .. .. .. .. .. 1828
+.. .. .. .. .. .. .. .. 1826
+.. .. .. .. .. .. .. .. .. .. 1824
+.. .. .. .. .. .. .. .. .. 1822
+.. .. .. .. .. .. 1820
+.. .. .. .. .. .. .. .. .. .. 1818
+.. .. .. .. .. .. .. .. .. 1816
+.. .. .. .. .. .. .. .. .. .. 1814
+.. .. .. .. .. .. .. .. 1812
+.. .. .. .. .. .. .. .. .. 1810
+.. .. .. .. .. .. .. 1808
+.. .. .. .. .. .. .. .. .. 1806
+.. .. .. .. .. .. .. .. 1804
+.. .. .. .. .. 1802
+.. .. .. .. .. .. .. .. 1800
+.. .. .. .. .. .. .. .. .. 1798
+.. .. .. .. .. .. .. 1796
+.. .. .. .. .. .. .. .. .. 1794
+.. .. .. .. .. .. .. .. 1792
+.. .. .. .. .. .. .. .. .. 1790
+.. .. .. .. .. .. 1788
+.. .. .. .. .. .. .. .. .. 1786
+.. .. .. .. .. .. .. .. 1784
+.. .. .. .. .. .. .. .. .. 1782
+.. .. .. .. .. .. .. 1780
+.. .. .. .. .. .. .. .. .. 1778
+.. .. .. .. .. .. .. .. 1776
+.. .. .. .. .. .. .. .. .. 1774
+.. .. .. .. 1772
+.. .. .. .. .. .. .. .. .. .. 1770
+.. .. .. .. .. .. .. .. .. 1768
+.. .. .. .. .. .. .. .. 1766
+.. .. .. .. .. .. .. .. .. 1764
+.. .. .. .. .. .. .. 1762
+.. .. .. .. .. .. .. .. .. .. 1760
+.. .. .. .. .. .. .. .. .. 1758
+.. .. .. .. .. .. .. .. 1756
+.. .. .. .. .. .. .. .. .. 1754
+.. .. .. .. .. .. .. .. .. .. 1752
+.. .. .. .. .. .. 1750
+.. .. .. .. .. .. .. .. .. .. 1748
+.. .. .. .. .. .. .. .. .. 1746
+.. .. .. .. .. .. .. .. .. .. 1744
+.. .. .. .. .. .. .. .. 1742
+.. .. .. .. .. .. .. .. .. .. 1740
+.. .. .. .. .. .. .. .. .. 1738
+.. .. .. .. .. .. .. 1736
+.. .. .. .. .. .. .. .. .. .. 1734
+.. .. .. .. .. .. .. .. .. 1732
+.. .. .. .. .. .. .. .. .. .. 1730
+.. .. .. .. .. .. .. .. 1728
+.. .. .. .. .. .. .. .. .. 1726
+.. .. .. .. .. 1724
+.. .. .. .. .. .. .. .. .. 1722
+.. .. .. .. .. .. .. .. 1720
+.. .. .. .. .. .. .. .. .. 1718
+.. .. .. .. .. .. .. 1716
+.. .. .. .. .. .. .. .. .. 1714
+.. .. .. .. .. .. .. .. 1712
+.. .. .. .. .. .. .. .. .. 1710
+.. .. .. .. .. .. 1708
+.. .. .. .. .. .. .. .. .. 1706
+.. .. .. .. .. .. .. .. 1704
+.. .. .. .. .. .. .. .. .. 1702
+.. .. .. .. .. .. .. 1700
+.. .. .. .. .. .. .. .. 1698
+.. .. 1696
+.. .. .. .. .. .. .. .. .. .. 1694
+.. .. .. .. .. .. .. .. .. 1692
+.. .. .. .. .. .. .. .. .. .. 1690
+.. .. .. .. .. .. .. .. 1688
+.. .. .. .. .. .. .. .. .. 1686
+.. .. .. .. .. .. .. .. .. .. 1684
+.. .. .. .. .. .. .. 1680
+.. .. .. .. .. .. .. .. 1678
+.. .. .. .. .. .. .. .. .. 1676
+.. .. .. .. .. .. 1672
+.. .. .. .. .. .. .. .. .. .. 1670
+.. .. .. .. .. .. .. .. .. 1668
+.. .. .. .. .. .. .. .. 1666
+.. .. .. .. .. .. .. .. .. .. .. 1664
+.. .. .. .. .. .. .. .. .. .. 1662
+.. .. .. .. .. .. .. .. .. 1660
+.. .. .. .. .. .. .. .. .. .. 1658
+.. .. .. .. .. .. .. .. .. .. .. 1656
+.. .. .. .. .. .. .. 1654
+.. .. .. .. .. .. .. .. .. 1652
+.. .. .. .. .. .. .. .. .. .. 1650
+.. .. .. .. .. .. .. .. 1648
+.. .. .. .. .. .. .. .. .. .. 1646
+.. .. .. .. .. .. .. .. .. 1644
+.. .. .. .. .. .. .. .. .. .. 1642
+.. .. .. .. .. 1640
+.. .. .. .. .. .. .. .. .. 1638
+.. .. .. .. .. .. .. .. 1636
+.. .. .. .. .. .. .. .. .. .. 1634
+.. .. .. .. .. .. .. .. .. 1632
+.. .. .. .. .. .. .. .. .. .. 1630
+.. .. .. .. .. .. .. 1628
+.. .. .. .. .. .. .. .. .. 1626
+.. .. .. .. .. .. .. .. 1624
+.. .. .. .. .. .. 1622
+.. .. .. .. .. .. .. .. .. .. 1620
+.. .. .. .. .. .. .. .. .. 1618
+.. .. .. .. .. .. .. .. .. .. 1616
+.. .. .. .. .. .. .. .. 1614
+.. .. .. .. .. .. .. .. .. 1612
+.. .. .. .. .. .. .. .. .. .. 1610
+.. .. .. .. .. .. .. 1608
+.. .. .. .. .. .. .. .. .. 1606
+.. .. .. .. .. .. .. .. 1604
+.. .. .. .. .. .. .. .. .. 1602
+.. .. .. .. 1600
+.. .. .. .. .. .. .. .. .. .. 1598
+.. .. .. .. .. .. .. .. .. 1596
+.. .. .. .. .. .. .. .. 1594
+.. .. .. .. .. .. .. .. .. 1592
+.. .. .. .. .. .. .. 1590
+.. .. .. .. .. .. .. .. .. 1588
+.. .. .. .. .. .. .. .. 1586
+.. .. .. .. .. .. .. .. .. .. 1584
+.. .. .. .. .. .. .. .. .. 1582
+.. .. .. .. .. .. .. .. .. .. 1580
+.. .. .. .. .. .. 1578
+.. .. .. .. .. .. .. .. .. .. 1576
+.. .. .. .. .. .. .. .. .. 1574
+.. .. .. .. .. .. .. .. 1572
+.. .. .. .. .. .. .. .. .. 1570
+.. .. .. .. .. .. .. 1568
+.. .. .. .. .. .. .. .. .. 1566
+.. .. .. .. .. .. .. .. 1564
+.. .. .. .. .. .. .. .. .. 1562
+.. .. .. .. .. 1560
+.. .. .. .. .. .. .. .. .. .. 1558
+.. .. .. .. .. .. .. .. .. 1556
+.. .. .. .. .. .. .. .. 1554
+.. .. .. .. .. .. .. .. .. .. 1552
+.. .. .. .. .. .. .. .. .. 1550
+.. .. .. .. .. .. .. 1548
+.. .. .. .. .. .. .. .. .. 1546
+.. .. .. .. .. .. .. .. 1544
+.. .. .. .. .. .. .. .. .. 1542
+.. .. .. .. .. .. 1540
+.. .. .. .. .. .. .. .. .. 1538
+.. .. .. .. .. .. .. .. 1536
+.. .. .. .. .. .. .. .. .. 1534
+.. .. .. .. .. .. .. 1532
+.. .. .. .. .. .. .. .. 1530
+.. .. .. .. .. .. .. .. .. 1528
+.. .. .. 1526
+.. .. .. .. .. .. .. .. .. 1524
+.. .. .. .. .. .. .. .. 1522
+.. .. .. .. .. .. .. 1520
+.. .. .. .. .. .. .. .. .. 1518
+.. .. .. .. .. .. .. .. .. .. 1516
+.. .. .. .. .. .. .. .. 1514
+.. .. .. .. .. .. .. .. .. .. 1512
+.. .. .. .. .. .. .. .. .. 1510
+.. .. .. .. .. .. 1508
+.. .. .. .. .. .. .. .. .. 1506
+.. .. .. .. .. .. .. .. 1504
+.. .. .. .. .. .. .. .. .. 1502
+.. .. .. .. .. .. .. 1500
+.. .. .. .. .. .. .. .. .. 1498
+.. .. .. .. .. .. .. .. 1496
+.. .. .. .. .. .. .. .. .. 1494
+.. .. .. .. .. .. .. .. .. .. 1492
+.. .. .. .. .. 1490
+.. .. .. .. .. .. .. .. .. .. 1488
+.. .. .. .. .. .. .. .. .. 1486
+.. .. .. .. .. .. .. .. .. .. 1484
+.. .. .. .. .. .. .. .. 1482
+.. .. .. .. .. .. .. .. .. 1480
+.. .. .. .. .. .. .. 1478
+.. .. .. .. .. .. .. .. .. .. 1476
+.. .. .. .. .. .. .. .. .. 1474
+.. .. .. .. .. .. .. .. 1472
+.. .. .. .. .. .. .. .. .. .. 1470
+.. .. .. .. .. .. .. .. .. 1468
+.. .. .. .. .. .. .. .. .. .. 1466
+.. .. .. .. .. .. 1464
+.. .. .. .. .. .. .. .. .. 1462
+.. .. .. .. .. .. .. .. 1460
+.. .. .. .. .. .. .. .. .. 1458
+.. .. .. .. .. .. .. 1456
+.. .. .. .. .. .. .. .. .. 1454
+.. .. .. .. .. .. .. .. 1452
+.. .. .. .. .. .. .. .. .. .. 1450
+.. .. .. .. .. .. .. .. .. 1448
+.. .. .. .. 1446
+.. .. .. .. .. .. .. .. .. .. 1444
+.. .. .. .. .. .. .. .. .. 1442
+.. .. .. .. .. .. .. .. 1440
+.. .. .. .. .. .. .. .. .. 1438
+.. .. .. .. .. .. .. .. .. .. 1436
+.. .. .. .. .. .. .. 1434
+.. .. .. .. .. .. .. .. .. .. 1432
+.. .. .. .. .. .. .. .. .. 1430
+.. .. .. .. .. .. .. .. 1428
+.. .. .. .. .. .. .. .. .. .. 1426
+.. .. .. .. .. .. .. .. .. 1424
+.. .. .. .. .. .. .. .. .. .. .. 1422
+.. .. .. .. .. .. .. .. .. .. 1420
+.. .. .. .. .. .. .. .. .. .. .. 1418
+.. .. .. .. .. .. 1416
+.. .. .. .. .. .. .. .. .. .. 1414
+.. .. .. .. .. .. .. .. .. 1412
+.. .. .. .. .. .. .. .. .. .. 1410
+.. .. .. .. .. .. .. .. .. .. .. 1408
+.. .. .. .. .. .. .. .. 1406
+.. .. .. .. .. .. .. .. .. .. 1404
+.. .. .. .. .. .. .. .. .. 1402
+.. .. .. .. .. .. .. .. .. .. 1400
+.. .. .. .. .. .. .. 1398
+.. .. .. .. .. .. .. .. .. .. 1396
+.. .. .. .. .. .. .. .. .. 1394
+.. .. .. .. .. .. .. .. .. .. .. 1392
+.. .. .. .. .. .. .. .. .. .. 1390
+.. .. .. .. .. .. .. .. 1388
+.. .. .. .. .. .. .. .. .. .. 1386
+.. .. .. .. .. .. .. .. .. 1384
+.. .. .. .. .. .. .. .. .. .. 1382
+.. .. .. .. .. .. .. .. .. .. .. 1380
+.. .. .. .. .. 1378
+.. .. .. .. .. .. .. .. .. .. 1376
+.. .. .. .. .. .. .. .. .. 1374
+.. .. .. .. .. .. .. .. .. .. 1372
+.. .. .. .. .. .. .. .. 1370
+.. .. .. .. .. .. .. .. .. .. 1368
+.. .. .. .. .. .. .. .. .. 1366
+.. .. .. .. .. .. .. 1364
+.. .. .. .. .. .. .. .. .. 1362
+.. .. .. .. .. .. .. .. .. .. 1360
+.. .. .. .. .. .. .. .. 1358
+.. .. .. .. .. .. .. .. .. 1356
+.. .. .. .. .. .. 1354
+.. .. .. .. .. .. .. .. .. 1352
+.. .. .. .. .. .. .. .. 1350
+.. .. .. .. .. .. .. .. .. .. 1348
+.. .. .. .. .. .. .. .. .. 1346
+.. .. .. .. .. .. .. 1344
+.. .. .. .. .. .. .. .. .. 1342
+.. .. .. .. .. .. .. .. .. .. 1340
+.. .. .. .. .. .. .. .. 1338
+.. .. .. .. .. .. .. .. .. .. 1336
+.. .. .. .. .. .. .. .. .. 1334
+.. .. .. .. .. .. .. .. .. .. 1332
+.. 1330
+.. .. .. .. .. .. .. .. 1328
+.. .. .. .. .. .. .. .. .. 1326
+.. .. .. .. .. .. .. 1324
+.. .. .. .. .. .. .. .. .. 1322
+.. .. .. .. .. .. .. .. 1320
+.. .. .. .. .. .. .. .. .. 1318
+.. .. .. .. .. .. 1316
+.. .. .. .. .. .. .. .. .. 1314
+.. .. .. .. .. .. .. .. 1312
+.. .. .. .. .. .. .. .. .. 1310
+.. .. .. .. .. .. .. 1308
+.. .. .. .. .. .. .. .. .. 1306
+.. .. .. .. .. .. .. .. .. .. 1304
+.. .. .. .. .. .. .. .. 1302
+.. .. .. .. .. .. .. .. .. .. 1300
+.. .. .. .. .. .. .. .. .. 1298
+.. .. .. .. .. 1296
+.. .. .. .. .. .. .. .. .. 1294
+.. .. .. .. .. .. .. .. 1292
+.. .. .. .. .. .. .. .. .. 1290
+.. .. .. .. .. .. .. 1288
+.. .. .. .. .. .. .. .. .. 1286
+.. .. .. .. .. .. .. .. 1284
+.. .. .. .. .. .. .. .. .. 1282
+.. .. .. .. .. .. 1280
+.. .. .. .. .. .. .. .. 1278
+.. .. .. .. .. .. .. 1276
+.. .. .. .. .. .. .. .. 1274
+.. .. .. .. 1272
+.. .. .. .. .. .. .. .. .. 1270
+.. .. .. .. .. .. .. .. 1268
+.. .. .. .. .. .. .. .. .. 1266
+.. .. .. .. .. .. .. 1264
+.. .. .. .. .. .. .. .. 1262
+.. .. .. .. .. .. 1260
+.. .. .. .. .. .. .. .. .. .. 1258
+.. .. .. .. .. .. .. .. .. 1256
+.. .. .. .. .. .. .. .. .. .. 1254
+.. .. .. .. .. .. .. .. 1252
+.. .. .. .. .. .. .. .. .. 1250
+.. .. .. .. .. .. .. 1248
+.. .. .. .. .. .. .. .. .. 1246
+.. .. .. .. .. .. .. .. .. .. 1244
+.. .. .. .. .. .. .. .. 1242
+.. .. .. .. .. .. .. .. .. 1240
+.. .. .. .. .. .. .. .. .. .. 1238
+.. .. .. .. .. 1236
+.. .. .. .. .. .. .. .. .. 1234
+.. .. .. .. .. .. .. .. .. .. 1232
+.. .. .. .. .. .. .. .. 1230
+.. .. .. .. .. .. .. .. .. 1228
+.. .. .. .. .. .. .. 1226
+.. .. .. .. .. .. .. .. 1224
+.. .. .. .. .. .. .. .. .. 1222
+.. .. .. .. .. .. 1220
+.. .. .. .. .. .. .. .. .. 1218
+.. .. .. .. .. .. .. .. 1216
+.. .. .. .. .. .. .. .. .. 1214
+.. .. .. .. .. .. .. 1212
+.. .. .. .. .. .. .. .. .. 1210
+.. .. .. .. .. .. .. .. 1208
+.. .. .. 1206
+.. .. .. .. .. .. .. .. .. 1204
+.. .. .. .. .. .. .. .. 1202
+.. .. .. .. .. .. .. 1200
+.. .. .. .. .. .. .. .. 1198
+.. .. .. .. .. .. 1196
+.. .. .. .. .. .. .. .. 1194
+.. .. .. .. .. .. .. 1192
+.. .. .. .. .. .. .. .. .. 1190
+.. .. .. .. .. .. .. .. 1188
+.. .. .. .. .. 1186
+.. .. .. .. .. .. .. .. 1184
+.. .. .. .. .. .. .. 1182
+.. .. .. .. .. .. .. .. 1180
+.. .. .. .. .. .. 1178
+.. .. .. .. .. .. .. .. 1176
+.. .. .. .. .. .. .. .. .. 1174
+.. .. .. .. .. .. .. 1172
+.. .. .. .. .. .. .. .. .. 1170
+.. .. .. .. .. .. .. .. 1168
+.. .. .. .. 1166
+.. .. .. .. .. .. .. .. 1164
+.. .. .. .. .. .. .. 1162
+.. .. .. .. .. .. .. .. 1160
+.. .. .. .. .. .. 1158
+.. .. .. .. .. .. .. .. .. 1156
+.. .. .. .. .. .. .. .. 1154
+.. .. .. .. .. .. .. .. .. 1152
+.. .. .. .. .. .. .. 1150
+.. .. .. .. .. .. .. .. 1148
+.. .. .. .. .. 1146
+.. .. .. .. .. .. .. .. .. 1144
+.. .. .. .. .. .. .. .. 1142
+.. .. .. .. .. .. .. .. .. 1140
+.. .. .. .. .. .. .. 1138
+.. .. .. .. .. .. .. .. .. 1136
+.. .. .. .. .. .. .. .. 1134
+.. .. .. .. .. .. .. .. .. 1132
+.. .. .. .. .. .. 1130
+.. .. .. .. .. .. .. .. 1128
+.. .. .. .. .. .. .. 1126
+.. .. .. .. .. .. .. .. 1124
+.. .. .. .. .. .. .. .. .. 1122
+.. .. 1120
+.. .. .. .. .. .. .. .. .. 1118
+.. .. .. .. .. .. .. .. 1116
+.. .. .. .. .. .. .. .. .. .. 1114
+.. .. .. .. .. .. .. .. .. 1112
+.. .. .. .. .. .. .. 1110
+.. .. .. .. .. .. .. .. .. 1108
+.. .. .. .. .. .. .. .. 1106
+.. .. .. .. .. .. 1104
+.. .. .. .. .. .. .. .. .. 1102
+.. .. .. .. .. .. .. .. 1100
+.. .. .. .. .. .. .. 1098
+.. .. .. .. .. .. .. .. .. .. 1096
+.. .. .. .. .. .. .. .. .. 1094
+.. .. .. .. .. .. .. .. 1092
+.. .. .. .. .. .. .. .. .. 1090
+.. .. .. .. .. .. .. .. .. .. 1088
+.. .. .. .. .. 1086
+.. .. .. .. .. .. .. .. .. .. 1084
+.. .. .. .. .. .. .. .. .. 1082
+.. .. .. .. .. .. .. .. .. .. 1080
+.. .. .. .. .. .. .. .. 1078
+.. .. .. .. .. .. .. .. .. 1076
+.. .. .. .. .. .. .. .. .. .. 1074
+.. .. .. .. .. .. .. 1072
+.. .. .. .. .. .. .. .. .. 1070
+.. .. .. .. .. .. .. .. 1068
+.. .. .. .. .. .. .. .. .. 1066
+.. .. .. .. .. .. 1064
+.. .. .. .. .. .. .. .. .. 1062
+.. .. .. .. .. .. .. .. 1060
+.. .. .. .. .. .. .. 1058
+.. .. .. .. .. .. .. .. .. 1056
+.. .. .. .. .. .. .. .. .. .. 1054
+.. .. .. .. .. .. .. .. 1052
+.. .. .. .. .. .. .. .. .. .. 1050
+.. .. .. .. .. .. .. .. .. 1048
+.. .. .. .. 1046
+.. .. .. .. .. .. .. .. .. 1044
+.. .. .. .. .. .. .. .. 1042
+.. .. .. .. .. .. .. .. .. 1040
+.. .. .. .. .. .. .. 1038
+.. .. .. .. .. .. .. .. 1036
+.. .. .. .. .. .. .. .. .. 1034
+.. .. .. .. .. .. 1032
+.. .. .. .. .. .. .. .. 1030
+.. .. .. .. .. .. .. 1028
+.. .. .. .. .. .. .. .. .. 1026
+.. .. .. .. .. .. .. .. 1024
+.. .. .. .. .. .. .. .. .. 1022
+.. .. .. .. .. 1020
+.. .. .. .. .. .. .. 1018
+.. .. .. .. .. .. 1016
+.. .. .. .. .. .. .. .. 1014
+.. .. .. .. .. .. .. 1012
+.. .. .. .. .. .. .. .. 1010
+.. .. .. 1008
+.. .. .. .. .. .. .. .. .. 1006
+.. .. .. .. .. .. .. .. 1004
+.. .. .. .. .. .. .. .. .. 1002
+.. .. .. .. .. .. .. 1000
+.. .. .. .. .. .. .. .. .. 998
+.. .. .. .. .. .. .. .. 996
+.. .. .. .. .. .. 994
+.. .. .. .. .. .. .. .. 992
+.. .. .. .. .. .. .. 990
+.. .. .. .. .. .. .. .. .. 988
+.. .. .. .. .. .. .. .. 986
+.. .. .. .. .. .. .. .. .. 984
+.. .. .. .. .. 982
+.. .. .. .. .. .. .. .. 980
+.. .. .. .. .. .. .. 978
+.. .. .. .. .. .. 976
+.. .. .. .. .. .. .. .. 974
+.. .. .. .. .. .. .. 972
+.. .. .. .. .. .. .. .. 970
+.. .. .. .. .. .. .. .. .. 968
+.. .. .. .. 966
+.. .. .. .. .. .. .. .. .. 964
+.. .. .. .. .. .. .. .. 962
+.. .. .. .. .. .. .. .. .. 960
+.. .. .. .. .. .. .. 958
+.. .. .. .. .. .. .. .. .. 956
+.. .. .. .. .. .. .. .. 954
+.. .. .. .. .. .. .. .. .. 952
+.. .. .. .. .. .. .. .. .. .. 950
+.. .. .. .. .. .. 948
+.. .. .. .. .. .. .. .. .. 946
+.. .. .. .. .. .. .. .. 944
+.. .. .. .. .. .. .. .. .. 942
+.. .. .. .. .. .. .. 940
+.. .. .. .. .. .. .. .. .. .. 938
+.. .. .. .. .. .. .. .. .. 936
+.. .. .. .. .. .. .. .. .. .. 934
+.. .. .. .. .. .. .. .. 932
+.. .. .. .. .. .. .. .. .. 930
+.. .. .. .. .. .. .. .. .. .. 928
+.. .. .. .. .. 926
+.. .. .. .. .. .. .. .. .. .. 924
+.. .. .. .. .. .. .. .. .. 922
+.. .. .. .. .. .. .. .. 920
+.. .. .. .. .. .. .. .. .. .. 918
+.. .. .. .. .. .. .. .. .. 916
+.. .. .. .. .. .. .. .. .. .. 914
+.. .. .. .. .. .. .. 912
+.. .. .. .. .. .. .. .. .. 910
+.. .. .. .. .. .. .. .. 908
+.. .. .. .. .. .. .. .. .. .. 906
+.. .. .. .. .. .. .. .. .. 904
+.. .. .. .. .. .. .. .. .. .. 902
+.. .. .. .. .. .. 900
+.. .. .. .. .. .. .. .. .. 898
+.. .. .. .. .. .. .. .. 896
+.. .. .. .. .. .. .. .. .. 894
+.. .. .. .. .. .. .. 892
+.. .. .. .. .. .. .. .. .. .. 890
+.. .. .. .. .. .. .. .. .. 888
+.. .. .. .. .. .. .. .. .. .. 886
+.. .. .. .. .. .. .. .. 884
+.. .. .. .. .. .. .. .. .. .. 882
+.. .. .. .. .. .. .. .. .. 880
+878
+.. .. .. .. .. .. .. .. .. 876
+.. .. .. .. .. .. .. .. 874
+.. .. .. .. .. .. .. .. .. 872
+.. .. .. .. .. .. .. 870
+.. .. .. .. .. .. .. .. .. .. 868
+.. .. .. .. .. .. .. .. .. 866
+.. .. .. .. .. .. .. .. .. .. 864
+.. .. .. .. .. .. .. .. 862
+.. .. .. .. .. .. .. .. .. 860
+.. .. .. .. .. .. 858
+.. .. .. .. .. .. .. .. .. 856
+.. .. .. .. .. .. .. .. 854
+.. .. .. .. .. .. .. 852
+.. .. .. .. .. .. .. .. 850
+.. .. .. .. .. .. .. .. .. 848
+.. .. .. .. .. 846
+.. .. .. .. .. .. .. .. .. 844
+.. .. .. .. .. .. .. .. 842
+.. .. .. .. .. .. .. .. .. 840
+.. .. .. .. .. .. .. 838
+.. .. .. .. .. .. .. .. .. 836
+.. .. .. .. .. .. .. .. 834
+.. .. .. .. .. .. .. .. .. 832
+.. .. .. .. .. .. 830
+.. .. .. .. .. .. .. .. 828
+.. .. .. .. .. .. .. 826
+.. .. .. .. .. .. .. .. 824
+.. .. .. .. .. .. .. .. .. 822
+.. .. .. .. 820
+.. .. .. .. .. .. .. .. .. .. 818
+.. .. .. .. .. .. .. .. .. 816
+.. .. .. .. .. .. .. .. 814
+.. .. .. .. .. .. .. .. .. .. 812
+.. .. .. .. .. .. .. .. .. 810
+.. .. .. .. .. .. .. 808
+.. .. .. .. .. .. .. .. .. 806
+.. .. .. .. .. .. .. .. 804
+.. .. .. .. .. .. 802
+.. .. .. .. .. .. .. .. .. .. 800
+.. .. .. .. .. .. .. .. .. 798
+.. .. .. .. .. .. .. .. .. .. 796
+.. .. .. .. .. .. .. .. 794
+.. .. .. .. .. .. .. .. .. .. 792
+.. .. .. .. .. .. .. .. .. 790
+.. .. .. .. .. .. .. .. .. .. 788
+.. .. .. .. .. .. .. 786
+.. .. .. .. .. .. .. .. .. 784
+.. .. .. .. .. .. .. .. .. .. 782
+.. .. .. .. .. .. .. .. 780
+.. .. .. .. .. .. .. .. .. 778
+.. .. .. .. .. .. .. .. .. .. 776
+.. .. .. .. .. 774
+.. .. .. .. .. .. .. .. 772
+.. .. .. .. .. .. .. 770
+.. .. .. .. .. .. .. .. .. 768
+.. .. .. .. .. .. .. .. 766
+.. .. .. .. .. .. 764
+.. .. .. .. .. .. .. .. .. .. 762
+.. .. .. .. .. .. .. .. .. 760
+.. .. .. .. .. .. .. .. 758
+.. .. .. .. .. .. .. .. .. .. 756
+.. .. .. .. .. .. .. .. .. 754
+.. .. .. .. .. .. .. .. .. .. 752
+.. .. .. .. .. .. .. 750
+.. .. .. .. .. .. .. .. .. 748
+.. .. .. .. .. .. .. .. 746
+.. .. .. .. .. .. .. .. .. 744
+.. .. .. 742
+.. .. .. .. .. .. .. .. 740
+.. .. .. .. .. .. .. 738
+.. .. .. .. .. .. .. .. .. 736
+.. .. .. .. .. .. .. .. 734
+.. .. .. .. .. .. 732
+.. .. .. .. .. .. .. .. .. 730
+.. .. .. .. .. .. .. .. 728
+.. .. .. .. .. .. .. .. .. 726
+.. .. .. .. .. .. .. 724
+.. .. .. .. .. .. .. .. .. 722
+.. .. .. .. .. .. .. .. 720
+.. .. .. .. .. .. .. .. .. 718
+.. .. .. .. .. 716
+.. .. .. .. .. .. .. .. .. 714
+.. .. .. .. .. .. .. .. 712
+.. .. .. .. .. .. .. .. .. 710
+.. .. .. .. .. .. .. 708
+.. .. .. .. .. .. .. .. 706
+.. .. .. .. .. .. .. .. .. 704
+.. .. .. .. .. .. 702
+.. .. .. .. .. .. .. .. 700
+.. .. .. .. .. .. .. .. .. 698
+.. .. .. .. .. .. .. 696
+.. .. .. .. .. .. .. .. .. 694
+.. .. .. .. .. .. .. .. 692
+.. .. .. .. .. .. .. .. .. 690
+.. .. .. .. 688
+.. .. .. .. .. .. .. .. .. 686
+.. .. .. .. .. .. .. .. 684
+.. .. .. .. .. .. .. .. .. 682
+.. .. .. .. .. .. .. 680
+.. .. .. .. .. .. .. .. 678
+.. .. .. .. .. .. 676
+.. .. .. .. .. .. .. .. .. 674
+.. .. .. .. .. .. .. .. 672
+.. .. .. .. .. .. .. .. .. 670
+.. .. .. .. .. .. .. 668
+.. .. .. .. .. .. .. .. 666
+.. .. .. .. .. .. .. .. .. 664
+.. .. .. .. .. 662
+.. .. .. .. .. .. .. .. .. .. 660
+.. .. .. .. .. .. .. .. .. 658
+.. .. .. .. .. .. .. .. 656
+.. .. .. .. .. .. .. .. .. 654
+.. .. .. .. .. .. .. 652
+.. .. .. .. .. .. .. .. .. 650
+.. .. .. .. .. .. .. .. 648
+.. .. .. .. .. .. 646
+.. .. .. .. .. .. .. .. .. 644
+.. .. .. .. .. .. .. .. 642
+.. .. .. .. .. .. .. .. .. 640
+.. .. .. .. .. .. .. 638
+.. .. .. .. .. .. .. .. .. 636
+.. .. .. .. .. .. .. .. 634
+.. .. .. .. .. .. .. .. .. .. 632
+.. .. .. .. .. .. .. .. .. 630
+.. .. 628
+.. .. .. .. .. .. .. .. .. .. 626
+.. .. .. .. .. .. .. .. .. 624
+.. .. .. .. .. .. .. .. 622
+.. .. .. .. .. .. .. .. .. 620
+.. .. .. .. .. .. .. .. .. .. 618
+.. .. .. .. .. .. .. 616
+.. .. .. .. .. .. .. .. .. .. 614
+.. .. .. .. .. .. .. .. .. 612
+.. .. .. .. .. .. .. .. 610
+.. .. .. .. .. .. .. .. .. .. 608
+.. .. .. .. .. .. .. .. .. 606
+.. .. .. .. .. .. .. .. .. .. 604
+.. .. .. .. .. .. .. .. .. .. .. 602
+.. .. .. .. .. .. 600
+.. .. .. .. .. .. .. .. .. 598
+.. .. .. .. .. .. .. .. 596
+.. .. .. .. .. .. .. .. .. 594
+.. .. .. .. .. .. .. 592
+.. .. .. .. .. .. .. .. .. .. 590
+.. .. .. .. .. .. .. .. .. 588
+.. .. .. .. .. .. .. .. .. .. 586
+.. .. .. .. .. .. .. .. 584
+.. .. .. .. .. .. .. .. .. 582
+.. .. .. .. .. .. .. .. .. .. 580
+.. .. .. .. .. 578
+.. .. .. .. .. .. .. .. 576
+.. .. .. .. .. .. .. .. .. 574
+.. .. .. .. .. .. .. 572
+.. .. .. .. .. .. .. .. 570
+.. .. .. .. .. .. .. .. .. 568
+.. .. .. .. .. .. 566
+.. .. .. .. .. .. .. .. .. 564
+.. .. .. .. .. .. .. .. .. .. 562
+.. .. .. .. .. .. .. .. 560
+.. .. .. .. .. .. .. .. .. 558
+.. .. .. .. .. .. .. .. .. .. 556
+.. .. .. .. .. .. .. 554
+.. .. .. .. .. .. .. .. 552
+.. .. .. .. .. .. .. .. .. 550
+.. .. .. .. 548
+.. .. .. .. .. .. .. .. .. .. 546
+.. .. .. .. .. .. .. .. .. 544
+.. .. .. .. .. .. .. .. 542
+.. .. .. .. .. .. .. .. .. .. 540
+.. .. .. .. .. .. .. .. .. 538
+.. .. .. .. .. .. .. .. .. .. 536
+.. .. .. .. .. .. .. 534
+.. .. .. .. .. .. .. .. .. 532
+.. .. .. .. .. .. .. .. 530
+.. .. .. .. .. .. 528
+.. .. .. .. .. .. .. .. .. .. 526
+.. .. .. .. .. .. .. .. .. 524
+.. .. .. .. .. .. .. .. 522
+.. .. .. .. .. .. .. .. .. .. 520
+.. .. .. .. .. .. .. .. .. 518
+.. .. .. .. .. .. .. 516
+.. .. .. .. .. .. .. .. .. 514
+.. .. .. .. .. .. .. .. .. .. 512
+.. .. .. .. .. .. .. .. 510
+.. .. .. .. .. .. .. .. .. 508
+.. .. .. .. .. .. .. .. .. .. 506
+.. .. .. .. .. 504
+.. .. .. .. .. .. .. .. 502
+.. .. .. .. .. .. .. 500
+.. .. .. .. .. .. .. .. .. 498
+.. .. .. .. .. .. .. .. 496
+.. .. .. .. .. .. .. .. .. 494
+.. .. .. .. .. .. 492
+.. .. .. .. .. .. .. .. .. 490
+.. .. .. .. .. .. .. .. 488
+.. .. .. .. .. .. .. .. .. 486
+.. .. .. .. .. .. .. 484
+.. .. .. .. .. .. .. .. .. .. 482
+.. .. .. .. .. .. .. .. .. 480
+.. .. .. .. .. .. .. .. 478
+.. .. .. .. .. .. .. .. .. .. 476
+.. .. .. .. .. .. .. .. .. 474
+.. .. .. .. .. .. .. .. .. .. 472
+.. .. .. 470
+.. .. .. .. .. .. .. .. 468
+.. .. .. .. .. .. .. 466
+.. .. .. .. .. .. .. .. .. 464
+.. .. .. .. .. .. .. .. 462
+.. .. .. .. .. .. 460
+.. .. .. .. .. .. .. .. 458
+.. .. .. .. .. .. .. 456
+.. .. .. .. .. .. .. .. 454
+.. .. .. .. .. .. .. .. .. 452
+.. .. .. .. .. 450
+.. .. .. .. .. .. .. .. .. 448
+.. .. .. .. .. .. .. .. 446
+.. .. .. .. .. .. .. 444
+.. .. .. .. .. .. .. .. 442
+.. .. .. .. .. .. .. .. .. 440
+.. .. .. .. .. .. 438
+.. .. .. .. .. .. .. .. .. 436
+.. .. .. .. .. .. .. .. 434
+.. .. .. .. .. .. .. .. .. 432
+.. .. .. .. .. .. .. 430
+.. .. .. .. .. .. .. .. 428
+.. .. .. .. 426
+.. .. .. .. .. .. .. .. .. 424
+.. .. .. .. .. .. .. .. 422
+.. .. .. .. .. .. .. .. .. .. 420
+.. .. .. .. .. .. .. .. .. 418
+.. .. .. .. .. .. .. 416
+.. .. .. .. .. .. .. .. .. 414
+.. .. .. .. .. .. .. .. 412
+.. .. .. .. .. .. .. .. .. .. 410
+.. .. .. .. .. .. .. .. .. 408
+.. .. .. .. .. .. 406
+.. .. .. .. .. .. .. .. .. 404
+.. .. .. .. .. .. .. .. 402
+.. .. .. .. .. .. .. 400
+.. .. .. .. .. .. .. .. .. 398
+.. .. .. .. .. .. .. .. 396
+.. .. .. .. .. .. .. .. .. 394
+.. .. .. .. .. 392
+.. .. .. .. .. .. .. .. .. 390
+.. .. .. .. .. .. .. .. 388
+.. .. .. .. .. .. .. 386
+.. .. .. .. .. .. .. .. .. 384
+.. .. .. .. .. .. .. .. 382
+.. .. .. .. .. .. 380
+.. .. .. .. .. .. .. .. 378
+.. .. .. .. .. .. .. .. .. 376
+.. .. .. .. .. .. .. 374
+.. .. .. .. .. .. .. .. .. 372
+.. .. .. .. .. .. .. .. 370
+.. .. .. .. .. .. .. .. .. 368
+.. 366
+.. .. .. .. .. .. .. 364
+.. .. .. .. .. .. .. .. 362
+.. .. .. .. .. .. 360
+.. .. .. .. .. .. .. .. 358
+.. .. .. .. .. .. .. 356
+.. .. .. .. .. .. .. .. .. 354
+.. .. .. .. .. .. .. .. 352
+.. .. .. .. .. 350
+.. .. .. .. .. .. .. .. 348
+.. .. .. .. .. .. .. 346
+.. .. .. .. .. .. .. .. 344
+.. .. .. .. .. .. 342
+.. .. .. .. .. .. .. 340
+.. .. .. .. 338
+.. .. .. .. .. .. .. 336
+.. .. .. .. .. .. .. .. 334
+.. .. .. .. .. .. 332
+.. .. .. .. .. .. .. .. .. 330
+.. .. .. .. .. .. .. .. 328
+.. .. .. .. .. .. .. .. .. 326
+.. .. .. .. .. .. .. 324
+.. .. .. .. .. .. .. .. 322
+.. .. .. .. .. .. .. .. .. 320
+.. .. .. .. .. 318
+.. .. .. .. .. .. .. .. .. 316
+.. .. .. .. .. .. .. .. 314
+.. .. .. .. .. .. .. 312
+.. .. .. .. .. .. .. .. .. 310
+.. .. .. .. .. .. .. .. 308
+.. .. .. .. .. .. .. .. .. 306
+.. .. .. .. .. .. 304
+.. .. .. .. .. .. .. .. .. 302
+.. .. .. .. .. .. .. .. 300
+.. .. .. .. .. .. .. .. .. 298
+.. .. .. .. .. .. .. 296
+.. .. .. .. .. .. .. .. .. 294
+.. .. .. .. .. .. .. .. 292
+.. .. .. 290
+.. .. .. .. .. .. .. .. 288
+.. .. .. .. .. .. .. .. .. 286
+.. .. .. .. .. .. .. 284
+.. .. .. .. .. .. .. .. .. 282
+.. .. .. .. .. .. .. .. 280
+.. .. .. .. .. .. .. .. .. 278
+.. .. .. .. .. .. 276
+.. .. .. .. .. .. .. .. 274
+.. .. .. .. .. .. .. 272
+.. .. .. .. .. .. .. .. 270
+.. .. .. .. .. 268
+.. .. .. .. .. .. .. .. 266
+.. .. .. .. .. .. .. 264
+.. .. .. .. .. .. .. .. 262
+.. .. .. .. .. .. .. .. .. 260
+.. .. .. .. .. .. 258
+.. .. .. .. .. .. .. .. 256
+.. .. .. .. .. .. .. 254
+.. .. .. .. 252
+.. .. .. .. .. .. .. .. .. .. 250
+.. .. .. .. .. .. .. .. .. 248
+.. .. .. .. .. .. .. .. 246
+.. .. .. .. .. .. .. .. .. 244
+.. .. .. .. .. .. .. 242
+.. .. .. .. .. .. .. .. .. 240
+.. .. .. .. .. .. .. .. 238
+.. .. .. .. .. .. .. .. .. 236
+.. .. .. .. .. .. 234
+.. .. .. .. .. .. .. .. .. .. 232
+.. .. .. .. .. .. .. .. .. 230
+.. .. .. .. .. .. .. .. .. .. 228
+.. .. .. .. .. .. .. .. 226
+.. .. .. .. .. .. .. .. .. 224
+.. .. .. .. .. .. .. .. .. .. 222
+.. .. .. .. .. .. .. 220
+.. .. .. .. .. .. .. .. .. 218
+.. .. .. .. .. .. .. .. 216
+.. .. .. .. .. 214
+.. .. .. .. .. .. .. .. .. .. 212
+.. .. .. .. .. .. .. .. .. 210
+.. .. .. .. .. .. .. .. .. .. 208
+.. .. .. .. .. .. .. .. 206
+.. .. .. .. .. .. .. .. .. 204
+.. .. .. .. .. .. .. 202
+.. .. .. .. .. .. .. .. .. 200
+.. .. .. .. .. .. .. .. .. .. 198
+.. .. .. .. .. .. .. .. 196
+.. .. .. .. .. .. .. .. .. 194
+.. .. .. .. .. .. 192
+.. .. .. .. .. .. .. .. .. 190
+.. .. .. .. .. .. .. .. .. .. 188
+.. .. .. .. .. .. .. .. 186
+.. .. .. .. .. .. .. .. .. 184
+.. .. .. .. .. .. .. 182
+.. .. .. .. .. .. .. .. .. .. 180
+.. .. .. .. .. .. .. .. .. 178
+.. .. .. .. .. .. .. .. 176
+.. .. .. .. .. .. .. .. .. 174
+.. .. 172
+.. .. .. .. .. .. .. .. 170
+.. .. .. .. .. .. .. 168
+.. .. .. .. .. .. .. .. 166
+.. .. .. .. .. .. .. .. .. 164
+.. .. .. .. .. .. 162
+.. .. .. .. .. .. .. .. 160
+.. .. .. .. .. .. .. 158
+.. .. .. .. .. .. .. .. 156
+.. .. .. .. .. 154
+.. .. .. .. .. .. .. .. .. 152
+.. .. .. .. .. .. .. .. 150
+.. .. .. .. .. .. .. 148
+.. .. .. .. .. .. .. .. .. .. 146
+.. .. .. .. .. .. .. .. .. 144
+.. .. .. .. .. .. .. .. .. .. 142
+.. .. .. .. .. .. .. .. 140
+.. .. .. .. .. .. .. .. .. 138
+.. .. .. .. .. .. 136
+.. .. .. .. .. .. .. .. .. 134
+.. .. .. .. .. .. .. .. 132
+.. .. .. .. .. .. .. .. .. 130
+.. .. .. .. .. .. .. 128
+.. .. .. .. .. .. .. .. 126
+.. .. .. .. 124
+.. .. .. .. .. .. .. .. 122
+.. .. .. .. .. .. .. 120
+.. .. .. .. .. .. .. .. 118
+.. .. .. .. .. .. 116
+.. .. .. .. .. .. .. .. .. 114
+.. .. .. .. .. .. .. .. 112
+.. .. .. .. .. .. .. .. .. 110
+.. .. .. .. .. .. .. 108
+.. .. .. .. .. .. .. .. 106
+.. .. .. .. .. .. .. .. .. 104
+.. .. .. .. .. 102
+.. .. .. .. .. .. .. .. 100
+.. .. .. .. .. .. .. .. .. 98
+.. .. .. .. .. .. .. 96
+.. .. .. .. .. .. .. .. 94
+.. .. .. .. .. .. 92
+.. .. .. .. .. .. .. .. .. 90
+.. .. .. .. .. .. .. .. 88
+.. .. .. .. .. .. .. .. .. 86
+.. .. .. .. .. .. .. 84
+.. .. .. .. .. .. .. .. .. 82
+.. .. .. .. .. .. .. .. 80
+.. .. .. .. .. .. .. .. .. 78
+.. .. .. 76
+.. .. .. .. .. .. .. .. 74
+.. .. .. .. .. .. .. 72
+.. .. .. .. .. .. .. .. .. 70
+.. .. .. .. .. .. .. .. 68
+.. .. .. .. .. .. 66
+.. .. .. .. .. .. .. .. .. 64
+.. .. .. .. .. .. .. .. 62
+.. .. .. .. .. .. .. 60
+.. .. .. .. .. .. .. .. 58
+.. .. .. .. .. 56
+.. .. .. .. .. .. .. .. 54
+.. .. .. .. .. .. .. 52
+.. .. .. .. .. .. .. .. 50
+.. .. .. .. .. .. 48
+.. .. .. .. .. .. .. .. 46
+.. .. .. .. .. .. .. 44
+.. .. .. .. .. .. .. .. 42
+.. .. .. .. 40
+.. .. .. .. .. .. .. .. .. 38
+.. .. .. .. .. .. .. .. 36
+.. .. .. .. .. .. .. 34
+.. .. .. .. .. .. .. .. 32
+.. .. .. .. .. .. 30
+.. .. .. .. .. .. .. .. 28
+.. .. .. .. .. .. .. .. .. 26
+.. .. .. .. .. .. .. 24
+.. .. .. .. .. .. .. .. .. 22
+.. .. .. .. .. .. .. .. 20
+.. .. .. .. .. .. .. .. .. 18
+.. .. .. .. .. 16
+.. .. .. .. .. .. .. 14
+.. .. .. .. .. .. .. .. 12
+.. .. .. .. .. .. 10
+.. .. .. .. .. .. .. .. 8
+.. .. .. .. .. .. .. .. .. 6
+.. .. .. .. .. .. .. 4
+.. .. .. .. .. .. .. .. 0
+-- end foo ----------------
|
|
From: <sv...@va...> - 2005-08-14 22:15:00
|
Author: njn Date: 2005-08-14 23:14:55 +0100 (Sun, 14 Aug 2005) New Revision: 4411 Log: Forgot this file. Added: trunk/coregrind/pub_core_oset.h Added: trunk/coregrind/pub_core_oset.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/coregrind/pub_core_oset.h 2005-08-14 22:13:00 UTC (rev 4410) +++ trunk/coregrind/pub_core_oset.h 2005-08-14 22:14:55 UTC (rev 4411) @@ -0,0 +1,49 @@ + +/*--------------------------------------------------------------------*/ +/*--- An ordered set implemenation. pub_core_oset.h ---*/ +/*--------------------------------------------------------------------*/ + +/* + This file is part of Valgrind, a dynamic binary instrumentation + framework. + + Copyright (C) 2000-2005 Julian Seward + js...@ac... + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. + + The GNU General Public License is contained in the file COPYING. +*/ + +#ifndef __PUB_CORE_OSET_H +#define __PUB_CORE_OSET_H + +//-------------------------------------------------------------------- +// PURPOSE: A generic data structure with fast (eg. amortised log(n) or +// better) insertion, lookup and deletion of elements. It does not allo= w +// duplicates. +//-------------------------------------------------------------------- + +#include "pub_tool_oset.h" + +// No core-only exports; everything in this module is visible to both +// the core and tools. + +#endif // __PUB_CORE_OSET_H + +/*--------------------------------------------------------------------*/ +/*--- end ---*/ +/*--------------------------------------------------------------------*/ |
|
From: <sv...@va...> - 2005-08-14 22:13:12
|
Author: njn
Date: 2005-08-14 23:13:00 +0100 (Sun, 14 Aug 2005)
New Revision: 4410
Log:
Added new module, m_oset, which provides a generic data structure, OSet,
which is a sorted set with no duplicates. This is derived from
m_skiplist, which it will hopefully replace. The interface has the
following improvements:
- Avoided all mention of how the data structure is implemented in the
interface, so it could be replaced with another data structure without
changing external code.
- Two kinds of comparison: fast -- use the first word of each element
for comparison; slow -- use a custom function. The custom function
compares a key with an element, so non-overlapping interval lists can
be supported easily. m_skiplist only supports the slow variant, and it
makes things almost 2x faster.
- Users pass in malloc() and free() functions, so m_oset.c it doesn't
rely on any particular allocator.
- It has a Destroy() function which will deallocate all the nodes.
- It allows variable-sized nodes.
- No static constructor; I needed the flexibility of being able to
execute arbitrary code in the constructor. This also means no type
internals are exposed.
No part of Valgrind actually uses OSet yet, although I've privately
converted several data structures, and so I'm confident that the
interface is basically sound. Some functions may be added later.
=20
The implementation uses AVL trees, and has the following
characteristics:
- Lookup is much faster than for skiplists -- around 3x. This is
because the inner lookup loop is much tighter.
- Insertion and removal is similar speed to skiplists, maybe a little
slower, but there's still some fat to be trimmed.
- The code is a bit longer and more complex than the skiplist code.
This was intended to replace the need for the VgHashTable type. But my
experiments have shown that VgHashTable is really fast, faster than both
AVL trees and skiplists in all but extreme cases (eg. if the hashtable
becomes way too full): insertion takes constant time, because you always
prepend to chains; lookup depends on chain length, but the inner loop
is so tight that you need about 20 elements per chain before it gets
worse than the AVL tree; removal is similar to lookup. And because
insertion uses prepending, any locality in accesses will help things. If
VgHashTable had its interface cleaned up to look like OSet's, and was mad=
e
to auto-resize when it got too full, it might be a better OSet (although
it's not sorted).
So, it's currently unclear exactly how the AVL tree OSet will be used.
The skiplist could be converted to the new interface (I have a 90%
complete version which I used in the comparison experiments). If
VgHashTable was converted to the same interface (or as close as
possible) it would make direct comparison of important places (eg.
Memcheck's malloc_lists) simple.
Added:
trunk/coregrind/m_oset.c
trunk/include/pub_tool_oset.h
Modified:
trunk/coregrind/Makefile.am
trunk/include/Makefile.am
Modified: trunk/coregrind/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/Makefile.am 2005-08-14 18:32:16 UTC (rev 4409)
+++ trunk/coregrind/Makefile.am 2005-08-14 22:13:00 UTC (rev 4410)
@@ -55,6 +55,7 @@
pub_core_main.h \
pub_core_mallocfree.h \
pub_core_options.h \
+ pub_core_oset.h \
pub_core_profile.h \
pub_core_pthreadmodel.h \
pub_core_redir.h \
@@ -109,6 +110,7 @@
m_main.c \
m_mallocfree.c \
m_options.c \
+ m_oset.c \
m_profile.c \
m_pthreadmodel.c \
m_redir.c \
Added: trunk/coregrind/m_oset.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_oset.c 2005-08-14 18:32:16 UTC (rev 4409)
+++ trunk/coregrind/m_oset.c 2005-08-14 22:13:00 UTC (rev 4410)
@@ -0,0 +1,736 @@
+
+/*--------------------------------------------------------------------*/
+/*--- An ordered set implemented using an AVL tree. m_oset.c ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2005 Nicholas Nethercote
+ nj...@va...
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ The GNU General Public License is contained in the file COPYING.
+*/
+
+//----------------------------------------------------------------------
+// This file is based on:
+//
+// ANSI C Library for maintainance of AVL Balanced Trees
+// (C) 2000 Daniel Nagy, Budapest University of Technology and Economi=
cs
+// Released under GNU General Public License (GPL) version 2
+//----------------------------------------------------------------------
+
+// This file implements a generic ordered set using an AVL tree.
+//
+// Each node in the tree has two parts. =20
+// - First is the AVL metadata, which is three words: a left pointer, a
+// right pointer, and a word containing balancing information and a
+// "magic" value which provides some checking that the user has not
+// corrupted the metadata.
+// - Second is the user's data. This can be anything. Note that becaus=
e it
+// comes after the metadata, it will only be word-aligned, even if the
+// user data is a struct that would normally be doubleword-aligned.
+//
+// AvlNode* node -> +---------------+ V
+// | struct |
+// | AvlNode |
+// void* element -> +---------------+ ^
+// | element | |
+// keyOff -> | key | elemSize
+// +---------------+ v
+//
+// Users have to allocate AvlNodes with OSet_AllocNode(), which allocate=
s
+// space for the metadata.
+//
+// The terminology used throughout this file:
+// - a "node", usually called "n", is a pointer to the metadata.
+// - an "element", usually called "e", is a pointer to the user data.
+// - a "key", usually called "k", is a pointer to a key.
+//
+// The helper functions elem_of_node and node_of_elem do the pointer
+// arithmetic to switch between the node and the element. The node magi=
c is
+// checked after each operation to make sure that we're really operating=
on
+// an AvlNode.
+//
+// Each tree also has an iterator. Note that we cannot use the iterator
+// internally within this file (eg. we could implement OSet_Size() by
+// stepping through with the iterator and counting nodes) because it's
+// non-reentrant -- the user might be using it themselves, and the
+// concurrent uses would screw things up.
+
+#include "pub_core_basics.h"
+#include "pub_core_libcbase.h"
+#include "pub_core_libcassert.h"
+#include "pub_core_libcprint.h"
+#include "pub_core_oset.h"
+
+/*--------------------------------------------------------------------*/
+/*--- Types and constants ---*/
+/*--------------------------------------------------------------------*/
+
+// Internal names for the OSet types.
+typedef OSet AvlTree;
+typedef OSetNode AvlNode;
+
+// The padding ensures that magic is right at the end of the node,
+// regardless of the machine's word size, so that any overwrites will be
+// detected earlier.
+struct _OSetNode {
+ AvlNode* left;
+ AvlNode* right;
+ Char balance;
+ Char padding[sizeof(void*)-3];
+ Short magic;
+};
+
+#define STACK_MAX 32 // At most 2**32 entries can be iterated over
+#define OSET_MAGIC 0x5b1f
+
+// An OSet (AVL tree). If cmp is NULL, the key must be a UWord, and mus=
t
+// be the first word in the element. If cmp is set, arbitrary keys in
+// arbitrary positions can be used.
+struct _OSet {
+ SizeT keyOff; // key offset
+ OSetCmp_t cmp; // compare a key and an element, or NULL
+ OSetAlloc_t alloc; // allocator
+ OSetFree_t free; // deallocator
+ Int nElems; // number of elements in the tree
+ AvlNode* root; // root node
+
+ AvlNode* nodeStack[STACK_MAX]; // Iterator node stack
+ Int numStack[STACK_MAX]; // Iterator num stack
+ Int stackTop; // Iterator stack pointer, one pa=
st end
+};
+
+/*--------------------------------------------------------------------*/
+/*--- Helper operations ---*/
+/*--------------------------------------------------------------------*/
+
+// Given a pointer to the node's element, return the pointer to the AvlN=
ode
+// structure. If the node has a bad magic number, it will die with an
+// assertion failure.
+static inline
+AvlNode* node_of_elem(const void *elem)
+{
+ AvlNode* n =3D (AvlNode*)((Addr)elem - sizeof(AvlNode));
+ vg_assert2(n->magic =3D=3D OSET_MAGIC,
+ "bad magic on node %p =3D %x (expected %x)\n"
+ "possible causes:\n"
+ " - node not allocated with VG_(OSet_AllocNode)()?\n"
+ " - node metadata corrupted by underwriting start of eleme=
nt?\n",
+ n, n->magic, OSET_MAGIC);
+ return n;
+}
+
+// Given an AvlNode, return the pointer to the element.
+static inline
+void* elem_of_node(const AvlNode *n)
+{
+ vg_assert2(n->magic =3D=3D OSET_MAGIC,
+ "bad magic on node %p =3D %x (expected %x)\n"
+ "possible causes:\n"
+ " - node metadata corrupted by overwriting end of element?=
\n",
+ n, n->magic, OSET_MAGIC);
+ return (void*)((Addr)n + sizeof(AvlNode));
+}
+
+// Like elem_of_node, but no magic checking.
+static inline
+void* elem_of_node_no_check(const AvlNode *n)
+{
+ return (void*)((Addr)n + sizeof(AvlNode));
+}
+
+static inline
+void* slow_key_of_node(AvlTree* t, AvlNode* n)
+{
+ return (void*)((Addr)elem_of_node(n) + t->keyOff);
+}
+
+static inline
+void* fast_key_of_node(AvlNode* n)
+{
+ return elem_of_node(n);
+}
+
+// Compare the first word of each element. Inlining is *crucial*.
+static inline Int fast_cmp(void* k, AvlNode* n)
+{
+ return ( *(Int*)k - *(Int*)elem_of_node(n) );
+}
+
+// Compare a key and an element. Inlining is *crucial*.
+static inline Int slow_cmp(AvlTree* t, void* k, AvlNode* n)
+{
+ return t->cmp(k, elem_of_node(n));
+}
+
+
+// Swing to the left. Warning: no balance maintainance.
+static void avl_swl ( AvlNode** root )
+{
+ AvlNode* a =3D *root;
+ AvlNode* b =3D a->right;
+ *root =3D b;
+ a->right =3D b->left;
+ b->left =3D a;
+}
+
+// Swing to the right. Warning: no balance maintainance.
+static void avl_swr ( AvlNode** root )
+{
+ AvlNode* a =3D *root;
+ AvlNode* b =3D a->left;
+ *root =3D b;
+ a->left =3D b->right;
+ b->right =3D a;
+}
+
+// Balance maintainance after especially nasty swings.
+static void avl_nasty ( AvlNode* root )
+{
+ switch (root->balance) {
+ case -1:
+ root->left->balance =3D 0;
+ root->right->balance =3D 1;
+ break;
+ case 1:
+ root->left->balance =3D-1;
+ root->right->balance =3D 0;
+ break;
+ case 0:
+ root->left->balance =3D 0;
+ root->right->balance =3D 0;
+ }
+ root->balance =3D 0;
+}
+
+
+// Clear the iterator stack.
+static void stackClear(AvlTree* t)
+{
+ Int i;
+ vg_assert(t);
+ for (i =3D 0; i < STACK_MAX; i++) {
+ t->nodeStack[i] =3D NULL;
+ t->numStack[i] =3D 0;
+ }
+ t->stackTop =3D 0;
+}
+
+// Push onto the iterator stack.
+static void stackPush(AvlTree* t, AvlNode* n, Int i)
+{
+ vg_assert(t->stackTop < STACK_MAX);
+ vg_assert(1 <=3D i && i <=3D 3);
+ t->nodeStack[t->stackTop] =3D n;
+ t-> numStack[t->stackTop] =3D i;
+ t->stackTop++;
+}
+
+// Pop from the iterator stack.
+static Bool stackPop(AvlTree* t, AvlNode** n, Int* i)
+{
+ vg_assert(t->stackTop <=3D STACK_MAX);
+
+ if (t->stackTop > 0) {
+ t->stackTop--;
+ *n =3D t->nodeStack[t->stackTop];
+ *i =3D t-> numStack[t->stackTop];
+ vg_assert(1 <=3D *i && *i <=3D 3);
+ t->nodeStack[t->stackTop] =3D NULL;
+ t-> numStack[t->stackTop] =3D 0;
+ return True;
+ } else {
+ return False;
+ }
+}
+
+/*--------------------------------------------------------------------*/
+/*--- Creating and destroying AvlTrees and AvlNodes ---*/
+/*--------------------------------------------------------------------*/
+
+// The underscores avoid GCC complaints about overshadowing global names=
.
+AvlTree* VG_(OSet_Create)(OffT _keyOff, OSetCmp_t _cmp,
+ OSetAlloc_t _alloc, OSetFree_t _free)
+{
+ AvlTree* t;
+
+ // Check the padding is right and the AvlNode is the expected size.
+ vg_assert(sizeof(AvlNode) =3D=3D 3*sizeof(void*));
+
+ // Sanity check args
+ vg_assert(_alloc);
+ vg_assert(_free);
+ if (!_cmp) vg_assert(0 =3D=3D _keyOff); // If no cmp, offset must =
be zero
+
+ t =3D _alloc(sizeof(AvlTree));
+ t->keyOff =3D _keyOff;
+ t->cmp =3D _cmp;
+ t->alloc =3D _alloc;
+ t->free =3D _free;
+ t->nElems =3D 0;
+ t->root =3D NULL;
+ stackClear(t);
+
+ return t;
+}
+
+// Destructor, frees up all memory held by remaining nodes.
+void VG_(OSet_Destroy)(AvlTree* t)
+{
+ AvlNode* n;
+ Int i, sz =3D 0;
+ =20
+ vg_assert(t);
+ stackClear(t);
+ if (t->root)
+ stackPush(t, t->root, 1);
+
+ // Free all the AvlNodes. This is a post-order traversal, because we
+ // must free all children of a node before the node itself.
+ while (stackPop(t, &n, &i)) {
+ switch (i) {
+ case 1:=20
+ stackPush(t, n, 2);
+ if (n->left) stackPush(t, n->left, 1);
+ break;
+ case 2:=20
+ stackPush(t, n, 3);
+ if (n->right) stackPush(t, n->right, 1);
+ break;
+ case 3:
+ t->free(n);
+ sz++;
+ break;
+ }
+ }
+ vg_assert(sz =3D=3D t->nElems);
+
+ // Free the AvlTree itself.
+ t->free(t);
+}
+
+// Allocate and initialise a new node.
+void* VG_(OSet_AllocNode)(AvlTree* t, SizeT elemSize)
+{
+ Int nodeSize =3D sizeof(AvlNode) + elemSize;
+ AvlNode* n =3D t->alloc( nodeSize );
+ vg_assert(elemSize > 0);
+ VG_(memset)(n, 0, nodeSize);
+ n->magic =3D OSET_MAGIC;
+ return elem_of_node(n);
+}
+
+void VG_(OSet_FreeNode)(AvlTree* t, void* e)
+{
+ t->free( node_of_elem(e) );
+}
+
+/*--------------------------------------------------------------------*/
+/*--- Insertion ---*/
+/*--------------------------------------------------------------------*/
+
+static inline Int cmp_key_root(AvlTree* t, AvlNode* n)
+{
+ return t->cmp
+ ? slow_cmp(t, slow_key_of_node(t, n), t->root)
+ : fast_cmp( fast_key_of_node( n), t->root);
+}
+
+// Insert element e into the non-empty AVL tree t.
+// Returns True if the depth of the tree has grown.
+static Bool avl_insert(AvlTree* t, AvlNode* n)
+{
+ Int cmpres;
+
+ cmpres =3D cmp_key_root(t, n);
+
+ if (cmpres < 0) {
+ // Insert into the left subtree.
+ if (t->root->left) {
+ // Only need to set the used fields in the subtree.
+ AvlTree left_subtree;
+ left_subtree.root =3D t->root->left;
+ left_subtree.cmp =3D t->cmp;
+ left_subtree.keyOff =3D t->keyOff;
+ if (avl_insert(&left_subtree, n)) {
+ switch (t->root->balance--) {
+ case 1: return False;
+ case 0: return True;
+ }
+ if (t->root->left->balance < 0) {
+ avl_swr(&(t->root));
+ t->root->balance =3D 0;
+ t->root->right->balance =3D 0;
+ } else {
+ avl_swl(&(t->root->left));
+ avl_swr(&(t->root));
+ avl_nasty(t->root);
+ }
+ } else {
+ t->root->left=3Dleft_subtree.root;
+ }
+ return False;
+ } else {
+ t->root->left =3D n;
+ if (t->root->balance--) return False;
+ return True;
+ }
+
+ } else if (cmpres > 0) {
+ // Insert into the right subtree
+ if (t->root->right) {
+ // Only need to set the used fields in the subtree.
+ AvlTree right_subtree;
+ right_subtree.root =3D t->root->right;
+ right_subtree.cmp =3D t->cmp;
+ right_subtree.keyOff =3D t->keyOff;
+ if (avl_insert(&right_subtree, n)) {
+ switch (t->root->balance++) {
+ case -1: return False;
+ case 0: return True;
+ }
+ if (t->root->right->balance > 0) {
+ avl_swl(&(t->root));
+ t->root->balance =3D 0;
+ t->root->left->balance =3D 0;
+ } else {
+ avl_swr(&(t->root->right));
+ avl_swl(&(t->root));
+ avl_nasty(t->root);
+ }
+ } else {
+ t->root->right=3Dright_subtree.root;
+ }
+ return False;
+ } else {
+ t->root->right =3D n;
+ if (t->root->balance++) return False;
+ return True;
+ }
+
+ } else {
+ vg_assert2(0, "OSet_Insert: duplicate element added");
+ }
+}
+
+// Insert element e into the AVL tree t. This is just a wrapper for
+// avl_insert() which doesn't return a Bool.
+void VG_(OSet_Insert)(AvlTree* t, void* e)
+{
+ vg_assert(t);
+
+ // Initialise. Even though OSet_AllocNode zeroes these fields, we sh=
ould
+ // do it again in case a node is removed and then re-added to the tre=
e.
+ AvlNode* n =3D node_of_elem(e);
+ n->left =3D 0;
+ n->right =3D 0;
+ n->balance =3D 0;
+
+ // Insert into an empty tree
+ if (!t->root) {
+ t->root =3D n;
+ } else {
+ avl_insert(t, n);
+ }
+
+ t->nElems++;
+ t->stackTop =3D 0; // So the iterator can't get out of sync
+}
+
+/*--------------------------------------------------------------------*/
+/*--- Lookup ---*/
+/*--------------------------------------------------------------------*/
+
+// Find the *node* in t matching k, or NULL if not found.
+static AvlNode* avl_lookup(AvlTree* t, void* k)
+{
+ Int cmpres;
+ AvlNode* curr;
+
+ vg_assert(t);
+ curr =3D t->root;
+
+ if (t->cmp) {
+ // General case
+ while (True) {
+ if (curr =3D=3D NULL) return NULL;
+ cmpres =3D slow_cmp(t, k, curr);
+ if (cmpres < 0) curr =3D curr->left; else
+ if (cmpres > 0) curr =3D curr->right; else
+ return curr;
+ }
+ } else {
+ // Fast-track special case. We use the no-check version of
+ // elem_of_node because it saves about 10% on lookup time. This
+ // shouldn't be very dangerous because each node will have been
+ // checked on insertion.
+ Int kk =3D *(Int*)k;
+ while (True) {
+ if (curr =3D=3D NULL) return NULL;
+ cmpres =3D kk - *(Int*)elem_of_node_no_check(curr);
+ if (cmpres < 0) curr =3D curr->left; else
+ if (cmpres > 0) curr =3D curr->right; else
+ return curr;
+ }
+ }
+}
+
+// Find the *element* in t matching k, or NULL if not found.
+void* VG_(OSet_Lookup)(AvlTree* t, void* k)
+{
+ AvlNode* n =3D avl_lookup(t, k);
+ return ( n ? elem_of_node(n) : NULL );
+}
+
+// Is there an element matching k?
+Bool VG_(OSet_Contains)(AvlTree* t, void* k)
+{
+ return (NULL !=3D VG_(OSet_Lookup)(t, k));
+}
+
+/*--------------------------------------------------------------------*/
+/*--- Deletion ---*/
+/*--------------------------------------------------------------------*/
+
+static Bool avl_removeroot(AvlTree* t);
+
+// Remove an already-selected node n from the AVL tree t.
+// Returns True if the depth of the tree has shrunk.
+static Bool avl_remove(AvlTree* t, AvlNode* n)
+{
+ Bool ch;
+ Int cmpres;
+
+ vg_assert(t && t->root);
+ =20
+ cmpres =3D cmp_key_root(t, n);
+
+ if (cmpres < 0) {
+ // Remove from the left subtree
+ vg_assert(t->root->left);
+ AvlTree left_subtree;
+ // Only need to set the used fields in the subtree.
+ left_subtree.root =3D t->root->left;
+ left_subtree.cmp =3D t->cmp;
+ left_subtree.keyOff =3D t->keyOff;
+ ch =3D avl_remove(&left_subtree, n);
+ t->root->left =3D left_subtree.root;
+ if (ch) {
+ switch (t->root->balance++) {
+ case -1: return True;
+ case 0: return False;
+ }
+ switch (t->root->right->balance) {
+ case 0:
+ avl_swl(&(t->root));
+ t->root->balance =3D -1;
+ t->root->left->balance =3D 1;
+ return False;
+ case 1:
+ avl_swl(&(t->root));
+ t->root->balance =3D 0;
+ t->root->left->balance =3D 0;
+ return True;
+ }
+ avl_swr(&(t->root->right));
+ avl_swl(&(t->root));
+ avl_nasty(t->root);
+ return True;
+ } else {
+ return False;
+ }
+ =20
+ } else if (cmpres > 0) {
+ // Remove from the right subtree
+ AvlTree right_subtree;
+ vg_assert(t->root->right);
+ // Only need to set the used fields in the subtree.
+ right_subtree.root =3D t->root->right;
+ right_subtree.cmp =3D t->cmp;
+ right_subtree.keyOff =3D t->keyOff;
+ ch =3D avl_remove(&right_subtree, n);
+ t->root->right =3D right_subtree.root;
+ if (ch) {
+ switch (t->root->balance--) {
+ case 1: return True;
+ case 0: return False;
+ }
+ switch (t->root->left->balance) {
+ case 0:
+ avl_swr(&(t->root));
+ t->root->balance =3D 1;
+ t->root->right->balance =3D -1;
+ return False;
+ case -1:
+ avl_swr(&(t->root));
+ t->root->balance =3D 0;
+ t->root->right->balance =3D 0;
+ return True;
+ }
+ avl_swl(&(t->root->left));
+ avl_swr(&(t->root));
+ avl_nasty(t->root);
+ return True;
+ } else {
+ return False;
+ }
+
+ } else {
+ // Found the node to be removed.
+ vg_assert(t->root =3D=3D n);
+ return avl_removeroot(t);
+ }
+}
+
+// Remove the root of the AVL tree t.
+// Returns True if the depth of the tree has shrunk.
+static Bool avl_removeroot(AvlTree* t)
+{
+ Int ch;
+ AvlNode* n;
+
+ vg_assert(t && t->root);
+
+ if (!t->root->left) {
+ if (!t->root->right) {
+ t->root =3D NULL;
+ return True;
+ }
+ t->root =3D t->root->right;
+ return True;
+ }
+ if (!t->root->right) {
+ t->root =3D t->root->left;
+ return True;
+ }
+ if (t->root->balance < 0) {
+ // Remove from the left subtree
+ n =3D t->root->left;
+ while (n->right) n =3D n->right;
+ } else {
+ // Remove from the right subtree
+ n =3D t->root->right;
+ while (n->left) n =3D n->left;
+ }
+ ch =3D avl_remove(t, n);
+ n->left =3D t->root->left;
+ n->right =3D t->root->right;
+ n->balance =3D t->root->balance;
+ t->root =3D n;
+ if (n->balance =3D=3D 0) return ch;
+ return False;
+}
+
+// Remove and return the element matching the key 'k', or NULL if not pr=
esent.
+void* VG_(OSet_Remove)(AvlTree* t, void* k)
+{
+ // Have to find the node first, then remove it.
+ AvlNode* n =3D avl_lookup(t, k);
+ if (n) {
+ avl_remove(t, n);
+ t->nElems--;
+ t->stackTop =3D 0; // So the iterator can't get out of sync
+ return elem_of_node(n);
+ } else {
+ return NULL;
+ }
+}
+
+/*--------------------------------------------------------------------*/
+/*--- Iterator ---*/
+/*--------------------------------------------------------------------*/
+
+// The iterator is implemented using in-order traversal with an explicit
+// stack, which lets us do the traversal one step at a time and remember
+// where we are between each call to OSet_Next().
+
+void VG_(OSet_ResetIter)(AvlTree* t)
+{
+ vg_assert(t);
+ stackClear(t);
+ if (t->root)
+ stackPush(t, t->root, 1);
+}
+
+void* VG_(OSet_Next)(AvlTree* t)
+{
+ Int i;
+ OSetNode* n;
+ =20
+ vg_assert(t);
+
+ // This in-order traversal requires each node to be pushed and popped
+ // three times. These could be avoided by updating nodes in-situ on =
the
+ // top of the stack, but the push/pop cost is so small that it's wort=
h
+ // keeping this loop in this simpler form.
+ while (stackPop(t, &n, &i)) {
+ switch (i) {
+ case 1:=20
+ stackPush(t, n, 2);
+ if (n->left) stackPush(t, n->left, 1);
+ break;
+ case 2:=20
+ stackPush(t, n, 3);
+ return elem_of_node(n);
+ case 3:
+ if (n->right) stackPush(t, n->right, 1);
+ break;
+ }
+ }
+
+ // Stack empty, iterator is exhausted, return NULL
+ return NULL;
+}
+
+/*--------------------------------------------------------------------*/
+/*--- Miscellaneous operations ---*/
+/*--------------------------------------------------------------------*/
+
+Int VG_(OSet_Size)(AvlTree* t)
+{
+ vg_assert(t);
+ return t->nElems;
+}
+
+static void OSet_Print2( AvlTree* t, AvlNode* n,
+ Char*(*strElem)(void *), Int p )
+{
+ // This is a recursive in-order traversal.
+ Int q =3D p;
+ if (NULL =3D=3D n) return;
+ if (n->right) OSet_Print2(t, n->right, strElem, p+1);
+ while (q--) VG_(printf)(".. ");
+ VG_(printf)("%s\n", strElem(elem_of_node(n)));
+ if (n->left) OSet_Print2(t, n->left, strElem, p+1);
+}
+
+__attribute__((unused))
+static void OSet_Print( AvlTree* t, const HChar *where, Char*(*strElem)(=
void *) )
+{
+ VG_(printf)("-- start %s ----------------\n", where);
+ OSet_Print2(t, t->root, strElem, 0);
+ VG_(printf)("-- end %s ----------------\n", where);
+}
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
+
Modified: trunk/include/Makefile.am
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/Makefile.am 2005-08-14 18:32:16 UTC (rev 4409)
+++ trunk/include/Makefile.am 2005-08-14 22:13:00 UTC (rev 4410)
@@ -20,6 +20,7 @@
pub_tool_machine.h \
pub_tool_mallocfree.h \
pub_tool_options.h \
+ pub_tool_oset.h \
pub_tool_profile.h \
pub_tool_redir.h \
pub_tool_replacemalloc.h \
Added: trunk/include/pub_tool_oset.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/pub_tool_oset.h 2005-08-14 18:32:16 UTC (rev 4409)
+++ trunk/include/pub_tool_oset.h 2005-08-14 22:13:00 UTC (rev 4410)
@@ -0,0 +1,160 @@
+
+/*--------------------------------------------------------------------*/
+/*--- OSet: a fast data structure with no dups. pub_tool_oset.h ---*/
+/*--------------------------------------------------------------------*/
+
+/*
+ This file is part of Valgrind, a dynamic binary instrumentation
+ framework.
+
+ Copyright (C) 2000-2005 Julian Seward
+ js...@ac...
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ The GNU General Public License is contained in the file COPYING.
+*/
+
+#ifndef __PUB_TOOL_OSET_H
+#define __PUB_TOOL_OSET_H
+
+// This module implements an ordered set, a data structure with fast
+// (eg. amortised log(n) or better) insertion, lookup and deletion of
+// elements. It does not allow duplicates, and will assert if you inser=
t a
+// duplicate to an OSet.
+//
+// The structure is totally generic. The user provides the allocation a=
nd
+// deallocation functions. Also, each element has a key, which the look=
up
+// is done with. The key may be the whole element (eg. in an OSet of
+// integers, each integer serves both as an element and a key), or it ma=
y be
+// only part of it (eg. if the key is a single field in a struct). The =
user
+// can provide a function that compares an element with a key; this is =
very
+// flexible, and with the right comparison function even a (non-overlapp=
ing)
+// interval list can be created. But the cost of calling a function for
+// every comparison can be high during lookup. If no comparison functio=
n is
+// provided, we assume that keys are (signed or unsigned) words, and tha=
t
+// the key is the first word in each element. This fast comparison is
+// suitable for an OSet of Ints, or an OSet containing structs where the
+// first element is an Addr, for example.
+//
+// Each OSet also has an iterator, which makes it simple to traverse all=
the
+// nodes in order. Note that the iterator maintains state and so is
+// non-reentrant.
+//
+// Note that once you insert an element into an OSet, if you modify any =
part
+// of it looked at by your cmp() function, this may cause incorrect
+// behaviour as the sorted order maintained will be wrong.
+
+/*--------------------------------------------------------------------*/
+/*--- Types ---*/
+/*--------------------------------------------------------------------*/
+
+typedef struct _OSet OSet;
+typedef struct _OSetNode OSetNode;
+
+typedef Int (*OSetCmp_t) ( void* key, void* elem );
+typedef void* (*OSetAlloc_t) ( SizeT szB );
+typedef void (*OSetFree_t) ( void* p );
+
+/*--------------------------------------------------------------------*/
+/*--- Creating and destroying OSets and OSet members ---*/
+/*--------------------------------------------------------------------*/
+
+// * Create: allocates an initialises the OSet. Arguments:
+// - keyOff The offset of the key within the element.
+// - elemSize The size of the element.
+// - cmp The comparison function between keys and elements, or N=
ULL
+// if the OSet should use fast comparisons.
+// - alloc The allocation function used for allocating the OSet it=
self;
+// it's also called for each invocation of VG_(OSet_AllocN=
ode)().
+// - free The deallocation function used by VG_(OSet_FreeNode)() =
and
+// VG_(OSet_Destroy)().
+//
+// If cmp is NULL, keyOff must be zero. This is checked.
+//
+// * Destroy: frees all nodes in the table, plus the memory used by
+// the table itself.
+//
+// * AllocNode: Allocate and zero memory for a node to go into the OSet.
+// Uses the alloc function given to VG_(OSet_Create)() to allocated a =
node
+// which is big enough for both an element and the OSet metadata.
+// Not all elements in one OSet have to be the same size.
+//
+// Note that the element allocated will be at most word-aligned, which=
may
+// be less aligned than the element type would normally be.
+//
+// * FreeNode: Deallocate a node allocated with OSet_AllocNode(). Using
+// a deallocation function (such as VG_(free)()) directly will likely
+// lead to assertions in Valgrind's allocator.
+
+extern OSet* VG_(OSet_Create) ( OffT keyOff, OSetCmp_t cmp,
+ OSetAlloc_t alloc, OSetFree_t free );
+extern void VG_(OSet_Destroy) ( OSet* os );
+extern void* VG_(OSet_AllocNode) ( OSet* os, SizeT elemSize );
+extern void VG_(OSet_FreeNode) ( OSet* os, void* elem );
+
+/*--------------------------------------------------------------------*/
+/*--- Operations on OSets ---*/
+/*--------------------------------------------------------------------*/
+
+// * Size: The number of elements in the set.
+//
+// * Contains: Determines if any element in the OSet matches the key.
+//
+// * Lookup: Returns a pointer to the element matching the key, if there=
is
+// one, otherwise returns NULL.
+//
+// * Insert: Inserts a new element into the list. Note that 'elem' must
+// have been allocated using VG_(OSet_AllocNode)(), otherwise you will=
get
+// assertion failures about "bad magic". Duplicates are forbidden, an=
d
+// will also cause assertion failures.
+//
+// * Remove: Removes the element matching the key, if there is one. Ret=
urns
+// NULL if no element matches the key.
+//
+// * ResetIter: Each OSet has an iterator. This resets it to point to t=
he
+// first element in the OSet.
+//=20
+// * Next: Returns a pointer to the element pointed to by the OSet's
+// iterator, and advances the iterator by one; the elements are visit=
ed
+// in order. Or, returns NULL if the iterator has reached the OSet's =
end.
+// =20
+// You can thus iterate in order through an OSet like this:
+//
+// VG_(OSet_ResetIter)(oset);
+// while ( (elem =3D VG_(OSet_Next)(oset)) ) {
+// ... do stuff with 'elem' ...
+// }
+//
+// Note that iterators are cleared any time an element is inserted or
+// removed from the OSet, to avoid possible mayhem caused by the itera=
tor
+// getting out of sync with the OSet's contents. "Cleared" means that
+// they will return NULL if VG_(OSet_Next)() is called without an
+// intervening call to VG_(OSet_ResetIter)().
+
+extern Int VG_(OSet_Size) ( OSet* os );
+extern void VG_(OSet_Insert) ( OSet* os, void* elem );
+extern Bool VG_(OSet_Contains) ( OSet* os, void* key );
+extern void* VG_(OSet_Lookup) ( OSet* os, void* key );
+extern void* VG_(OSet_Remove) ( OSet* os, void* key );
+extern void VG_(OSet_ResetIter) ( OSet* os );
+extern void* VG_(OSet_Next) ( OSet* os );
+
+#endif // __PUB_TOOL_OSET_H
+
+/*--------------------------------------------------------------------*/
+/*--- end ---*/
+/*--------------------------------------------------------------------*/
|
|
From: <sv...@va...> - 2005-08-14 18:32:26
|
Author: njn
Date: 2005-08-14 19:32:16 +0100 (Sun, 14 Aug 2005)
New Revision: 4409
Log:
Remove more now-unnecessary casts, thanks to the recent VgHashTable chang=
es.
Modified:
trunk/memcheck/mac_malloc_wrappers.c
trunk/memcheck/mc_main.c
Modified: trunk/memcheck/mac_malloc_wrappers.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/mac_malloc_wrappers.c 2005-08-14 18:24:44 UTC (rev 440=
8)
+++ trunk/memcheck/mac_malloc_wrappers.c 2005-08-14 18:32:16 UTC (rev 440=
9)
@@ -463,7 +463,7 @@
{
MAC_Mempool* mp;
=20
- mp =3D (MAC_Mempool*)VG_(HT_remove) ( MAC_(mempool_list), (UWord)pool=
);
+ mp =3D VG_(HT_remove) ( MAC_(mempool_list), (UWord)pool );
=20
if (mp =3D=3D NULL) {
ThreadId tid =3D VG_(get_running_tid)();
@@ -481,7 +481,7 @@
{
MAC_Mempool* mp;
=20
- mp =3D (MAC_Mempool*)VG_(HT_lookup) ( MAC_(mempool_list), (UWord)pool=
);
+ mp =3D VG_(HT_lookup) ( MAC_(mempool_list), (UWord)pool );
=20
if (mp =3D=3D NULL) {
MAC_(record_illegal_mempool_error) ( tid, pool );
@@ -498,7 +498,7 @@
MAC_Chunk* mc;
ThreadId tid =3D VG_(get_running_tid)();
=20
- mp =3D (MAC_Mempool*)VG_(HT_lookup)(MAC_(mempool_list), (UWord)pool);
+ mp =3D VG_(HT_lookup)(MAC_(mempool_list), (UWord)pool);
if (mp =3D=3D NULL) {
MAC_(record_illegal_mempool_error)(tid, pool);
return;
Modified: trunk/memcheck/mc_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/mc_main.c 2005-08-14 18:24:44 UTC (rev 4408)
+++ trunk/memcheck/mc_main.c 2005-08-14 18:32:16 UTC (rev 4409)
@@ -2328,8 +2328,8 @@
// Use zero as the redzone for client blocks.
if (VG_(addr_is_in_block)(a, cgbs[i].start, cgbs[i].size, 0)) {
/* OK - maybe it's a mempool, too? */
- MAC_Mempool* mp =3D (MAC_Mempool*)VG_(HT_lookup)(MAC_(mempool_l=
ist),
- (UWord)cgbs[i].s=
tart);
+ MAC_Mempool* mp =3D VG_(HT_lookup)(MAC_(mempool_list),
+ (UWord)cgbs[i].start);
if(mp !=3D NULL) {
if(mp->chunks !=3D NULL) {
MAC_Chunk *mc;
|
|
From: <sv...@va...> - 2005-08-14 18:24:45
|
Author: njn
Date: 2005-08-14 19:24:44 +0100 (Sun, 14 Aug 2005)
New Revision: 4408
Log:
Remove ancient backwards compatibility code which is no longer needed, si=
nce
backwards compatibility was broken in various other ways by 3.0.0.
Modified:
trunk/memcheck/mac_shared.c
trunk/memcheck/memcheck.h
Modified: trunk/memcheck/mac_shared.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/mac_shared.c 2005-08-14 17:42:35 UTC (rev 4407)
+++ trunk/memcheck/mac_shared.c 2005-08-14 18:24:44 UTC (rev 4408)
@@ -965,13 +965,6 @@
=20
Bool MAC_(handle_common_client_requests)(ThreadId tid, UWord* arg, UWord=
* ret )
{
- Char* err =3D=20
- "The client requests VALGRIND_MALLOCLIKE_BLOCK and\n"
- " VALGRIND_FREELIKE_BLOCK have moved. Please recompile your\n"
- " program to incorporate the updates in the Valgrind header file=
s.\n"
- " You shouldn't need to change the text of your program at all.\=
n"
- " Everything should then work as before. Sorry for the bother.\=
n";
- =20
switch (arg[0]) {
case VG_USERREQ__COUNT_LEAKS: { /* count leaked bytes */
UWord** argp =3D (UWord**)arg;
@@ -987,10 +980,6 @@
*ret =3D 0;
return True;
}
- case VG_USERREQ__MALLOCLIKE_BLOCK__OLD_DO_NOT_USE:
- case VG_USERREQ__FREELIKE_BLOCK__OLD_DO_NOT_USE:
- VG_(tool_panic)(err);
-
case VG_USERREQ__MALLOCLIKE_BLOCK: {
Addr p =3D (Addr)arg[1];
SizeT sizeB =3D arg[2];
Modified: trunk/memcheck/memcheck.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/memcheck.h 2005-08-14 17:42:35 UTC (rev 4407)
+++ trunk/memcheck/memcheck.h 2005-08-14 18:24:44 UTC (rev 4408)
@@ -81,13 +81,6 @@
VG_USERREQ__DO_LEAK_CHECK,
VG_USERREQ__COUNT_LEAKS,
=20
- /* These two have been moved into core, because they are useful fo=
r
- any tool that tracks heap blocks. Hence the suffix. But they'=
re
- still here for backwards compatibility, although Valgrind will
- abort with an explanatory message if you use them. */
- VG_USERREQ__MALLOCLIKE_BLOCK__OLD_DO_NOT_USE,
- VG_USERREQ__FREELIKE_BLOCK__OLD_DO_NOT_USE,
-
VG_USERREQ__GET_VBITS,
VG_USERREQ__SET_VBITS,
=20
@@ -218,22 +211,6 @@
}
=20
=20
-/* These two have been moved to valgrind.h; still here so that a warnin=
g can
- be printed out for any programs using the old ones. */
-#define VALGRIND_MALLOCLIKE_BLOCK__OLD_DO_NOT_USE(addr, sizeB, rzB, is_z=
eroed)\
- {unsigned int _qzz_res; \
- VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0, \
- VG_USERREQ__MALLOCLIKE_BLOCK, \
- addr, sizeB, rzB, is_zeroed); \
- }
-#define VALGRIND_FREELIKE_BLOCK__OLD_DO_NOT_USE(addr, rzB) \
- {unsigned int _qzz_res; \
- VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0, \
- VG_USERREQ__FREELIKE_BLOCK, \
- addr, rzB, 0, 0); \
- }
-
-
/* Get in zzvbits the validity data for the zznbytes starting at
zzsrc. Return values:
0 if not running on valgrind
|
|
From: <sv...@va...> - 2005-08-14 17:42:38
|
Author: njn
Date: 2005-08-14 18:42:35 +0100 (Sun, 14 Aug 2005)
New Revision: 4407
Log:
Added an iterator to VgHashTable.
Modified:
trunk/coregrind/m_hashtable.c
trunk/include/pub_tool_hashtable.h
Modified: trunk/coregrind/m_hashtable.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_hashtable.c 2005-08-14 17:36:07 UTC (rev 4406)
+++ trunk/coregrind/m_hashtable.c 2005-08-14 17:42:35 UTC (rev 4407)
@@ -41,7 +41,9 @@
=20
struct _VgHashTable {
UInt n_chains; // should be prime
- VgHashNode* chains[0];
+ VgHashNode* iterNode; // current iterator node
+ UInt iterChain; // next chain to be traversed by the itera=
tor
+ VgHashNode* chains[0]; // must be last field in the struct!
};
=20
/*--------------------------------------------------------------------*/
@@ -203,6 +205,33 @@
}
}
=20
+void VG_(HT_ResetIter)(VgHashTable table)
+{
+ vg_assert(table);
+ table->iterNode =3D NULL;
+ table->iterChain =3D 0;
+}
+
+void* VG_(HT_Next)(VgHashTable table)
+{
+ Int i;
+ vg_assert(table);
+ =20
+ if (table->iterNode && table->iterNode->next) {
+ table->iterNode =3D table->iterNode->next;
+ return table->iterNode;
+ }
+
+ for (i =3D table->iterChain; i < table->n_chains; i++) {
+ if (table->chains[i]) {
+ table->iterNode =3D table->chains[i];
+ table->iterChain =3D i + 1; // Next chain to be traversed
+ return table->iterNode;
+ }
+ }
+ return NULL;
+}
+
void VG_(HT_destruct)(VgHashTable table)
{
UInt i;
Modified: trunk/include/pub_tool_hashtable.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/pub_tool_hashtable.h 2005-08-14 17:36:07 UTC (rev 4406)
+++ trunk/include/pub_tool_hashtable.h 2005-08-14 17:42:35 UTC (rev 4407)
@@ -90,6 +90,14 @@
void (*f)(VgHashNode*, void*),
void* d );
=20
+/* Reset the table's iterator to point to the first element. */
+extern void VG_(HT_ResetIter) ( VgHashTable table );
+
+/* Return the element pointed to by the iterator and move on to the next
+ one. Returns NULL if the last one has been passed, or if HT_ResetIte=
r()
+ has not been called previously. */
+extern void* VG_(HT_Next) ( VgHashTable table );
+
/* Destroy a table. */
extern void VG_(HT_destruct) ( VgHashTable t );
=20
|
|
From: <sv...@va...> - 2005-08-14 17:36:15
|
Author: njn
Date: 2005-08-14 18:36:07 +0100 (Sun, 14 Aug 2005)
New Revision: 4406
Log:
Clarify comment.
Modified:
trunk/coregrind/m_syswrap/syswrap-generic.c
Modified: trunk/coregrind/m_syswrap/syswrap-generic.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_syswrap/syswrap-generic.c 2005-08-14 17:25:28 UTC (=
rev 4405)
+++ trunk/coregrind/m_syswrap/syswrap-generic.c 2005-08-14 17:36:07 UTC (=
rev 4406)
@@ -2871,8 +2871,12 @@
=20
PRE(sys_getcwd)
{
- // Note that the kernel version of getcwd() behaves quite differently=
to
- // the glibc one.
+ // Comment from linux/fs/dcache.c:
+ // NOTE! The user-level library version returns a character pointer=
.
+ // The kernel system call just returns the length of the buffer fil=
led
+ // (which includes the ending '\0' character), or a negative error
+ // value.
+ // Is this Linux-specific? If so it should be moved to syswrap-linux=
.c.
PRINT("sys_getcwd ( %p, %llu )", ARG1,(ULong)ARG2);
PRE_REG_READ2(long, "getcwd", char *, buf, unsigned long, size);
PRE_MEM_WRITE( "getcwd(buf)", ARG1, ARG2 );
|
|
From: <sv...@va...> - 2005-08-14 17:25:41
|
Author: njn Date: 2005-08-14 18:25:28 +0100 (Sun, 14 Aug 2005) New Revision: 4405 Log: Update for Vex. BACKPORT TO 3_0_X? Modified: trunk/none/tests/selfrun.vgtest Modified: trunk/none/tests/selfrun.vgtest =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/none/tests/selfrun.vgtest 2005-08-14 06:24:20 UTC (rev 4404) +++ trunk/none/tests/selfrun.vgtest 2005-08-14 17:25:28 UTC (rev 4405) @@ -1,3 +1,3 @@ prog: ../../coregrind/valgrind --tool=3Dnone --command-line-only=3Dyes .= /selfrun -vgopts: --single-step=3Dyes +vgopts: --vex-guest-max-insns=3D1 prereq: grep '^#define HAVE_PIE 1' ../../config.h > /dev/null |
|
From: Jeroen N. W. <jn...@xs...> - 2005-08-14 15:41:02
|
> On Debian 3.1, running the regression test off valgrind 3 revision > 4383/1330 results in a CPU-bound loop requiring SIGKILL to terminate. This was the result of a build problem in VEX, for which http://bugs.kde.org/show_bug.cgi?id=110770 has been opened. Jeroen. |
|
From: <sv...@va...> - 2005-08-14 06:24:24
|
Author: njn
Date: 2005-08-14 07:24:20 +0100 (Sun, 14 Aug 2005)
New Revision: 4404
Log:
Changed many, but not all, of the VgHashNode* parameters and return
types in m_hashtable.c to void*. This requires no changes to code
already using VgHashTables, but it allows some previously-required casts
to be removed. I also changed Memcheck and Massif by removing some of
these now-unnecessary casts.
Modified:
trunk/coregrind/m_hashtable.c
trunk/include/pub_tool_hashtable.h
trunk/massif/ms_main.c
trunk/memcheck/mac_malloc_wrappers.c
Modified: trunk/coregrind/m_hashtable.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_hashtable.c 2005-08-14 04:29:12 UTC (rev 4403)
+++ trunk/coregrind/m_hashtable.c 2005-08-14 06:24:20 UTC (rev 4404)
@@ -40,7 +40,7 @@
#define CHAIN_NO(key,tbl) (((UWord)(key)) % tbl->n_chains)
=20
struct _VgHashTable {
- UInt n_chains; // should be prime
+ UInt n_chains; // should be prime
VgHashNode* chains[0];
};
=20
@@ -71,8 +71,9 @@
=20
/* Puts a new, heap allocated VgHashNode, into the VgHashTable. Prepend=
s
the node to the appropriate chain. */
-void VG_(HT_add_node) ( VgHashTable table, VgHashNode* node )
+void VG_(HT_add_node) ( VgHashTable table, void* vnode )
{
+ VgHashNode* node =3D (VgHashNode*)vnode;
UInt chain =3D CHAIN_NO(node->key, table);
node->next =3D table->chains[chain];
table->chains[chain] =3D node;
@@ -81,8 +82,8 @@
/* Looks up a VgHashNode in the table. Also returns the address of
the previous node's 'next' pointer which allows it to be removed from=
the
list later without having to look it up again. */
-VgHashNode* VG_(HT_get_node) ( VgHashTable table, UWord key,
- /*OUT*/VgHashNode*** next_ptr )
+void* VG_(HT_get_node) ( VgHashTable table, UWord key,
+ /*OUT*/VgHashNode*** next_ptr )
{
VgHashNode *prev, *curr;
Int chain;
@@ -109,7 +110,7 @@
}
=20
/* Looks up a VgHashNode in the table. Returns NULL if not found. */
-VgHashNode* VG_(HT_lookup) ( VgHashTable table, UWord key )
+void* VG_(HT_lookup) ( VgHashTable table, UWord key )
{
VgHashNode* curr =3D table->chains[ CHAIN_NO(key, table) ];
=20
@@ -123,7 +124,7 @@
}
=20
/* Removes a VgHashNode from the table. Returns NULL if not found. */
-VgHashNode* VG_(HT_remove) ( VgHashTable table, UWord key )
+void* VG_(HT_remove) ( VgHashTable table, UWord key )
{
Int chain =3D CHAIN_NO(key, table);
VgHashNode* curr =3D table->chains[chain];
@@ -173,9 +174,9 @@
}
=20
/* Return the first VgHashNode satisfying the predicate p. */
-VgHashNode* VG_(HT_first_match) ( VgHashTable table,
- Bool (*p) ( VgHashNode*, void* ),
- void* d )
+void* VG_(HT_first_match) ( VgHashTable table,
+ Bool (*p) ( VgHashNode*, void* ),
+ void* d )
{
UInt i;
VgHashNode* node;
Modified: trunk/include/pub_tool_hashtable.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/pub_tool_hashtable.h 2005-08-14 04:29:12 UTC (rev 4403)
+++ trunk/include/pub_tool_hashtable.h 2005-08-14 06:24:20 UTC (rev 4404)
@@ -59,19 +59,19 @@
extern Int VG_(HT_count_nodes) ( VgHashTable table );
=20
/* Add a node to the table. */
-extern void VG_(HT_add_node) ( VgHashTable t, VgHashNode* node );
+extern void VG_(HT_add_node) ( VgHashTable t, void* node );
=20
/* Looks up a node in the hash table. Also returns the address of the
previous node's `next' pointer which allows it to be removed from the
list later without having to look it up again. */
-extern VgHashNode* VG_(HT_get_node) ( VgHashTable t, UWord key,
+extern void* VG_(HT_get_node) ( VgHashTable t, UWord key,
/*OUT*/VgHashNode*** next_ptr );
=20
/* Looks up a VgHashNode in the table. Returns NULL if not found. */
-extern VgHashNode* VG_(HT_lookup) ( VgHashTable table, UWord key );
+extern void* VG_(HT_lookup) ( VgHashTable table, UWord key );
=20
/* Removes a VgHashNode from the table. Returns NULL if not found. */
-extern VgHashNode* VG_(HT_remove) ( VgHashTable table, UWord key );
+extern void* VG_(HT_remove) ( VgHashTable table, UWord key );
=20
/* Allocates an array of pointers to all the shadow chunks of malloc'd
blocks. Must be freed with VG_(free)(). */
@@ -80,9 +80,9 @@
/* Returns first node that matches predicate `p', or NULL if none do.
Extra arguments can be implicitly passed to `p' using `d' which is an
opaque pointer passed to `p' each time it is called. */
-extern VgHashNode* VG_(HT_first_match) ( VgHashTable t,
- Bool (*p)(VgHashNode*, void*),
- void* d );
+extern void* VG_(HT_first_match) ( VgHashTable t,
+ Bool (*p)(VgHashNode*, void*),
+ void* d );
=20
/* Applies a function f() once to each node. Again, `d' can be used
to pass extra information to the function. */
Modified: trunk/massif/ms_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/massif/ms_main.c 2005-08-14 04:29:12 UTC (rev 4403)
+++ trunk/massif/ms_main.c 2005-08-14 06:24:20 UTC (rev 4404)
@@ -690,7 +690,7 @@
if (0 !=3D size)=20
update_XCon(hc->where, size);
}
- VG_(HT_add_node)(malloc_list, (VgHashNode*)hc);
+ VG_(HT_add_node)(malloc_list, hc);
n_heap_blocks++;
=20
// do a census!
@@ -821,7 +821,7 @@
// will have removed and then re-added mc unnecessarily. But that's =
ok
// because shrinking a block with realloc() is (presumably) much rare=
r
// than growing it, and this way simplifies the growing case.
- VG_(HT_add_node)(malloc_list, (VgHashNode*)hc);
+ VG_(HT_add_node)(malloc_list, hc);
=20
VGP_POPCC(VgpCliMalloc);
return p_new;
Modified: trunk/memcheck/mac_malloc_wrappers.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/memcheck/mac_malloc_wrappers.c 2005-08-14 04:29:12 UTC (rev 440=
3)
+++ trunk/memcheck/mac_malloc_wrappers.c 2005-08-14 06:24:20 UTC (rev 440=
4)
@@ -212,8 +212,7 @@
// Only update this stat if allocation succeeded.
cmalloc_bs_mallocd +=3D size;
=20
- VG_(HT_add_node)( table,=20
- (VgHashNode*)create_MAC_Chunk(tid, p, size, kind) )=
;
+ VG_(HT_add_node)( table, create_MAC_Chunk(tid, p, size, kind) );
=20
MAC_(ban_mem_heap)( p-rzB, rzB );
MAC_(new_mem_heap)( p, size, is_zeroed );
@@ -417,7 +416,7 @@
// will have removed and then re-added mc unnecessarily. But that's =
ok
// because shrinking a block with realloc() is (presumably) much rare=
r
// than growing it, and this way simplifies the growing case.
- VG_(HT_add_node)( MAC_(malloc_list), (VgHashNode*)mc );
+ VG_(HT_add_node)( MAC_(malloc_list), mc );
=20
VGP_POPCC(VgpCliMalloc);
return p_new;
@@ -444,7 +443,7 @@
VG_(tool_panic)("MAC_(create_mempool): shadow area is accessible")=
;
}=20
=20
- VG_(HT_add_node)( MAC_(mempool_list), (VgHashNode*)mp );
+ VG_(HT_add_node)( MAC_(mempool_list), mp );
=20
}
=20
@@ -525,7 +524,8 @@
}
MallocStats;
=20
-static void malloc_stats_count_chunk(VgHashNode* node, void* d) {
+static void malloc_stats_count_chunk(VgHashNode* node, void* d)=20
+{
MAC_Chunk* mc =3D (MAC_Chunk*)node;
MallocStats *ms =3D (MallocStats *)d;
=20
|
|
From: <sv...@va...> - 2005-08-14 04:29:14
|
Author: njn
Date: 2005-08-14 05:29:12 +0100 (Sun, 14 Aug 2005)
New Revision: 4403
Log:
Compactify unload_symbols().
Modified:
trunk/coregrind/m_debuginfo/symtab.c
Modified: trunk/coregrind/m_debuginfo/symtab.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_debuginfo/symtab.c 2005-08-14 04:12:40 UTC (rev 440=
2)
+++ trunk/coregrind/m_debuginfo/symtab.c 2005-08-14 04:29:12 UTC (rev 440=
3)
@@ -1703,36 +1703,28 @@
*/
static void unload_symbols ( Addr start, SizeT length )
{
- SegInfo *prev, *curr;
+ SegInfo** prev_next_ptr =3D &segInfo_list;
+ SegInfo* curr =3D segInfo_list;
=20
- prev =3D NULL;
- curr =3D segInfo_list;
- while (True) {
- if (curr =3D=3D NULL) break;
- if (start =3D=3D curr->start) break;
- prev =3D curr;
- curr =3D curr->next;
+ while (curr) {
+ if (start =3D=3D curr->start) {
+ // Found it; remove from list and free it.
+ if (VG_(clo_verbosity) > 1)
+ VG_(message)(Vg_DebugMsg,=20
+ "discard syms at %p-%p in %s due to munmap()",=20
+ start, start+length,
+ curr->filename ? curr->filename : (Char *)"???"=
);
+ vg_assert(*prev_next_ptr =3D=3D curr);
+ *prev_next_ptr =3D curr->next;
+ freeSegInfo(curr);
+ return;
+ }
+ prev_next_ptr =3D &curr->next;
+ curr =3D curr->next;
}
- if (curr =3D=3D NULL) {
- VGP_POPCC(VgpReadSyms);
- return;
- }
=20
- if (VG_(clo_verbosity) > 1)
- VG_(message)(Vg_DebugMsg,=20
- "discard syms at %p-%p in %s due to munmap()",=20
- start, start+length, curr->filename ? curr->filename =
: (Char *)"???");
-
- vg_assert(prev =3D=3D NULL || prev->next =3D=3D curr);
-
- if (prev =3D=3D NULL) {
- segInfo_list =3D curr->next;
- } else {
- prev->next =3D curr->next;
- }
-
- freeSegInfo(curr);
- return;
+ // Not found.
+ VGP_POPCC(VgpReadSyms);
}
=20
void VG_(seginfo_decref)(SegInfo *si, Addr start)
|
|
From: <sv...@va...> - 2005-08-14 04:12:48
|
Author: njn
Date: 2005-08-14 05:12:40 +0100 (Sun, 14 Aug 2005)
New Revision: 4402
Log:
Partially evaluate m_stacks.c to simplify and shrink it a bit.
Modified:
trunk/coregrind/m_stacks.c
Modified: trunk/coregrind/m_stacks.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_stacks.c 2005-08-14 00:59:45 UTC (rev 4401)
+++ trunk/coregrind/m_stacks.c 2005-08-14 04:12:40 UTC (rev 4402)
@@ -95,54 +95,21 @@
* stack pointer falls outside the range of the current stack, we search
* the stacks list above for a matching stack.
*/
-static Addr current_stack_start;
-static Addr current_stack_end;
-static UWord current_stack_id;
+static Stack current_stack;
=20
-/* Search for a particular stack by id number. */
-static Bool find_stack_by_id(UWord id, Addr *start, Addr *end)
-{
- Stack *i =3D stacks;
- while(i) {
- if(i->id =3D=3D id) {
- *start =3D i->start;
- *end =3D i->end;
- return True;
- }
- i =3D i->next;
- }
- return False;
-}
-
/* Find what stack an address falls into. */
-static Bool find_stack_by_addr(Addr sp, Addr *start, Addr *end, UWord *i=
d)
+static Stack* find_stack_by_addr(Addr sp)
{
Stack *i =3D stacks;
- while(i) {
- if(sp >=3D i->start && sp <=3D i->end) {
- *start =3D i->start;
- *end =3D i->end;
- *id =3D i->id;
- return True;
+ while (i) {
+ if (sp >=3D i->start && sp <=3D i->end) {
+ return i;
}
i =3D i->next;
}
- return False;
+ return NULL;
}
=20
-/* Change over to a new stack. */
-static Bool set_current_stack(UWord id)
-{
- Addr start, end;
- if (find_stack_by_id(id, &start, &end)) {
- current_stack_id =3D id;
- current_stack_start =3D start;
- current_stack_end =3D end;
- return True;
- }
- return False;
-}
-
/*
* Register a new stack from start - end. This is invoked from the
* VALGRIND_STACK_REGISTER client request, and is also called just befor=
e
@@ -164,8 +131,8 @@
i->next =3D stacks;
stacks =3D i;
=20
- if(i->id =3D=3D 0) {
- set_current_stack(i->id);
+ if (i->id =3D=3D 0) {
+ current_stack =3D *i;
}
=20
return i->id;
@@ -180,7 +147,7 @@
Stack *i =3D stacks;
Stack *prev =3D NULL;
=20
- if(current_stack_id =3D=3D id) {
+ if (current_stack.id =3D=3D id) {
return;
}
=20
@@ -208,12 +175,12 @@
{
Stack *i =3D stacks;
=20
- if (id =3D=3D current_stack_id) {
- current_stack_start =3D start;
- current_stack_end =3D end;
+ if (id =3D=3D current_stack.id) {
+ current_stack.start =3D start;
+ current_stack.end =3D end;
}
=20
- while(i) {
+ while (i) {
if (i->id =3D=3D id) {
i->start =3D start;
i->end =3D end;
@@ -234,14 +201,12 @@
Word delta =3D (Word)new_SP - (Word)old_SP;
=20
/* Check if the stack pointer is still in the same stack as before. *=
/
- if (new_SP < current_stack_start || new_SP > current_stack_end) {
- Addr start, end;
- UWord new_id;
- Bool found =3D find_stack_by_addr(new_SP, &start, &end, &new_id);
- if (found && new_id !=3D current_stack_id) {
+ if (new_SP < current_stack.start || new_SP > current_stack.end) {
+ Stack* new_stack =3D find_stack_by_addr(new_SP);
+ if (new_stack && new_stack->id !=3D current_stack.id) {
/* The stack pointer is now in another stack. Update the curre=
nt
stack information and return without doing anything else. */
- set_current_stack(new_id);
+ current_stack =3D *new_stack;
return;
}
}
|
|
From: Tom H. <to...@co...> - 2005-08-14 02:41:49
|
Nightly build on dunsmere ( athlon, Fedora Core 4 ) started at 2005-08-14 03:30:04 BST Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 182 tests, 5 stderr failures, 0 stdout failures ================= memcheck/tests/leak-tree (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/xml1 (stderr) none/tests/faultstatus (stderr) none/tests/x86/int (stderr) |
|
From: Tom H. <th...@cy...> - 2005-08-14 02:27:13
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2005-08-14 03:15:03 BST Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 181 tests, 15 stderr failures, 2 stdout failures ================= memcheck/tests/addressable (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/erringfds (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/partiallydefinedeq (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/sigkill (stderr) memcheck/tests/stack_changes (stderr) none/tests/faultstatus (stderr) none/tests/x86/cmpxchg8b (stdout) none/tests/x86/cmpxchg8b (stderr) none/tests/x86/int (stderr) none/tests/x86/yield (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 == 181 tests, 15 stderr failures, 1 stdout failure ================= memcheck/tests/addressable (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/erringfds (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/partiallydefinedeq (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/sigkill (stderr) memcheck/tests/stack_changes (stderr) none/tests/faultstatus (stderr) none/tests/x86/cmpxchg8b (stdout) none/tests/x86/cmpxchg8b (stderr) none/tests/x86/int (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Sun Aug 14 03:21:13 2005 --- new.short Sun Aug 14 03:27:09 2005 *************** *** 8,10 **** ! == 181 tests, 15 stderr failures, 1 stdout failure ================= memcheck/tests/addressable (stderr) --- 8,10 ---- ! == 181 tests, 15 stderr failures, 2 stdout failures ================= memcheck/tests/addressable (stderr) *************** *** 25,26 **** --- 25,27 ---- none/tests/x86/int (stderr) + none/tests/x86/yield (stdout) |
|
From: Tom H. <th...@cy...> - 2005-08-14 02:25:21
|
Nightly build on dellow ( x86_64, Fedora Core 4 ) started at 2005-08-14 03:10:07 BST Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 159 tests, 6 stderr failures, 0 stdout failures ================= memcheck/tests/sigprocmask (stderr) memcheck/tests/strchr (stderr) memcheck/tests/vgtest_ume (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/xml1 (stderr) none/tests/faultstatus (stderr) |
|
From: Tom H. <th...@cy...> - 2005-08-14 02:24:45
|
Nightly build on ginetta ( i686, Red Hat 8.0 ) started at 2005-08-14 03:10:06 BST Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 181 tests, 2 stderr failures, 0 stdout failures ================= none/tests/faultstatus (stderr) none/tests/x86/int (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 == 181 tests, 2 stderr failures, 1 stdout failure ================= none/tests/faultstatus (stderr) none/tests/x86/int (stderr) none/tests/x86/yield (stdout) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Sun Aug 14 03:18:32 2005 --- new.short Sun Aug 14 03:24:29 2005 *************** *** 8,13 **** ! == 181 tests, 2 stderr failures, 1 stdout failure ================= none/tests/faultstatus (stderr) none/tests/x86/int (stderr) - none/tests/x86/yield (stdout) --- 8,12 ---- ! == 181 tests, 2 stderr failures, 0 stdout failures ================= none/tests/faultstatus (stderr) none/tests/x86/int (stderr) |
|
From: Tom H. <th...@cy...> - 2005-08-14 02:23:03
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2005-08-14 03:00:03 BST Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 159 tests, 7 stderr failures, 1 stdout failure ================= memcheck/tests/sigprocmask (stderr) memcheck/tests/strchr (stderr) memcheck/tests/vgtest_ume (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/xml1 (stderr) none/tests/faultstatus (stderr) none/tests/fdleak_fcntl (stderr) none/tests/tls (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 == 159 tests, 7 stderr failures, 0 stdout failures ================= memcheck/tests/sigprocmask (stderr) memcheck/tests/strchr (stderr) memcheck/tests/vgtest_ume (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/xml1 (stderr) none/tests/faultstatus (stderr) none/tests/fdleak_fcntl (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Sun Aug 14 03:09:54 2005 --- new.short Sun Aug 14 03:22:53 2005 *************** *** 8,10 **** ! == 159 tests, 7 stderr failures, 0 stdout failures ================= memcheck/tests/sigprocmask (stderr) --- 8,10 ---- ! == 159 tests, 7 stderr failures, 1 stdout failure ================= memcheck/tests/sigprocmask (stderr) *************** *** 16,17 **** --- 16,18 ---- none/tests/fdleak_fcntl (stderr) + none/tests/tls (stdout) |
|
From: Tom H. <th...@cy...> - 2005-08-14 02:16:51
|
Nightly build on aston ( x86_64, Fedora Core 3 ) started at 2005-08-14 03:05:11 BST Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 159 tests, 6 stderr failures, 0 stdout failures ================= memcheck/tests/sigprocmask (stderr) memcheck/tests/strchr (stderr) memcheck/tests/vgtest_ume (stderr) memcheck/tests/weirdioctl (stderr) memcheck/tests/xml1 (stderr) none/tests/faultstatus (stderr) |
|
From: <sv...@va...> - 2005-08-14 00:59:47
|
Author: sewardj
Date: 2005-08-14 01:59:45 +0100 (Sun, 14 Aug 2005)
New Revision: 4401
Log:
Update.
Modified:
trunk/docs/internals/3_0_BUGSTATUS.txt
Modified: trunk/docs/internals/3_0_BUGSTATUS.txt
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/docs/internals/3_0_BUGSTATUS.txt 2005-08-14 00:31:26 UTC (rev 4=
400)
+++ trunk/docs/internals/3_0_BUGSTATUS.txt 2005-08-14 00:59:45 UTC (rev 4=
401)
@@ -57,7 +57,7 @@
=20
FIXED-TRUNK: done(1331, 4390 contains regtest=20
+ mistaken commit of this file)
-FIXED-30BRANCH: TODO
+FIXED-30BRANCH: done(1337)
=20
----------------------------------------------------------------
=20
@@ -279,6 +279,18 @@
=20
----------------------------------------------------------------
=20
+110657 Small test fixes
+
+(1) Filter out L3 cache warning messages causing problems
+(2) Stop tests/mq failing on 2.4 kernels
+
+I suppose it would be good to apply these. They seem low risk.
+
+FIXED-TRUNK: no
+FIXED-30BRANCH: no
+
+----------------------------------------------------------------
+
110669 valgrind attach to gdb and quitting gdb hangs valgrind
=20
Not clear if this is really a Valgrind bug.
@@ -291,7 +303,7 @@
110671 vex x86->IR: unhandled instruction bytes: 0xF3 0xC3 (rep ret)
=20
FIXED-TRUNK: done(1332)
-FIXED-30BRANCH: TODO
+FIXED-30BRANCH: done(1338)
=20
----------------------------------------------------------------
=20
|
|
From: <sv...@va...> - 2005-08-14 00:50:46
|
Author: sewardj
Date: 2005-08-14 01:50:40 +0100 (Sun, 14 Aug 2005)
New Revision: 1338
Log:
merge rev 1332 (x86 rep ret)
Modified:
branches/VEX_3_0_BRANCH/priv/guest-x86/toIR.c
Modified: branches/VEX_3_0_BRANCH/priv/guest-x86/toIR.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VEX_3_0_BRANCH/priv/guest-x86/toIR.c 2005-08-14 00:44:33 UTC=
(rev 1337)
+++ branches/VEX_3_0_BRANCH/priv/guest-x86/toIR.c 2005-08-14 00:50:40 UTC=
(rev 1338)
@@ -11344,11 +11344,11 @@
dres.whatNext =3D Dis_StopHere;
break;
=20
-//-- case 0xC3: /* REP RET */
-//-- /* AMD K7/K8-specific optimisation; faster than vanilla RE=
T */
-//-- dis_ret(cb, 0);
-//-- DIP("rep ret\n");
-//-- break;
+ case 0xC3: /* REP RET -- same as normal ret? */
+ dis_ret(0);
+ dres.whatNext =3D Dis_StopHere;
+ DIP("rep ret\n");
+ break;
=20
default:
goto decode_failure;
|
|
From: <sv...@va...> - 2005-08-14 00:44:35
|
Author: sewardj
Date: 2005-08-14 01:44:33 +0100 (Sun, 14 Aug 2005)
New Revision: 1337
Log:
merge rev 1331 (x86 cmpxchg8b support)
Modified:
branches/VEX_3_0_BRANCH/priv/guest-x86/toIR.c
branches/VEX_3_0_BRANCH/priv/host-x86/isel.c
Modified: branches/VEX_3_0_BRANCH/priv/guest-x86/toIR.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VEX_3_0_BRANCH/priv/guest-x86/toIR.c 2005-08-14 00:25:40 UTC=
(rev 1336)
+++ branches/VEX_3_0_BRANCH/priv/guest-x86/toIR.c 2005-08-14 00:44:33 UTC=
(rev 1337)
@@ -11700,10 +11700,72 @@
case 0xB1: /* CMPXCHG Gv,Ev */
delta =3D dis_cmpxchg_G_E ( sorb, sz, delta );
break;
-//-- case 0xC7: /* CMPXCHG8B Gv */
-//-- eip =3D dis_cmpxchg8b ( cb, sorb, eip );
-//-- break;
-//--=20
+
+ case 0xC7: { /* CMPXCHG8B Gv (0F C7 /1) */
+ IRTemp m64_old =3D newTemp(Ity_I64);
+ IRTemp m64_new =3D newTemp(Ity_I64);
+ IRTemp da_old =3D newTemp(Ity_I64);
+ IRTemp da_new =3D newTemp(Ity_I64);
+ IRTemp cb_old =3D newTemp(Ity_I64);
+ IRTemp flags_old =3D newTemp(Ity_I32);
+ IRTemp flags_new =3D newTemp(Ity_I32);
+ IRTemp cond =3D newTemp(Ity_I8);
+
+ /* Decode, and generate address. */
+ modrm =3D getIByte(delta);
+ if (epartIsReg(modrm)) goto decode_failure;
+ if (gregOfRM(modrm) !=3D 1) goto decode_failure;
+ addr =3D disAMode ( &alen, sorb, delta, dis_buf );
+ delta +=3D alen;
+
+ /* Fetch the old 64-bit values and compute the guard. */
+ assign( m64_old, loadLE(Ity_I64, mkexpr(addr) ));
+ assign( da_old, binop(Iop_32HLto64,=20
+ getIReg(4,R_EDX), getIReg(4,R_EAX)) );
+ assign( cb_old, binop(Iop_32HLto64,=20
+ getIReg(4,R_ECX), getIReg(4,R_EBX)) );
+
+ assign( cond,=20
+ unop(Iop_1Uto8,=20
+ binop(Iop_CmpEQ64, mkexpr(da_old), mkexpr(m64_old)=
)) );
+
+ /* Compute new %edx:%eax and m64 values, and put in place */
+ assign( da_new,=20
+ IRExpr_Mux0X(mkexpr(cond), mkexpr(m64_old), mkexpr(da_o=
ld)));
+ assign( m64_new,
+ IRExpr_Mux0X(mkexpr(cond), mkexpr(m64_old), mkexpr(cb_o=
ld)));
+
+ putIReg(4, R_EDX, unop(Iop_64HIto32, mkexpr(da_new)) );
+ putIReg(4, R_EAX, unop(Iop_64to32, mkexpr(da_new)) );
+ storeLE( mkexpr(addr), mkexpr(m64_new) );
+
+ /* Copy the guard into the Z flag and leave the others unchange=
d */
+ assign( flags_old, widenUto32(mk_x86g_calculate_eflags_all()));
+ assign(=20
+ flags_new,
+ binop(Iop_Or32,
+ binop(Iop_And32, mkexpr(flags_old),=20
+ mkU32(~X86G_CC_MASK_Z)),
+ binop(Iop_Shl32,=20
+ binop(Iop_And32,=20
+ unop(Iop_8Uto32, mkexpr(cond)), mkU32(1)),=
=20
+ mkU8(X86G_CC_SHIFT_Z)) ));
+
+ stmt( IRStmt_Put( OFFB_CC_OP, mkU32(X86G_CC_OP_COPY) ));
+ stmt( IRStmt_Put( OFFB_CC_DEP1, mkexpr(flags_new) ));
+ stmt( IRStmt_Put( OFFB_CC_DEP2, mkU32(0) ));
+ /* Set NDEP even though it isn't used. This makes
+ redundant-PUT elimination of previous stores to this field
+ work better. */
+ stmt( IRStmt_Put( OFFB_CC_NDEP, mkU32(0) ));
+
+ /* Sheesh. Aren't you glad it was me and not you that had to
+ write and validate all this grunge? */
+
+ DIP("cmpxchg8b %s\n", dis_buf);
+ break;
+ }
+
/* =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- CPUID -=3D-=3D-=3D-=3D-=3D=
-=3D-=3D-=3D-=3D-=3D-=3D */
=20
case 0xA2: { /* CPUID */
Modified: branches/VEX_3_0_BRANCH/priv/host-x86/isel.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VEX_3_0_BRANCH/priv/host-x86/isel.c 2005-08-14 00:25:40 UTC =
(rev 1336)
+++ branches/VEX_3_0_BRANCH/priv/host-x86/isel.c 2005-08-14 00:44:33 UTC =
(rev 1337)
@@ -1721,7 +1721,8 @@
=20
/* CmpNE64 */
if (e->tag =3D=3D Iex_Binop=20
- && e->Iex.Binop.op =3D=3D Iop_CmpNE64) {
+ && (e->Iex.Binop.op =3D=3D Iop_CmpNE64
+ || e->Iex.Binop.op =3D=3D Iop_CmpEQ64)) {
HReg hi1, hi2, lo1, lo2;
HReg tHi =3D newVRegI(env);
HReg tLo =3D newVRegI(env);
@@ -1734,6 +1735,7 @@
addInstr(env, X86Instr_Alu32R(Xalu_OR,X86RMI_Reg(tHi), tLo));
switch (e->Iex.Binop.op) {
case Iop_CmpNE64: return Xcc_NZ;
+ case Iop_CmpEQ64: return Xcc_Z;
default: vpanic("iselCondCode(x86): CmpXX64");
}
}
|
|
From: <sv...@va...> - 2005-08-14 00:31:30
|
Author: sewardj Date: 2005-08-14 01:31:26 +0100 (Sun, 14 Aug 2005) New Revision: 4400 Log: Update. Modified: trunk/docs/internals/3_0_BUGSTATUS.txt Modified: trunk/docs/internals/3_0_BUGSTATUS.txt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/docs/internals/3_0_BUGSTATUS.txt 2005-08-13 23:38:26 UTC (rev 4= 399) +++ trunk/docs/internals/3_0_BUGSTATUS.txt 2005-08-14 00:31:26 UTC (rev 4= 400) @@ -260,15 +260,15 @@ =20 110652 AMD64 valgrind crashes on cwtd instruction =20 -FIXED-TRUNK: TODO -FIXED-30BRANCH: TODO +FIXED-TRUNK: done(1333) +FIXED-30BRANCH: done(1335) =20 ---------------------------------------------------------------- =20 110653 AMD64 valgrind crashes on sarb $0x4,foo(%rip) instruction =20 -FIXED-TRUNK: TODO -FIXED-30BRANCH: TODO +FIXED-TRUNK: done(1334) +FIXED-30BRANCH: done(1336) =20 ---------------------------------------------------------------- =20 |
|
From: <sv...@va...> - 2005-08-14 00:25:43
|
Author: sewardj
Date: 2005-08-14 01:25:40 +0100 (Sun, 14 Aug 2005)
New Revision: 1336
Log:
merge r1334 (dis_Grp2 amode fix)
Modified:
branches/VEX_3_0_BRANCH/priv/guest-amd64/toIR.c
Modified: branches/VEX_3_0_BRANCH/priv/guest-amd64/toIR.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VEX_3_0_BRANCH/priv/guest-amd64/toIR.c 2005-08-14 00:20:46 U=
TC (rev 1335)
+++ branches/VEX_3_0_BRANCH/priv/guest-amd64/toIR.c 2005-08-14 00:25:40 U=
TC (rev 1336)
@@ -2921,7 +2921,7 @@
assign(dst0, getIRegE(sz, pfx, modrm));
delta +=3D (am_sz + d_sz);
} else {
- addr =3D disAMode ( &len, pfx, delta, dis_buf, 0 );
+ addr =3D disAMode ( &len, pfx, delta, dis_buf, /*xtra*/d_sz );
assign(dst0, loadLE(ty,mkexpr(addr)));
delta +=3D len + d_sz;
}
|