aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/test/small_SUITE_data
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2014-08-21 09:26:56 +0200
committerHans Bolinder <[email protected]>2014-08-21 09:26:56 +0200
commit305bfc3360acfae8af75b36e00c61298b6ea582e (patch)
tree11300443a664f962db49adbc1123dd9d69a50e49 /lib/dialyzer/test/small_SUITE_data
parentdaed987f7ebae3fc8f969b4f55f225837267411b (diff)
parent6eac68854c414285b7a99f27196bbbfa7969b295 (diff)
downloadotp-305bfc3360acfae8af75b36e00c61298b6ea582e.tar.gz
otp-305bfc3360acfae8af75b36e00c61298b6ea582e.tar.bz2
otp-305bfc3360acfae8af75b36e00c61298b6ea582e.zip
Merge branch 'hb/dialyzer/bugfixes/OTP-12018' into maint
* hb/dialyzer/bugfixes/OTP-12018: dialyzer, hipe: Fix a bug concerning is_record/2,3
Diffstat (limited to 'lib/dialyzer/test/small_SUITE_data')
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/limit.erl20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/dialyzer/test/small_SUITE_data/src/limit.erl b/lib/dialyzer/test/small_SUITE_data/src/limit.erl
new file mode 100644
index 0000000000..97ee585b77
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/limit.erl
@@ -0,0 +1,20 @@
+%% Misc cases where Dialyzer would fail with system_limit or crash
+
+-module(limit).
+
+-export([tu/0, big/1, b2/0]).
+
+tu() ->
+ erlang:make_tuple(1 bsl 24, def, [{5,e},{1,a},{3,c}]).
+
+big(<<Int:1152921504606846976/unit:128,0,_/binary>>) -> {5,Int}.
+
+b2() ->
+ Maxbig = maxbig(),
+ _ = bnot Maxbig,
+ ok.
+
+maxbig() ->
+ %% We assume that the maximum arity is (1 bsl 19) - 1.
+ Ws = erlang:system_info(wordsize),
+ (((1 bsl ((16777184 * (Ws div 4))-1)) - 1) bsl 1) + 1.