Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1224)

Unified Diff: src/trusted/service_runtime/posix/nacl_signal.c

Issue 12460003: [MIPS] Leave room for frame header on stack for MIPS arch (Closed) Base URL: http://git.chromium.org/native_client/src/native_client.git@master
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/trusted/service_runtime/posix/nacl_signal.c
diff --git a/src/trusted/service_runtime/posix/nacl_signal.c b/src/trusted/service_runtime/posix/nacl_signal.c
index 4ce545deaf9afa0778a68d7593158ace3708b712..58abbb1984ee2a7db7217a8164aac740e1e0dc4d 100644
--- a/src/trusted/service_runtime/posix/nacl_signal.c
+++ b/src/trusted/service_runtime/posix/nacl_signal.c
@@ -271,7 +271,8 @@ static int DispatchToUntrustedHandler(struct NaClAppThread *natp,
regs->return_addr = kReturnAddr;
regs->a0 = context_user_addr;
regs->prog_ctr = NaClUserToSys(nap, nap->exception_handler);
- regs->stack_ptr = NaClUserToSys(nap, new_stack_ptr);
+ regs->stack_ptr = NaClUserToSys(nap, new_stack_ptr) - NACL_STACK_ARG_SIZE;
Mark Seaborn 2013/03/06 00:26:58 The adjustment should be applied before NaClUserTo
petarj 2013/03/07 14:52:48 Done, I added the adjustment just after the alignm
+ regs->t9 = regs->prog_ctr;
Mark Seaborn 2013/03/06 00:26:58 Can you add a comment? e.g. "PIC functions assume
petarj 2013/03/07 14:52:48 Done.
#else
# error Unsupported architecture
#endif

Powered by Google App Engine
This is Rietveld 408576698