diff options
author | Joshua Rogers <jrogers@opera.com> | 2021-04-02 22:23:11 +0000 |
---|---|---|
committer | Joshua Rogers <jrogers@opera.com> | 2021-04-02 22:23:11 +0000 |
commit | 920e9402a4d6101bbbed2ef7584d85a3c3de0eaa (patch) | |
tree | c8d8a258835b09099a30d9302ef0a9114a3ecae2 /include | |
parent | e98cd008222aa3bfea9b696ad756163302437eb3 (diff) | |
download | afl++-920e9402a4d6101bbbed2ef7584d85a3c3de0eaa.tar.gz |
Add support for standalone leak-sanitizer, introducting the environment
variable AFL_USE_LSAN. AFL_USE_LSAN introduces the macro __AFL_CHECK_LEAK() which will check for a memory leak when the macro is run. This is especially helpful when using __AFL_LOOP(). If __AFL_LEAK_CHECK() is not used when AFL_USE_LSAN=1 is set, the leak checker will run when the program exits.
Diffstat (limited to 'include')
-rw-r--r-- | include/config.h | 4 | ||||
-rw-r--r-- | include/envs.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h index 29225f6b..6490a5fe 100644 --- a/include/config.h +++ b/include/config.h @@ -393,6 +393,10 @@ #define MSAN_ERROR 86 +/* Distinctive exit code used to indicate LSAN trip condition: */ + +#define LSAN_ERROR 23 + /* Designated file descriptors for forkserver commands (the application will use FORKSRV_FD and FORKSRV_FD + 1): */ diff --git a/include/envs.h b/include/envs.h index 2ce50be7..d1856c50 100644 --- a/include/envs.h +++ b/include/envs.h @@ -172,6 +172,7 @@ static char *afl_environment_variables[] = { "AFL_USE_TRACE_PC", "AFL_USE_UBSAN", "AFL_USE_CFISAN", + "AFL_USE_LSAN", "AFL_WINE_PATH", "AFL_NO_SNAPSHOT", "AFL_EXPAND_HAVOC_NOW", |