OK, so I do this now:
pthread::memory_range_t range = *i; // line 325, this is "mark" routine,
marks reachable objects
if(debug)
{
unsigned long n = (char*)range.e - (char*)range.b;
fprintf(stderr, "Conservate scan of memory %p->%p, %ld
bytes\n",range.b, range.e, n);
}
VALGRIND_MAKE_MEM_DEFINED(range.b, (char*)range.e-(char*)range.b);
void *end = range.e;
for ( void *i = range.b; i != end; i = (void*)((void**)i+1))
{
if(debug)
fprintf(stderr, "Check if *%p=%p is a pointer\n",i,*(void**)i);
scan_object(*(void**)i, reclimit);
}
if(debug)
fprintf(stderr, "DONE: Conservate scan of memory %p->%p\n",range.b,
range.e);
The VALGRIND macro there doesn't seem to be working, I must be
doing something wrong. I'm trying to just mark the whole stack as defined.
Here's output:
Actually collect
Request to collect, thread 1004f6be0
Thread 1004f6be0 Stopping world, active threads=1
World stop thread=1004f6be0, stack=0x7fff5fbff128!
Stack size = 1648
World STOPPED
Collecting, thread 1004f6be0
Collector: Running mark
Conservate scan of memory 0x7fff5fbff128->0x7fff5fbff798, 1648 bytes
Check if *0x7fff5fbff128=0x18 is a pointer
==7159== Conditional jump or move depends on uninitialised value(s)
==7159== at 0x10032E579: __vfprintf (in /usr/lib/libSystem.B.dylib)
==7159== by 0x10032C06E: __vfprintf (in /usr/lib/libSystem.B.dylib)
==7159== by 0x10036F07A: vfprintf_l (in /usr/lib/libSystem.B.dylib)
==7159== by 0x10036EFFD: fprintf (in /usr/lib/libSystem.B.dylib)
==7159== by 0x10000DCFA:
flx::gc::collector::flx_collector_t::scan_object(void*, int)
(flx_collector.cpp:451)
==7159== by 0x10000E4A7:
flx::gc::collector::flx_collector_t::mark(std::vector<flx::pthread::memory_range_t,
std::allocator<flx::pthread::memory_range_t> >*) (flx_collector.cpp:337)
==7159== by 0x10000EFF6: flx::gc::collector::flx_collector_t::impl_collect()
(flx_collector.cpp:535)
==7159== by 0x1000111A6: flx::gc::collector::flx_ts_collector_t::v_collect()
(flx_ts_collector.cpp:21)
==7159== by 0x100004D23: flx::gc::generic::collector_t::collect()
(flx_gc.hpp:108)
==7159== by 0x100010B9F: flx::gc::generic::gc_profile_t::actually_collect()
(flx_gc.cpp:59)
==7159== by 0x100010DBF: flx::gc::generic::gc_profile_t::maybe_collect()
(flx_gc.cpp:53)
==7159== by 0x100010E0C:
flx::gc::generic::gc_profile_t::allocate(flx::gc::generic::gc_shape_t*,
unsigned long, bool) (flx_gc.cpp:81)
==7159== Uninitialised value was created by a stack allocation
==7159== at 0x10000E492:
flx::gc::collector::flx_collector_t::mark(std::vector<flx::pthread::memory_range_t,
std::allocator<flx::pthread::memory_range_t> >*) (flx_collector.cpp:337)
.. more ..
Scan object 0x18, reachable bit value = 1
==7159== Use of uninitialised value of size 8
==7159== at 0x100081737: JudyLGet (JudyLGet.c:327)
==7159== by 0x10005CCFD: JudyLLast (JudyLFirst.c:118)
==7159== by 0x10000DD2F:
flx::gc::collector::flx_collector_t::scan_object(void*, int)
(flx_collector.cpp:454)
==7159== by 0x10000E4A7:
flx::gc::collector::flx_collector_t::mark(std::vector<flx::pthread::memory_range_t,
std::allocator<flx::pthread::memory_range_t> >*) (flx_collector.cpp:337)
==7159== by 0x10000EFF6: flx::gc::collector::flx_collector_t::impl_collect()
(flx_collector.cpp:535)
==7159== by 0x1000111A6: flx::gc::collector::flx_ts_collector_t::v_collect()
(flx_ts_collector.cpp:21)
==7159== by 0x100004D23: flx::gc::generic::collector_t::collect()
(flx_gc.hpp:108)
==7159== by 0x100010B9F: flx::gc::generic::gc_profile_t::actually_collect()
(flx_gc.cpp:59)
==7159== by 0x100010DBF: flx::gc::generic::gc_profile_t::maybe_collect()
(flx_gc.cpp:53)
==7159== by 0x100010E0C:
flx::gc::generic::gc_profile_t::allocate(flx::gc::generic::gc_shape_t*,
unsigned long, bool) (flx_gc.cpp:81)
==7159== by 0x100010F58: operator new(unsigned long,
flx::gc::generic::gc_profile_t&, flx::gc::generic::gc_shape_t&, bool)
(flx_gc.cpp:117)
==7159== by 0x1000012D5: flxusr::lr::rev(flxusr::lr::thread_frame_t*,
flx::rtl::_uctor_) (in ./lr)
==7159== Uninitialised value was created by a stack allocation
==7159== at 0x10000E492:
flx::gc::collector::flx_collector_t::mark(std::vector<flx::pthread::memory_range_t,
std::allocator<flx::pthread::memory_range_t> >*) (flx_collector.cpp:337)
==7159==
==7159== Use of uninitialised value of size 8
==7159== at 0x100080E0D: JudyLGet (JudyLGet.c:125)
==7159== by 0x10005CCFD: JudyLLast (JudyLFirst.c:118)
==7159== by 0x10000DD2F:
flx::gc::collector::flx_collector_t::scan_object(void*, int)
(flx_collector.cpp:454)
==7159== by 0x10000E4A7:
flx::gc::collector::flx_collector_t::mark(std::vector<flx::pthread::memory_range_t,
std::allocator<flx::pthread::memory_range_t> >*) (flx_collector.cpp:337)
==7159== by 0x10000EFF6: flx::gc::collector::flx_collector_t::impl_collect()
(flx_collector.cpp:535)
==7159== by 0x1000111A6: flx::gc::collector::flx_ts_collector_t::v_collect()
(flx_ts_collector.cpp:21)
==7159== by 0x100004D23: flx::gc::generic::collector_t::collect()
(flx_gc.hpp:108)
==7159== by 0x100010B9F: flx::gc::generic::gc_profile_t::actually_collect()
(flx_gc.cpp:59)
==7159== by 0x100010DBF: flx::gc::generic::gc_profile_t::maybe_collect()
(flx_gc.cpp:53)
==7159== by 0x100010E0C:
flx::gc::generic::gc_profile_t::allocate(flx::gc::generic::gc_shape_t*,
unsigned long, bool) (flx_gc.cpp:81)
==7159== by 0x100010F58: operator new(unsigned long,
flx::gc::generic::gc_profile_t&, flx::gc::generic::gc_shape_t&, bool)
(flx_gc.cpp:117)
==7159== by 0x1000012D5: flxusr::lr::rev(flxusr::lr::thread_frame_t*,
flx::rtl::_uctor_) (in ./lr)
==7159== Uninitialised value was created by a stack allocation
==7159== at 0x10000E492:
flx::gc::collector::flx_collector_t::mark(std::vector<flx::pthread::memory_range_t,
std::allocator<flx::pthread::memory_range_t> >*) (flx_collector.cpp:337)
==7159==
etc etc etc....
--
john skaller
[email protected]
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users