mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-04 02:18:37 +00:00
Nasty hack to stop the leak checker dying on custom-allocator example
from Ashley Pittman. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5367
This commit is contained in:
parent
89add09cf8
commit
d2de349f96
@ -119,10 +119,10 @@ static Addr* get_seg_starts ( /*OUT*/Int* n_acquired )
|
||||
*/
|
||||
typedef
|
||||
enum {
|
||||
Unreached,
|
||||
IndirectLeak,
|
||||
Interior,
|
||||
Proper
|
||||
Unreached =0,
|
||||
IndirectLeak =1,
|
||||
Interior =2,
|
||||
Proper =3
|
||||
}
|
||||
Reachedness;
|
||||
|
||||
@ -536,7 +536,18 @@ static void full_report(ThreadId tid)
|
||||
lc_do_leakcheck(i);
|
||||
|
||||
tl_assert(lc_markstack_top == -1);
|
||||
tl_assert(lc_markstack[i].state == IndirectLeak);
|
||||
VG_(printf)("state = %d\n", (Int)lc_markstack[i].state);
|
||||
tl_assert(lc_markstack[i].state == IndirectLeak
|
||||
/* jrs 20051218: Ashley Pittman supplied a
|
||||
custom-allocator test program which causes the ==
|
||||
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 == Unreached);
|
||||
|
||||
lc_markstack[i].state = Unreached; /* Return to unreached state,
|
||||
to indicate its a clique
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user