Boost logo

Boost :

Subject: Re: [boost] [thread] Address sanitizer failures on marshall-mac
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2014-03-07 13:35:06


On 7 Mar 2014 at 19:13, Vicente J. Botet Escriba wrote:

> I was aware of this issue, but I didn't reached to diagnose what was wrong.
>
> Could you explain me how did you found that some of them are false
> positives?

Through inspection, the usual debugging experience. Figuring out
causes of memcheck failure is not easy nor quick.

The main cause of false positives is when Boost uses atomics to
implement low level primitives such as locks. You need to annotate
all CAS lock operations with the fact they are CAS locks - that way a
thread sanitiser knows you're serialising code. Otherwise it appears
you're riddling your code with race conditions.

Markup is very easy, but tedious. You effectively must audit every
line of code.

> Could you provide a patch with the needed annotations?

Marking up all of Boost.Thread with all the necessary annotations and
fixing up any problems revealed is probably a full (and extremely
worthwhile) GSoC.

Niall

-- 
Currently unemployed and looking for work in Ireland.
Work Portfolio: http://careers.stackoverflow.com/nialldouglas/



Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk