Chromium Code Reviews| 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 |