From dc2c05153c57b55fdd949a8827d4c8f648db8484 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 14 Dec 2017 20:23:12 -0600 Subject: Fix 2 binary fuzz bugs (#1323) * Check if there is a currFunction before using it (we need it for some stacky code; a valid wasm wouldn't need a function in that location anyhow, as what can be put in a memory/table offset is very limited). * Huge alignment led us to do a power of 2 shift that is undefined behavior. Also adds a test facility to check we don't crash on testcases. --- test/crash/use_var_outside_func.wasm | Bin 0 -> 871 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 test/crash/use_var_outside_func.wasm (limited to 'test/crash/use_var_outside_func.wasm') diff --git a/test/crash/use_var_outside_func.wasm b/test/crash/use_var_outside_func.wasm new file mode 100644 index 000000000..f91794845 Binary files /dev/null and b/test/crash/use_var_outside_func.wasm differ -- cgit v1.2.3