aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src/beam_validator.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2014-02-06 10:08:15 +0100
committerBjörn Gustavsson <[email protected]>2014-02-06 10:08:15 +0100
commit503b0769e647f06b15b8d5e5fd09f3b2ab10ebfa (patch)
tree639a5d81f85ffc83f5023f4b0d4ae04c2882e178 /lib/compiler/src/beam_validator.erl
parent3efa33db1e59b400babf672b07763c4a2467798a (diff)
parent5f4b495e68de1d1762cad0a96d01b5195d3b458e (diff)
downloadotp-503b0769e647f06b15b8d5e5fd09f3b2ab10ebfa.tar.gz
otp-503b0769e647f06b15b8d5e5fd09f3b2ab10ebfa.tar.bz2
otp-503b0769e647f06b15b8d5e5fd09f3b2ab10ebfa.zip
Merge branch 'bjorn/compiler/applying-binary-crash/OTP-11672'
* bjorn/compiler/applying-binary-crash/OTP-11672: beam_bsm: Eliminate emulator crash when a binary is called beam_validator: Validate the "fun" argument for a call_fun/1 instruction
Diffstat (limited to 'lib/compiler/src/beam_validator.erl')
-rw-r--r--lib/compiler/src/beam_validator.erl1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/compiler/src/beam_validator.erl b/lib/compiler/src/beam_validator.erl
index 97f84da08f..682f7adbc2 100644
--- a/lib/compiler/src/beam_validator.erl
+++ b/lib/compiler/src/beam_validator.erl
@@ -574,6 +574,7 @@ valfun_4({apply,Live}, Vst) ->
valfun_4({apply_last,Live,_}, Vst) ->
tail_call(apply, Live+2, Vst);
valfun_4({call_fun,Live}, Vst) ->
+ validate_src([{x,Live}], Vst),
call('fun', Live+1, Vst);
valfun_4({call,Live,Func}, Vst) ->
call(Func, Live, Vst);