diff options
author | SaeHie Park <saehie.park@gmail.com> | 2017-02-16 17:50:08 +0900 |
---|---|---|
committer | Jan Vorlicek <janvorli@microsoft.com> | 2017-02-16 09:50:08 +0100 |
commit | f8e6123ca24475cff7d78ff234c2cfd67e9e9772 (patch) | |
tree | 9ad08d0a8ef96701baf0f05d2417b92f28986111 /src/vm/excep.cpp | |
parent | a9b25d4aa22a1f4ad5f323f6c826e318f5a720fe (diff) | |
download | coreclr-f8e6123ca24475cff7d78ff234c2cfd67e9e9772.tar.gz coreclr-f8e6123ca24475cff7d78ff234c2cfd67e9e9772.tar.bz2 coreclr-f8e6123ca24475cff7d78ff234c2cfd67e9e9772.zip |
[x86/Linux] Fix IsIPInMarkedJitHelper to handle sigsegv (#9605)
Include JIT_WriteBarrier and JIT_CheckedWriteBarrier functions
so that we can handle NullReferenceException for sigsegv from WriteBarriers.
Diffstat (limited to 'src/vm/excep.cpp')
-rw-r--r-- | src/vm/excep.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/vm/excep.cpp b/src/vm/excep.cpp index 7fca6f02e7..a9c38eee2f 100644 --- a/src/vm/excep.cpp +++ b/src/vm/excep.cpp @@ -7072,6 +7072,11 @@ bool IsIPInMarkedJitHelper(UINT_PTR uControlPc) CHECK_RANGE(JIT_WriteBarrier) CHECK_RANGE(JIT_CheckedWriteBarrier) +#else +#ifdef FEATURE_PAL + CHECK_RANGE(JIT_WriteBarrierGroup) + CHECK_RANGE(JIT_PatchedWriteBarrierGroup) +#endif // FEATURE_PAL #endif // _TARGET_X86_ #if defined(_TARGET_AMD64_) && defined(_DEBUG) @@ -7097,8 +7102,8 @@ AdjustContextForWriteBarrier( #if defined(_TARGET_X86_) && !defined(PLATFORM_UNIX) void* f_IP = (void *)GetIP(pContext); - if (((f_IP >= (void *) JIT_WriteBarrierStart) && (f_IP <= (void *) JIT_WriteBarrierLast)) || - ((f_IP >= (void *) JIT_PatchedWriteBarrierStart) && (f_IP <= (void *) JIT_PatchedWriteBarrierLast))) + if (((f_IP >= (void *) JIT_WriteBarrierGroup) && (f_IP <= (void *) JIT_WriteBarrierGroup_End)) || + ((f_IP >= (void *) JIT_PatchedWriteBarrierGroup) && (f_IP <= (void *) JIT_PatchedWriteBarrierGroup_End))) { // set the exception IP to be the instruction that called the write barrier void* callsite = (void *)GetAdjustedCallAddress(*dac_cast<PTR_PCODE>(GetSP(pContext))); |