afl: add define to disable mgt threads

The inherent non-deterministic nature of the management threads
creates variable test cases.
pull/2002/merge
Victor Julien 9 years ago
parent b2695600ba
commit a42251d459

@ -221,6 +221,10 @@ static ConfNode *GetConfig(void) {
static void StatsInitCtx(void)
{
SCEnter();
#ifdef AFLFUZZ_DISABLE_MGTTHREADS
stats_enabled = FALSE;
SCReturn;
#endif
ConfNode *stats = GetConfig();
if (stats != NULL) {
const char *enabled = ConfNodeLookupChildValue(stats, "enabled");

@ -105,6 +105,9 @@ typedef struct FlowTimeoutCounters_ {
*/
void FlowDisableFlowManagerThread(void)
{
#ifdef AFLFUZZ_DISABLE_MGTTHREADS
return;
#endif
ThreadVars *tv = NULL;
int cnt = 0;
@ -708,6 +711,9 @@ static uint64_t FlowGetMemuse(void)
/** \brief spawn the flow manager thread */
void FlowManagerThreadSpawn()
{
#ifdef AFLFUZZ_DISABLE_MGTTHREADS
return;
#endif
intmax_t setting = 1;
(void)ConfGetInt("flow.managers", &setting);
@ -868,6 +874,9 @@ int FlowRecyclerReadyToShutdown(void)
/** \brief spawn the flow recycler thread */
void FlowRecyclerThreadSpawn()
{
#ifdef AFLFUZZ_DISABLE_MGTTHREADS
return;
#endif
intmax_t setting = 1;
(void)ConfGetInt("flow.recyclers", &setting);
@ -917,6 +926,9 @@ void FlowRecyclerThreadSpawn()
*/
void FlowDisableFlowRecyclerThread(void)
{
#ifdef AFLFUZZ_DISABLE_MGTTHREADS
return;
#endif
ThreadVars *tv = NULL;
int cnt = 0;

@ -229,6 +229,7 @@
#endif
#define AFLFUZZ_NO_RANDOM 1
#define AFLFUZZ_DISABLE_MGTTHREADS 1
/* we need this to stringify the defines which are supplied at compiletime see:
http://gcc.gnu.org/onlinedocs/gcc-3.4.1/cpp/Stringification.html#Stringification */

Loading…
Cancel
Save