aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_bif_info.c
diff options
context:
space:
mode:
Diffstat (limited to 'erts/emulator/beam/erl_bif_info.c')
-rw-r--r--erts/emulator/beam/erl_bif_info.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/erts/emulator/beam/erl_bif_info.c b/erts/emulator/beam/erl_bif_info.c
index 4d8c3eb9dd..e5ba79488a 100644
--- a/erts/emulator/beam/erl_bif_info.c
+++ b/erts/emulator/beam/erl_bif_info.c
@@ -2022,14 +2022,16 @@ current_function(Process *c_p, ErtsHeapFactory *hfact, Process* rp,
if (c_p == rp && !(flags & ERTS_PI_FLAG_REQUEST_FOR_OTHER)) {
FunctionInfo fi2;
+ BeamInstr* continuation_ptr;
/*
* The current function is erlang:process_info/{1,2},
* which is not the answer that the application want.
- * We will use the function pointed into by rp->cp
- * instead if it can be looked up.
+ * We will use the continuation pointer stored at the
+ * top of the stack instead.
*/
- erts_lookup_function_info(&fi2, rp->cp, full_info);
+ continuation_ptr = (BeamInstr *) rp->stop[0];
+ erts_lookup_function_info(&fi2, continuation_ptr, full_info);
if (fi2.mfa) {
fi = fi2;
rp->current = fi2.mfa;
@@ -2076,10 +2078,6 @@ current_stacktrace(ErtsHeapFactory *hfact, Process* rp,
s->trace[s->depth++] = rp->i;
depth--;
}
- if (depth > 0 && rp->cp != 0) {
- s->trace[s->depth++] = rp->cp - 1;
- depth--;
- }
erts_save_stacktrace(rp, s, depth);
depth = s->depth;
@@ -2813,7 +2811,10 @@ BIF_RETTYPE system_info_1(BIF_ALIST_1)
} else if (BIF_ARG_1 == am_threads) {
return am_true;
} else if (BIF_ARG_1 == am_creation) {
- return make_small(erts_this_node->creation);
+ Uint hsz = 0;
+ erts_bld_uint(NULL, &hsz, erts_this_node->creation);
+ hp = hsz ? HAlloc(BIF_P, hsz) : NULL;
+ BIF_RET(erts_bld_uint(&hp, NULL, erts_this_node->creation));
} else if (BIF_ARG_1 == am_break_ignored) {
extern int ignore_break;
if (ignore_break)