You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/02/08 19:07:04 UTC

[GitHub] [arrow] lidavidm commented on a change in pull request #12330: ARROW-15550: [C++] Add optional debug memory checks

lidavidm commented on a change in pull request #12330:
URL: https://github.com/apache/arrow/pull/12330#discussion_r801965459



##########
File path: python/pyarrow/tests/test_memory.py
##########
@@ -169,3 +178,63 @@ def test_supported_memory_backends():
         assert "jemalloc" in backends
     if should_have_mimalloc:
         assert "mimalloc" in backends
+
+
+def run_debug_memory_pool(pool_factory, env_value):
+    """
+    Run a piece of code making an invalid memory write with the
+    ARROW_DEBUG_MEMORY_POOL environment variable set to a specific value.
+    """
+    code = f"""if 1:

Review comment:
       is the `if 1` just so the string contents don't have to be dedented?

##########
File path: cpp/src/parquet/level_conversion_inc.h
##########
@@ -333,7 +333,7 @@ void DefLevelsToBitmapSimd(const int16_t* def_levels, int64_t num_def_levels,
   ::arrow::internal::FirstTimeBitmapWriter writer(
       output->valid_bits,
       /*start_offset=*/output->valid_bits_offset,
-      /*length=*/num_def_levels);
+      /*length=*/output->values_read_upper_bound);

Review comment:
       Ah - it hasn't yet been fixed on master - and presumably it fails without this fix.

##########
File path: cpp/src/parquet/level_conversion_inc.h
##########
@@ -333,7 +333,7 @@ void DefLevelsToBitmapSimd(const int16_t* def_levels, int64_t num_def_levels,
   ::arrow::internal::FirstTimeBitmapWriter writer(
       output->valid_bits,
       /*start_offset=*/output->valid_bits_offset,
-      /*length=*/num_def_levels);
+      /*length=*/output->values_read_upper_bound);

Review comment:
       Was this change meant to be included here?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org