On Fri, Jun 18, 2010 at 1:18 PM, Pramod <[email protected]> wrote:
>
> I have cross-compiled valgrind 3.5.0 to work on MontaVista Linux.
>
> After installing (copied bin, lib, include directories to montavista machine),
> and running valgrind with no arguments, I get a core file from memcheck.
>
> Using GDB, I see that the core occurs at line 251 in mc_leakcheck.c.
>
> ---
> Program terminated with signal 11, Segmentation fault.
>
> #0  0x000000000000000c in compare_MC_Chunks (n1=0x0, n2=0x0)
> at mc_leakcheck.c:251
> 251     mc_leakcheck.c: No such file or directory.
>        in mc_leakcheck.c
> ---
>
> ---
> 246: // Compare the MC_Chunks by 'data' (i.e. the address of the block).
> 247: static Int compare_MC_Chunks(void* n1, void* n2)
> 248: {
> 249:    MC_Chunk* mc1 = *(MC_Chunk**)n1;
> 250:    MC_Chunk* mc2 = *(MC_Chunk**)n2;
> 251:    if (mc1->data < mc2->data) return -1;
> 252:    if (mc1->data > mc2->data) return  1;
> 253:    return 0;
> 254: }
> ---
>
> How do I overcome this issue and make valgrind work.
> Please let me know if further information is needed.

Valgrind itself and the client program run in the same memory space.
So it is possible that a client program overwrites data structures
managed by Valgrind. You should start with fixing all errors in the
analyzed program and that were reported by memcheck before it crashed.

Bart.

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to