X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fnative_client%2Fsrc%2Ftrusted%2Fservice_runtime%2Flinux%2Fnacl_signal_64.c;h=5e52892576c4469fd07b685ceb6c471ef8b1d640;hb=4a1a0bdd01eef90b0826a0e761d3379d3715c10f;hp=55ff7c6a3631ac4459270c5f69993736c14045fb;hpb=b1be5ca53587d23e7aeb77b26861fdc0a181ffd8;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/native_client/src/trusted/service_runtime/linux/nacl_signal_64.c b/src/native_client/src/trusted/service_runtime/linux/nacl_signal_64.c index 55ff7c6..5e52892 100644 --- a/src/native_client/src/trusted/service_runtime/linux/nacl_signal_64.c +++ b/src/native_client/src/trusted/service_runtime/linux/nacl_signal_64.c @@ -1,10 +1,11 @@ /* * Copyright 2010 The Native Client Authors. All rights reserved. - * Use of this source code is governed by a BSD-style license that can - * be found in the LICENSE file. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. */ #include +#include #include #include "native_client/src/trusted/service_runtime/nacl_signal.h" @@ -23,6 +24,8 @@ void NaClSignalContextFromHandler(struct NaClSignalContext *sig_ctx, const ucontext_t *uctx = (const ucontext_t *) raw_ctx; const mcontext_t *mctx = &uctx->uc_mcontext; + memset(sig_ctx, 0, sizeof(*sig_ctx)); + sig_ctx->prog_ctr = mctx->gregs[REG_RIP]; sig_ctx->stack_ptr = mctx->gregs[REG_RSP];