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 2021/12/05 16:46:20 UTC

[GitHub] [arrow] Crystrix edited a comment on pull request #11789: ARROW-14898: [C++][Compute] Fix crash of out-of-bounds memory accessing in key_hash if a key is smaller than int64

Crystrix edited a comment on pull request #11789:
URL: https://github.com/apache/arrow/pull/11789#issuecomment-986262845


   > I see. I don't think we want to add such a file to the test suite, no.
   
   I have no idea to add a suitable test case. Here is an explanation of the reason why it is not easy to reproduce:
   
   In general, the occurrence of the crash depends on the allocation of memory.
   
   The `std::memcpy` always copies 8 bytes. So the out-of-bounds memory access happens if the source variable is less than 8 bytes. But if the accessed memory is still in the address space of the process, then the crash won't happen. And the invalid copied tailing bytes are filtered out by a mask, so the result is still correct.
   
   Only after reading a specific data file as a `MemoryMappedFile` and executing `GroupBy` with keys of a single char, the accessed memory won't be in the address space of the process. Then the OS will terminate the process with a segmentation fault.
   
   
   
   
   


-- 
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