ARROW-15550: [C++] Add optional debug memory checks#12330
ARROW-15550: [C++] Add optional debug memory checks#12330pitrou wants to merge 3 commits intoapache:masterfrom
Conversation
|
|
87a3a3d to
27f10c8
Compare
Debug memory checks can be enabled by setting the environment variable ARROW_DEBUG_MEMORY_POOL to one of the recognized values "abort", "trap" or "warn" (regardless of whether Arrow was compiled in debug or release mode). The only implemented check adds a suffix past the allocation and checks that it isn't clobbered on deallocation. Adding a prefix would be more expensive because of alignment constraints.
27f10c8 to
5af811f
Compare
|
@github-actions crossbow submit -g cpp |
|
Revision: 5af811f Submitted crossbow builds: ursacomputing/crossbow @ actions-1606 |
|
@github-actions crossbow submit -g cpp |
|
Revision: 689076851345a919a3654bd6a129dd3c3909b40f Submitted crossbow builds: ursacomputing/crossbow @ actions-1607 |
6890768 to
5c5fe4f
Compare
5c5fe4f to
9090492
Compare
|
@github-actions crossbow submit -g cpp |
|
Revision: 9090492 Submitted crossbow builds: ursacomputing/crossbow @ actions-1608 |
wjones127
left a comment
There was a problem hiding this comment.
This looks great! GDB integration sounds cool (though I haven't tried it out yet).
| 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: |
There was a problem hiding this comment.
is the if 1 just so the string contents don't have to be dedented?
|
It looks like conda-cpp-valgrind failed, but there's not an obvious error (out of memory, or compiler crash?). It doesn't seem related to this, though. |
|
Yes, the conda-cpp-valgrind failure is https://issues.apache.org/jira/browse/ARROW-15354 |
|
Benchmark runs are scheduled for baseline = f0ed940 and contender = d6e5778. d6e5778 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
Debug memory checks can be enabled by setting the environment variable ARROW_DEBUG_MEMORY_POOL
to one of the recognized values "abort", "trap" or "warn" (regardless of whether Arrow
was compiled in debug or release mode).
The only implemented check adds a suffix past the allocation and checks that it isn't clobbered on deallocation.
Adding a prefix would be more expensive because of alignment constraints.
Also add a fix by Will Jones for ARROW-14047 (Parquet Arrow reader sets null values in buffer overflow), since otherwise CI would fail.