diff options
author | Alon Zakai <azakai@google.com> | 2023-03-01 10:06:36 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-01 10:06:36 -0800 |
commit | 5b98e1896f16fc41d6a7b0d0c4ef0b7e1d72f420 (patch) | |
tree | 8d5cfb1ad8ac675ad7c86afb327763ad5721ebd4 /src | |
parent | 702b48f80dcc5f83548c8f461cf75bfe0a318997 (diff) | |
download | binaryen-5b98e1896f16fc41d6a7b0d0c4ef0b7e1d72f420.tar.gz binaryen-5b98e1896f16fc41d6a7b0d0c4ef0b7e1d72f420.tar.bz2 binaryen-5b98e1896f16fc41d6a7b0d0c4ef0b7e1d72f420.zip |
Fuzzer: Handle HostLimitException during instance creation (#5534)
We handle this like the existing handling of TrapException: we skip running
this module (since we can't even instantiate it, so there is nothing to run).
Diffstat (limited to 'src')
-rw-r--r-- | src/tools/execution-results.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tools/execution-results.h b/src/tools/execution-results.h index 569052086..17101e0ab 100644 --- a/src/tools/execution-results.h +++ b/src/tools/execution-results.h @@ -132,6 +132,8 @@ struct ExecutionResults { } } catch (const TrapException&) { // may throw in instance creation (init of offsets) + } catch (const HostLimitException&) { + // may throw in instance creation (e.g. array.new of huge size) } } @@ -221,6 +223,9 @@ struct ExecutionResults { } catch (const TrapException&) { // may throw in instance creation (init of offsets) return {}; + } catch (const HostLimitException&) { + // may throw in instance creation (e.g. array.new of huge size) + return {}; } } |