aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/test/small_SUITE_data/src
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2014-08-21 09:29:50 +0200
committerHans Bolinder <[email protected]>2014-08-21 09:29:50 +0200
commit05d8ce4d317df08076433296449083e9848b4d2d (patch)
tree8b9a919d8dd337b2da74ee3c8e4f19aa6a04e689 /lib/dialyzer/test/small_SUITE_data/src
parent0f0befab60ccd0bb75972932299a2b4c0522325a (diff)
parent305bfc3360acfae8af75b36e00c61298b6ea582e (diff)
downloadotp-05d8ce4d317df08076433296449083e9848b4d2d.tar.gz
otp-05d8ce4d317df08076433296449083e9848b4d2d.tar.bz2
otp-05d8ce4d317df08076433296449083e9848b4d2d.zip
Merge branch 'maint'
* maint: dialyzer, hipe: Fix a bug concerning is_record/2,3
Diffstat (limited to 'lib/dialyzer/test/small_SUITE_data/src')
-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.