Chromium Code Reviews

Side by Side Diff: third_party/afl/src/qemu_mode/patches/translate-all.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.
Jump to:
View unified diff |
« no previous file with comments | « third_party/afl/src/qemu_mode/patches/syscall.diff ('k') | third_party/afl/src/test-instr.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 --- qemu-2.3.0/translate-all.c.orig 2014-12-09 14:45:46.000000000 +0000
2 +++ qemu-2.3.0/translate-all.c 2015-01-28 22:37:42.383000000 +0000
3 @@ -393,8 +393,13 @@
4 /* We can't use g_malloc because it may recurse into a locked mutex. */
5 # define ALLOC(P, SIZE) \
6 do { \
7 - P = mmap(NULL, SIZE, PROT_READ | PROT_WRITE, \
8 - MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); \
9 + void* _tmp = mmap(NULL, SIZE, PROT_READ | PROT_WRITE, \
10 + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); \
11 + if (_tmp == (void*)-1) { \
12 + qemu_log(">>> Out of memory for stack, bailing out. <<<\n"); \
13 + exit(1); \
14 + } \
15 + (P) = _tmp; \
16 } while (0)
17 #else
18 # define ALLOC(P, SIZE) \
OLDNEW
« no previous file with comments | « third_party/afl/src/qemu_mode/patches/syscall.diff ('k') | third_party/afl/src/test-instr.c » ('j') | no next file with comments »

Powered by Google App Engine