From valgrind(memcheck):
==2418== Invalid read of size 4
==2418==    at 0x40054EC: ??? (in /lib/ld-uClibc-0.9.33.2.so)
==2418==  Address 0x7d87a664 is on thread 1's stack
==2418==  20 bytes below stack pointer

     Program received signal SIGTRAP, Trace/breakpoint trap.
     0x040054ec in ?? ()

From the vgdb server:
     (gdb) info reg

     r10            0x7d87aa48    2106042952
     r11            0x7d87a674    2106041972
     r12            0x7d87a678    2106041976
     sp             0x7d87a678    0x7d87a678

     pc             0x40054ec    0x40054ec

So the description "20 bytes below stack pointer" is correct,
because ($sp - 0x7d87a664) = (0x7d87a678 - 0x7d87a664) = 0x14 = 20.

What was the instruction stream?  Where is the output from
the next command that was requested in my earlier message:
        (gdb) x/9i $pc-4*4

If the instruction at 0x040054ec is a 'ldr' fetch from memory
which uses address -996(r10), -16(r11), -20(r12), or -20(sp),
then that is the culprit, and it is a compiler error (or a logic
error if indexing an array with an index less than zero,
or a programmer error if the code was inlined assembly language.)

Also, were you able to install the debuginfo symbols for 
/lib/ld-uClibc-0.9.33.2.so ?
(or, not strip the symbols from ld-uClibc ?)
It would be nice to correlate the instruction stream with the source code:
        (gdb) bt
which should show function names, source file names, and line numbers.
This would make it easier to confirm the exact cause of the error.

--

------------------------------------------------------------------------------
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

Reply via email to