/*
* Copyright 2012 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 <signal.h>
+#include <string.h>
#include <sys/ucontext.h>
#include "native_client/src/trusted/service_runtime/nacl_signal.h"
ucontext_t *uctx = (ucontext_t *) raw_ctx;
mcontext_t *mctx = &uctx->uc_mcontext;
+ memset(sig_ctx, 0, sizeof(*sig_ctx));
+
sig_ctx->prog_ctr = mctx->pc;
sig_ctx->zero = mctx->gregs[0];