mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-15 19:38:09 +00:00
Export set afl_environment_variables to stats
This commit is contained in:
@ -1035,6 +1035,7 @@ without feedback, bug reports, or patches from:
|
|||||||
Andrea Biondo Vincent Le Garrec
|
Andrea Biondo Vincent Le Garrec
|
||||||
Khaled Yakdan Kuang-che Wu
|
Khaled Yakdan Kuang-che Wu
|
||||||
Josephine Calliotte Konrad Welc
|
Josephine Calliotte Konrad Welc
|
||||||
|
Thomas Rooijakkers
|
||||||
```
|
```
|
||||||
|
|
||||||
Thank you!
|
Thank you!
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "afl-fuzz.h"
|
#include "afl-fuzz.h"
|
||||||
|
#include "envs.h"
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
/* Update stats file for unattended monitoring. */
|
/* Update stats file for unattended monitoring. */
|
||||||
@ -163,11 +164,28 @@ void write_stats_file(afl_state_t *afl, double bitmap_cvg, double stability,
|
|||||||
? ""
|
? ""
|
||||||
: "default",
|
: "default",
|
||||||
afl->orig_cmdline);
|
afl->orig_cmdline);
|
||||||
|
|
||||||
|
char * val;
|
||||||
|
uint32_t i = 0;
|
||||||
|
uint32_t s_afl_env =
|
||||||
|
sizeof(afl_environment_variables) / sizeof(afl_environment_variables[0]) -
|
||||||
|
1;
|
||||||
|
|
||||||
|
for (i = 0; i < s_afl_env; i++) {
|
||||||
|
|
||||||
|
if ((val = get_afl_env(afl_environment_variables[i])) != NULL) {
|
||||||
|
|
||||||
|
fprintf(f, "%-18.*s: %s\n", strlen(afl_environment_variables[i]),
|
||||||
|
afl_environment_variables[i], val);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/* ignore errors */
|
/* ignore errors */
|
||||||
|
|
||||||
if (afl->debug) {
|
if (afl->debug) {
|
||||||
|
|
||||||
uint32_t i = 0;
|
|
||||||
fprintf(f, "virgin_bytes :");
|
fprintf(f, "virgin_bytes :");
|
||||||
for (i = 0; i < afl->fsrv.map_size; i++) {
|
for (i = 0; i < afl->fsrv.map_size; i++) {
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user