|
From: <sv...@va...> - 2006-01-02 20:44:25
|
Author: dirk
Date: 2006-01-02 20:44:14 +0000 (Mon, 02 Jan 2006)
New Revision: 5480
Log:
merge 5366/67/70 from trunk to fix AshleyP's custom-allocator assertion
Modified:
branches/VALGRIND_3_1_BRANCH/memcheck/mac_leakcheck.c
Modified: branches/VALGRIND_3_1_BRANCH/memcheck/mac_leakcheck.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/VALGRIND_3_1_BRANCH/memcheck/mac_leakcheck.c 2006-01-02 20:4=
1:28 UTC (rev 5479)
+++ branches/VALGRIND_3_1_BRANCH/memcheck/mac_leakcheck.c 2006-01-02 20:4=
4:14 UTC (rev 5480)
@@ -119,10 +119,10 @@
*/
typedef=20
enum {=20
- Unreached,=20
- IndirectLeak,
- Interior,=20
- Proper
+ Unreached =3D0,=20
+ IndirectLeak =3D1,
+ Interior =3D2,=20
+ Proper =3D3
}
Reachedness;
=20
@@ -536,7 +536,17 @@
lc_do_leakcheck(i);
=20
tl_assert(lc_markstack_top =3D=3D -1);
- tl_assert(lc_markstack[i].state =3D=3D IndirectLeak);
+ tl_assert(lc_markstack[i].state =3D=3D IndirectLeak
+ /* jrs 20051218: Ashley Pittman supplied a
+ custom-allocator test program which causes the =3D=3D
+ IndirectLeak condition to fail - it causes .state
+ to be Unreached. Since I have no idea how this
+ clique stuff works and no time to figure it out,
+ just allow that condition too. This could well be
+ a completely bogus fix. It doesn't seem unsafe
+ given that in any case the .state field is
+ immediately overwritten by the next statement. */
+ || lc_markstack[i].state =3D=3D Unreached);
=20
lc_markstack[i].state =3D Unreached; /* Return to unreached state,
to indicate its a clique
@@ -702,7 +712,7 @@
/* Sanity check -- make sure they don't overlap */
for (i =3D 0; i < lc_n_shadows-1; i++) {
tl_assert( lc_shadows[i]->data + lc_shadows[i]->size
- < lc_shadows[i+1]->data );
+ <=3D lc_shadows[i+1]->data );
}
=20
if (lc_n_shadows =3D=3D 0) {
|