Installing Valgrind
Prerequisites
Building valgrind requires the following ports to be installed:
- gmake
- autoconf
- automake
Obtaining the Valgrind source
The current version of the Valgrind FreeBSD is maintained in a mercurial repository on bitbucket.org: https://bitbucket.org/stass/valgrind-freebsd
To check out the source:
hg clone https://bitbucket.org/stass/valgrind-freebsd
The current version is also in the FreeBSD ports collection in devel/valgrind-snapshot and devel/valgrind.
Building
sh autogen.sh ./configure gmake gmake install
TODO
FreeBSD tree
Task |
HEAD |
RELENG_7 |
RELENG_6 |
END() macros in src |
done |
r192760 needed |
needed |
kern.proc sysctls |
done |
done |
needed |
Valgrind src
- Exit with a suitable error message if the procfs sysctl aren't available. Valgrind currently exits with an obscure message.
- Test more syscalls which are disabled and implement the missing ones (rfork mainly, others to come).
- Push FreeBSD changes to upstream valgrind
[PATCH]: FreeBSD support for valgrind in the Valgrind bug tracker
- Fix exp-ptrcheck.
- Details?
- Fix support for FreeBSD TLS
http://people.freebsd.org/~marcel/tls.html Linux TLS notes
http://lwn.net/Articles/5851/ FreeBSD TLS notes
http://www.pastebin.ca/1798637 Test application
- Growable stack / SIGSEGV / kqueue signal delivery issue.
- ptrace handlers
Done
- Tested by Sandvine Incorporated: SYS_sched_get_priority_max, SYS_sched_get_priority_min, SYS_sched_rr_get_interval
libVex doesn't know about atomic instructions, which are used heavilly in userland by threading primitives (libthr in primis) in order to implement locking mechanism. While a direct fix to libVex seems pretty much difficult, a short-circuit of atomic operations may be implemented and got in place for main libraries. Apparently 3.5.0 has atomic support
Links
P4 valgrind repository (older port)
Valgrind port on freshports