This is a part of https://reviews.llvm.org/D95835.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
How many patches are left for origin tracking?
When can we start adding end-to-end tests in compiler-rt?
llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp | ||
---|---|---|
211–212 | ||
610 | Do we need this function at all? Maybe just inline the increment at the one place we do it. | |
658 | ||
660 | ||
2269 | Do we still need to do an intptr cast here? | |
2276 | I think these names would be clearer. | |
2289 | ||
2313 | We no longer honor ClPreserveAlignment here. TBH I don't know what the original purpose of the flag is, but why are we OK to remove this? | |
2319 | ||
2495–2497 | Nit | |
llvm/test/Instrumentation/DataFlowSanitizer/origin_ldst.ll | ||
294 | This is a dangling pointer to p. In real code this would be a bug. I'm not sure if its undefined behavior or not; if it is, the compiler could optimize the "escape" away. |
We are able to add end-to-end tests after this one because ld/st are common.
After this one, the left patches are
- adding origin tracking report and the set of end-to-end tests the current instrumentation can support
- support phi and memory transfer instructions
- those custom function extensions to support origin. This could be split into 2-3.
llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp | ||
---|---|---|
610 | removed the function. | |
2269 | Just checked DataLayout::getIntPtrType from llvm/lib/IR/DataLayout.cpp. It returns an int type. | |
2313 | We moved this into getShadowAlign. So both load and store, and other related code can share them. | |
llvm/test/Instrumentation/DataFlowSanitizer/origin_ldst.ll | ||
294 | Thank you. Replaced ret %p by foo(%p). |
llvm/test/Instrumentation/DataFlowSanitizer/origin_ldst.ll | ||
---|---|---|
306 | Do these have to be exact? If we abstract them to [[#ADDR]] it will be easier to support fast8 later or other layout changes. |
llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp | ||
---|---|---|
2498 | For this function, Origin is really an optional argument (as it's just a nullptr when origin tracking is not enabled). | |
llvm/test/Instrumentation/DataFlowSanitizer/origin_ldst.ll | ||
385–396 | Are these expectations exhaustive? Or are there missing lines? In the first case, adding the -NEXT part should be straightforward. |
update test cases
llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp | ||
---|---|---|
2498 | This name is consistent with other function names that operate on both shadow and origins. | |
llvm/test/Instrumentation/DataFlowSanitizer/origin_ldst.ll | ||
385–396 | Added NEXT for most cases. These names help read the IR to understand which are origins and shadows, and operations on them at IR level. |