aboutsummaryrefslogtreecommitdiffstats
path: root/erts/preloaded/ebin/erts_code_purger.beam
AgeCommit message (Collapse)Author
2018-12-03Update preloaded modulesHenrik Nord
2018-06-18Update preloaded modulesHenrik Nord
2018-04-25Update preloaded modulesBjörn Gustavsson
2017-11-20Merge branch 'lukas/stdlib/maps_iterators/OTP-14012'Lukas Larsson
* lukas/stdlib/maps_iterators/OTP-14012: erts: Limit size of first iterator for hashmaps Update primary bootstrap Update preloaded modules erts: Remove erts_internal:maps_to_list/2 stdlib: Make io_lib and io_lib_pretty use maps iterator erts: Implement batching maps:iterator erts: Implement maps path iterator erts: Implement map iterator using a stack stdlib: Introduce maps iterator API Conflicts: bootstrap/lib/stdlib/ebin/io_lib.beam bootstrap/lib/stdlib/ebin/io_lib_pretty.beam erts/emulator/beam/bif.tab erts/preloaded/ebin/erlang.beam erts/preloaded/ebin/erts_internal.beam erts/preloaded/ebin/zlib.beam
2017-11-20Update preloaded modulesLukas Larsson
2017-06-20Update preloaded modulesHans Nilsson
2017-06-14Update preloaded modulesRickard Green
2017-05-04Update preloaded modulesBjörn Gustavsson
2017-04-25Update preloaded modulesLukas Larsson
2017-04-10Update preloaded modulesLukas Larsson
2017-02-17Teach make_preload to handle the new 'AtU8' chunkBjörn Gustavsson
26b59dfe67 introduced the new 'AtU8' chunk to support Unicode atoms. make_preload strips the pre-loaded BEAM files so that they only contain essential chunks. It expects to find the old 'Atom' chunk. Teach make_preload to read the new 'AtU8' chunk instead of the old chunk. Also produce a nice error message if someone by mistake compiles the pre-loaded modules with an OTP 19 compiler.
2016-12-20Update preloaded modulesLukas Larsson
2016-09-15Merge branch 'maint'Björn Gustavsson
* maint: erts: Add nif_SUITE:t_on_load erts: Improve nif_SUITE:upgrade test Don't leak old code when loading a modules with an on_load function Conflicts: erts/preloaded/ebin/erts_code_purger.beam erts/preloaded/ebin/erts_internal.beam erts/preloaded/src/erts_code_purger.erl
2016-09-14Don't leak old code when loading a modules with an on_load functionBjörn Gustavsson
Normally, calling code:delete/1 before re-loading the code for a module is unnecessary but causes no problem. But there will be be problems if the new code has an on_load function. Code with an on_load function will always be loaded as old code to allowed it to be easily purged if the on_load function would fail. If the on_load function succeeds, the old and current code will be swapped. So in the scenario where code:delete/1 has been called explicitly, there is old code but no current code. Loading code with an on_load function will cause the reference to the old code to be overwritten. That will at best cause a memory leak, and at worst an emulator crash (especially if NIFs are involved). To avoid that situation, we will put the code with the on_load function in a special, third slot in Module. ERL-240
2016-08-31Avoid selective receive in code-purger processRickard Green
The code purger process handles vast amounts of messages when there are lots of processes alive. A single message in the message queue that does not match will in such cases cause lots of extra work. The code purger process now always picks the first message in the message queue, and by this avoid this extra work.
2016-08-31Remove old purge strategyRickard Green
2016-08-29Fix purge of codeRickard Green
Ensure that we cannot get any dangling pointers into code that has been purged. This is done by a two phase purge. At first phase all fun entries pointing into the code to purge are marked for purge. All processes trying to call these funs will be suspended and by this we avoid getting new direct references into the code. When all processes has been checked, these processes are resumed. The new purge strategy now also completely ignore the existence of indirect references to the code (funs). If such exist, they will cause bad fun exceptions to the caller, but will not prevent a soft purge or cause a kill of a process having such live references during a hard purge. This since it is impossible to give any guarantees that no processes in the system have such indirect references. Even when the system is completely clean from such references, new ones can appear via distribution and/or disk.
2016-08-26Reclaim literal area after purge has completedRickard Green
2016-06-20Update preloaded modulesHenrik Nord
2016-05-10Update preloaded modulesLukas Larsson
2016-05-03Update preloaded modulesBjörn-Egil Dahlberg
2016-04-15Update preloaded modulesLukas Larsson
2016-02-17Update preloaded modulesHans Bolinder
2016-02-08Merge branch 'sverk/safe-purging/OTP-13122'Sverker Eriksson
* sverk/safe-purging/OTP-13122: erts: Fix harmless dialyzer warnings
2016-02-02Update preloaded modulesLukas Larsson
2016-01-26Update preloaded modulesLukas Larsson
2016-01-25erts: Fix harmless dialyzer warningsSverker Eriksson
2016-01-19erts: Ignore unexpected messages to erts_code_purgerSverker Eriksson
2016-01-13erts: Optimize erlang:check_process_codeSverker Eriksson
by ignoring literals. erts_internal:check_process_code will be called again anyway (with option {copy_literals, true}) before the module is actually purged. No need to check literals twice.
2016-01-13erts: Make copy_literals more fail safeSverker Eriksson
* Same process must do enable-disable. * System process will force it and never get 'aborted'
2016-01-13erts: Move copy_literals/2 from erlang to erts_internalSverker Eriksson
as it's not a public interface.
2016-01-13erts: Make erlang:purge_module/1 safeSverker Eriksson
Problem: erlang:purge_module/1 is not safe in the sense that very bad things may happen if the code to be purged is still referred to by live processes. Introduce erts_internal:purge_module which is the same as the old erlang:purge_module BIF (except it returns false if no such old module). Implement erlang:purge_module in Erlang and let it invoke erts_code_purger for safe purging where all clogging processes first are killed.
2016-01-13erts: Refactor code:purge/1 and code:soft_purge/1Sverker Eriksson
by moving code from code_server to erts_code_purger. This is more or less a copy-paste from code_server.erl to erts_code_purger.erl. All the inner mechanics of code:purge/1 and code:soft_purge/1 are unchanged.
2016-01-13erts: Introduce erts_code_purgerSverker Eriksson
as a system process with preloaded code.