[Libreoffice-commits] core.git: external/nss

Stephan Bergmann sbergman at redhat.com
Tue Oct 11 07:41:58 UTC 2016


 external/nss/asan.patch.1            |   12 ++++++------
 external/nss/ubsan-alignment.patch.0 |   34 +++++++++++++++++-----------------
 2 files changed, 23 insertions(+), 23 deletions(-)

New commits:
commit 5ab5779bf4a16f4ee4a8d1198ffbd8f842f2edd9
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Oct 11 09:39:21 2016 +0200

    external/nss: Adapt ASan/UBSan-specific patches to nss 3.27
    
    Change-Id: Ic96a57a1f43f7aae4e0733d2e65edd843b827a54

diff --git a/external/nss/asan.patch.1 b/external/nss/asan.patch.1
index 3b64aa6..0685adb 100644
--- a/external/nss/asan.patch.1
+++ b/external/nss/asan.patch.1
@@ -1,12 +1,12 @@
 diff -ur nss.org/nss/coreconf/Linux.mk nss/nss/coreconf/Linux.mk
 --- nss.org/nss/coreconf/Linux.mk	2014-05-06 04:36:01.817838877 +0200
 +++ nss/nss/coreconf/Linux.mk	2014-05-06 04:37:25.387835456 +0200
-@@ -145,7 +145,7 @@
- # The linker on Red Hat Linux 7.2 and RHEL 2.1 (GNU ld version 2.11.90.0.8)
- # incorrectly reports undefined references in the libraries we link with, so
+@@ -158,7 +158,7 @@
  # we don't use -z defs there.
+ # Also, -z defs conflicts with Address Sanitizer, which emits relocations
+ # against the libsanitizer runtime built into the main executable.
 -ZDEFS_FLAG		= -Wl,-z,defs
 +ZDEFS_FLAG		=
- DSO_LDOPTS		+= $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG)) -Wl,-z,origin '-Wl,-rpath,$$ORIGIN'
- LDFLAGS			+= $(ARCHFLAG)
- 
+ ifneq ($(USE_ASAN),1)
+ DSO_LDOPTS             += $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG)) -Wl,-z,origin '-Wl,-rpath,$$ORIGIN'
+ endif
diff --git a/external/nss/ubsan-alignment.patch.0 b/external/nss/ubsan-alignment.patch.0
index 4d13ffc..651939f 100644
--- a/external/nss/ubsan-alignment.patch.0
+++ b/external/nss/ubsan-alignment.patch.0
@@ -1,13 +1,13 @@
 --- nss/lib/freebl/md5.c
 +++ nss/lib/freebl/md5.c
-@@ -443,7 +443,7 @@
- 	/* Iterate over 64-byte chunks of the message. */
- 	while (inputLen >= MD5_BUFFER_SIZE) {
+@@ -445,7 +445,7 @@
+     /* Iterate over 64-byte chunks of the message. */
+     while (inputLen >= MD5_BUFFER_SIZE) {
  #ifdef IS_LITTLE_ENDIAN
 -#ifdef NSS_X86_OR_X64
 +#if 0
- 		/* x86 can handle arithmetic on non-word-aligned buffers */
- 		wBuf = (PRUint32 *)input;
+         /* x86 can handle arithmetic on non-word-aligned buffers */
+         wBuf = (PRUint32 *)input;
  #else
 --- nss/lib/freebl/sha_fast.c
 +++ nss/lib/freebl/sha_fast.c
@@ -15,26 +15,26 @@
  #include "ssltrace.h"
  #endif
  
--static void shaCompress(volatile SHA_HW_t *X, const PRUint32 * datain);
-+static void shaCompress(volatile SHA_HW_t *X, const unsigned char * datain);
+-static void shaCompress(volatile SHA_HW_t *X, const PRUint32 *datain);
++static void shaCompress(volatile SHA_HW_t *X, const unsigned char *datain);
  
  #define W u.w
  #define B u.b
-@@ -243,7 +243,7 @@
+@@ -241,7 +241,7 @@
   * code on AMD64.
   */
- static void 
--shaCompress(volatile SHA_HW_t *X, const PRUint32 *inbuf) 
-+shaCompress(volatile SHA_HW_t *X, const unsigned char *inbuf) 
+ static void
+-shaCompress(volatile SHA_HW_t *X, const PRUint32 *inbuf)
++shaCompress(volatile SHA_HW_t *X, const unsigned char *inbuf)
  {
-   register SHA_HW_t A, B, C, D, E;
+     register SHA_HW_t A, B, C, D, E;
  
-@@ -275,7 +275,7 @@
- #define SHA_RND4(a,b,c,d,e,n) \
-   a = SHA_ROTL(b,5)+SHA_F4(c,d,e)+a+XW(n)+K3; c=SHA_ROTL(c,30) 
+@@ -277,7 +277,7 @@
+     a = SHA_ROTL(b, 5) + SHA_F4(c, d, e) + a + XW(n) + K3; \
+     c = SHA_ROTL(c, 30)
  
 -#define LOAD(n) XW(n) = SHA_HTONL(inbuf[n])
 +#define LOAD(n) XW(n) = (((PRUint32)inbuf[4*n])<<24)|(((PRUint32)inbuf[4*n+1])<<16)|(((PRUint32)inbuf[4*n+2])<<8)|((PRUint32)inbuf[4*n+3])
  
-   A = XH(0);
-   B = XH(1);
+     A = XH(0);
+     B = XH(1);


More information about the Libreoffice-commits mailing list