com php-fuzzing-sapi: Disable Zend MM for fuzzing: fuzzer-sapi.c
| From: | Johannes Schlüter | Date: | Mon, 11 Mar 2019 22:53:54 +0000 |
| Subject: | com php-fuzzing-sapi: Disable Zend MM for fuzzing: fuzzer-sapi.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-105119@lists.php.net to get a copy of this message | ||
Commit: 30103cfdce2f07ec629b04d8cdd1d2547407471f
Author: Stanislav Malyshev <smalyshev@gmail.com> Mon, 11 Mar 2019 15:53:54 -0700
Parents: 69ffaf2606df66b33a522ce4f9757551c93a29d0
Branches: master
Link: http://git.php.net/?p=php-fuzzing-sapi.git;a=commitdiff;h=30103cfdce2f07ec629b04d8cdd1d2547407471f
Log:
Disable Zend MM for fuzzing
Ideally, we'd test it in both modes, but until then I think
it makes more sense to test in non-Zend mode as it will find
more bugs this way.
Changed paths:
M fuzzer-sapi.c
Diff:
diff --git a/fuzzer-sapi.c b/fuzzer-sapi.c
index 8e0c3a1..a303202 100644
--- a/fuzzer-sapi.c
+++ b/fuzzer-sapi.c
@@ -108,6 +108,8 @@ int fuzzer_init_php()
fuzzer_module.ini_entries = malloc(sizeof(HARDCODED_INI));
memcpy(fuzzer_module.ini_entries, HARDCODED_INI, sizeof(HARDCODED_INI));
+ putenv("USE_ZEND_ALLOC=0");
+
if (fuzzer_module.startup(&fuzzer_module)==FAILURE) {
return FAILURE;
}