Skip to content

Instantly share code, notes, and snippets.

@Nokius
Created April 11, 2015 17:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nokius/662fde2eca3f7ff4c992 to your computer and use it in GitHub Desktop.
Save Nokius/662fde2eca3f7ff4c992 to your computer and use it in GitHub Desktop.
sh-3.2# valgrind --leak-check=full -v test_sensors
sh-3.2# valgrind --leak-check=full -v test_sensors
==15673== Memcheck, a memory error detector
==15673== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==15673== Using Valgrind-3.9.0 and LibVEX; rerun with -h for copyright info
==15673== Command: test_sensors
==15673==
--15673-- Valgrind options:
--15673-- --leak-check=full
--15673-- -v
--15673-- Contents of /proc/version:
--15673-- Linux version 3.4.76-cyanogenmod-g828ab42-dirty (user@Build-Box-III) (gcc version 4.7 (GCC) ) #24 SMP PREEMPT Fri Apr 10 17:44:07 UTC 2015
--15673-- Arch and hwcaps: ARM, ARMv7-vfp-neon
--15673-- Page sizes: currently 4096, max supported 4096
--15673-- Valgrind library directory: /usr/lib/valgrind
--15673-- Reading syms from /usr/bin/test_sensors
--15673-- Reading syms from /lib/ld-2.15.so
--15673-- Considering /usr/lib/debug/.build-id/35/efc6d9ebbdad283626940edac23843055d9b2a.debug ..
--15673-- .. build-id is valid
--15673-- Reading syms from /usr/lib/valgrind/memcheck-arm-linux
--15673-- object doesn't have a dynamic symbol table
--15673-- Scheduler: using generic scheduler lock implementation.
--15673-- Reading suppressions file: /usr/lib/valgrind/default.supp
==15673== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-15673-by-???-on-???
==15673== embedded gdbserver: writing to /tmp/vgdb-pipe-to-vgdb-from-15673-by-???-on-???
==15673== embedded gdbserver: shared mem /tmp/vgdb-pipe-shared-mem-vgdb-15673-by-???-on-???
==15673==
==15673== TO CONTROL THIS PROCESS USING vgdb (which you probably
==15673== don't want to do, unless you know exactly what you're doing,
==15673== or are doing some strange experiment):
==15673== /usr/lib/valgrind/../../bin/vgdb --pid=15673 ...command...
==15673==
==15673== TO DEBUG THIS PROCESS USING GDB: start GDB like this
==15673== /path/to/gdb test_sensors
==15673== and then give GDB the following command
==15673== target remote | /usr/lib/valgrind/../../bin/vgdb --pid=15673
==15673== --pid is optional if only one valgrind process is running
==15673==
--15673-- Reading syms from /usr/lib/valgrind/vgpreload_core-arm-linux.so
--15673-- Reading syms from /usr/lib/valgrind/vgpreload_memcheck-arm-linux.so
--15673-- Reading syms from /usr/lib/libhybris-common.so.1.0.0
--15673-- Reading syms from /usr/lib/libhardware.so.2.0.0
--15673-- Reading syms from /lib/libdl-2.15.so
--15673-- Considering /usr/lib/debug/.build-id/6c/9c2696adfaab09d27505f8de1b2ff24ec1ec15.debug ..
--15673-- .. build-id is valid
--15673-- Reading syms from /lib/librt-2.15.so
--15673-- Considering /usr/lib/debug/.build-id/18/11295cabeec87fee7c07a30b61a8ef928cded1.debug ..
--15673-- .. build-id is valid
--15673-- Reading syms from /usr/lib/libandroid-properties.so.1.0.0
--15673-- Reading syms from /lib/libgcc_s-4.6.4.so.1
--15673-- Considering /usr/lib/debug/.build-id/62/3f2e1b634304ee7d1641f5c5733fad8acca56f.debug ..
--15673-- .. build-id is valid
--15673-- Reading syms from /lib/libpthread-2.15.so
--15673-- Considering /usr/lib/debug/.build-id/b8/76d43f67d4f6b8bbc4e2cc35c20e2d2a68ae57.debug ..
--15673-- .. build-id is valid
--15673-- Reading syms from /lib/libc-2.15.so
--15673-- Considering /usr/lib/debug/.build-id/cb/7db3b0a4260380f93f3f8616ad2a7848ee8b33.debug ..
--15673-- .. build-id is valid
--15673-- REDIR: 0x495ab40 (memset) redirected to 0x483c184 (memset)
--15673-- REDIR: 0x495b1b0 (memcpy) redirected to 0x483aea0 (memcpy)
--15673-- REDIR: 0x49595c0 (rindex) redirected to 0x4839164 (rindex)
--15673-- REDIR: 0x4958c80 (strcmp) redirected to 0x483a704 (strcmp)
--15673-- REDIR: 0x49590f0 (strlen) redirected to 0x4839924 (strlen)
--15673-- REDIR: 0x495932c (strncmp) redirected to 0x4839ed4 (strncmp)
--15673-- Reading syms from /system/lib/libhardware.so
--15673-- Considering /system/lib/libhardware.so ..
--15673-- .. CRC mismatch (computed b7ee7f60 wanted e3f20ef4)
--15673-- object doesn't have a symbol table
--15673-- REDIR: 0x4958c61 (index) redirected to 0x483926c (index)
--15673-- Reading syms from /usr/libexec/droid-hybris/system/lib/libcutils.so
--15673-- Considering /usr/libexec/droid-hybris/system/lib/libcutils.so ..
--15673-- .. CRC mismatch (computed d4626e80 wanted d27b4fde)
--15673-- object doesn't have a symbol table
--15673-- Reading syms from /usr/libexec/droid-hybris/system/lib/liblog.so
--15673-- Considering /usr/libexec/droid-hybris/system/lib/liblog.so ..
--15673-- .. CRC mismatch (computed d2638679 wanted 3cdc174b)
--15673-- object doesn't have a symbol table
--15673-- Reading syms from /usr/libexec/droid-hybris/system/lib/libc.so
--15673-- Considering /usr/libexec/droid-hybris/system/lib/libc.so ..
--15673-- .. CRC mismatch (computed ec52edd0 wanted c6cc4468)
--15673-- object doesn't have a symbol table
--15673-- REDIR: 0x495ab40 (memset) redirected to 0x483c184 (memset)
--15673-- REDIR: 0x49590f0 (strlen) redirected to 0x4839924 (strlen)
--15673-- REDIR: 0x4958c80 (strcmp) redirected to 0x483a704 (strcmp)
--15673-- REDIR: 0x495b1b0 (memcpy) redirected to 0x483aea0 (memcpy)
--15673-- REDIR: 0x495932c (strncmp) redirected to 0x4839ed4 (strncmp)
--15673-- Reading syms from /usr/libexec/droid-hybris/system/lib/libdsyscalls.so
--15673-- Considering /usr/libexec/droid-hybris/system/lib/libdsyscalls.so ..
--15673-- .. CRC mismatch (computed a9d5f39e wanted eddd18c2)
--15673-- object doesn't have a symbol table
--15673-- REDIR: 0x4959e50 (strstr) redirected to 0x483ccb0 (strstr)
--15673-- Reading syms from /usr/libexec/droid-hybris/system/lib/libstdc++.so
--15673-- Considering /usr/libexec/droid-hybris/system/lib/libstdc++.so ..
--15673-- .. CRC mismatch (computed 0ab3c649 wanted f382e081)
--15673-- object doesn't have a symbol table
--15673-- Reading syms from /usr/libexec/droid-hybris/system/lib/libm.so
--15673-- Considering /usr/libexec/droid-hybris/system/lib/libm.so ..
--15673-- .. CRC mismatch (computed c0017923 wanted be87338d)
--15673-- object doesn't have a symbol table
--15673-- REDIR: 0x4959448 (strncpy) redirected to 0x4839bcc (strncpy)
--15673-- REDIR: 0x4958cc0 (strcpy) redirected to 0x483999c (strcpy)
--15673-- REDIR: 0x495cf8c (strchrnul) redirected to 0x483c7cc (strchrnul)
--15673-- REDIR: 0x4954a7c (free) redirected to 0x483760c (free)
--15673-- Reading syms from /system/lib/hw/sensors.msm8960.so
--15673-- object doesn't have a symbol table
--15673-- Reading syms from /usr/libexec/droid-hybris/system/lib/libutils.so
--15673-- Considering /usr/libexec/droid-hybris/system/lib/libutils.so ..
--15673-- .. CRC mismatch (computed 4199db48 wanted 9fb3b960)
--15673-- object doesn't have a symbol table
--15673-- Reading syms from /usr/libexec/droid-hybris/system/lib/libcorkscrew.so
--15673-- Considering /usr/libexec/droid-hybris/system/lib/libcorkscrew.so ..
--15673-- .. CRC mismatch (computed d38b285a wanted 1d317b81)
--15673-- object doesn't have a symbol table
--15673-- Reading syms from /usr/libexec/droid-hybris/system/lib/libgccdemangle.so
--15673-- Considering /usr/libexec/droid-hybris/system/lib/libgccdemangle.so ..
--15673-- .. CRC mismatch (computed c5ac516c wanted 4a160bb0)
--15673-- object doesn't have a symbol table
--15673-- Reading syms from /system/lib/libsensor1.so
--15673-- Considering /system/lib/libsensor1.so ..
--15673-- .. CRC mismatch (computed f3a1dad3 wanted 28a46e2a)
--15673-- object doesn't have a symbol table
--15673-- Reading syms from /system/lib/libidl.so
--15673-- Considering /system/lib/libidl.so ..
--15673-- .. CRC mismatch (computed 5bd5aef0 wanted aa785dc0)
--15673-- object doesn't have a symbol table
--15673-- Reading syms from /system/lib/libsensor_reg.so
--15673-- Considering /system/lib/libsensor_reg.so ..
--15673-- .. CRC mismatch (computed c4a01c75 wanted c429cf46)
--15673-- object doesn't have a symbol table
--15673-- REDIR: 0x4954268 (malloc) redirected to 0x4838c30 (malloc)
--15673-- REDIR: 0x4a4f110 (memset) redirected to 0x483c184 (memset)
--15673-- REDIR: 0x484b919 (operator new[](unsigned int)) redirected to 0x4837cd0 (operator new[](unsigned int))
--15673-- REDIR: 0x49c9808 (__strcpy_chk) redirected to 0x483c894 (__strcpy_chk)
--15673-- REDIR: 0x4a50281 (strlen) redirected to 0x4839924 (strlen)
--15673-- REDIR: 0x4a50597 (strchr) redirected to 0x483920c (strchr)
==15673== Invalid read of size 4
==15673== at 0x4A5B576: ??? (in /usr/libexec/droid-hybris/system/lib/libc.so)
==15673== Address 0x90 is not stack'd, malloc'd or (recently) free'd
==15673==
==15673==
==15673== Process terminating with default action of signal 11 (SIGSEGV)
==15673== Access not within mapped region at address 0x90
==15673== at 0x4A5B576: ??? (in /usr/libexec/droid-hybris/system/lib/libc.so)
==15673== If you believe this happened as a result of a stack
==15673== overflow in your program's main thread (unlikely but
==15673== possible), you can try to increase the size of the
==15673== main thread stack using the --main-stacksize= flag.
==15673== The main thread stack size used in this run was 8388608.
==15673==
==15673== HEAP SUMMARY:
==15673== in use at exit: 7,351 bytes in 12 blocks
==15673== total heap usage: 12 allocs, 0 frees, 7,351 bytes allocated
==15673==
==15673== Searching for pointers to 12 not-freed blocks
==15673== Checked 348,312 bytes
==15673==
==15673== 48 bytes in 1 blocks are possibly lost in loss record 10 of 11
==15673== at 0x4838CBC: malloc (vg_replace_malloc.c:291)
==15673== by 0x4B19C53: android::SharedBuffer::alloc(unsigned int) (in /usr/libexec/droid-hybris/system/lib/libutils.so)
==15673==
==15673== LEAK SUMMARY:
==15673== definitely lost: 0 bytes in 0 blocks
==15673== indirectly lost: 0 bytes in 0 blocks
==15673== possibly lost: 48 bytes in 1 blocks
==15673== still reachable: 7,303 bytes in 11 blocks
==15673== suppressed: 0 bytes in 0 blocks
==15673== Reachable blocks (those to which a pointer was found) are not shown.
==15673== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==15673==
==15673== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
==15673==
==15673== 1 errors in context 1 of 2:
==15673== Invalid read of size 4
==15673== at 0x4A5B576: ??? (in /usr/libexec/droid-hybris/system/lib/libc.so)
==15673== Address 0x90 is not stack'd, malloc'd or (recently) free'd
==15673==
==15673== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
Segmentation fault
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment