aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2015-11-10 18:29:32 +0100
committerBjörn Gustavsson <[email protected]>2015-11-16 13:52:14 +0100
commit0a94d155e0197121fac63c8fb8ae0f7bc942dcc2 (patch)
tree324dcfd62fd9be8a8abd78bbdea8bd0a4b718949
parent0a1150e85bd23b2dbf116454d4d0207b7c54974a (diff)
downloadotp-0a94d155e0197121fac63c8fb8ae0f7bc942dcc2.tar.gz
otp-0a94d155e0197121fac63c8fb8ae0f7bc942dcc2.tar.bz2
otp-0a94d155e0197121fac63c8fb8ae0f7bc942dcc2.zip
beam_validator: Don't allow an 'undefined' entry label in a function
Before 912fea0b beam_validator could validate disassembled files. That's probably why the entry label was allowed to be 'undefined'.
-rw-r--r--lib/compiler/src/beam_validator.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/compiler/src/beam_validator.erl b/lib/compiler/src/beam_validator.erl
index 5944746edc..fd38fc0095 100644
--- a/lib/compiler/src/beam_validator.erl
+++ b/lib/compiler/src/beam_validator.erl
@@ -172,7 +172,7 @@ validate_2({Ls1,Is}, Name, Arity, _Entry, _Ft) ->
validate_3({Ls2,Is}, Name, Arity, Entry, Mod, Ls1, Ft) ->
Offset = 1 + length(Ls1) + 1 + length(Ls2),
- EntryOK = (Entry =:= undefined) orelse lists:member(Entry, Ls2),
+ EntryOK = lists:member(Entry, Ls2),
if
EntryOK ->
St = init_state(Arity),