Valgrind a good tool to catch memory leaks. But while working with old version (valgrind-3.9.0.1) have encountered a crash in our process do to a syscall not handled in it (WARNING: unhandled syscall: 314)
bin include lib share
Linux bgl-ads-1451 2.6.18-371.11.1.el5 #1 SMP Mon Jun 30 04:51:39 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux
Still having problem
/usr/bin/valgrind -version
valgrind: failed to start tool 'memcheck' for platform 'amd64-linux': No su
Then,
export VALGRIND_LIB=/usr/lib/valgrind
$/usr/bin/valgrind --version
valgrind-3.10.1
--22787--
You may be able to write your own handler.
--22787-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--22787-- Nevertheless we consider this a bug. Please report
--22787-- it at http://valgrind.org/support/bug_reports.html
--22787-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--22787-- Nevertheless we consider this a bug. Please report
--22787-- it at http://valgrind.org/support/bug_reports.html
This raised an need to compile the valgrind's latest version for our x86_64 platform for our linux router.
So, here are the simple steps.
1. Download valgrind 3.10.1 (tar.bz2) [11MB] - 25 November 2014. from http://valgrind.org/downloads/current.html
2. untar it tar xvjf valgrind-3.10.1.tar.bz2
3. cd valgrind-3.10.1
4. mkdir valusr create a local folder where finally the binaries to install could be placed (needed specially if u don't have access to /usr/... folder.)
5. ./configure --prefix=/path-to-folder/valgrind-3.10.1/valusr
6. make
7. make install
8. Finally you have all the files and folder that u can transfer to router.
ls valusr/bin include lib share
Note: in case you need to clear and re-make use
make distclean
Also don't forget to check the linux version
uname -aLinux bgl-ads-1451 2.6.18-371.11.1.el5 #1 SMP Mon Jun 30 04:51:39 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux
Still having problem
/usr/bin/valgrind -version
valgrind: failed to start tool 'memcheck' for platform 'amd64-linux': No su
Then,
export VALGRIND_LIB=/usr/lib/valgrind
$/usr/bin/valgrind --version
valgrind-3.10.1
Enjoy...