From 4f4c106e98f85b8e1dd03e9fcfeef9710668b023 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Wed, 14 Jun 2023 17:30:52 +0200 Subject: executor: move setup_ext() below other features It makes these extentions much more flexible as they can now also customize what other features set up. --- executor/common.h | 7 +++---- executor/executor.cc | 8 ++++---- 2 files changed, 7 insertions(+), 8 deletions(-) (limited to 'executor') diff --git a/executor/common.h b/executor/common.h index 32df69001..5f042d1ec 100644 --- a/executor/common.h +++ b/executor/common.h @@ -815,9 +815,6 @@ int main(void) /*{{{MMAP_DATA}}}*/ #endif -#if SYZ_HAVE_SETUP_EXT - setup_ext(); -#endif #if SYZ_SYSCTL setup_sysctl(); #endif @@ -842,10 +839,12 @@ int main(void) #if SYZ_802154 setup_802154(); #endif - #if SYZ_HANDLE_SEGV install_segv_handler(); #endif +#if SYZ_HAVE_SETUP_EXT + setup_ext(); +#endif #if SYZ_MULTI_PROC for (procid = 0; procid < /*{{{PROCS}}}*/; procid++) { if (fork() == 0) { diff --git a/executor/executor.cc b/executor/executor.cc index b2e24f46b..3d6d8f1b8 100644 --- a/executor/executor.cc +++ b/executor/executor.cc @@ -1638,13 +1638,13 @@ void setup_features(char** enable, int n) // This does any one-time setup for the requested features on the machine. // Note: this can be called multiple times and must be idempotent. flag_debug = true; -#if SYZ_HAVE_SETUP_EXT - // This can be defined in common_ext.h. - setup_ext(); -#endif #if SYZ_HAVE_FEATURES setup_sysctl(); setup_cgroups(); +#endif +#if SYZ_HAVE_SETUP_EXT + // This can be defined in common_ext.h. + setup_ext(); #endif for (int i = 0; i < n; i++) { bool found = false; -- cgit mrf-deployment