Date: prev next · Thread: first prev next last
2017 Archives by date, by thread · List index


Hi Stephan,

On Thu, Jun 01, 2017 at 09:49:31AM +0200, Stephan Bergmann <sbergman@redhat.com> 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/com_GCC_defs.mk adds
-fno-threadsafe-statics (to effectively turn the toolchain into kind 1) when
HAVE_THREADSAFE_STATICS is not true.

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
com_GCC_defs.mk (unless com_GCC_defs.mk 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
<https://gerrit.libreoffice.org/#/c/38296/> applied (so
HAVE_THREADSAFE_STATICS is TRUE in config_host.mk, 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?

Regards,

Miklos

Attachment: signature.asc
Description: Digital signature


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.