[Libreoffice-commits] core.git: sc/source

Stephan Bergmann sbergman at redhat.com
Fri Oct 9 02:45:04 PDT 2015


 sc/source/ui/undo/undoblk3.cxx |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit 7eeb1c908b58df395b21bf5fbf5d565e9b51ce66
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Oct 9 11:28:35 2015 +0200

    Apparently, pUndoDoc must be reset before calling DeleteSdrUndoAction
    
    ...in ~ScUndoDeleteContents, otherwise (implicitly) resetting pUndoDoc only at
    the end of ~ScUndoDeleteContents could cause a stack of calls into ~ScDocument,
    ~ScTable, ~ScColumn, ~ScPostIt that operates on stale pointers, as an
    SdrCaptionObj is already destroyed while the ScPostIt still points to it.  See
    the failing JunitTest_sc_unoapi_2 under ASan+UBSan at the end of
    <http://ci.libreoffice.org/job/lo_ubsan/41/console>.
    
    Regression introduced with ee9b3c1f1cb7445f0a7e76736e32fe81878f8d00 "Return the
    std::unique_ptr itself here, not a raw pointer."
    
    Change-Id: I5e1c6c3e46cb46388d186b63ce23b00fd298a32b

diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index 5ebdd63..27fd815 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -102,6 +102,7 @@ ScUndoDeleteContents::ScUndoDeleteContents(
 
 ScUndoDeleteContents::~ScUndoDeleteContents()
 {
+    pUndoDoc.reset();
     DeleteSdrUndoAction( pDrawUndo );
 }
 


More information about the Libreoffice-commits mailing list