jorgecarleitao commented on pull request #9478:
URL: https://github.com/apache/arrow/pull/9478#issuecomment-777835446


   IMO this may be unsound: 
   
   Docs for `unsafe fn from_raw_parts` 
[reads](https://doc.rust-lang.org/std/slice/fn.from_raw_parts.html#safety):
   
   > * `data` must point to `len` consecutive properly initialized values of 
type `T`.
   
   When we set the len to beyond the uninitialized region and then use 
`from_raw_parts` (via `as_slice` -> `Deref`), aren't we violating the invariant 
above?


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

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


Reply via email to