aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2016-03-16 13:42:04 +0100
committerRickard Green <[email protected]>2016-03-16 16:54:03 +0100
commit0fe04b07b4d15c9671d6665ac5304bffd0f63d23 (patch)
treecb6637633a6d16ceb171b67ee15193b3fd85ee10 /erts/emulator
parent5e1b5ef47f3f2b898d30e0425823835bd9a574d4 (diff)
downloadotp-0fe04b07b4d15c9671d6665ac5304bffd0f63d23.tar.gz
otp-0fe04b07b4d15c9671d6665ac5304bffd0f63d23.tar.bz2
otp-0fe04b07b4d15c9671d6665ac5304bffd0f63d23.zip
Unbreak process_info(Pid,last_calls)
Diffstat (limited to 'erts/emulator')
-rw-r--r--erts/emulator/beam/erl_bif_info.c2
-rw-r--r--erts/emulator/test/save_calls_SUITE.erl11
2 files changed, 12 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_bif_info.c b/erts/emulator/beam/erl_bif_info.c
index 2c232c6c03..ac7a70c642 100644
--- a/erts/emulator/beam/erl_bif_info.c
+++ b/erts/emulator/beam/erl_bif_info.c
@@ -1534,7 +1534,7 @@ process_info_aux(Process *BIF_P,
}
case am_last_calls: {
- struct saved_calls *scb = ERTS_PROC_GET_SAVED_CALLS_BUF(BIF_P);
+ struct saved_calls *scb = ERTS_PROC_GET_SAVED_CALLS_BUF(rp);
if (!scb) {
hp = HAlloc(BIF_P, 3);
res = am_false;
diff --git a/erts/emulator/test/save_calls_SUITE.erl b/erts/emulator/test/save_calls_SUITE.erl
index 544d841f16..4e50fdc898 100644
--- a/erts/emulator/test/save_calls_SUITE.erl
+++ b/erts/emulator/test/save_calls_SUITE.erl
@@ -156,8 +156,19 @@ save_calls_1() ->
?line erlang:process_flag(self(), save_calls, 10),
?line {last_calls, L3} = process_info(self(), last_calls),
+ true = (L3 /= false),
?line L31 = lists:filter(fun is_local_function/1, L3),
?line [] = L31,
+ erlang:process_flag(self(), save_calls, 0),
+
+ %% Also check that it works on another process ...
+ Pid = spawn(fun () -> receive after infinity -> ok end end),
+ erlang:process_flag(Pid, save_calls, 10),
+ {last_calls, L4} = process_info(Pid, last_calls),
+ true = (L4 /= false),
+ L41 = lists:filter(fun is_local_function/1, L4),
+ [] = L41,
+ exit(Pid,kill),
ok.
do_bipp() ->