-
Resolve MSan symbols dynamically · 47c3ca10Nicolas Capens authored
Runtime symbols referenced by MemorySanitizer instrumentation (e.g. __msan_warning_noreturn) reside in the executable and are exported from it (i.e. __attribute__((visibility("default"))). They can be resolved using dlsym(RTLD_DEFAULT). This works for either an executable or shared library using Reactor. Note that this differs from our regular symbol Resolver approach which lists pairs of symbol names and addresses. There is no public header which declares these MSan symbols, and if we list symbols only available in a newer version of LLVM's compiler-rt, the executable won't link or the shared library won't load. This change has no effect at this point. A later change will enable MemorySanitizer intrumentation for Reactor routines. Bug: b/155148722 Change-Id: I4601e499a2bf7073dbdd68679b74518500ebe217 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/49848Reviewed-by:Antonio Maiorano <amaiorano@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com>
47c3ca10
×