From: Fabian Keil <fk@fabiankeil.de>
Date: Mon, 29 May 2017 10:12:50 +0000 (+0000)
Subject: Make sure binaries with fuzzing support are used for fuzzing-related things
X-Git-Tag: v_3_0_27~146
X-Git-Url: http://www.privoxy.org/gitweb/@default-cgi@/faq/%22https:/user-manual/developer-manual/diff?a=commitdiff_plain;h=05b18a8cb1864e52703997c92c6831356ee2fa1c;p=privoxy.git

Make sure binaries with fuzzing support are used for fuzzing-related things

... and exit otherwise.

In case of fuzzing builds various data structures are static
which is unsafe when using threads.
---

diff --git a/jcc.c b/jcc.c
index dd8b7657..0dc75335 100644
--- a/jcc.c
+++ b/jcc.c
@@ -1,4 +1,4 @@
-const char jcc_rcs[] = "$Id: jcc.c,v 1.457 2017/05/25 11:17:21 fabiankeil Exp $";
+const char jcc_rcs[] = "$Id: jcc.c,v 1.458 2017/05/29 10:02:11 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/jcc.c,v $
@@ -3893,6 +3893,9 @@ int main(int argc, char **argv)
    {
       exit(process_fuzzed_input(fuzz_input_type, fuzz_input_file));
    }
+   log_error(LOG_LEVEL_FATAL,
+      "When compiled with fuzzing support, Privoxy should only be used for fuzzing. "
+      "Various data structures are static which is unsafe when using threads.");
 #endif
 
    if (do_config_test)