mirror of
https://github.com/reactos/syzkaller.git
synced 2024-11-30 23:00:29 +00:00
98f4a9612d
Currently we have a global fixed set of sandboxes, which makes it hard to add new OS-specific ones (all OSes need to updated to say that they don't support this sandbox). Let it each OS say what sandboxes it supports instead.
36 lines
684 B
C
36 lines
684 B
C
// Copyright 2017 syzkaller project authors. All rights reserved.
|
|
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
|
|
|
// This file is shared between executor and csource package.
|
|
|
|
#include <ros/syscall.h>
|
|
#include <stdlib.h>
|
|
#include <unistd.h>
|
|
|
|
#if SYZ_EXECUTOR || SYZ_SANDBOX_NONE
|
|
static void loop();
|
|
static int do_sandbox_none(void)
|
|
{
|
|
loop();
|
|
doexit(0);
|
|
}
|
|
#endif
|
|
|
|
#if SYZ_EXECUTOR || SYZ_REPEAT
|
|
static void execute_one();
|
|
const char* program_name;
|
|
|
|
void child()
|
|
{
|
|
#if SYZ_EXECUTOR || SYZ_HANDLE_SEGV
|
|
install_segv_handler();
|
|
#endif
|
|
#if SYZ_EXECUTOR
|
|
receive_execute();
|
|
close(kInPipeFd);
|
|
#endif
|
|
execute_one();
|
|
doexit(0);
|
|
}
|
|
#endif
|