diff options
author | Björn Gustavsson <[email protected]> | 2016-09-14 10:24:27 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2016-09-14 10:24:27 +0200 |
commit | 3f8eeea4a291060a25bcc7d6a9f5d09e18cc9aa4 (patch) | |
tree | 77fd2e5d662de7437d9421fa5a61bdb994f06469 /lib/compiler/test | |
parent | 19d6c4e7830ee8513a4b614cbb39862868fc57a1 (diff) | |
parent | 176b7c94e4146a65ccd2bd729d58487098dddd9c (diff) | |
download | otp-3f8eeea4a291060a25bcc7d6a9f5d09e18cc9aa4.tar.gz otp-3f8eeea4a291060a25bcc7d6a9f5d09e18cc9aa4.tar.bz2 otp-3f8eeea4a291060a25bcc7d6a9f5d09e18cc9aa4.zip |
Merge branch 'maint'
* maint:
beam_validator: Handle unreachable instructions
Turn off parallel make for start scripts Makefile
Diffstat (limited to 'lib/compiler/test')
-rw-r--r-- | lib/compiler/test/beam_validator_SUITE.erl | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/lib/compiler/test/beam_validator_SUITE.erl b/lib/compiler/test/beam_validator_SUITE.erl index 263fd2ca7e..ca85eef688 100644 --- a/lib/compiler/test/beam_validator_SUITE.erl +++ b/lib/compiler/test/beam_validator_SUITE.erl @@ -32,7 +32,8 @@ bad_bin_match/1,bad_dsetel/1, state_after_fault_in_catch/1,no_exception_in_catch/1, undef_label/1,illegal_instruction/1,failing_gc_guard_bif/1, - map_field_lists/1,cover_bin_opt/1]). + map_field_lists/1,cover_bin_opt/1, + val_dsetel/1]). -include_lib("common_test/include/ct.hrl"). @@ -60,7 +61,7 @@ groups() -> freg_state,bad_bin_match,bad_dsetel, state_after_fault_in_catch,no_exception_in_catch, undef_label,illegal_instruction,failing_gc_guard_bif, - map_field_lists,cover_bin_opt]}]. + map_field_lists,cover_bin_opt,val_dsetel]}]. init_per_suite(Config) -> Config. @@ -546,3 +547,23 @@ beam_val(M) -> _ = [io:put_chars(beam_validator:format_error(E)) || E <- Errors], Errors. + +%%%------------------------------------------------------------------------- + +val_dsetel(_Config) -> + self() ! 13, + {'EXIT',{{try_clause,participating},_}} = (catch night(0)), + ok. + +night(Turned) -> + receive + 13 -> + try participating of engine -> 16 after false end + end, + %% The setelement/3 call is unreachable. + Turned(setelement(#{true => Turned}, + participating(Turned, "suit", 40, []), + Turned < Turned)), + ok. + +participating(_, _, _, _) -> ok. |