diff options
author | Vyacheslav Cherkashin <v.cherkashin@samsung.com> | 2019-07-22 13:40:47 +0300 |
---|---|---|
committer | Dongkyun Son <dongkyun.s@samsung.com> | 2019-09-30 13:47:50 +0900 |
commit | aac6bc6d2253639ef7c13a1b8220d084e455744d (patch) | |
tree | e4cf24b69960ddaf4c09d18c98aa9f3c852231e3 /src/vm/dllimport.cpp | |
parent | 0ed411ea39a56e43247a7506d9c0fff68386058a (diff) | |
download | coreclr-aac6bc6d2253639ef7c13a1b8220d084e455744d.tar.gz coreclr-aac6bc6d2253639ef7c13a1b8220d084e455744d.tar.bz2 coreclr-aac6bc6d2253639ef7c13a1b8220d084e455744d.zip |
[Tizen] Implement ASan wrapper for Linux ARM32
This commit implements wrappers that allow interception transitions
from managed to external unmanaged code (CIL -> native) and back
(native -> CIL). This allows enable/disable ASan during transitions.
Due to this, we sanitize only external code, which allows us to
achieve acceptable performance.
Change-Id: I53ecdc14d28f7210cd9e7f5bd4db0c8ef5ed81fc
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
Diffstat (limited to 'src/vm/dllimport.cpp')
-rw-r--r-- | src/vm/dllimport.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/vm/dllimport.cpp b/src/vm/dllimport.cpp index eed690454d..3946f8fbda 100644 --- a/src/vm/dllimport.cpp +++ b/src/vm/dllimport.cpp @@ -46,6 +46,10 @@ #include "compile.h" #endif // FEATURE_PREJIT +#ifdef TIZEN_ASAN_ENVIRONMENT +#include <tizenasanenv.h> +#endif // TIZEN_ASAN_ENVIRONMENT + #include "eventtrace.h" #include "clr/fs/path.h" using namespace clr::fs; @@ -6696,6 +6700,13 @@ VOID NDirect::NDirectLink(NDirectMethodDesc *pMD) LPVOID pvTarget = NDirectGetEntryPoint(pMD, hmod); if (pvTarget) { +#ifdef TIZEN_ASAN_ENVIRONMENT + if (PAL_IsSanitizedLibraryDirect(hmod)) + { + pvTarget = TizenASanEnv::CreateWrapperSanitizedEntryPoint(pvTarget); + } +#endif // TIZEN_ASAN_ENVIRONMENT + pMD->SetNDirectTarget(pvTarget); fSuccess = TRUE; } |