aboutsummaryrefslogtreecommitdiffstats
path: root/executor/executor.cc
diff options
context:
space:
mode:
Diffstat (limited to 'executor/executor.cc')
-rw-r--r--executor/executor.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/executor/executor.cc b/executor/executor.cc
index f1f6ba294..bbbb2da31 100644
--- a/executor/executor.cc
+++ b/executor/executor.cc
@@ -119,6 +119,7 @@ static bool flag_enable_net_dev;
static bool flag_enable_net_reset;
static bool flag_enable_cgroups;
static bool flag_enable_binfmt_misc;
+static bool flag_enable_close_fds;
static bool flag_collect_cover;
static bool flag_dedup_cover;
@@ -454,6 +455,7 @@ void parse_env_flags(uint64 flags)
flag_enable_net_reset = flags & (1 << 9);
flag_enable_cgroups = flags & (1 << 10);
flag_enable_binfmt_misc = flags & (1 << 11);
+ flag_enable_close_fds = flags & (1 << 12);
}
#if SYZ_EXECUTOR_USES_FORK_SERVER
@@ -732,6 +734,10 @@ retry:
}
}
+#if SYZ_HAVE_CLOSE_FDS
+ close_fds();
+#endif
+
if (flag_collide && !flag_inject_fault && !colliding && !collide) {
debug("enabling collider\n");
collide = colliding = true;