aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2012-02-07 09:00:22 +0100
committerBjörn Gustavsson <[email protected]>2012-02-07 09:00:22 +0100
commit0c399a77db7eba81f13baccb1f19517991619f4e (patch)
tree2472685fc5b7911a79ede6c23291798802fdd9cc /erts/emulator
parentee20527da3c90d1f7c10e7702237f9c71e23a3cd (diff)
parent741eb5821beba958eafba23f11b1f115f63dd75e (diff)
downloadotp-0c399a77db7eba81f13baccb1f19517991619f4e.tar.gz
otp-0c399a77db7eba81f13baccb1f19517991619f4e.tar.bz2
otp-0c399a77db7eba81f13baccb1f19517991619f4e.zip
Merge branch 'bjorn/erts/bif-stubs/OTP-9861'
* bjorn/erts/bif-stubs/OTP-9861: beam_bp: Fix faulty assertion in erts_find_local_func() beam_load: Fix faulty assertion in module_info(native_addresses)
Diffstat (limited to 'erts/emulator')
-rw-r--r--erts/emulator/beam/beam_bp.c3
-rw-r--r--erts/emulator/beam/beam_load.c6
2 files changed, 6 insertions, 3 deletions
diff --git a/erts/emulator/beam/beam_bp.c b/erts/emulator/beam/beam_bp.c
index dd13cd179a..53f283ba39 100644
--- a/erts/emulator/beam/beam_bp.c
+++ b/erts/emulator/beam/beam_bp.c
@@ -486,7 +486,8 @@ erts_find_local_func(Eterm mfa[3]) {
for (i = 0; i < n; ++i) {
code_ptr = code_base[MI_FUNCTIONS+i];
ASSERT(((BeamInstr) BeamOp(op_i_func_info_IaaI)) == code_ptr[0]);
- ASSERT(mfa[0] == ((Eterm) code_ptr[2]));
+ ASSERT(mfa[0] == ((Eterm) code_ptr[2]) ||
+ is_nil((Eterm) code_ptr[2]));
if (mfa[1] == ((Eterm) code_ptr[3]) &&
((BeamInstr) mfa[2]) == code_ptr[4]) {
return code_ptr + 5;
diff --git a/erts/emulator/beam/beam_load.c b/erts/emulator/beam/beam_load.c
index 1f9635a6c1..d54fe603d8 100644
--- a/erts/emulator/beam/beam_load.c
+++ b/erts/emulator/beam/beam_load.c
@@ -5158,9 +5158,11 @@ native_addresses(Process* p, Eterm mod)
int arity = (int) func_info[4];
Eterm tuple;
- ASSERT(is_atom(name));
+ ASSERT(is_atom(name) || is_nil(name)); /* [] if BIF stub */
if (func_info[1] != 0) {
- Eterm addr = erts_bld_uint(&hp, NULL, func_info[1]);
+ Eterm addr;
+ ASSERT(is_atom(name));
+ addr = erts_bld_uint(&hp, NULL, func_info[1]);
tuple = erts_bld_tuple(&hp, NULL, 3, name, make_small(arity), addr);
result = erts_bld_cons(&hp, NULL, tuple, result);
}