aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kernel')
-rw-r--r--lib/kernel/src/hipe_unified_loader.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/kernel/src/hipe_unified_loader.erl b/lib/kernel/src/hipe_unified_loader.erl
index ce7408a3cc..04ec1479cb 100644
--- a/lib/kernel/src/hipe_unified_loader.erl
+++ b/lib/kernel/src/hipe_unified_loader.erl
@@ -774,8 +774,9 @@ add_ref(CalleeMFA, Address, FunDefs, RefType, Trampoline, RemoteOrLocal) ->
CallerMFA = address_to_mfa_lth(Address, FunDefs),
case RemoteOrLocal of
local ->
- %% just a sanity assertion
- {_M,_,_} = CalleeMFA,
+ %% assert that the callee and caller are from the same module
+ {M,_,_} = CalleeMFA,
+ {M,_,_} = CallerMFA,
ok;
remote ->
hipe_bifs:add_ref(CalleeMFA, {CallerMFA,Address,RefType,Trampoline,