aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2017-04-05 14:35:56 +0200
committerSverker Eriksson <[email protected]>2017-04-05 14:41:04 +0200
commit647984f14188ba2cf73128c09e888d4bcf733a9f (patch)
treedd17b88d60e36cbf015113ce29be9473d8f992ee
parent9c4a807cc1b83a6918c0ccf19cdc3837d746f53b (diff)
downloadotp-647984f14188ba2cf73128c09e888d4bcf733a9f.tar.gz
otp-647984f14188ba2cf73128c09e888d4bcf733a9f.tar.bz2
otp-647984f14188ba2cf73128c09e888d4bcf733a9f.zip
erts: Remove deliberate leak of hipe fun entries
should be fixed since 32729cab75325de58bf127e6e8836348071b8682
-rw-r--r--erts/emulator/beam/beam_load.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/erts/emulator/beam/beam_load.c b/erts/emulator/beam/beam_load.c
index ae98b37956..baa8a183d3 100644
--- a/erts/emulator/beam/beam_load.c
+++ b/erts/emulator/beam/beam_load.c
@@ -6269,16 +6269,7 @@ patch_funentries(Eterm Patchlist)
fe = erts_get_fun_entry(Mod, uniq, index);
fe->native_address = (Uint *)native_address;
- /* Deliberate MEMORY LEAK of native fun entries!!!
- *
- * Uncomment line below when hipe code upgrade and purging works correctly.
- * Today we may get cases when old (leaked) native code of a purged module
- * gets called and tries to create instances of a deleted fun entry.
- *
- * Reproduced on a debug emulator with stdlib_test/qlc_SUITE:join_merge
- *
- * erts_smp_refc_dec(&fe->refc, 1);
- */
+ erts_smp_refc_dec(&fe->refc, 1);
if (!patch(Addresses, (Uint) fe))
return 0;