[clang] -fsanitize=alignment: check memcpy/memmove arguments (PR #67766)

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 9 22:57:44 PDT 2023


MaskRay wrote:

Add the test to `clang/test/CodeGen/catch-undef-behavior.c`  ca810073b3e4cef8ed58c03dcc724771f8f8615b
```
+  /// Casting to void * or char * drops the alignment requirement.
+  memcpy((void *)p, (char *)q, sz);
```

https://github.com/llvm/llvm-project/pull/67766


More information about the cfe-commits mailing list