Using Valgrind on FreeBSD

Romain Tartière romain at
Sat Oct 8 10:42:03 UTC 2011


On Sat, Oct 08, 2011 at 09:57:44AM +0300, Omer Faruk SEN wrote:
> May it be related with the patches for Valgrind that
> written? It may require to
> rebuild valgrind with that patch but I am not sure. Maybe Romain can answer
> that question.

Long story short: I wrote some code I wanted to test with Valgrind and
got the message saying that some syscall wrappers where not available.
Since the IPC stuff was quite trivial and my concerns where about
another part of the code, I started hacking these system calls in order
to avoid Valgrind quitting when they where called so that it could check
the 'important' part of my code.

Then, I wondered how hard it would have been to make a complete IPC
syscalls support for FreeBSD in Valgrind, unfortunately I could not get
much time to take on this and I decided to push my patches 'as it' at
some location I could get them back is necessary.
... and it looks like Google indexed it.

Basically, the code is copy-pasta with minor tweaks of other parts of
Valgrind.  It is NOT production-ready.  It does not build because I
pushed it after trying to add support for all message queues and
semaphores syscalls after testing my program with the 2-3 system calls
that where missing for it to run.

I took a few minutes to fix the build (at least on 8-STABLE amd64, new
patches are here:
) but I have not even tried to test anything, so beware!  To use these
patches, create a 'files' directory in the Valgrind port and put them
there, then install the port as usual.

If you would like to work on expanding IPC support in Valgrind on
FreeBSD, please write me a line.  Maybe we can coordinate some work ;-)


Romain Tartière <romain at>
pgp: 8234 9A78 E7C0 B807 0B59  80FF BA4D 1D95 5112 336F (ID: 0x5112336F)
(plain text =non-HTML= PGP/GPG encrypted/signed e-mail much appreciated)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 663 bytes
Desc: not available
Url :

More information about the freebsd-hackers mailing list