[clang] [CodeGen] Respect pointer-overflow sanitizer for void pointers (PR #67772)

Justin Stitt via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 29 06:14:44 PDT 2023


https://github.com/JustinStitt approved this pull request.

LGTM!

FWIW, here's a test file that does not trip the sanitizer before this PR and _does_ trip after the PR:

```c
#include <stdio.h>

int main(int argc, char **argv) {
  void *p = NULL;
  printf("p: %p\n", p);
  p = p - argc;
  printf("p: %p\n", p);
  return 0;
}

```

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


More information about the cfe-commits mailing list