Commit
dc8cbfa4
authored
by
Committed by
swiftshader-scoped@luci-project-accounts.iam.gserviceaccount.com
Determine MSan instrumentation for Reactor at run-time
Previously the REACTOR_ENABLE_MEMORY_SANITIZER_INSTRUMENTATION macro
definition controlled whether we compiled the code for properly
instrumenting Reactor routines with the MemorySanitizer LLVM pass, or
compile the code to unpoison all memory writes.
This change makes us compile the code for both options, and select
between the two at run-time. Currently this has no net effect, but it
will allow selectively enabling MSan instrumentation to be done even
when REACTOR_ENABLE_MEMORY_SANITIZER_INSTRUMENTATION is not defined (or
false). Thus the define now means enabling instrumentation to always be
performed. This way we'll be able to gradually enable more use of
MSan instrumentation, where not already enforced by the build define.
The ReactorUnitTests.Uninitialized test was changed to only run on build
that have REACTOR_ENABLE_MEMORY_SANITIZER_INSTRUMENTATION set, since it
already assumed MSan builds to always have instrumentation enabled.
Bug: b/188205704
Change-Id: I54056ddc9b1d55fabbde6ae0f02d6c8cea3afad6
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/54888
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Tested-by:
Nicolas Capens <nicolascapens@google.com>
Presubmit-Ready: Nicolas Capens <nicolascapens@google.com>
Reviewed-by:
Alexis Hétu <sugoi@google.com>
Commit-Queue: Nicolas Capens <nicolascapens@google.com>
Showing
Please
register
or
sign in
to comment