$ valgrind –version
valgrind-3.13.0
$ callgrind_control --version
callgrind_control-3.13.0
valgrind, vgdb, and the executable were compiled with GCC 4.9.3
run on Linux kernel 2.6.32
uname -a
Linux 2.6.32.23-0.3-default #1 SMP 2010-10-07 14:57:45 +0200 x86_64 x86_64
x86_64 GNU/Linux
Here is the monitored executable:
ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), for GNU/Linux 2.6.32,
dynamically linked (uses shared libs), not stripped
$ callgrind_control –i off
error size shared memory file vgdb-pipe-shared-mem-vgdb-...
expecting size 40 (64bits) or 32 (32bits) got 48.
There is a mismatch between callgrind_control and callgrind.
That Linux 2.6.32... was built on 2010-10-07 which is 7.5 years ago.
What are the dates of callgrind_control and callgrind?
$ ls -l $(which callgrind callgrind_control)
The output from "git blame coregrind/pub_core_gdbserver.h" says:
=====
2ee9e904 (Julian Seward 2011-05-06 21:02:55 +0000 216) typedef
2ee9e904 (Julian Seward 2011-05-06 21:02:55 +0000 217) struct {
2ee9e904 (Julian Seward 2011-05-06 21:02:55 +0000 218) volatile int
written_by_vgdb;
2ee9e904 (Julian Seward 2011-05-06 21:02:55 +0000 219) volatile int
seen_by_valgrind;
2ee9e904 (Julian Seward 2011-05-06 21:02:55 +0000 220)
2ee9e904 (Julian Seward 2011-05-06 21:02:55 +0000 221) Addr64
invoke_gdbserver;
2ee9e904 (Julian Seward 2011-05-06 21:02:55 +0000 222)
2ee9e904 (Julian Seward 2011-05-06 21:02:55 +0000 223) Addr64
threads;
025b320e (Philippe Waroquiers 2015-02-09 21:30:58 +0000 224) int
vg_n_threads;
2ee9e904 (Julian Seward 2011-05-06 21:02:55 +0000 225) int
sizeof_ThreadState;
2ee9e904 (Julian Seward 2011-05-06 21:02:55 +0000 226) int
offset_status;
2ee9e904 (Julian Seward 2011-05-06 21:02:55 +0000 227) int
offset_lwpid;
564e6857 (Philippe Waroquiers 2012-02-22 19:47:27 +0000 228)
564e6857 (Philippe Waroquiers 2012-02-22 19:47:27 +0000 229) int vgdb_pid;
2ee9e904 (Julian Seward 2011-05-06 21:02:55 +0000 230) } VgdbShared64;
=====
Notice that vg_n_threads was inserted in 2015, three or four years after all
other members.
The individual sizes sum to (4+4 +8 +8+4+4+4+4 +4) = 44 bytes
but the alignment of 8 for Addr64 forces sizeof(VgdbShared64) to be 48 bytes.
sizeof(VgdbShared64) would be 40 bytes if vg_n_threads were omitted.
So it looks like callgrind_control may have been compiled from old source.
Check the source code, then recompile callgrind_control.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users