[Bug 38835] strip out non-trivial globals before main

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Feb 28 00:53:49 PST 2014


https://bugs.freedesktop.org/show_bug.cgi?id=38835

Stephan Bergmann <sbergman at redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sbergman at redhat.com

--- Comment #9 from Stephan Bergmann <sbergman at redhat.com> ---
(In reply to comment #6)
> Then as the first thing, try to make it non-global if it is possible, like
> here:
> 
> http://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=92bede3900e84d4f08efb81757ec95c518c7fa76
> 
> because that way this will get initialized when used for the first time.  If
> that is not possible, or not practical, then you can do what is suggested in
> the initial comment.  An example can be seen in this commit:

Note that initialization of local static variables is not thread-safe in C++03,
so the above can only be used for cases where the local static variable ends up
in code that is synchronized.  Other cases need to use the rtl/instance.hxx
idioms.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20140228/b0cbcff0/attachment.html>


More information about the LibreOffice mailing list