pitrou commented on issue #76:
URL: https://github.com/apache/arrow-nanoarrow/issues/76#issuecomment-1333914069

   > Actually, I wonder if this might be considered an error in Go instead, 
since `malloc(0)` may return NULL and it would be a little weird to say that 
we're forced to allocate.
   
   Note that doing arithmetic on null pointers is UB, so the use of null 
pointers is severely limited in practice. Forcing a valid pointer is good 
practice in general. We have explicit code for it Arrow C++:
   
https://github.com/apache/arrow/blob/1d9f7781acf5e5b3679ac2d2aee9e837435ac87e/cpp/src/arrow/memory_pool.cc#L62


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