summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCHUNSEOK LEE <chunseok.lee@samsung.com>2017-08-02 09:02:14 +0900
committerCHUNSEOK LEE <chunseok.lee@samsung.com>2017-08-04 10:37:09 +0900
commit710f09e6bbc8bcb6894fdd69949806d22eb888d0 (patch)
treea018e6e1689725023e46856729c77dd5e855ba14
parentbba3789fa1b275a4bb544c87eb7979b8cdd2523d (diff)
downloadcoreclr-710f09e6bbc8bcb6894fdd69949806d22eb888d0.tar.gz
coreclr-710f09e6bbc8bcb6894fdd69949806d22eb888d0.tar.bz2
coreclr-710f09e6bbc8bcb6894fdd69949806d22eb888d0.zip
callsignalhandlerwrapper patch
Change-Id: I38630f9d02733aab5890b46afda39fd6e45461db
-rw-r--r--src/pal/src/arch/arm/callsignalhandlerwrapper.S10
-rw-r--r--src/pal/src/arch/arm/signalhandlerhelper.cpp2
2 files changed, 8 insertions, 4 deletions
diff --git a/src/pal/src/arch/arm/callsignalhandlerwrapper.S b/src/pal/src/arch/arm/callsignalhandlerwrapper.S
index 266e4fdfe9..b6288c4dd6 100644
--- a/src/pal/src/arch/arm/callsignalhandlerwrapper.S
+++ b/src/pal/src/arch/arm/callsignalhandlerwrapper.S
@@ -18,12 +18,14 @@ C_FUNC(SignalHandlerWorkerReturnOffset\Alignment):
// address set to SignalHandlerWorkerReturn during SIGSEGV handling.
// It enables the unwinder to unwind stack from the handling code to the actual failure site.
NESTED_ENTRY CallSignalHandlerWrapper\Alignment, _TEXT, NoHandler
- sub sp, sp, #(8 + \Alignment) // red zone + alignment
- stmfd sp!, {r7, lr}
+ alloc_stack (8 + \Alignment)
+// PROLOG_PUSH "{r7, lr}"
+ .save {r7, r11, lr, pc}
bl EXTERNAL_C_FUNC(signal_handler_worker)
LOCAL_LABEL(SignalHandlerWorkerReturn\Alignment):
- ldmfd sp!, {r7, lr}
- bx lr
+// EPILOG_POP "{r7, lr}"
+// free_stack (8 + \Alignment)
+// bx lr
NESTED_END CallSignalHandlerWrapper\Alignment, _TEXT
.endm
diff --git a/src/pal/src/arch/arm/signalhandlerhelper.cpp b/src/pal/src/arch/arm/signalhandlerhelper.cpp
index e1ad460905..3936204af6 100644
--- a/src/pal/src/arch/arm/signalhandlerhelper.cpp
+++ b/src/pal/src/arch/arm/signalhandlerhelper.cpp
@@ -48,7 +48,9 @@ void ExecuteHandlerOnOriginalStack(int code, siginfo_t *siginfo, void *context,
// Build fake stack frame to enable the stack unwinder to unwind from signal_handler_worker to the faulting instruction
// pushed LR
*--sp = (size_t)MCREG_Pc(ucontext->uc_mcontext);
+ *--sp = (size_t)MCREG_Lr(ucontext->uc_mcontext);
// pushed frame pointer
+ *--sp = (size_t)MCREG_R11(ucontext->uc_mcontext);
*--sp = (size_t)MCREG_R7(ucontext->uc_mcontext);
// Switch the current context to the signal_handler_worker and the original stack