diff options
author | Heejin Ahn <aheejin@gmail.com> | 2022-01-04 12:39:38 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-04 12:39:38 -0800 |
commit | 16ac2eb73a57eb530f78b632cffacac97c6b8fdd (patch) | |
tree | 81e0945bbb828b880f8292647c21318c600b783c /scripts | |
parent | 28665b1d8f0632216ceb2de475560c64dc260b9d (diff) | |
download | binaryen-16ac2eb73a57eb530f78b632cffacac97c6b8fdd.tar.gz binaryen-16ac2eb73a57eb530f78b632cffacac97c6b8fdd.tar.bz2 binaryen-16ac2eb73a57eb530f78b632cffacac97c6b8fdd.zip |
[EH] Enable fuzzer with initial contents (#4409)
This enables fuzzing EH with initial contents. fuzzing.cpp/h does not
yet support generation of EH instructions, but with this we can still
fuzz EH based on initial contents.
The fuzzer ran successfully for more than 1,900,000 iterations, with my
local modification that always enables EH and lets the fuzzer select
only EH tests for its initial contents.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/fuzz_opt.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/scripts/fuzz_opt.py b/scripts/fuzz_opt.py index d7c82e244..21d39853a 100755 --- a/scripts/fuzz_opt.py +++ b/scripts/fuzz_opt.py @@ -312,8 +312,6 @@ def pick_initial_contents(): global FEATURE_OPTS FEATURE_OPTS += [ - # has not been enabled in the fuzzer yet - '--disable-exception-handling', # has not been fuzzed in general yet '--disable-memory64', # avoid multivalue for now due to bad interactions with gc rtts in @@ -793,7 +791,7 @@ class CompareVMs(TestCaseHandler): compare(before[vm], after[vm], 'CompareVMs between before and after: ' + vm.name) def can_run_on_feature_opts(self, feature_opts): - return all_disallowed(['simd', 'exception-handling', 'multivalue']) + return all_disallowed(['simd', 'multivalue']) # Check for determinism - the same command must have the same output. @@ -1184,9 +1182,6 @@ def randomize_opt_flags(): if has_flatten: print('avoiding multiple --flatten in a single command, due to exponential overhead') continue - if '--enable-exception-handling' in FEATURE_OPTS: - print('avoiding --flatten due to exception catching which does not support it yet') - continue if '--enable-multivalue' in FEATURE_OPTS and '--enable-reference-types' in FEATURE_OPTS: print('avoiding --flatten due to multivalue + reference types not supporting it (spilling of non-nullable tuples)') continue @@ -1198,6 +1193,10 @@ def randomize_opt_flags(): continue else: has_flatten = True + if ('--rereloop' in choice or '--dfo' in choice) and \ + '--enable-exception-handling' in FEATURE_OPTS: + print('avoiding --rereloop or --dfo due to exception-handling not supporting it') + continue flag_groups.append(choice) if len(flag_groups) > 20 or random.random() < 0.3: break @@ -1238,7 +1237,7 @@ print('POSSIBLE_FEATURE_OPTS:', POSSIBLE_FEATURE_OPTS) # some features depend on other features, so if a required feature is # disabled, its dependent features need to be disabled as well. IMPLIED_FEATURE_OPTS = { - '--disable-reference-types': ['--disable-exception-handling', '--disable-gc'] + '--disable-reference-types': ['--disable-gc'] } if __name__ == '__main__': |