This came up as recommendation while reviewing D112098.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Yep, removed FUNCTION_PASS_WITH_PARAMS("asan", must affect some tests
| llvm/include/llvm/Transforms/Instrumentation/AddressSanitizer.h | ||
|---|---|---|
| 107 | please run check-all | |
| llvm/lib/Passes/PassRegistry.def | ||
| 396 | you should also rename MODULE_PASS_WITH_PARAMS("asan-module", to just MODULE_PASS_WITH_PARAMS("asan", | |
| llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp | ||
|---|---|---|
| 1318 | At first I had module sanitizer run first, but some tests failed. Is it possible that the function pass has some side effects, which are used by the module pass? | |
| 2860 | This was a pain to figure out. Maybe we should apply the same check in HWAsan? | |
| llvm/include/llvm/Transforms/Instrumentation/AddressSanitizer.h | ||
|---|---|---|
| 92 | Adding it back in as discussed offline. | |
| llvm/lib/Passes/PassRegistry.def | ||
| 139 | I must have reverted by an accident. Should be done now. | |
| 146 | I think parseModuleAddressSanitizerPassOptions does exactly the same thing as parseASanPassOptions, which is to look for the "kernel" param. | |
Lets keep AddressSanitizerPass for a while, we don't have to remove it in the same patch
| llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp | ||
|---|---|---|
| 1318 | That's OK. NewPMDriver.cpp was wrong, BackendUtil.cpp was wrong if we put module in-front of function the following with disable globals instrumentation: if (G && (!ClInitializers || GlobalIsLinkerInitialized(G)) &&
isSafeAccess(ObjSizeVis, Addr, O.TypeSize)) { | |
| 2860 | I looks like should be the first "if" in the function | |
| clang/lib/CodeGen/BackendUtil.cpp | ||
|---|---|---|
| 1189 | I'm seeing build errors here, and I'm not sure what this is supposed to be? /home/rupprecht/src/llvm-project/clang/lib/CodeGen/BackendUtil.cpp:1189:37: error: use of undeclared identifier 'ModuleUseAfterScope'; did you mean 'UseAfterScope'?
CompileKernel, Recover, ModuleUseAfterScope, UseOdrIndicator,
^~~~~~~~~~~~~~~~~~~
UseAfterScope | |
| clang/lib/CodeGen/BackendUtil.cpp | ||
|---|---|---|
| 1189 | I see it was reverted already, sorry! | |
| clang/lib/CodeGen/BackendUtil.cpp | ||
|---|---|---|
| 1189 | Sorry about breaking the build. I can't understand how my local tests passed. Functions with a long list of boolean params are so error prone. The downside of not using the builder pattern :-( | |
can we rename "asan-module" to "asan" after this change? and remove the extra "asan-pipeline"/"asan-function-pipeline" parsing callbacks in NewPMDriver.cpp? and previously we had -passes=require<asan-globals-md> because a function pass couldn't invoke a module analysis, but that's no longer relevant, so cleaning those up from RUN lines would also be good
| llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp | ||
|---|---|---|
| 1318 | Fixing typo in the comment.
NewPMDriver.cpp was correct, BackendUtil.cpp was wrong | |
That was idea, but I changed my mind and recommended to do that in a separate patch.
I'm seeing build errors here, and I'm not sure what this is supposed to be?
/home/rupprecht/src/llvm-project/clang/lib/CodeGen/BackendUtil.cpp:1189:37: error: use of undeclared identifier 'ModuleUseAfterScope'; did you mean 'UseAfterScope'? CompileKernel, Recover, ModuleUseAfterScope, UseOdrIndicator, ^~~~~~~~~~~~~~~~~~~ UseAfterScopehttps://buildkite.com/llvm-project/upstream-bazel-rbe/builds/11193#bbebbf99-a2c1-4959-b6f7-f7fb816591c0