[PATCH] D90648: [SCEV] Fix nsw flags for GEP expressions
Jordan Rupprecht via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 25 15:55:32 PST 2020
rupprecht added a comment.
Turns out this isn't failing at trunk anymore. It looks like this was fixed by 02fdbc3567249471349474c70828cb5a5d4881c8 <https://reviews.llvm.org/rG02fdbc3567249471349474c70828cb5a5d4881c8>. For posterity, here's my reduction:
#include <cstdio>
void repro(char *dst, size_t dstlen, char *src) {
char *end = dst + dstlen;
while (dst < end - 3) {
*dst++ = 0x00;
*dst++ = 0x00;
*dst++ = 0x00;
}
}
int main() {
char src[] = {1, 2, 3};
char dst[100];
repro(dst, 100, src);
}
That fails with running with `clang++ -O1 -fsanitize=address,null -fno-sanitize-recover=all`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90648/new/
https://reviews.llvm.org/D90648
More information about the llvm-commits
mailing list