[Libreoffice-commits] core.git: 2 commits - solenv/gbuild sw/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Sat Dec 7 15:31:41 UTC 2019


 solenv/gbuild/LinkTarget.mk                             |    3 ---
 solenv/gbuild/platform/com_GCC_class.mk                 |    2 +-
 solenv/gbuild/platform/com_GCC_defs.mk                  |    1 -
 solenv/gbuild/platform/com_MSC_class.mk                 |    2 +-
 solenv/gbuild/platform/com_MSC_defs.mk                  |    1 -
 sw/source/core/doc/DocumentContentOperationsManager.cxx |    2 +-
 6 files changed, 3 insertions(+), 8 deletions(-)

New commits:
commit d61e9c9c226cdebaf01f765f7cef657656640740
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Sat Dec 7 15:38:54 2019 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Sat Dec 7 16:31:01 2019 +0100

    Remove redundant gb_YACC indirection
    
    (as discussed at 0a803c0a41f46be4019ddd2768b4be5669b7ab59 "Honor BISON passed
    into configure")
    
    Change-Id: I160a3c97414be47cd1efef0b7fac4af93a398ac6
    Reviewed-on: https://gerrit.libreoffice.org/84684
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 0d9d2cb11bf6..0cfa5a25c145 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -403,9 +403,6 @@ $(call gb_YaccTarget_get_header_target,$(1)) : $(call gb_YaccTarget_get_target,$
 
 endef
 
-gb_YACC := $(BISON)
-
-
 # LexTarget class
 
 gb_LexTarget_get_source = $(1)/$(2).l
diff --git a/solenv/gbuild/platform/com_GCC_class.mk b/solenv/gbuild/platform/com_GCC_class.mk
index 25142f70625c..bf15f5e472d0 100644
--- a/solenv/gbuild/platform/com_GCC_class.mk
+++ b/solenv/gbuild/platform/com_GCC_class.mk
@@ -149,7 +149,7 @@ define gb_YaccTarget__command
 $(call gb_Output_announce,$(2),$(true),YAC,3)
 $(call gb_Helper_abbreviate_dirs,\
 	mkdir -p $(dir $(3)) && \
-	$(gb_YACC) $(T_YACCFLAGS) -v --defines=$(4) -o $(5) $(1) && touch $(3) )
+	$(BISON) $(T_YACCFLAGS) -v --defines=$(4) -o $(5) $(1) && touch $(3) )
 
 endef
 
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index 1996135e2195..ebcd94553155 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -8,7 +8,6 @@
 #
 
 gb_AWK := awk
-gb_YACC := $(BISON)
 
 gb_CLASSPATHSEP := :
 gb_LICENSE := LICENSE
diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk
index ec23efc08df7..2e45d9d7d212 100644
--- a/solenv/gbuild/platform/com_MSC_class.mk
+++ b/solenv/gbuild/platform/com_MSC_class.mk
@@ -28,7 +28,7 @@ define gb_YaccTarget__command
 $(call gb_Output_announce,$(2),$(true),YAC,3)
 $(call gb_Helper_abbreviate_dirs,\
 	mkdir -p $(dir $(3)) && \
-	$(gb_YACC) $(T_YACCFLAGS) --defines=$(4) -o $(5) $(1) && touch $(3) )
+	$(BISON) $(T_YACCFLAGS) --defines=$(4) -o $(5) $(1) && touch $(3) )
 
 endef
 
diff --git a/solenv/gbuild/platform/com_MSC_defs.mk b/solenv/gbuild/platform/com_MSC_defs.mk
index 2e4424e29cc8..11c1aa6d4b49 100644
--- a/solenv/gbuild/platform/com_MSC_defs.mk
+++ b/solenv/gbuild/platform/com_MSC_defs.mk
@@ -29,7 +29,6 @@ gb_LINK := link
 gb_AWK := awk
 gb_CLASSPATHSEP := ;
 gb_RC := rc
-gb_YACC := $(BISON)
 
 # use CC/CXX if they are nondefaults
 ifneq ($(origin CC),default)
commit 546cbc9182589e9fec1dc0a23f1af07ddfbc576c
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Sat Dec 7 15:37:51 2019 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Sat Dec 7 16:30:51 2019 +0100

    Fix heap-use-after-free
    
    ...after 91b2325808a75174f284c48c8b8afc118fad74e4 "tdf#121300 sw: consistent fly
    at-pargraph selection", as seen with ASan during UITest_writer_tests6 (see also
    <https://ci.libreoffice.org/job/lo_ubsan/1472/>):
    
    > ERROR: AddressSanitizer: heap-use-after-free on address 0x6040006ec168 at pc 0x7f75b9ee9c81 bp 0x7f75d168a410 sp 0x7f75d168a408
    > READ of size 4 at 0x6040006ec168 thread T41 (cppu_threadpool)
    >  #0 in SwFormatAnchor::GetAnchorId() const at sw/inc/fmtanchr.hxx:65:44
    >  #1 in sw::DocumentContentOperationsManager::CopyImplImpl(SwPaM&, SwPosition&, bool, SwPaM*) const at sw/source/core/doc/DocumentContentOperationsManager.cxx:4863:30
    >  #2 in sw::DocumentContentOperationsManager::CopyImpl(SwPaM&, SwPosition&, bool, SwPaM*) const at sw/source/core/doc/DocumentContentOperationsManager.cxx:4432:16
    >  #3 in sw::DocumentContentOperationsManager::CopyRange(SwPaM&, SwPosition&, bool, bool) const at sw/source/core/doc/DocumentContentOperationsManager.cxx:1868:16
    >  #4 in SwFEShell::Paste(SwDoc*) at sw/source/core/frmedt/fecopy.cxx:1038:62
    [...]
    > 0x6040006ec168 is located 24 bytes inside of 40-byte region [0x6040006ec150,0x6040006ec178)
    > freed by thread T41 (cppu_threadpool) here:
    >  #0 in operator delete(void*, unsigned long) at /home/sbergman/github.com/llvm/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:172:3
    >  #1 in SwFormatAnchor::~SwFormatAnchor() at sw/source/core/layout/atrfrm.cxx:1473:1
    >  #2 in SfxItemPool::Remove(SfxPoolItem const&) at svl/source/items/itempool.cxx:741:13
    >  #3 in SfxItemSet::~SfxItemSet() at svl/source/items/itemset.cxx:252:42
    >  #4 in SwAttrSet::~SwAttrSet() at sw/inc/swatrset.hxx:161:20
    >  #5 in SwFormat::SetFormatAttr(SfxPoolItem const&) at sw/source/core/attr/format.cxx:541:5
    >  #6 in sw::DocumentContentOperationsManager::CopyImplImpl(SwPaM&, SwPosition&, bool, SwPaM*) const at sw/source/core/doc/DocumentContentOperationsManager.cxx:4861:27
    >  #7 in sw::DocumentContentOperationsManager::CopyImpl(SwPaM&, SwPosition&, bool, SwPaM*) const at sw/source/core/doc/DocumentContentOperationsManager.cxx:4432:16
    >  #8 in sw::DocumentContentOperationsManager::CopyRange(SwPaM&, SwPosition&, bool, bool) const at sw/source/core/doc/DocumentContentOperationsManager.cxx:1868:16
    >  #9 in SwFEShell::Paste(SwDoc*) at sw/source/core/frmedt/fecopy.cxx:1038:62
    [...]
    
    Change-Id: I7a31e9dbb6fa1cdf938420a9a949b125c66e3ce2
    Reviewed-on: https://gerrit.libreoffice.org/84683
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 4b9ee39a1ed4..50b49232d511 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -4860,7 +4860,7 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
                     anchor.SetAnchor( &startPos );
                     pFly->SetFormatAttr(anchor);
                 }
-                if (pAnchor->GetAnchorId() == RndStdIds::FLY_AT_PARA)
+                else if (pAnchor->GetAnchorId() == RndStdIds::FLY_AT_PARA)
                 {
                     SwFormatAnchor anchor(*pAnchor);
                     anchor.SetAnchor( &startPosAtPara );


More information about the Libreoffice-commits mailing list