diff options
author | Björn Gustavsson <[email protected]> | 2018-11-01 06:19:52 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2018-11-06 10:16:53 +0100 |
commit | e7b3dcde36969be9442e05b18919ecb5b61bf6a4 (patch) | |
tree | 665c241adbc1a24dbae62a4b3339cfbc1d827c23 /lib/compiler/test | |
parent | 9212ce67e22e3f45190ded62bea82291d084351d (diff) | |
download | otp-e7b3dcde36969be9442e05b18919ecb5b61bf6a4.tar.gz otp-e7b3dcde36969be9442e05b18919ecb5b61bf6a4.tar.bz2 otp-e7b3dcde36969be9442e05b18919ecb5b61bf6a4.zip |
beam_trim, beam_jump: Print Name/Arity if there is a crash
This will help investigation of compiler bugs.
Diffstat (limited to 'lib/compiler/test')
-rw-r--r-- | lib/compiler/test/misc_SUITE.erl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/compiler/test/misc_SUITE.erl b/lib/compiler/test/misc_SUITE.erl index c9acda2b6d..d6fc51448f 100644 --- a/lib/compiler/test/misc_SUITE.erl +++ b/lib/compiler/test/misc_SUITE.erl @@ -234,6 +234,10 @@ silly_coverage(Config) when is_list(Config) -> {label,2}|non_proper_list]}],99}, expect_error(fun() -> beam_except:module(ExceptInput, []) end), + %% beam_jump + JumpInput = BlockInput, + expect_error(fun() -> beam_jump:module(JumpInput, []) end), + %% beam_clean CleanInput = {?MODULE,[{foo,0}],[], [{function,foo,0,2, @@ -243,6 +247,10 @@ silly_coverage(Config) when is_list(Config) -> {jump,{f,42}}]}],99}, expect_error(fun() -> beam_clean:module(CleanInput, []) end), + %% beam_jump + TrimInput = BlockInput, + expect_error(fun() -> beam_trim:module(TrimInput, []) end), + %% beam_peep. This is tricky. Use a select instruction with %% an odd number of elements in the list to crash %% prune_redundant_values/2 but not beam_clean:clean_labels/1. |