This patch starts a series of changes dedicated to adding support for targets that do not have hardware memory managers.
D30583 contains the overview patch for this work.
Differential D31395
[Asan] Disable inline instrumentation for MMU-less targets kosarev on Mar 27 2017, 6:30 AM. Authored by
Details
Diff Detail
Event TimelineComment Actions You can use -asan-instrumentation-with-call-threshold=0 for this without any changes to llvm. Comment Actions If the only thing you'll want to do with kUseSoftwareMemoryManager is to always emit calls, then you should use what @dvyukov mentioned: -asan-instrumentation-with-call-threshold=0
Comment Actions Indeed there's no need to introduce a special clang build. Thanks for pointing out. Updated. Comment Actions Is this something orthogonal to the target triple? Can you know if it's an MMU-less target from the triple?
Comment Actions It seems to be orthogonal to the architecture and vendor fields and we can probably deduce presence of MMU from the OS and environment fields of the triple. For development and testing purposes, however, we still would need a cmake-level option that makes it possible to build and run Asan tests with the software memory manager enabled on Linux and other platforms that do have MMU. Comment Actions I don't like adding a new configuration option, but the argument about testing the no-MMU code paths in an MMU environment makes sense (*assuming* those code paths make sense in that environment).
Comment Actions Yes, we are planning establishing a buildbot at some point later when there is more of the no-MMU specific code to maintain. Comment Actions I have no problems with this patch (assuming the rest of the patches will follow), but double-check that @kcc is ok with it (I haven't been paying too much attention to the discussion thread, sorry). Comment Actions I was on vacation/ooo, sorry for delays. LGTM (assuming the new option is for testing on linux) Comment Actions Yes, I can commit it, thanks. I just thought that we probably should postpone committing it until we know we can do the rest in a form suitable for putting to mainline. Comment Actions Dmitry, with your permission I'm going to update and commit this patch as it seems to be useful regardless of which way we support sanitizers on MMU-less platforms. One more thing: now that D31592 is landed, would you mind if we do the same for Tsan? Thanks. Comment Actions
If you plan to continue working on this, I think it's fine. Comment Actions
In general getting rid of the reverse mapping is positive. |
That option's name + what it does isn't what the string says.