about summary refs log tree commit diff
path: root/instrumentation/afl-gcc-pass.so.cc
diff options
context:
space:
mode:
authorrapt0r <goktugserez@gmail.com>2024-10-19 22:19:41 +0900
committerrapt0r <goktugserez@gmail.com>2024-10-19 22:19:41 +0900
commitc1d9a4fab9b652a0ea810086ce064ec3836c7bd9 (patch)
treeb94b61c2546264ca2dee2fc174506b659cef721a /instrumentation/afl-gcc-pass.so.cc
parent8a060a4b68a0aa1c812916bcbcf4bf3424854124 (diff)
downloadafl++-c1d9a4fab9b652a0ea810086ce064ec3836c7bd9.tar.gz
feat: introduce GCC disable environment variable
This change is to disable the GCC plugin version check for
GCC plugin and CMPLOG, to overcome the issues with incompatability
with expected GCC version and actual GCC version used to compile
using `AFL_GCC_DISABLE_VERSION_CHECK` environment variable.
Diffstat (limited to 'instrumentation/afl-gcc-pass.so.cc')
-rw-r--r--instrumentation/afl-gcc-pass.so.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/instrumentation/afl-gcc-pass.so.cc b/instrumentation/afl-gcc-pass.so.cc
index 41b1e5af..26f7bd19 100644
--- a/instrumentation/afl-gcc-pass.so.cc
+++ b/instrumentation/afl-gcc-pass.so.cc
@@ -478,7 +478,8 @@ Specify -frandom-seed for reproducible instrumentation.\n\
 int plugin_init(struct plugin_name_args   *info,
                 struct plugin_gcc_version *version) {
 
-  if (!plugin_default_version_check(version, &gcc_version))
+  if (!plugin_default_version_check(version, &gcc_version) &&
+      !getenv("AFL_GCC_DISABLE_VERSION_CHECK"))
     FATAL(G_("GCC and plugin have incompatible versions, expected GCC %s, "
              "is %s"),
           gcc_version.basever, version->basever);