Some baseline thoughts

Miklos Vajna vmiklos at
Thu Jun 1 10:51:07 UTC 2017

Hi Stephan,

On Thu, Jun 01, 2017 at 09:49:31AM +0200, Stephan Bergmann <sbergman at> wrote:
> I don't think your experiment is telling much.  There are three cases to
> consider:
> 1  A toolchain that doesn't support thread-safe statics.
> 2  A toolchain that correctly supports thread-safe statics.
> 3  A (dated GCC) toolchain that supports thread-safe statics, but in a
> broken way (using a single lock for all static variables) that can lead to
> deadlock.
> To guard against kind 3, solenv/gbuild/platform/ adds
> -fno-threadsafe-statics (to effectively turn the toolchain into kind 1) when
> So your experiment (which would try to detect whether Android toolchains are
> of kind 3) would probably also need to remove -fno-threadsafe-statics from
> (unless somehow isn't relevant for building
> on Android, anyway).
> However, your experiment doesn't try to detect whether Android toolchains
> are of kind 1.  (But it's probably safe to assume that they are not if they
> use a GCC that supports -fthreadsafe-statics.)

I repeated the experiment with
<> applied (so
HAVE_THREADSAFE_STATICS is TRUE in, also verified that
the generated commandline when compiling a C++ file contains no
-fno-threadsafe-statics), and also did a clean build, so all code is
built with the new compiler flags. I still see no deadlock up to the
point where a Writer document is rendered.

In addition, we build for Android using (currently) gcc-4.9, so 3) seems
to be out of question.

Does that help?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <>

More information about the LibreOffice mailing list