You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by gr...@apache.org on 2019/07/01 17:16:02 UTC

[kudu] branch master updated (5c652de -> 70f8131)

This is an automated email from the ASF dual-hosted git repository.

granthenke pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git.


    from 5c652de  docs: adjust ordering of security docs
     new 841cc7c  KUDU-2770: Upgrade bison to 3.0.5
     new 70f8131  KUDU-2770: apply ustat removal patch from llvm

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 thirdparty/download-thirdparty.sh                  | 14 +++---
 .../bison-fix-high-sierra-compilation-issue.patch  | 15 ------
 thirdparty/patches/llvm-ustat-removal.patch        | 56 ++++++++++++++++++++++
 thirdparty/vars.sh                                 |  2 +-
 4 files changed, 63 insertions(+), 24 deletions(-)
 delete mode 100644 thirdparty/patches/bison-fix-high-sierra-compilation-issue.patch
 create mode 100644 thirdparty/patches/llvm-ustat-removal.patch


[kudu] 02/02: KUDU-2770: apply ustat removal patch from llvm

Posted by gr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

granthenke pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git

commit 70f8131423323004b42e70d85308c0fa07753935
Author: Scott Reynolds <sd...@gmail.com>
AuthorDate: Mon May 27 14:13:48 2019 -0700

    KUDU-2770: apply ustat removal patch from llvm
    
    Summary:
    glib's sys/ustat.h has been deprecated for awhile and it has been
    removed in glibc 2.28: https://lwn.net/Articles/761462/
    
    The LLVM team merged the following into their project:
    https://reviews.llvm.org/rG383fe5c8668f63ef21c646b43f48da9fa41aa100
    and this is a port of that patch.
    
    Change-Id: I506f6031f39972bf9b9dbe3368214da2cf390830
    Reviewed-on: http://gerrit.cloudera.org:8080/13447
    Reviewed-by: Grant Henke <gr...@apache.org>
    Tested-by: Grant Henke <gr...@apache.org>
---
 thirdparty/download-thirdparty.sh           |  5 +--
 thirdparty/patches/llvm-ustat-removal.patch | 56 +++++++++++++++++++++++++++++
 2 files changed, 59 insertions(+), 2 deletions(-)

diff --git a/thirdparty/download-thirdparty.sh b/thirdparty/download-thirdparty.sh
index 30d4ae2..249fc35 100755
--- a/thirdparty/download-thirdparty.sh
+++ b/thirdparty/download-thirdparty.sh
@@ -317,7 +317,7 @@ fetch_and_patch \
  $PYTHON_SOURCE \
  $PYTHON_PATCHLEVEL
 
-LLVM_PATCHLEVEL=2
+LLVM_PATCHLEVEL=3
 fetch_and_patch \
  llvm-${LLVM_VERSION}-iwyu-${IWYU_VERSION}.src.tar.gz \
  $LLVM_SOURCE \
@@ -327,7 +327,8 @@ fetch_and_patch \
   "patch -p1 < $TP_DIR/patches/llvm-iwyu-nocurses.patch" \
   "patch -p1 < $TP_DIR/patches/llvm-iwyu-include-picker.patch" \
   "patch -d tools/clang/tools/include-what-you-use -p1 < $TP_DIR/patches/llvm-iwyu-llvm-6-compat.patch" \
-  "patch -d projects/compiler-rt -p1 < $TP_DIR/patches/llvm-tsan-disable-trace-switching-after-multithreaded-for.patch"
+  "patch -d projects/compiler-rt -p1 < $TP_DIR/patches/llvm-tsan-disable-trace-switching-after-multithreaded-for.patch" \
+  "patch -d projects -p1 < $TP_DIR/patches/llvm-ustat-removal.patch"
 
 LZ4_PATCHLEVEL=1
 fetch_and_patch \
diff --git a/thirdparty/patches/llvm-ustat-removal.patch b/thirdparty/patches/llvm-ustat-removal.patch
new file mode 100644
index 0000000..ccf621a
--- /dev/null
+++ b/thirdparty/patches/llvm-ustat-removal.patch
@@ -0,0 +1,56 @@
+commit 383fe5c8668f63ef21c646b43f48da9fa41aa100
+Author: Craig Topper <cr...@intel.com>
+Date:   Thu May 24 17:59:47 2018 +0000
+
+    sanitizer: Use pre-computed size of struct ustat for Linux
+    
+    <sys/ustat.h> has been removed from glibc 2.28 by:
+    
+    commit cf2478d53ad7071e84c724a986b56fe17f4f4ca7
+    Author: Adhemerval Zanella <ad...@linaro.org>
+    Date: Sun Mar 18 11:28:59 2018 +0800
+    
+    Deprecate ustat syscall interface
+    This patch uses pre-computed size of struct ustat for Linux to fix
+    
+    https://bugs.llvm.org/show_bug.cgi?id=37418
+    
+    Patch by H.J. Lu.
+    
+    Differential Revision: https://reviews.llvm.org/D47281
+    
+    llvm-svn: 333213
+
+diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+index 94b8f3f627c..936d8186733 100644
+--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
++++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+@@ -159,7 +159,6 @@ typedef struct user_fpregs elf_fpregset_t;
+ # include <sys/procfs.h>
+ #endif
+ #include <sys/user.h>
+-#include <sys/ustat.h>
+ #include <linux/cyclades.h>
+ #include <linux/if_eql.h>
+ #include <linux/if_plip.h>
+@@ -253,7 +252,19 @@ namespace __sanitizer {
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+ 
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+-  unsigned struct_ustat_sz = sizeof(struct ustat);
++  // Use pre-computed size of struct ustat to avoid <sys/ustat.h> which
++  // has been removed from glibc 2.28.
++#if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \
++  || defined(__powerpc64__) || defined(__arch64__) || defined(__sparcv9) \
++  || defined(__x86_64__)
++#define SIZEOF_STRUCT_USTAT 32
++#elif defined(__arm__) || defined(__i386__) || defined(__mips__) \
++  || defined(__powerpc__) || defined(__s390__)
++#define SIZEOF_STRUCT_USTAT 20
++#else
++#error Unknown size of struct ustat
++#endif
++  unsigned struct_ustat_sz = SIZEOF_STRUCT_USTAT;
+   unsigned struct_rlimit64_sz = sizeof(struct rlimit64);
+   unsigned struct_statvfs64_sz = sizeof(struct statvfs64);
+ #endif // SANITIZER_LINUX && !SANITIZER_ANDROID


[kudu] 01/02: KUDU-2770: Upgrade bison to 3.0.5

Posted by gr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

granthenke pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git

commit 841cc7cd7b2aa0b738118097132bada486ac5b1f
Author: Scott Reynolds <sd...@gmail.com>
AuthorDate: Sat Jun 29 15:21:35 2019 -0700

    KUDU-2770: Upgrade bison to 3.0.5
    
    Summary:
    Bison 3.0.4 does not compile under glib 2.28, a fix for this was
    introduced in
    http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=4af4a4a71827c0bc5e0ec67af23edef4f15cee8e
    
    This also removes the patch for Mac OS High Sierra as it is believed
    to be no longer required
    
    Change-Id: I892af2d85bb481248715ba971a4439bc66ce4c90
    Reviewed-on: http://gerrit.cloudera.org:8080/13446
    Tested-by: Kudu Jenkins
    Reviewed-by: Grant Henke <gr...@apache.org>
---
 thirdparty/download-thirdparty.sh                         |  9 +++------
 .../patches/bison-fix-high-sierra-compilation-issue.patch | 15 ---------------
 thirdparty/vars.sh                                        |  2 +-
 3 files changed, 4 insertions(+), 22 deletions(-)

diff --git a/thirdparty/download-thirdparty.sh b/thirdparty/download-thirdparty.sh
index dd51678..30d4ae2 100755
--- a/thirdparty/download-thirdparty.sh
+++ b/thirdparty/download-thirdparty.sh
@@ -409,16 +409,13 @@ fetch_and_patch \
  $THRIFT_SOURCE \
  $THRIFT_PATCHLEVEL
 
-BISON_PATCHLEVEL=1
+BISON_PATCHLEVEL=0
 fetch_and_patch \
  $BISON_NAME.tar.gz \
  $BISON_SOURCE \
- $BISON_PATCHLEVEL \
- "patch -p0 < $TP_DIR/patches/bison-fix-high-sierra-compilation-issue.patch"
- # Fix compilation issue in macOS High Sierra
- # See: https://github.com/spack/spack/issues/5521
+ $BISON_PATCHLEVEL
  # This would normally call autoreconf, but it does not succeed with
- # autoreconf 2.69 (RHEL 7): "autoreconf: 'configure.ac' or 'configure.in' is required".
+ # autoreconf 2.69-11 (RHEL 7): "autoreconf: 'configure.ac' or 'configure.in' is required".
 
 HIVE_PATCHLEVEL=0
 fetch_and_patch \
diff --git a/thirdparty/patches/bison-fix-high-sierra-compilation-issue.patch b/thirdparty/patches/bison-fix-high-sierra-compilation-issue.patch
deleted file mode 100644
index 0dff749..0000000
--- a/thirdparty/patches/bison-fix-high-sierra-compilation-issue.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-With format string strictness, High Sierra also enforces that %n isn't used
-in dynamic format strings, but we should just disable its use on darwin in
-general.
-
---- lib/vasnprintf.c.orig	2017-06-22 15:19:15.000000000 -0700
-+++ lib/vasnprintf.c	2017-06-22 15:20:20.000000000 -0700
-@@ -4869,7 +4869,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *
- #endif
-                   *fbp = dp->conversion;
- #if USE_SNPRINTF
--# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
-+# if !defined(__APPLE__) && !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
-                 fbp[1] = '%';
-                 fbp[2] = 'n';
-                 fbp[3] = '\0';
diff --git a/thirdparty/vars.sh b/thirdparty/vars.sh
index 2e01115..ed8303e 100644
--- a/thirdparty/vars.sh
+++ b/thirdparty/vars.sh
@@ -213,7 +213,7 @@ THRIFT_VERSION=0.11.0
 THRIFT_NAME=thrift-$THRIFT_VERSION
 THRIFT_SOURCE=$TP_SOURCE_DIR/$THRIFT_NAME
 
-BISON_VERSION=3.0.4
+BISON_VERSION=3.0.5
 BISON_NAME=bison-$BISON_VERSION
 BISON_SOURCE=$TP_SOURCE_DIR/$BISON_NAME