diff options
author | Sverker Eriksson <[email protected]> | 2017-02-14 18:26:31 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2017-02-14 18:26:31 +0100 |
commit | 118de47d703e303aea7f4575849a37c11416ba14 (patch) | |
tree | 211bbb6c24d6069c657d3b7ac7776be45631ec48 /erts/emulator/beam/erl_bif_re.c | |
parent | dd60ebfa1f2f6dc203deee59f95305291d06a619 (diff) | |
download | otp-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_re.c')
-rw-r--r-- | erts/emulator/beam/erl_bif_re.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_bif_re.c b/erts/emulator/beam/erl_bif_re.c index ba183f24e8..a66b05c6ff 100644 --- a/erts/emulator/beam/erl_bif_re.c +++ b/erts/emulator/beam/erl_bif_re.c @@ -600,10 +600,11 @@ static void cleanup_restart_context(RestartContext *rc) } } -static void cleanup_restart_context_bin(Binary *bp) +static int cleanup_restart_context_bin(Binary *bp) { RestartContext *rc = ERTS_MAGIC_BIN_DATA(bp); cleanup_restart_context(rc); + return 1; } /* |