From 5d10e89b5d796edc62cfb6bc3f806d8a1b1272c0 Mon Sep 17 00:00:00 2001 From: Ben Smith Date: Fri, 12 May 2017 16:34:54 -0700 Subject: Add fuzzing helper scripts, fix fuzzing bugs (#416) * Add fuzzing helper scripts, fix fuzzing bugs The fuzzing dictionary was old, so I updated it. Also, I've added some simple fuzzing shell scripts that make it a bit easier to run. Bug fixes: * Validate function index in local name section before calling callback. * Fix invalid assert in parse_{float,double}_infinity, which assumed that "infinity" is required (it could be "inf"). * Bail out of resolve local names if there is no current function (e.g. if attempting to resolve names in an elem offset expression). * Catch bad_alloc in wast2wasm and wasm2wast. Without this, afl-fuzz will see allocation failure as a crash. * disable exceptions by default, add option, wrap tools in try/catch --- src/config.h.in | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/config.h.in') diff --git a/src/config.h.in b/src/config.h.in index d3101eb4..b2dc04b4 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -41,6 +41,8 @@ #cmakedefine01 COMPILER_IS_GNU #cmakedefine01 COMPILER_IS_MSVC +#cmakedefine01 WITH_EXCEPTIONS + #define SIZEOF_SIZE_T @SIZEOF_SIZE_T@ #define SIZEOF_INT @SIZEOF_INT@ #define SIZEOF_LONG @SIZEOF_LONG@ -- cgit v1.2.3