TBB + valgrind

TBB + valgrind

Hi,
Does anyone have experience in using Threading Building Blocks with valgrind?
Is it possible at all?

Tried it on Linux with gcc 4.1.2 and valgrind-3.2.3 under kernel version 2.6.20-gentoo-r8.
Valgrind can't cope with TBB calls, fails and abort program.
Is there a way to come round that? Maybe an unstable, adapted version?

Thanks for information.
Francisco

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
robert-reed (Intel)'s picture

I have heard there is at least one report of a deficiency in valgrind that has tripped up analysis of code using TBB. It couldn't parse an opcode, which on examination proved to be a locked compare-exchange byte instruction with a REX (x86_64) prefix, certainly a reasonable instruction to include in a library that does thread synchronization. I don't know what effort is being done to fix this insome future release of valgrind, but it looks like a problem has been identified and may be related to the difficulty you encountered.

Yes, we've hit this problem too. There is a bug logged with valgrind on the general issue, with a reference specifically to the TBB problem, here:

http://bugs.kde.org/show_bug.cgi?id=147498

If you add your comment to the bug as well, or vote for it, it should get a higher priority for a fix.

Login to leave a comment.