[Libreoffice-commits] core.git: 3 commits - bridges/source external/cppunit external/python3

Stephan Bergmann sbergman at redhat.com
Fri May 23 07:50:51 PDT 2014


 bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx |    9 +++++++--
 external/cppunit/unix.patch                          |   10 +++++++++-
 external/python3/UnpackedTarball_python3.mk          |    1 +
 external/python3/python-lsan.patch.0                 |   19 +++++++++++++++++++
 4 files changed, 36 insertions(+), 3 deletions(-)

New commits:
commit fa2fcc2074ac102d8592fdf2b429ef369dd501f3
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri May 23 16:49:45 2014 +0200

    external/python3: Fix memory leak in configure check code
    
    ...that LeakSanitizer would complain about, causing the check to erroneously fail.
    
    Change-Id: Ieaef38576afd6196d38f395d48fd1bc92b22ddb6

diff --git a/external/python3/UnpackedTarball_python3.mk b/external/python3/UnpackedTarball_python3.mk
index d6a1d04..49a56e0 100644
--- a/external/python3/UnpackedTarball_python3.mk
+++ b/external/python3/UnpackedTarball_python3.mk
@@ -30,6 +30,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,python3,\
 	external/python3/python-3.3.3-py17797.patch.1 \
 	external/python3/python-3.3.3-msvc2012-winxp.patch.1 \
 	external/python3/python-3.3.5-pyexpat-symbols.patch.1 \
+	external/python3/python-lsan.patch.0 \
 ))
 
 ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD SOLARIS,$(OS)),)
diff --git a/external/python3/python-lsan.patch.0 b/external/python3/python-lsan.patch.0
new file mode 100644
index 0000000..3796904
--- /dev/null
+++ b/external/python3/python-lsan.patch.0
@@ -0,0 +1,19 @@
+--- configure
++++ configure
+@@ -11821,6 +11821,7 @@
+         break;
+       }
+     }
++    freeaddrinfo(aitop);
+   }
+ 
+   if (!(inet4 == 0 || inet4 == 2))
+@@ -11828,8 +11829,6 @@
+   if (!(inet6 == 0 || inet6 == 2))
+     goto bad;
+ 
+-  if (aitop)
+-    freeaddrinfo(aitop);
+   return 0;
+ 
+  bad:
commit 67825fe270d52b78c81cc1c1c37486c11bad394e
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri May 23 16:47:16 2014 +0200

    dlclose confuses LeakSanitizer
    
    Change-Id: I2bebbf1615ddc3619bcc3bf940f70c0967ce8534

diff --git a/external/cppunit/unix.patch b/external/cppunit/unix.patch
index 0a153ad..74de602 100644
--- a/external/cppunit/unix.patch
+++ b/external/cppunit/unix.patch
@@ -1,6 +1,14 @@
 --- misc/cppunit-1.13.1/src/cppunit/UnixDynamicLibraryManager.cpp
 +++ misc/build/cppunit-1.13.1/src/cppunit/UnixDynamicLibraryManager.cpp
-@@ -34,7 +34,11 @@
+@@ -20,7 +20,6 @@
+ void 
+ DynamicLibraryManager::doReleaseLibrary()
+ {
+-  ::dlclose( m_libraryHandle);
+ }
+ 
+ 
+@@ -34,7 +33,11 @@
  std::string 
  DynamicLibraryManager::getLastErrorDetail() const
  {
commit 26cf118247855bb5caeac3d8e68906fbcfcdc837
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri May 23 16:46:30 2014 +0200

    Fix undefined misaligned writes
    
    Change-Id: I8ad64babd43c2a692c305f3fa56331edb6d502ee

diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
index 2373769..58c4ac1 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
@@ -411,11 +411,16 @@ unsigned char * codeSnippet( unsigned char * code,
 
     // movq $<nOffsetAndIndex>, %r10
     *reinterpret_cast<sal_uInt16 *>( code ) = 0xba49;
-    *reinterpret_cast<sal_uInt64 *>( code + 2 ) = nOffsetAndIndex;
+    *reinterpret_cast<sal_uInt16 *>( code + 2 ) = nOffsetAndIndex & 0xFFFF;
+    *reinterpret_cast<sal_uInt32 *>( code + 4 ) = nOffsetAndIndex >> 16;
+    *reinterpret_cast<sal_uInt16 *>( code + 8 ) = nOffsetAndIndex >> 48;
 
     // movq $<address of the privateSnippetExecutor>, %r11
     *reinterpret_cast<sal_uInt16 *>( code + 10 ) = 0xbb49;
-    *reinterpret_cast<sal_uInt64 *>( code + 12 ) = reinterpret_cast<sal_uInt64>( privateSnippetExecutor );
+    *reinterpret_cast<sal_uInt32 *>( code + 12 )
+        = reinterpret_cast<sal_uInt64>(privateSnippetExecutor);
+    *reinterpret_cast<sal_uInt32 *>( code + 16 )
+        = reinterpret_cast<sal_uInt64>(privateSnippetExecutor) >> 32;
 
     // jmpq *%r11
     *reinterpret_cast<sal_uInt32 *>( code + 20 ) = 0x00e3ff49;


More information about the Libreoffice-commits mailing list