Bug P2
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: SwiftShader
Branch: master
commit 0296680c782c0da62744cad6d5ab545602a8e548
Author: Nicolas Capens <capn@google.com>
Date: Tue Aug 02 00:24:26 2022
Strip only the leading underscore from Mach-O symbols
LLVM prepends an underscore to all Mach-O (Apple) symbols. Previously
we stripped all leading underscores, including ones part of the
function's actual name.
This change will make it possible to support AddressSanitizer
instrumentation, which calls functions such as __asan_report_load_n
which need to be resolved from the dynamically linked runtime.
Bug: b/240465596
Change-Id: If1674f4a44ba36f3571d05bcb9ba518962686351
Reviewed-on:https://swiftshader-review.googlesource.com/c/SwiftShader/+/67188
Reviewed-by: Alexis Hétu <sugoi@google.com>
Commit-Queue: Nicolas Capens <nicolascapens@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
M src/Reactor/LLVMJIT.cpp
https://swiftshader-review.googlesource.com/67188
Branch: master
commit 0296680c782c0da62744cad6d5ab545602a8e548
Author: Nicolas Capens <capn@google.com>
Date: Tue Aug 02 00:24:26 2022
Strip only the leading underscore from Mach-O symbols
LLVM prepends an underscore to all Mach-O (Apple) symbols. Previously
we stripped all leading underscores, including ones part of the
function's actual name.
This change will make it possible to support AddressSanitizer
instrumentation, which calls functions such as __asan_report_load_n
which need to be resolved from the dynamically linked runtime.
Bug:
Change-Id: If1674f4a44ba36f3571d05bcb9ba518962686351
Reviewed-on:
Reviewed-by: Alexis Hétu <sugoi@google.com>
Commit-Queue: Nicolas Capens <nicolascapens@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
M src/Reactor/LLVMJIT.cpp
ap...@google.com <ap...@google.com> #3
Project: SwiftShader
Branch: master
commit a07b3fb6b3bd47be49c0c3879475d25452b22106
Author: Nicolas Capens <capn@google.com>
Date: Thu Jul 28 04:18:58 2022
Support AddressSanitizer instrumentation of LLVM JIT routines
The instrumentation produces helpful crash reports and detects more
issues.
This is expected to cause a 2x slowdown on average.
Bug: b/240465596
Change-Id: I8861a51344866c646580763cbd0c7a491143dbf9
Reviewed-on:https://swiftshader-review.googlesource.com/c/SwiftShader/+/67128
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
M src/Reactor/LLVMReactor.cpp
M third_party/llvm-10.0/CMakeLists.txt
M third_party/llvm-10.0/Android.bp
M src/Reactor/LLVMJIT.cpp
M third_party/llvm-10.0/BUILD.gn
https://swiftshader-review.googlesource.com/67128
Branch: master
commit a07b3fb6b3bd47be49c0c3879475d25452b22106
Author: Nicolas Capens <capn@google.com>
Date: Thu Jul 28 04:18:58 2022
Support AddressSanitizer instrumentation of LLVM JIT routines
The instrumentation produces helpful crash reports and detects more
issues.
This is expected to cause a 2x slowdown on average.
Bug:
Change-Id: I8861a51344866c646580763cbd0c7a491143dbf9
Reviewed-on:
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
M src/Reactor/LLVMReactor.cpp
M third_party/llvm-10.0/CMakeLists.txt
M third_party/llvm-10.0/Android.bp
M src/Reactor/LLVMJIT.cpp
M third_party/llvm-10.0/BUILD.gn
ap...@google.com <ap...@google.com> #4
Project: SwiftShader
Branch: master
commit aafa10869568fd3e84bfef1df2ed0e159b179dce
Author: Nicolas Capens <capn@google.com>
Date: Thu Aug 04 13:40:58 2022
Disable AddressSanitizer JIT instrumentation support on Windows
When compiling with Clang on Windows, __has_feature(address_sanitizer)
is true for asan enabled builds. This caused us to try to include
<dlfcn.h> and use dlsym(), which is UNIX specific, for looking up
symbols in the asan runtime for use by the LLVM JIT instrumentation.
While it should be feasible to do the equivalent on Windows by using
GetProcAddress(), for now just disable asan instrumentation of JIT-
compiled code on Windows to fix the asan Clang build.
Instrumentation of static code (C++) is unaffected.
Bug: b/240465596
Change-Id: Ibeee6dcdc233c9d43dd0dfd30ac6c8c12ec3711d
Reviewed-on:https://swiftshader-review.googlesource.com/c/SwiftShader/+/67308
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
M src/Reactor/LLVMJIT.cpp
https://swiftshader-review.googlesource.com/67308
Branch: master
commit aafa10869568fd3e84bfef1df2ed0e159b179dce
Author: Nicolas Capens <capn@google.com>
Date: Thu Aug 04 13:40:58 2022
Disable AddressSanitizer JIT instrumentation support on Windows
When compiling with Clang on Windows, __has_feature(address_sanitizer)
is true for asan enabled builds. This caused us to try to include
<dlfcn.h> and use dlsym(), which is UNIX specific, for looking up
symbols in the asan runtime for use by the LLVM JIT instrumentation.
While it should be feasible to do the equivalent on Windows by using
GetProcAddress(), for now just disable asan instrumentation of JIT-
compiled code on Windows to fix the asan Clang build.
Instrumentation of static code (C++) is unaffected.
Bug:
Change-Id: Ibeee6dcdc233c9d43dd0dfd30ac6c8c12ec3711d
Reviewed-on:
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
M src/Reactor/LLVMJIT.cpp
Description
While AddressSanitizer does not strictly require instrumenting all code ( the way MemorySanitizer does ), it would still be valuable to instrument Reactor's dynamically generated code because it produces crash reports with details about the symptoms and potentially useful debugging information. It also checks for conditions which otherwise don't necessarily result in a crash.