|
From: Greg H.
|
After rooting through the valgrind source, I discovered that I am
blind, and the address info I coveted is displayed between two partial
stack traces:
==6579== Syscall param writev(vector[...]) contains uninitialised or unaddressable byte(s)
==6579== at 0x40181C24: vgAllRoadsLeadToRome_writev (vg_intercept.c:108)
==6579== by 0x40181C60: __writev (vg_intercept.c:732)
==6579== by 0x407C311D: (within /usr/lib/liblinc.so.1.0.0)
==6579== by 0x407C32AB: linc_connection_writev (in /usr/lib/liblinc.so.1.0.0)
==6579== Address 0x4402E83E is 10 bytes inside a block of size 2048 alloc'd
==6579== at 0x4002942A: malloc (vg_replace_malloc.c:153)
==6579== by 0x4112F558: g_malloc (in /usr/lib/libglib-2.0.so.0.200.1)
==6579== by 0x4078531E: get_next_indirect (giop-send-buffer.c:273)
==6579== by 0x407853E3: giop_send_buffer_append_copy (giop-send-buffer.c:295)
I think I would have been less likely to have missed it if the
"Address 0x4402E83E" line weren't indented. Here's a trivial patch to
de-indent address-info headers if the powers that be agree with me.
--- mac_needs.c 2003-07-24 19:43:11.000000000 -0400
+++ mac_needs.c.new 2003-08-06 02:11:03.000000000 -0400
@@ -226,19 +226,19 @@
switch (ai->akind) {
case Stack:
VG_(message)(Vg_UserMsg,
- " Address 0x%x is on thread %d's stack",
+ "Address 0x%x is on thread %d's stack",
a, ai->stack_tid);
break;
case Unknown:
if (ai->maybe_gcc) {
VG_(message)(Vg_UserMsg,
- " Address 0x%x is just below %%esp. Possibly a bug in GCC/G++",
+ "Address 0x%x is just below %%esp. Possibly a bug in GCC/G++",
a);
VG_(message)(Vg_UserMsg,
- " v 2.96 or 3.0.X. To suppress, use: --workaround-gcc296-bugs=yes");
+ "v 2.96 or 3.0.X. To suppress, use: --workaround-gcc296-bugs=yes");
} else {
VG_(message)(Vg_UserMsg,
- " Address 0x%x is not stack'd, malloc'd or free'd", a);
+ "Address 0x%x is not stack'd, malloc'd or free'd", a);
}
break;
case Freed: case Mallocd: case UserG: {
@@ -255,7 +255,7 @@
relative = "inside";
}
VG_(message)(Vg_UserMsg,
- " Address 0x%x is %d bytes %s a block of size %d %s",
+ "Address 0x%x is %d bytes %s a block of size %d %s",
a, delta, relative,
ai->blksize,
ai->akind==Mallocd ? "alloc'd"
|