Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Side by Side Diff: third_party/afl/src/qemu_mode/patches/elfload.diff

Issue 2075883002: Add American Fuzzy Lop (afl) to third_party/afl/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nits Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 --- qemu-2.3.0/linux-user/elfload.c.orig 2014-12-09 14:45:42.000000000 +0 000
2 +++ qemu-2.3.0/linux-user/elfload.c 2015-01-28 02:51:23.719000000 +0000
3 @@ -28,6 +28,8 @@
4
5 #define ELF_OSABI ELFOSABI_SYSV
6
7 +extern abi_ulong afl_entry_point, afl_start_code, afl_end_code;
8 +
9 /* from personality.h */
10
11 /*
12 @@ -1889,6 +1891,8 @@
13 info->brk = 0;
14 info->elf_flags = ehdr->e_flags;
15
16 + if (!afl_entry_point) afl_entry_point = info->entry;
17 +
18 for (i = 0; i < ehdr->e_phnum; i++) {
19 struct elf_phdr *eppnt = phdr + i;
20 if (eppnt->p_type == PT_LOAD) {
21 @@ -1922,9 +1926,11 @@
22 if (elf_prot & PROT_EXEC) {
23 if (vaddr < info->start_code) {
24 info->start_code = vaddr;
25 + if (!afl_start_code) afl_start_code = vaddr;
26 }
27 if (vaddr_ef > info->end_code) {
28 info->end_code = vaddr_ef;
29 + if (!afl_end_code) afl_end_code = vaddr_ef;
30 }
31 }
32 if (elf_prot & PROT_WRITE) {
OLDNEW
« no previous file with comments | « third_party/afl/src/qemu_mode/patches/cpu-exec.diff ('k') | third_party/afl/src/qemu_mode/patches/syscall.diff » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698