[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 3 commits - pyuno/source sw/source
Michael Meeks
michael at kemper.freedesktop.org
Mon Feb 20 09:10:54 PST 2012
pyuno/source/module/pyuno_gc.cxx | 5 ++++-
sw/source/filter/ww8/ww8par.cxx | 6 ++----
2 files changed, 6 insertions(+), 5 deletions(-)
New commits:
commit ca6d45fff41bb4765bfc6b3c72e8fad224273ff1
Author: Michael Stahl <mstahl at redhat.com>
Date: Sat Feb 18 00:06:41 2012 +0100
pyuno: decreaseRefCount: valgrind warning:
Apparently the thread spawned in decreaseRefCount runs and deletes
itself before the "m_hThread != 0" from osl::Thread::create is executed;
try a lame workaround for that.
==1877== Invalid read of size 8
==1877== at 0x2A70E546: osl::Thread::create() (in pyuno/unxlngx6/lib/libpyuno.so)
==1877== by 0x2A70E351: pyuno::decreaseRefCount(_is*, _object*) (in pyuno/unxlngx6/lib/libpyuno.so)
==1877== by 0x2A7092B4: pyuno::Adapter::~Adapter() (in pyuno/unxlngx6/lib/libpyuno.so)
==1877== by 0x2A709393: pyuno::Adapter::~Adapter() (in pyuno/unxlngx6/lib/libpyuno.so)
==1877== by 0x5EF2F64: cppu::OWeakObject::release() (weak.cxx:213)
==1877== by 0x2A70DE69:
==1877== Address 0x1ee30818 is 8 bytes inside a block of size 32 free'd
==1877== at 0x4A0662E: free (vg_replace_malloc.c:366)
==1877== by 0x4C44B62: rtl_freeMemory_SYSTEM(void*) (alloc_global.cxx:285)
==1877== by 0x4C44DC7: rtl_freeMemory (alloc_global.cxx:355)
==1877== by 0x2A70E41E: osl::Thread::operator delete(void*) (in pyuno/unxlngx6/lib/libpyuno.so)
==1877== by 0x2A70E6EF: pyuno::GCThread::~GCThread() (in pyuno/unxlngx6/lib/libpyuno.so)
==1877== by 0x2A70E303: pyuno::GCThread::onTerminated() (in pyuno/unxlngx6/lib/libpyuno.so)
==1877== by 0x2A70E671: threadFunc (in pyuno/unxlngx6/lib/libpyuno.so)
==1877== by 0x4C2E242: osl_thread_start_Impl (thread.c:292)
==1877== by 0x3C26607D8F: start_thread (pthread_create.c:309)
==1877== by 0x3C262EF48C: clone (clone.S:115)
Signed-off-by: a very sceptical Michael Meeks <michael.meeks at suse.com>
diff --git a/pyuno/source/module/pyuno_gc.cxx b/pyuno/source/module/pyuno_gc.cxx
index 77eb688..13e6013 100644
--- a/pyuno/source/module/pyuno_gc.cxx
+++ b/pyuno/source/module/pyuno_gc.cxx
@@ -112,7 +112,10 @@ void decreaseRefCount( PyInterpreterState *interpreter, PyObject *object )
// interpreter lock is held or not
// TODO: Look for a more efficient solution
osl::Thread *t = new GCThread( interpreter, object );
- t->create();
+ // don't call create() because Valgrind complains about invalid read in
+ // the rather bizarre GCThread::onTerminated; try a lame workaround:
+ t->createSuspended();
+ t->resume();
}
}
commit 7bec16ea0e67d81a1fdf2022cb0985acc51dc691
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Feb 8 23:30:21 2012 +0100
sw: ww8: ~SwIndexReg assertion:
Remove pointless SwPosition that triggers the assertion when loading
bugdoc from fdo#39006 from wwExtraneousParas::delete_all_from_doc.
Signed-off-by: Michael Meeks <michael.meeks at suse.com>
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 35def17..1070fdc 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -4135,8 +4135,7 @@ void wwExtraneousParas::delete_all_from_doc()
{
SwTxtNode *pTxtNode = *aI;
SwNodeIndex aIdx(*pTxtNode);
- SwPosition aPos(aIdx);
- SwPaM aTest(aPos);
+ SwPaM aTest(aIdx);
m_rDoc.DelFullPara(aTest);
}
m_aTxtNodes.clear();
commit dcfd811a57e8ffa5bf1a3f17448d6777ba6ce15b
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Feb 14 17:47:28 2012 +0100
sw: ww8: ~SwIndexReg assertion:
Remove pointless SwPosition that triggers the assertion when
loading bugdoc from i#87910 from wwSectionManager::InsertSegments.
Signed-off-by: Michael Meeks <michael.meeks at suse.com>
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 9923768..35def17 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -4120,8 +4120,7 @@ void wwSectionManager::InsertSegments()
if (pTxtNd)
{
SwNodeIndex aIdx(*pTxtNd);
- SwPosition aPos(aIdx);
- SwPaM aTest(aPos);
+ SwPaM aTest(aIdx);
mrReader.rDoc.DelFullPara(aTest);
pTxtNd = 0;
}
More information about the Libreoffice-commits
mailing list