aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2018-07-12 17:53:35 +0200
committerErlang/OTP <[email protected]>2018-07-12 17:53:35 +0200
commit02408029b07333fc6a3f68bdb5910c698b904481 (patch)
tree12c33d0ea96416f899803c394988f59781704e0e
parenta76294229b9548bb28cb4e3443b4654c3877e2a8 (diff)
parentc48d442024df188ac2e7b226ec2f04da9d10288b (diff)
downloadotp-02408029b07333fc6a3f68bdb5910c698b904481.tar.gz
otp-02408029b07333fc6a3f68bdb5910c698b904481.tar.bz2
otp-02408029b07333fc6a3f68bdb5910c698b904481.zip
Merge branch 'rickard/trace-info-bug/OTP-15183' into maint-21
* rickard/trace-info-bug/OTP-15183: Fix trace_info/2
-rw-r--r--erts/emulator/beam/erl_bif_trace.c2
-rw-r--r--erts/emulator/test/trace_SUITE.erl9
2 files changed, 8 insertions, 3 deletions
diff --git a/erts/emulator/beam/erl_bif_trace.c b/erts/emulator/beam/erl_bif_trace.c
index 9861483bf0..711e62c795 100644
--- a/erts/emulator/beam/erl_bif_trace.c
+++ b/erts/emulator/beam/erl_bif_trace.c
@@ -810,7 +810,7 @@ Eterm trace_info_2(BIF_ALIST_2)
}
erts_release_code_write_permission();
- if (is_internal_ref(res))
+ if (is_value(res) && is_internal_ref(res))
BIF_TRAP1(erts_await_result, BIF_P, res);
BIF_RET(res);
diff --git a/erts/emulator/test/trace_SUITE.erl b/erts/emulator/test/trace_SUITE.erl
index 138aefb29c..979b3185a5 100644
--- a/erts/emulator/test/trace_SUITE.erl
+++ b/erts/emulator/test/trace_SUITE.erl
@@ -38,7 +38,8 @@
system_monitor_long_gc_1/1, system_monitor_long_gc_2/1,
system_monitor_large_heap_1/1, system_monitor_large_heap_2/1,
system_monitor_long_schedule/1,
- bad_flag/1, trace_delivered/1, trap_exit_self_receive/1]).
+ bad_flag/1, trace_delivered/1, trap_exit_self_receive/1,
+ trace_info_badarg/1]).
-include_lib("common_test/include/ct.hrl").
@@ -62,7 +63,7 @@ all() ->
system_monitor_long_gc_2, system_monitor_large_heap_1,
system_monitor_long_schedule,
system_monitor_large_heap_2, bad_flag, trace_delivered,
- trap_exit_self_receive].
+ trap_exit_self_receive, trace_info_badarg].
init_per_testcase(_Case, Config) ->
[{receiver,spawn(fun receiver/0)}|Config].
@@ -1734,6 +1735,10 @@ trap_exit_self_receive(Config) ->
receive_nothing(),
ok.
+trace_info_badarg(Config) when is_list(Config) ->
+ catch erlang:trace_info({a,b,c},d),
+ ok.
+
drop_trace_until_down(Proc, Mon) ->
drop_trace_until_down(Proc, Mon, false, 0, 0).