aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_bif_info.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2010-11-18 11:45:18 +0100
committerRickard Green <[email protected]>2010-11-18 11:45:31 +0100
commitab9932741308ee226173256c1f7a5f6481c33217 (patch)
tree8cfdb973a2902f4dd573f1b7e70e4423df3d3525 /erts/emulator/beam/erl_bif_info.c
parent983a6efa7827161e079da49d720c9e5646d384be (diff)
parentf8201e51a45859708f9eb627936e4d63f04d4fdc (diff)
downloadotp-ab9932741308ee226173256c1f7a5f6481c33217.tar.gz
otp-ab9932741308ee226173256c1f7a5f6481c33217.tar.bz2
otp-ab9932741308ee226173256c1f7a5f6481c33217.zip
Merge branch 'pg/fix-system_info-cpu_topology-segfault' into dev
* pg/fix-system_info-cpu_topology-segfault: Fix crash with erlang:system_info({cpu_topology,junk}) OTP-8914
Diffstat (limited to 'erts/emulator/beam/erl_bif_info.c')
-rw-r--r--erts/emulator/beam/erl_bif_info.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_bif_info.c b/erts/emulator/beam/erl_bif_info.c
index 801263ec26..2f3e23f879 100644
--- a/erts/emulator/beam/erl_bif_info.c
+++ b/erts/emulator/beam/erl_bif_info.c
@@ -1687,6 +1687,8 @@ info_1_tuple(Process* BIF_P, /* Pointer to current process. */
return erts_get_cpu_topology_term(BIF_P, *tp);
} else if (ERTS_IS_ATOM_STR("cpu_topology", sel) && arity == 2) {
Eterm res = erts_get_cpu_topology_term(BIF_P, *tp);
+ if (res == THE_NON_VALUE)
+ goto badarg;
ERTS_BIF_PREP_TRAP1(ret, erts_format_cpu_topology_trap, BIF_P, res);
return ret;
#if defined(PURIFY) || defined(VALGRIND)