aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/test
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2018-01-12 15:44:21 +0100
committerHans Bolinder <[email protected]>2018-01-12 15:49:35 +0100
commitcecf41457d92a3bd21a7690b589f79c0a2901a93 (patch)
tree2c2dd6fc0f7fc555c731e00719e1dbc876423a43 /lib/dialyzer/test
parent8fbbc9713e86b51295835f4b5065769c4ca407ef (diff)
downloadotp-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/test')
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/bsL.erl13
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>>.