|
From: Michael B. <mi...@ob...> - 2008-02-29 09:38:34
|
I'm new to Valgrind, so I may be doing something stupid. Hopefully, someone will let me know either way! Our development system is based on Linux (CentOS 4.5), hosted on Windows XP using Vmware player 2.0.0. We are currently investigating what might be a heap corruption problem in our current code and so we decided to use Valgrind to see if it could shed any light on things. We built valgrind 3.3.0 from sources and installed it yesterday. However, when we ran our code via Valgrind, we got the following output: vex: the `impossible' happened: segmentGuestRegOffset(x86) vex storage: T total 1025941968 bytes allocated vex storage: P total 672 bytes allocated valgrind: the 'impossible' happened: LibVEX called failure_exit(). ==5744== at 0x3801807D: report_and_quit (m_libcassert.c:140) ==5744== by 0x3801818B: panic (m_libcassert.c:210) ==5744== by 0x38018222: vgPlain_core_panic_at (m_libcassert.c:215) ==5744== by 0x38018260: vgPlain_core_panic (m_libcassert.c:220) ==5744== by 0x3802D0F6: failure_exit (m_translate.c:588) ==5744== by 0x3808902E: vpanic (vex_util.c:227) ==5744== by 0x380C7B96: segmentGuestRegOffset (toIR.c:466) ==5744== by 0x380C7BEA: getSReg (toIR.c:536) ==5744== by 0x380E0992: disInstr_X86 (toIR.c:6471) ==5744== by 0x380BB65D: bb_to_IR (bb_to_IR.c:229) ==5744== by 0x38087725: LibVEX_Translate (vex_main.c:430) ==5744== by 0x3802BA0E: vgPlain_translate (m_translate.c:1417) ==5744== by 0x3803568F: vgPlain_scheduler (scheduler.c:762) ==5744== by 0x38048B18: run_a_thread_NORETURN (syswrap-linux.c:89) sched status: running_tid=1 Thread 1: status = VgTs_Runnable ==5744== at 0x59DB270: ??? So, firstly, is there anything about our development system configuration that may lead us into trouble with Valgrind? I'm happy to submit a bugzilla report but in the interim, does anyone have any idea what's going on here? Regards and TIA, MikeB |
|
From: Julian S. <js...@ac...> - 2008-02-29 11:07:22
|
> I'm new to Valgrind, so I may be doing something stupid. > [...] > vex: the `impossible' happened: > segmentGuestRegOffset(x86) No ... that's an extremely unusual failure. I've never seen it before and I think it can only happen as a result of executing an invalid instruction. > Thread 1: status = VgTs_Runnable > ==5744== at 0x59DB270: ??? At a guess I'd say your program jumped off to an invalid address and encountered an invalid instruction. It's true that Valgrind should not have asserted; instead it should do the normal invalid instruction handling, which is to bash the program on the head with SIGILL. J |
|
From: Michael B. <mi...@ob...> - 2008-02-29 16:04:47
|
> -----Original Message----- > From: Michael Baker [mailto:mi...@ob...] > Do you know how Valgrind works? I assume it instruments the My apologies, I just found this: http://valgrind.org/docs/valgrind2007.pdf ...and realise that you clearly *do* know how it works :o) /MikeB |
|
From: Julian S. <js...@ac...> - 2008-02-29 16:43:41
|
> http://valgrind.org/docs/valgrind2007.pdf > > ...and realise that you clearly *do* know how it works :o) well, at least on a good day :-) You might want to have a look at this: http://valgrind.org/docs/manual/faq.html#faq.crashes J |