You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "mapleFU (via GitHub)" <gi...@apache.org> on 2024/11/22 18:06:56 UTC

[I] [C++] Better handling `mem*` api that behave sanely on NULL input [arrow]

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

                 I think we take a systematic approach to this and make wrappers to `mem*` functions that behave sanely on `NULL` input.
   
   This article [1] discusses the issue in detail and points to approaches taken by projects like `boringssl`. [2] There is also a proposal from prolific LLVM contributors for fixing this at the C standard level. [3]
   
   [1] https://davidben.net/2024/01/15/empty-slices.html
   [2] https://boringssl.googlesource.com/boringssl/+/17cf2cb1d226b0ba2401304242df7ddd3b6f1ff2%5E%21/
   [3] https://docs.google.com/document/d/1guH_HgibKrX7t9JfKGfWX2UCPyZOTLsnRfR6UleD1F8/edit?tab=t.0
   
   _Originally posted by @felipecrv in https://github.com/apache/arrow/issues/44794#issuecomment-2494059369_
               


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


Re: [I] [C++] Better handling `mem*` api that behave sanely on NULL input [arrow]

Posted by "felipecrv (via GitHub)" <gi...@apache.org>.
felipecrv commented on issue #44814:
URL: https://github.com/apache/arrow/issues/44814#issuecomment-2494741203

   Make the wrappers inlineable (defined in a header) so the checks can be elided by the compiler when it can be prover at the callsite that the pointer is not null already.


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


Re: [I] [C++] Better handling `mem*` api that behave sanely on NULL input [arrow]

Posted by "felipecrv (via GitHub)" <gi...@apache.org>.
felipecrv commented on issue #44814:
URL: https://github.com/apache/arrow/issues/44814#issuecomment-2495110406

   Another idea (suggest the wrappers with `clang-tidy` warnings): https://github.com/apache/arrow/pull/44794#issuecomment-2494959680


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


Re: [I] [C++] Better handling `mem*` api that behave sanely on NULL input [arrow]

Posted by "mapleFU (via GitHub)" <gi...@apache.org>.
mapleFU commented on issue #44814:
URL: https://github.com/apache/arrow/issues/44814#issuecomment-2497103395

   They can all be applied, let me try this later


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