Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / native_client / tests / minsfi / sandbox_exit.c
1 /*
2  * Copyright (c) 2014 The Native Client Authors. All rights reserved.
3  * Use of this source code is governed by a BSD-style license that can be
4  * found in the LICENSE file.
5  */
6
7 #include <unistd.h>
8
9 /*
10  * This guest code is intentionally defined with _start returning an integer
11  * in order to test what happens if the sandbox does not exit with a syscall.
12  */
13 int _start(uint32_t info[]) {
14   if (info[0] == 1)
15     _exit(0xDEADC0DE);
16   else
17     return 0xDEADFA11;
18 }