felipecrv commented on issue #33933:
URL: https://github.com/apache/arrow/issues/33933#issuecomment-1409482466

   > > we seem to only guarantee 8-byte alignment.
   > 
   > Where do you see that?
   
   No checks here 
https://github.com/apache/arrow/blob/master/cpp/src/arrow/buffer.h#L91
   
   This `scratch_space` is 8-byte aligned (not 64-byte aligned) and is 
sometimes used as memory backing a `Buffer`.
   
https://github.com/apache/arrow/blob/64a48c99934555fe35a69066608328635ed62dad/cpp/src/arrow/array/data.h#L278
   
   Could be fixed with:
   
   ```diff
      // 16 bytes of scratch space to enable this ArraySpan to be a view onto
      // scalar values including binary scalars (where we need to create a 
buffer
      // that looks like two 32-bit or 64-bit offsets)
   -  uint64_t scratch_space[2];
   +  alignas(64) scratch_space[2];
   ```
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to