|
From: Chris W. <ch...@ch...> - 2009-02-13 16:37:53
|
Hi,
My apologies if this is not the most appropriate forum to raise this
issue. (I first tried to file a bug, but I just found a 503 instead).
Whilst using valgrind --track-origins=yes on a ppc32, I hit the
following assertion:
MC_(get_otrack_shadow_offset)(ppc32)(off=932,sz=4)
Memcheck: mc_machine.c:448 (get_otrack_shadow_offset_wrk): the
'impossible' happened.
==22405== at 0x380308E8: report_and_quit (m_libcassert.c:140)
==22405== by 0x38030C63: vgPlain_assert_fail (m_libcassert.c:205)
==22405== by 0x380272B3: vgMemCheck_get_otrack_shadow_offset
(mc_machine.c:448)
==22405== by 0x3801E5C7: schemeE (mc_translate.c:4064)
==22405== by 0x3802673B: vgMemCheck_instrument (mc_translate.c:4317)
==22405== by 0x380D1A9F: LibVEX_Translate (vex_main.c:500)
==22405== by 0x3804B4FB: vgPlain_translate (m_translate.c:1506)
==22405== by 0x3805EF2B: vgPlain_scheduler (scheduler.c:796)
==22405== by 0x38076563: run_a_thread_NORETURN (syswrap-linux.c:89
A quick glance through libvex_guest_ppc32.h indicates that this is the
VRSAVE register which is conspicuously absent from the translation table
in MC_(get_otrack_shadow_offset)(). So I tried the obvious patch:
diff --git a/memcheck/mc_machine.c b/memcheck/mc_machine.c
index f8eb1c1..d0a9fde 100644
--- a/memcheck/mc_machine.c
+++ b/memcheck/mc_machine.c
@@ -343,6 +343,7 @@ static Int get_otrack_shadow_offset_wrk ( Int offset, Int sz
if (o == GOF(CIA_AT_SC) && sz == 4) return -1;
if (o == GOF(RESVN) && sz == 4) return -1;
if (o == GOF(FPROUND) && sz == 4) return -1;
+ if (o == GOF(VRSAVE) && sz == 4) return -1;
if (o == GOF(EMWARN) && sz == 4) return -1;
if (o == GOF(TISTART) && sz == 4) return -1;
if (o == GOF(TILEN) && sz == 4) return -1;
which appears to work.
Thank you for a great tool.
-Chris
|