./configure --prefix=`pwd`/llm CC=/projects/hnd/tools/bcm/crosstools-arm-gcc-5.5-linux-4.1-glibc-2.26-binutils-2.28.1/usr/bin/arm-buildroot-linux-gnueabi-gcc --host=armv7-linux mkdir llm make -j6 make install
==1199== Memcheck, a memory error detector ==1199== Copyright (C)2002-2017, and GNU GPL'd, by Julian Seward et al. ==1199== Using Valgrind-3.17.0 and LibVEX; rerun with -h for copyright info ==1199== Command: ./test_arm ==1199== ==1199== ==1199== HEAP SUMMARY: ==1199== in use at exit: 200 bytes in 2 blocks ==1199== total heap usage: 2 allocs, 0 frees, 200 bytes allocated ==1199== ==1199== 100 bytes in 1 blocks are definitely lost in loss record 1 of 2 ==1199== at 0x484876C: malloc (vg_replace_malloc.c:380) ==1199== by 0x1048B: fun2 (test.c:9) ==1199== by 0x104C3: main (test.c:17) ==1199== ==1199== 100 bytes in 1 blocks are definitely lost in loss record 2 of 2 ==1199== at 0x484876C: malloc (vg_replace_malloc.c:380) ==1199== by 0x1044F: fun1 (test.c:3) ==1199== by 0x104A7: fun2 (test.c:12) ==1199== by 0x104C3: main (test.c:17) ==1199== ==1199== LEAK SUMMARY: ==1199== definitely lost: 200 bytes in 2 blocks ==1199== indirectly lost: 0 bytes in 0 blocks ==1199== possibly lost: 0 bytes in 0 blocks ==1199== still reachable: 0 bytes in 0 blocks ==1199== suppressed: 0 bytes in 0 blocks ==1199== ==1199== For lists of detected and suppressed errors, rerun with: -s ==1199== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
valgrind: Fatal error at startup: a function redirection valgrind: which is mandatory for this platform-tool combination valgrind: cannot be set up. Details of the redirection are: valgrind: valgrind: A must-be-redirected function valgrind: whose name matches the pattern: index valgrind:in an objectwith soname matching: ld-linux.so.3 valgrind: was not found whilst processing valgrind: symbols from the objectwith soname: ld-linux.so.3 valgrind: valgrind: Possible fixes: (1, short term): install glibc's debuginfo valgrind: package on this machine. (2, longer term): ask the packagers valgrind:for your Linux distribution to please in future ship a non- valgrind: stripped ld.so (or whatever the dynamic linker .so is called) valgrind: that exports the above-named functionusing the standard valgrind: calling conventions for this platform. The package you need valgrind:to install for fix (1) is called valgrind: valgrind:On Debian, Ubuntu: libc6-dbg valgrind:On SuSE, openSuSE, Fedora, RHEL: glibc-debuginfo valgrind: valgrind: Note that if you are debugging a 32 bit process on a valgrind:64 bit system, you will need a corresponding 32 bit debuginfo valgrind: package (e.g. libc6-dbg:i386).
# leon add, vagraind使用 echo"##leon cp $INSTALL_DIR/lib/ld-linux.so.3 $TARGETS_DIR/$ROOTFS/lib/" cp$INSTALL_DIR/lib/ld-linux.so.3 $TARGETS_DIR/$ROOTFS/lib/
共享内存运行报错
cms框架使用mdm的会共享内存,shmat报错如下
1 2 3 4 5 6 7 8 9
[0216 19:19:32] ==15363== Either way, Valgrind will now raise a SIGILL signal which will [0216 19:19:32] ==15363== probably kill your program. [0216 19:19:33] ==15363== Warning: client syscall shmat tried to modify addresses 0x58800000-0x5890ffff [0216 19:19:33] hgcmif::730.543:error:oalShm_init:209:Could not attach toshmId=0 at 0x58800000, error=Invalid argument [0216 19:19:33] Error at:InitCms,77 cmsMdm_init ret[9002] [0216 19:19:33] Start hgcmif ipc thread [0216 19:19:35] ==15363== Invalid read of size 4 [0216 19:19:35] ==15363== at 0x4D5832C: mdm_getObjectNodeFlags (in /lib/libmdm_db.so) [0216 19:19:35] ==15363== Address 0x0 is not stack'd, malloc'd or (recently) free'd