diff options
author | Hans Bolinder <[email protected]> | 2018-01-12 15:44:21 +0100 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2018-01-12 15:49:35 +0100 |
commit | cecf41457d92a3bd21a7690b589f79c0a2901a93 (patch) | |
tree | 2c2dd6fc0f7fc555c731e00719e1dbc876423a43 /lib/dialyzer | |
parent | 8fbbc9713e86b51295835f4b5065769c4ca407ef (diff) | |
download | otp-cecf41457d92a3bd21a7690b589f79c0a2901a93.tar.gz otp-cecf41457d92a3bd21a7690b589f79c0a2901a93.tar.bz2 otp-cecf41457d92a3bd21a7690b589f79c0a2901a93.zip |
dialyzer: Fix bsl/2 bug
Also modified erl_bif_types:infinity_bsl() when called with zero as
first argument. As of writing this, erlang:'bsl'/2 is modified on the
master branch to never fail if called with a huge second argument.
Diffstat (limited to 'lib/dialyzer')
-rw-r--r-- | lib/dialyzer/test/small_SUITE_data/src/bsL.erl | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/dialyzer/test/small_SUITE_data/src/bsL.erl b/lib/dialyzer/test/small_SUITE_data/src/bsL.erl new file mode 100644 index 0000000000..b2fdc16324 --- /dev/null +++ b/lib/dialyzer/test/small_SUITE_data/src/bsL.erl @@ -0,0 +1,13 @@ +-module(bsL). + +-export([t/0]). + +%% Found in lib/observer/test/crashdump_helper.erl. + +t() -> + Size = 60, + <<H:16/unit:8>> = erlang:md5(<<Size:32>>), + true = H < 20, + true = H > 2, + Data = ((H bsl (8*150)) div (H+7919)), + <<Data:Size/unit:8>>. |