Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/3452
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/52/3452/1
pyuno_loader::CreateInstance: delete the initial PyThreadState
Don't see how it could be used again, it appears to be leaked
and causes the assertion in PyThreadState_Swap to fire.
Change-Id: Id6bbb4363928e4fdd8bda1905f6e1f9931dba74c
---
M pyuno/source/loader/pyuno_loader.cxx
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/pyuno/source/loader/pyuno_loader.cxx b/pyuno/source/loader/pyuno_loader.cxx
index 0db1b9b..718edc7 100644
--- a/pyuno/source/loader/pyuno_loader.cxx
+++ b/pyuno/source/loader/pyuno_loader.cxx
@@ -223,6 +223,10 @@
PyThreadState *tstate = PyThreadState_Get();
PyEval_ReleaseThread( tstate );
+ // This tstate is never used again, so delete it here.
+ // This prevents an assertion in PyThreadState_Swap on the
+ // PyThreadAttach below.
+ PyThreadState_Delete(tstate);
}
PyThreadAttach attach( PyInterpreterState_Head() );
--
To view, visit https://gerrit.libreoffice.org/3452
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id6bbb4363928e4fdd8bda1905f6e1f9931dba74c
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Michael Stahl <mstahl@redhat.com>
Context
- [PATCH] pyuno_loader::CreateInstance: delete the initial PyThreadSta... · Michael Stahl (via Code Review)
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.