aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test/compilation_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2013-02-11 14:28:30 +0100
committerBjörn Gustavsson <[email protected]>2013-02-11 14:28:30 +0100
commitca97661807e3b986d1c1b84d92c69c51a3dcbf04 (patch)
tree7e00c519a3626054ae24f5a780e00afce704408a /lib/compiler/test/compilation_SUITE.erl
parent6b0aa99142ab7dcbc3db50b4940d6096d64ab6ef (diff)
parent5b5964026b1d59ddbfa4c57865110c1699f3e482 (diff)
downloadotp-ca97661807e3b986d1c1b84d92c69c51a3dcbf04.tar.gz
otp-ca97661807e3b986d1c1b84d92c69c51a3dcbf04.tar.bz2
otp-ca97661807e3b986d1c1b84d92c69c51a3dcbf04.zip
Merge branch 'bjorn/compiler/beam_utils-crash/OTP-10825'
* bjorn/compiler/beam_utils-crash/OTP-10825: Fix unsafe optimization of funs
Diffstat (limited to 'lib/compiler/test/compilation_SUITE.erl')
-rw-r--r--lib/compiler/test/compilation_SUITE.erl20
1 files changed, 19 insertions, 1 deletions
diff --git a/lib/compiler/test/compilation_SUITE.erl b/lib/compiler/test/compilation_SUITE.erl
index f8f74e6f7a..a62ec7ce79 100644
--- a/lib/compiler/test/compilation_SUITE.erl
+++ b/lib/compiler/test/compilation_SUITE.erl
@@ -50,7 +50,8 @@ groups() ->
trycatch_4,opt_crash,otp_5404,otp_5436,otp_5481,
otp_5553,otp_5632,otp_5714,otp_5872,otp_6121,
otp_6121a,otp_6121b,otp_7202,otp_7345,on_load,
- string_table,otp_8949_a,otp_8949_a,split_cases]}].
+ string_table,otp_8949_a,otp_8949_a,split_cases,
+ beam_utils_liveopt]}].
init_per_suite(Config) ->
Config.
@@ -683,4 +684,21 @@ do_split_cases(A) ->
end,
Z.
+-record(alarmInfo, {type,cause,origin}).
+
+beam_utils_liveopt(Config) ->
+ F = beam_utils_liveopt_fun(42, pebkac, user),
+ void = F(42, #alarmInfo{type=sctp,cause=pebkac,origin=user}),
+ ok.
+
+beam_utils_liveopt_fun(Peer, Cause, Origin) ->
+ fun(PeerNo, AlarmInfo)
+ when PeerNo == Peer andalso
+ AlarmInfo == #alarmInfo{type=sctp,
+ cause=Cause,
+ origin=Origin} ->
+ void
+ end.
+
+
id(I) -> I.