efriedma added a comment.

In D152275#4423845 <https://reviews.llvm.org/D152275#4423845>, @simeon wrote:

>> - User code might not actually obey the language rules; do we have any 
>> sanitizer that checks if user code trips over this?
>
> I believe AddressSanitizer 
> <https://clang.llvm.org/docs/AddressSanitizer.html> should be able to detect 
> out-of-bounds accesses.

asan will detect if you index completely outside a memory allocation, but it 
won't detect if you do something like `struct S { int x[10]; int y; } s = {}; 
return s->x[10];`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152275

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to