diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-12-09 23:42:14 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-12-19 19:46:00 +0000 |
commit | 962e70501e4351761a9e521faed9506d865bcc63 (patch) | |
tree | 561c19e41c5ea7298b1e3a30c37a95eaa0e59827 /setup_native/Package_packinfo.mk | |
parent | bf3b0a578717e56f704d27dc4b6152c8ad038d12 (diff) |
framework: fix race in ToolBarManager creation
ToolbarLayoutManager::createToolbar() may be called concurrently on
different threads, and then it can happen that both threads want to
create the same toolbar URL, see that it does not exist in line 457,
then both release the SolarMutex and create a new ToolBarManager
and the first inserts it and then the second overwrites it on line 514
without disposing the first one.
The non-disposed extra ToolBarManager is kept alive because it is
registered as a listener on the Frame. When the Frame::close() is
called, the ToolbarLayoutManager is disposed, and that disposes all the
ToolBarManagers it knows about, but not the extra one, which is
then un-ref'd and then has a live VclPtr m_pToolBar, which asserts
because the SolarMutex is not locked since commit
e794ce1eef6730e5a46d5fb0aa6db2895ede85e7.
(This commit is thanks to rr, which recorded the
JunitTest_framework_complex execution and allowed debugging this.)
(cherry picked from commit 84f2ff67a7e404febf710b1dc7f66d06745c503f)
tdf#104621 framework: Redo commit 84f2ff67a7e404febf710b1dc7f66d06745c503f
The fix was silly and wrong, need to check m_xUIElement, not m_aName,
which may be set independently, see the confusing code in
ToolbarLayoutManager::requestToolbar().
Change-Id: I279088cb2516b0a19619b5647f15f738a2624edf
(cherry picked from commit d266cb32c3c982a60cd68650dd7ae8983744134e)
Reviewed-on: https://gerrit.libreoffice.org/32186
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'setup_native/Package_packinfo.mk')
0 files changed, 0 insertions, 0 deletions