You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ks...@apache.org on 2022/07/27 12:27:31 UTC

[arrow] 02/06: ARROW-17213: [C++] Fix for valgrind issue in test-r-linux-valgrind crossbow build (#13715)

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

kszucs pushed a commit to branch maint-9.0.0
in repository https://gitbox.apache.org/repos/asf/arrow.git

commit 6d524780db653f073f11ba8a20fba0143187ba06
Author: Wes McKinney <we...@users.noreply.github.com>
AuthorDate: Tue Jul 26 20:12:41 2022 -0600

    ARROW-17213: [C++] Fix for valgrind issue in test-r-linux-valgrind crossbow build (#13715)
    
    Authored-by: Wes McKinney <we...@apache.org>
    Signed-off-by: Wes McKinney <we...@apache.org>
---
 cpp/src/arrow/compute/kernels/scalar_compare.cc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/cpp/src/arrow/compute/kernels/scalar_compare.cc b/cpp/src/arrow/compute/kernels/scalar_compare.cc
index f071986dd2..cfe1085531 100644
--- a/cpp/src/arrow/compute/kernels/scalar_compare.cc
+++ b/cpp/src/arrow/compute/kernels/scalar_compare.cc
@@ -271,8 +271,7 @@ struct CompareKernel {
     if (out_is_byte_aligned) {
       out_buffer = out_arr->buffers[1].data + out_arr->offset / 8;
     } else {
-      ARROW_ASSIGN_OR_RAISE(out_buffer_tmp,
-                            ctx->Allocate(bit_util::BytesForBits(batch.length)));
+      ARROW_ASSIGN_OR_RAISE(out_buffer_tmp, ctx->AllocateBitmap(batch.length));
       out_buffer = out_buffer_tmp->mutable_data();
     }
     if (batch[0].is_array() && batch[1].is_array()) {