[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 2/2] fuzz/libelf: exit with fuzzer function return value



Now the function can return nonzero value. Use that value as exit code
for the stub program. AFL might be able to use such information to
optimise fuzzing process.

Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 tools/fuzz/libelf/afl-libelf-fuzzer.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/tools/fuzz/libelf/afl-libelf-fuzzer.c 
b/tools/fuzz/libelf/afl-libelf-fuzzer.c
index b5668c11e7..02cbfb0e2c 100644
--- a/tools/fuzz/libelf/afl-libelf-fuzzer.c
+++ b/tools/fuzz/libelf/afl-libelf-fuzzer.c
@@ -42,9 +42,7 @@ int main(int argc, char **argv)
 
     fclose(fp);
 
-    LLVMFuzzerTestOneInput(input, size);
-
-    return 0;
+    return LLVMFuzzerTestOneInput(input, size);
 }
 
 /*
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.