aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_bif_info.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2017-02-14 18:26:31 +0100
committerSverker Eriksson <[email protected]>2017-02-14 18:26:31 +0100
commit118de47d703e303aea7f4575849a37c11416ba14 (patch)
tree211bbb6c24d6069c657d3b7ac7776be45631ec48 /erts/emulator/beam/erl_bif_info.c
parentdd60ebfa1f2f6dc203deee59f95305291d06a619 (diff)
downloadotp-118de47d703e303aea7f4575849a37c11416ba14.tar.gz
otp-118de47d703e303aea7f4575849a37c11416ba14.tar.bz2
otp-118de47d703e303aea7f4575849a37c11416ba14.zip
erts: Add deallocation veto for magic destructors
A magic destructor can return 0 and thereby take control and prolong the lifetime of a magic binary.
Diffstat (limited to 'erts/emulator/beam/erl_bif_info.c')
-rw-r--r--erts/emulator/beam/erl_bif_info.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_bif_info.c b/erts/emulator/beam/erl_bif_info.c
index be113b7c88..5a8776076e 100644
--- a/erts/emulator/beam/erl_bif_info.c
+++ b/erts/emulator/beam/erl_bif_info.c
@@ -3567,9 +3567,9 @@ BIF_RETTYPE error_logger_warning_map_0(BIF_ALIST_0)
static erts_smp_atomic_t available_internal_state;
-static void empty_magic_ref_destructor(Binary *bin)
+static int empty_magic_ref_destructor(Binary *bin)
{
-
+ return 1;
}
BIF_RETTYPE erts_debug_get_internal_state_1(BIF_ALIST_1)