Similarly to https://reviews.llvm.org/D18865 this adds options to provide custom mapping for msan.
As discussed in http://lists.llvm.org/pipermail/llvm-dev/2018-February/121339.html
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Transforms/Instrumentation/MemorySanitizer.cpp | ||
---|---|---|
610 | This getNumOccurrences() check and the 3 checks below are unnecessary. | |
618 | I feel uneasy about modifying global Custom_MemoryMapParams in module-specific initialization. Sure, it will be the same for each module, and it is determined by global cl:opt values anyway, but lets move it inside class MemorySanitizer to be on the safe side. | |
test/Instrumentation/MemorySanitizer/manual-shadow.ll | ||
4 | that's a lot of -msan flags | |
6 | Could you make the numbers decimal so they can be easily recognized in the IR? | |
7 | Please add a test for origin-base. |
Sure. There is still a few extra -msan flags in the tests, I can remove them before commit.
Actually, no. The test does not pass, not even close.
This check:
; CHECK-BASE-NOT: ret
is tripped by this line:
call void @__msan_warning_noreturn()
This check:
; CHECK-BASE: load{{.*}}3735928559
does not match because we never load from shadow base; we use it in "add".
Please make sure the test passes.
Hm, I did run tests before uploading the diff and they passed. Perhaps I upped the wrong file. I will recheck tomorrow and resubmit.
Morning. Ok, it looks like I hardly checked the IR and a ton of passes were left unnoticed making no sense of the tests :D. Sorry, fixed.
Oh, right. And I removed the extra -msan flags before running the tests. It means you were testing msan^3 before :)
This getNumOccurrences() check and the 3 checks below are unnecessary.