diff options
author | Sverker Eriksson <[email protected]> | 2011-10-19 11:00:20 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2011-10-26 18:19:21 +0200 |
commit | f06a72b52464b4bdfc419e20162e23b8478ad26c (patch) | |
tree | 4f1eb4a738202a44a09804a2ce6b510f30b4539d /erts | |
parent | 17241c30f56ba6bc31518f1c905f6178784fb4fa (diff) | |
download | otp-f06a72b52464b4bdfc419e20162e23b8478ad26c.tar.gz otp-f06a72b52464b4bdfc419e20162e23b8478ad26c.tar.bz2 otp-f06a72b52464b4bdfc419e20162e23b8478ad26c.zip |
erts-hipe: Deliberate leak of native fun entries
This is a workaround as hipe code upgrade/unloading does not work properly.
Diffstat (limited to 'erts')
-rw-r--r-- | erts/emulator/beam/beam_load.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/erts/emulator/beam/beam_load.c b/erts/emulator/beam/beam_load.c index bdf07d5028..264c5a18eb 100644 --- a/erts/emulator/beam/beam_load.c +++ b/erts/emulator/beam/beam_load.c @@ -5687,7 +5687,17 @@ patch_funentries(Eterm Patchlist) fe = erts_get_fun_entry(Mod, uniq, index); fe->native_address = (Uint *)native_address; - erts_refc_dec(&fe->refc, 1); + + /* 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_refc_dec(&fe->refc, 1); + */ if (!patch(Addresses, (Uint) fe)) return 0; |