[PATCH] D86815: [LangRef] Adjust guarantee for llvm.memcpy to also allow equal arguments.

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 1 12:29:00 PDT 2020


jdoerfert added a comment.

In D86815#2250373 <https://reviews.llvm.org/D86815#2250373>, @xbolva00 wrote:

> Clang/LLVM accepts memcpy(NULL, NULL, 0) while GCC assumes dst/src pointers are not null. LLVM is conservative here.

We basically "only" assume the pointers are dereferenceable by as many bytes as you copy. That is, if you copy 0 we don't assume anything.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86815/new/

https://reviews.llvm.org/D86815



More information about the llvm-commits mailing list