|
From: Dave N. <dc...@us...> - 2006-03-03 22:52:57
|
I started looking into the reason why I was seeing this assertion
failure in memcheck/tests:
badjump
describe-block
match-overrun
supp_unknown
only on the IBM PPC970, but you were not seeing it on your G5.
I discovered that the assertion failure happens because of a call to
make_elf_coredump. The value of 'limit coredumpsize' on the 970 just
happened to be 'unlimited' and 0 on the Power5 machine where these tests
passs cleanly. If I run tests on my Power5 machine with 'limit
coredumpsize unlimited' I get the same assertion errors so presumably
the problem hasn't been resolved in the SVN trunk.
Can you re-produce this behavior on your PPC machines?
Here is some debugging/grepping information:
! valgrind: m_coredump/coredump-elf.c:267 (fill_prstatus): Assertion
'sizeof(*regs) == sizeof(prs->pr_reg)' failed.
0x7005ef3c is in fill_prstatus (m_coredump/coredump-elf.c:267).
262 prs->pr_pgrp = VG_(getpgrp)();
263 prs->pr_sid = VG_(getpgrp)();
264
265 regs = (struct vki_user_regs_struct *)prs->pr_reg;
266
267 vg_assert(sizeof(*regs) == sizeof(prs->pr_reg));
p sizeof(prs->pr_reg)
$1 = 0x180
If you track this down in the source pr_reg is an array of 48 registers.
# searched .h files for vki_user_regs_struct
./include/vki-ppc64-linux.h:/* Kludge? I don't know where this came
from or if it is right. */
./include/vki-ppc64-linux.h:#define vki_user_regs_struct vki_pt_regs
# from include/vki-ppc64-linux.h
#define VKI_PPC_REG unsigned long
struct vki_pt_regs {
VKI_PPC_REG gpr[32];
VKI_PPC_REG nip;
VKI_PPC_REG msr;
VKI_PPC_REG orig_gpr3; /* Used for restarting system calls */
VKI_PPC_REG ctr;
VKI_PPC_REG link;
VKI_PPC_REG xer;
VKI_PPC_REG ccr;
VKI_PPC_REG softe; /* Soft enabled/disabled */
VKI_PPC_REG trap; /* Reason for being here */
VKI_PPC_REG dar; /* Fault registers */
VKI_PPC_REG dsisr;
VKI_PPC_REG result; /* Result of a system call */
};
This looks like just 44 registers.
|