[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - pyuno/source

Michael Stahl (via logerrit) logerrit at kemper.freedesktop.org
Wed Jan 15 08:01:06 UTC 2020


 pyuno/source/module/pyuno_runtime.cxx |    7 -------
 1 file changed, 7 deletions(-)

New commits:
commit c82311303bd26bffb74159b2d1294630830a615a
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Thu Jan 9 12:41:06 2020 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Wed Jan 15 09:00:37 2020 +0100

    pyuno: remove racy debug check
    
    The use-after-free is easier to trigger than expected; i don't see how
    it's possible to check this without a race.
    
    Change-Id: I4afb7066d1bf6b34f4f56aa0f51be0643ae40a66
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86481
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>
    (cherry picked from commit 777ae8101e23a31bdf806c1d09f0c849e47bb8ef)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86486
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx
index e0987cd63cd7..6cee574c77f5 100644
--- a/pyuno/source/module/pyuno_runtime.cxx
+++ b/pyuno/source/module/pyuno_runtime.cxx
@@ -978,13 +978,6 @@ PyThreadAttach::PyThreadAttach( PyInterpreterState *interp)
 {
     // note: *may* be called recursively, with PyThreadDetach between  - in
     // that case, don't create *new* PyThreadState but reuse!
-#ifndef NDEBUG
-#if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 7
-    PyThreadState const*const current = _PyThreadState_UncheckedGet();
-    // dereference isn't safe but let's hope it's tolerable for debugging purpose
-    assert((current == nullptr || current->thread_id != PyThread_get_thread_ident()) && "recursive PyThreadAttach");
-#endif
-#endif
     tstate = PyGILState_GetThisThreadState(); // from TLS, possibly detached
     if (!tstate)
     {


More information about the Libreoffice-commits mailing list