[Libreoffice-commits] core.git: 2 commits - solenv/gdb sysui/CustomTarget_solaris.mk

Michael Stahl mstahl at redhat.com
Fri Sep 29 15:01:57 UTC 2017


 solenv/gdb/libreoffice/sal.py         |    4 ++--
 solenv/gdb/libreoffice/util/string.py |    6 +++---
 sysui/CustomTarget_solaris.mk         |    2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 205677c88cb01e2bbee278443867baed2c89e5fe
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Sep 29 16:53:35 2017 +0200

    gdb pretty-printers: fix StringPrinterHelper for gdb 8.0
    
    Latest gdb release "lazy_string" validates the array size:
    
      Traceback (most recent call last):
        File "/work/lo/master/solenv/gdb/libreoffice/util/string.py", line
    29, in to_string
          return self.make_string(data, self.encoding, len)
        File "/work/lo/master/solenv/gdb/libreoffice/util/string.py", line
    66, in make_string
          return data.lazy_string(encoding, length)
      gdb.error: Length is larger than array size.
    
    rtl_uString has "sal_Unicode buffer[1];", which is a lie
    as the real size is the same as "length".
    
    Taking the address of "buffer" appears to avoid the exception.
    
    Change-Id: I85710b1adfae584ba09c8d517e9b49b290e79d8a

diff --git a/solenv/gdb/libreoffice/sal.py b/solenv/gdb/libreoffice/sal.py
index c2e8384537be..8dcfaebe66e1 100644
--- a/solenv/gdb/libreoffice/sal.py
+++ b/solenv/gdb/libreoffice/sal.py
@@ -21,7 +21,7 @@ class RtlStringPrinter(StringPrinterHelper):
         super(RtlStringPrinter, self).__init__(typename, val, encoding)
 
     def data(self):
-        return self.val['buffer']
+        return self.val['buffer'].address
 
     def length(self):
         return self.val['length']
@@ -37,7 +37,7 @@ class StringPrinter(StringPrinterHelper):
 
     def data(self):
         assert self.val['pData']
-        return self.val['pData'].dereference()['buffer']
+        return self.val['pData'].dereference()['buffer'].address
 
     def length(self):
         assert self.val['pData']
diff --git a/solenv/gdb/libreoffice/util/string.py b/solenv/gdb/libreoffice/util/string.py
index 32583718f83b..742aabbaca27 100644
--- a/solenv/gdb/libreoffice/util/string.py
+++ b/solenv/gdb/libreoffice/util/string.py
@@ -52,15 +52,15 @@ class StringPrinterHelper(object):
         if not encoding:
             encoding = ''
 
-        if use_lazy_string:
-            return data.lazy_string(encoding, length)
-
         # we need to determine length, if not given (for sal_Unicode*)
         if length < 0:
             length = 0
             while data[length] != 0 and length <= 512: # arbitrary limit
                 length += 1
 
+        if use_lazy_string:
+            return data.lazy_string(encoding, length)
+
         # The gdb.Value.string() conversion works on array of bytes, but
         # the length we have is the length of the string. So we must
         # multiply it by width of character if the string is Unicode.
commit ba65817fb927b1b2db8872fc981fd878219ab968
Author: Richard PALO <richard at NetBSD.org>
Date:   Fri Sep 29 16:37:21 2017 +0200

    tdf#100013 sysui: fix invalid tar invocation
    
    Change-Id: Ie7c482d387f9ffd3be92759200446951b9084408

diff --git a/sysui/CustomTarget_solaris.mk b/sysui/CustomTarget_solaris.mk
index ed264fe95960..20072fe0cd7f 100644
--- a/sysui/CustomTarget_solaris.mk
+++ b/sysui/CustomTarget_solaris.mk
@@ -50,6 +50,6 @@ $(solaris_WORKDIR)/%/prototype: $(solaris_SRCDIR)/prototype
 
 $(solaris_WORKDIR)/%-desktop-integration.tar.gz: $(solaris_WORKDIR)/%/copyright $(solaris_WORKDIR)/%/pkginfo $(solaris_WORKDIR)/%/depend $(solaris_WORKDIR)/%/mailcap $(solaris_WORKDIR)/%/postinstall $(solaris_WORKDIR)/%/postremove $(solaris_WORKDIR)/%/prototype $(call gb_CustomTarget_get_workdir,sysui/share)/%/openoffice.org.xml
 #	pkgmk -l 1073741824 -r $(solaris_WORKDIR) -f $(solaris_WORKDIR)/$*/prototype -o -d $(solaris_WORKDIR) ARCH=all VERSION=$(PKGVERSION.$*)
-	$(GNUTAR) -cf - -C $(solaris_WORKDIR) $*$(LIBO_MAJOR) -desktop-int | gzip > $@
+	$(GNUTAR) -cf - -C $(solaris_WORKDIR) $* | gzip > $@
 
 # vim: set noet sw=4 ts=4:


More information about the Libreoffice-commits mailing list