diff options
author | John Högberg <[email protected]> | 2018-07-18 14:22:23 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2018-07-18 14:22:23 +0200 |
commit | 42b2a4cbdf9dd7622f9503167556c79732d95d34 (patch) | |
tree | 6f7c968509b408c33449d059d350a14942659fb4 /lib/compiler/test/bs_bincomp_SUITE.erl | |
parent | d557a4090f593faff4ef4f990a1ca73bfebaab83 (diff) | |
parent | 798b39ae97c9495869990fd1264ad07e61600963 (diff) | |
download | otp-42b2a4cbdf9dd7622f9503167556c79732d95d34.tar.gz otp-42b2a4cbdf9dd7622f9503167556c79732d95d34.tar.bz2 otp-42b2a4cbdf9dd7622f9503167556c79732d95d34.zip |
Merge pull request #1875 from jhogberg/john/compiler/fix-varsize-binary-comprehension/OTP-15186/ERL-665
Fix a crash when compiling variable-sized binary comprehensions
Diffstat (limited to 'lib/compiler/test/bs_bincomp_SUITE.erl')
-rw-r--r-- | lib/compiler/test/bs_bincomp_SUITE.erl | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/compiler/test/bs_bincomp_SUITE.erl b/lib/compiler/test/bs_bincomp_SUITE.erl index 42361ea546..a5d49020a9 100644 --- a/lib/compiler/test/bs_bincomp_SUITE.erl +++ b/lib/compiler/test/bs_bincomp_SUITE.erl @@ -26,7 +26,7 @@ init_per_group/2,end_per_group/2, byte_aligned/1,bit_aligned/1,extended_byte_aligned/1, extended_bit_aligned/1,mixed/1,filters/1,trim_coverage/1, - nomatch/1,sizes/1,general_expressions/1]). + nomatch/1,sizes/1,general_expressions/1,matched_out_size/1]). -include_lib("common_test/include/ct.hrl"). @@ -35,7 +35,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}]. all() -> [byte_aligned, bit_aligned, extended_byte_aligned, extended_bit_aligned, mixed, filters, trim_coverage, - nomatch, sizes, general_expressions]. + nomatch, sizes, general_expressions, matched_out_size]. groups() -> []. @@ -338,6 +338,13 @@ general_expressions(_) -> -undef(BAD). +matched_out_size(Config) when is_list(Config) -> + <<1, 2>> = matched_out_size_1(<<4, 1:4, 4, 2:4>>), + ok. + +matched_out_size_1(Binary) -> + << <<X>> || <<S, X:S>> <= Binary>>. + cs_init() -> erts_debug:set_internal_state(available_internal_state, true), ok. |