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

Unified 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. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/afl/src/qemu_mode/patches/translate-all.diff
diff --git a/third_party/afl/src/qemu_mode/patches/translate-all.diff b/third_party/afl/src/qemu_mode/patches/translate-all.diff
new file mode 100644
index 0000000000000000000000000000000000000000..180b3a55ab25b270197beec6905046eee663d0c2
--- /dev/null
+++ b/third_party/afl/src/qemu_mode/patches/translate-all.diff
@@ -0,0 +1,18 @@
+--- qemu-2.3.0/translate-all.c.orig 2014-12-09 14:45:46.000000000 +0000
++++ qemu-2.3.0/translate-all.c 2015-01-28 22:37:42.383000000 +0000
+@@ -393,8 +393,13 @@
+ /* We can't use g_malloc because it may recurse into a locked mutex. */
+ # define ALLOC(P, SIZE) \
+ do { \
+- P = mmap(NULL, SIZE, PROT_READ | PROT_WRITE, \
+- MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); \
++ void* _tmp = mmap(NULL, SIZE, PROT_READ | PROT_WRITE, \
++ MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); \
++ if (_tmp == (void*)-1) { \
++ qemu_log(">>> Out of memory for stack, bailing out. <<<\n"); \
++ exit(1); \
++ } \
++ (P) = _tmp; \
+ } while (0)
+ #else
+ # define ALLOC(P, SIZE) \
« 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
This is Rietveld 408576698