aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2016-04-01 20:18:50 +0200
committerErlang/OTP <[email protected]>2016-04-01 20:18:50 +0200
commit339fb4277e49caa4473a28ab037702441979f207 (patch)
tree32bb50e55174f11abc851c75beb074d55d9b626a /erts
parent75f3e0c30face477da5de22c828b28cf32fca9ab (diff)
parent0fe04b07b4d15c9671d6665ac5304bffd0f63d23 (diff)
downloadotp-339fb4277e49caa4473a28ab037702441979f207.tar.gz
otp-339fb4277e49caa4473a28ab037702441979f207.tar.bz2
otp-339fb4277e49caa4473a28ab037702441979f207.zip
Merge branch 'rickard/last_calls/OTP-13418' into maint-18
* rickard/last_calls/OTP-13418: Unbreak process_info(Pid,last_calls)
Diffstat (limited to 'erts')
-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() ->