From 4dadc60968663e560053e45d4f6873e0d0dd046e Mon Sep 17 00:00:00 2001 From: Philipp Moritz Date: Wed, 11 Jul 2018 05:52:02 -0700 Subject: [PATCH] Update arrow to include uninitialized memory fixes (#2371) --- thirdparty/scripts/arrow-zero-fill.patch | 30 ------------------------ thirdparty/scripts/build_arrow.sh | 6 ++--- 2 files changed, 2 insertions(+), 34 deletions(-) delete mode 100644 thirdparty/scripts/arrow-zero-fill.patch diff --git a/thirdparty/scripts/arrow-zero-fill.patch b/thirdparty/scripts/arrow-zero-fill.patch deleted file mode 100644 index 77e0b080f..000000000 --- a/thirdparty/scripts/arrow-zero-fill.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff --git a/cpp/src/arrow/memory_pool.cc b/cpp/src/arrow/memory_pool.cc -index 34bd600e..3ef32090 100644 ---- a/cpp/src/arrow/memory_pool.cc -+++ b/cpp/src/arrow/memory_pool.cc -@@ -53,6 +53,7 @@ Status AllocateAligned(int64_t size, uint8_t** out) { - ss << "malloc of size " << size << " failed"; - return Status::OutOfMemory(ss.str()); - } -+ memset(*out, 0, size); - #elif defined(ARROW_JEMALLOC) - *out = reinterpret_cast(mallocx( - std::max(static_cast(size), kAlignment), MALLOCX_ALIGN(kAlignment))); -@@ -75,6 +76,7 @@ Status AllocateAligned(int64_t size, uint8_t** out) { - ss << "invalid alignment parameter: " << kAlignment; - return Status::Invalid(ss.str()); - } -+ memset(*out, 0, size); - #endif - return Status::OK(); - } -@@ -124,6 +126,9 @@ class DefaultMemoryPool : public MemoryPool { - DCHECK(out); - // Copy contents and release old memory chunk - memcpy(out, *ptr, static_cast(std::min(new_size, old_size))); -+ if (new_size > old_size) { -+ memset(out + old_size, 0, static_cast(new_size - old_size)); -+ } - #ifdef _MSC_VER - _aligned_free(*ptr); - #else diff --git a/thirdparty/scripts/build_arrow.sh b/thirdparty/scripts/build_arrow.sh index 9c1adf9fa..ef3209d6f 100755 --- a/thirdparty/scripts/build_arrow.sh +++ b/thirdparty/scripts/build_arrow.sh @@ -68,12 +68,10 @@ if [[ ! -d $TP_DIR/../python/ray/pyarrow_files/pyarrow || \ pushd $TP_DIR/build/arrow git fetch origin master - # The PR for this commit is https://github.com/apache/arrow/pull/2224. We + # The PR for this commit is https://github.com/apache/arrow/pull/2235. We # include the link here to make it easier to find the right commit because # Arrow often rewrites git history and invalidates certain commits. - git checkout 010c87402071d715e6fd0c3d22a0b13820b9aed5 - - git apply $TP_DIR/scripts/arrow-zero-fill.patch + git checkout fa08ddfbe8ada173b2c621172e176f159ce3b728 cd cpp if [ ! -d "build" ]; then