You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "zanmato1984 (via GitHub)" <gi...@apache.org> on 2024/04/30 07:48:02 UTC

[I] [C++][Acero] Use ASAN to replace current temp stack memory poisoning [arrow]

zanmato1984 opened a new issue, #41460:
URL: https://github.com/apache/arrow/issues/41460

   ### Describe the enhancement requested
   
   The `arrow::util::TempVectorStack` memory initialization (by filling `0xFF`s [1]) seems not very useful in the sense that:
   1. If it is supposed to be work with the guards [2] at the edge of each stack frame, the guards are only checked in debug mode (note it is using `ARROW_DCHECK`) [3], making filling `0xFF`s unnecessary in non-debug mode. And the debug-only guarding itself can fully leverage more decent memory poisoning strategy such as ASAN [4].
   2. If it is for non-debug mode too, then it might be unnecessary because the stack users are not assuming the stack memory to be initially filled with any particular content.
   
   We may want to refine this by removing unnecessary memory initialization and/or using ASAN's manual memory poisoning.
   
   [1] https://github.com/apache/arrow/blob/e4f31462dbd668c3bcb6ce96442f3c1632c4d8c8/cpp/src/arrow/compute/util.h#L95
   [2] https://github.com/apache/arrow/blob/e4f31462dbd668c3bcb6ce96442f3c1632c4d8c8/cpp/src/arrow/compute/util.h#L117-L118
   [3] https://github.com/apache/arrow/blob/e4f31462dbd668c3bcb6ce96442f3c1632c4d8c8/cpp/src/arrow/compute/util.cc#L52-L57
   [4] https://github.com/google/sanitizers/wiki/AddressSanitizerManualPoisoning
   
   ### Component(s)
   
   C++


-- 
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: issues-unsubscribe@arrow.apache.org.apache.org

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