Flattens arrays by ORing together all their elements.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Do you want to use this in eager checks when passing an array as a function argument (does that even happen in C++?) ?
llvm/test/Instrumentation/MemorySanitizer/check-array.ll | ||
---|---|---|
10 | just pass a [2xi24]* through the function arguments (and call it something other than main) |
llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp | ||
---|---|---|
1160 | Please reformat |
I don't believe this happens in C++ but wanted to add it for completeness's sake (or if some other LLVM based language might use it).
llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp | ||
---|---|---|
1784 | @eugenis With eager checks enabled, any noundef array arguments or return values will attempt to call this code. The behavior without this patch is for this assertion to fire. The patch enables these checks to work correctly. If you'd like, I can make this clear in the test I added by using -msan-eager-checks. |
LGTM
llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp | ||
---|---|---|
1784 | Got it, MSan is simply broken without this patch - it crashes on valid IR. |
llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp | ||
---|---|---|
1784 | Yep, that's why I made the test case use checking the main return value -- it's independent of eager-checks |
clang-format: please reformat the code