From 741eb5821beba958eafba23f11b1f115f63dd75e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Tue, 31 Jan 2012 08:08:13 +0100 Subject: beam_bp: Fix faulty assertion in erts_find_local_func() Commit 64ccd8c9b7a782ca777ca4649dbb1f4a1ef00bce introduced BIF stubs. The stub functions were not actually remove the loaded code, but the name of the function in the func_info instruction was changed to [] to mark it as invalid. --- erts/emulator/beam/beam_bp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'erts/emulator/beam/beam_bp.c') 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; -- cgit v1.2.3