> 1.
> ==4996== Invalid read of size 4
> ==4996==    at 0x40054EC: ??? (in /lib/ld-uClibc-0.9.33.2.so 
<http://ld-uClibc-0.9.33.2.so>)
> ==4996==  Address 0x7dbb6664 is on thread 1's stack
> ==4996==  20 bytes below stack pointer
GDB:
1.
(gdb) info reg
r0             0x4007148    67137864
r1             0x0    0
r2             0x49ba000    77307904
r3             0x49bd90c    77322508
r4             0x4015f78    67198840
r5             0x4006054    67133524
r6             0xa    10
r7             0x4006ac0    67136192
r8             0x24    36
r9             0x401602c    67199020
r10            0x7dbb6a48    2109434440
r11            0x7dbb6674    2109433460
r12            0x7dbb6678    2109433464
sp             0x7dbb6678    0x7dbb6678
lr             0x40054ec    67130604
pc             0x40054ec    0x40054ec
cpsr           0x20000010    536870928
(gdb) x/9i $pc-4*4
    0x40054dc:    beq    0x40054ec
    0x40054e0:    ldr    r2, [r7]
    0x40054e4:    add    r3, r3, r2
    0x40054e8:    blx    r3
=> 0x40054ec:    mov    r0, r7
    0x40054f0:    bl    0x4001440
    0x40054f4:    b    0x40054b8
    0x40054f8:    ldr    r1, [r6, #88]    ; 0x58
    0x40054fc:    sub    sp, sp, #16


This is strange.  None of the instructions (in any of the four cases)
that are designated by the address in "at 0x..." is a memory fetch 'ldr'
which would be necessary to correspond to the complaint "Invalid read of size 
4".

However, I see that each of the 4 complaints is immediately after a 'blx' 
instruction.
'blx' has a history of problems in both hardware and software.
Exactly what hardware are you running?  Please report the output of "lscpu" and "cat 
/proc/cpuinfo".
Also, please tell us which Linux distribution, and the exact package name of the
compiled binary package for uClibc, and where anyone can download a copy of the 
package
(both compiled binary and source code).

Meanwhile, please invoke with these diagnostic flags:
    valgrind --trace-notbelow=0 --trace-flags=10000000 /bin/true  2>vgtrace.txt

The re-directed stderr vgtrace.txt will be an instruction-by-instruction trace
[it will be large, probably about 5 MB or so] where the individual blocks look 
like
*****  [This example was generated on x86_64.]
==== SB 0 (evchecks 0) [tid 1] 0x4000c50 UNKNOWN_FUNCTION 
/usr/lib64/ld-2.24.so+0xc50

------------------------ Front end ------------------------

        0x4000C50:  movq %rsp,%rdi

              ------ IMark(0x4000C50, 3, 0) ------
              PUT(72) = GET:I64(48)
              PUT(184) = 0x4000C53:I64
*****
where the "SB 0" is a serial number of the block.   Find the 'blx' instruction
and its enclosing "SB nnnnn".  Then look forward until you find the SB for the
pc that is specified in the complaint from memcheck.  Select the entire range 
of SB
(from the 'blx' to the complaint) into a file, gzip it, and upload it somewhere
that anyone interested can download it.  The idea is to find out how memcheck
got the address that it is complaining about.

--

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