[PATCH] D118050: [analyzer] Different address spaces cannot overlap

Balázs Benics via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 25 01:49:54 PST 2022


steakhal added a subscriber: NoQ.
steakhal added a comment.

I'm wondering if we should have an assertion within the `SValBuilder::evalBinOpLL()` asserting that the pointers should have the same bitwidths.
That's better than having nothing, waiting for a bugreport containing such a constraint on the bugpath to get a crash with Z3 refutation.

That way we could have a chance to fix these issues for once and all.
WDYT @NoQ @martong?



================
Comment at: clang/test/Analysis/cstring-checker-addressspace.c:14
+// Copy from host to device memory.
+DEVICE void *memcpy(DEVICE void *dst, const void *src, unsigned long len);
+
----------------
Please try to trigger the test using some suffix for the `memcpy`.
E.g.: `memcpy_host2device` or something similar.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118050



More information about the cfe-commits mailing list