[Libreoffice] Helgrind results for LO
caolanm at redhat.com
Thu Mar 31 06:53:13 PDT 2011
On Thu, 2011-03-31 at 14:00 +0200, Julian Seward wrote:
> Surely some part of LO uses threadsafe refcounted classes?
There's the common thread-safe shared ownership rtl_uString string, etc.
e.g. sal/rtl/source/strtmpl.c and the use of thread-safe
> A bzip2'd text file containing the actual reports is attached. It
> also contains details of how to reproduce them.
The first one at least seems to be the common enough pattern we have
where we grab our global mutex when initializing singletons on first
const Class& foo()
static Class aFoo;
if (aFoo.uninit) //need to init this
//make sure some other thread didn't already do it
//while waiting to get mutex
so we have loads of warnings along the lines of "the last time you
accessed that singleton you took a mutex, but this time you didn't!"
I guess we might need to sprinkle that
VALGRIND_HELGRIND_DISABLE_CHECKING(&pInstance, sizeof pInstance);
pixie-dust you mentioned at the con here and there. There is a
rtl::Static template for the above pattern into which it might be
possible to work that macro somehow to make this easier, still a to-do
investigate for me.
More information about the LibreOffice