aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
AgeCommit message (Collapse)Author
2012-11-23Merge branch 'maint'Björn-Egil Dahlberg
2012-11-23Update copyright yearsBjörn-Egil Dahlberg
2012-11-23Merge branch 'maint'Björn-Egil Dahlberg
2012-11-23Merge branch 'egil/fix-crash_dump-lc-assert' into maintBjörn-Egil Dahlberg
* egil/fix-crash_dump-lc-assert: erts: Suppress lock assertion when dumping a crash
2012-11-22Teach erts_bs_append not to dump corePatrik Nyblom
When erts_bs_append() calls the garbage collector, it has set the PB_ACTIVE_WRITER flag in the ProcBin for the binary object is about to be appended to. Therefore, it is expected that the garbage collector should neither move nor shrink the binary object. But if the garbage collector does a minor collection (thereby clearing the PB_ACTIVE_WRITER flag in the ProcBin) and there is still not enough heap space, there will be a second major garbage collection. During the major collection (since the the PB_ACTIVE_WRITER flag was cleared), the binary object may be shrunk or moved (depending on sizes and how many other writable binaries there are in the process). Avoid the problem by clearing the PB_ACTIVE_WRITER flags in a separate pass after the garbage collection(s). Thanks to Denis Titoruk for helping us find this bug.
2012-11-21erts: Make carrier header sizes compile time constantsSverker Eriksson
No allocator strategy is using customized carrier headers anyway.
2012-11-19Fix bad assertRickard Green
2012-11-19erts: Cleanup minor things in alloc_utilSverker Eriksson
2012-11-16erts: Fix compile warnings in alloc_utilSverker Eriksson
2012-11-16Merge branch 'maint'Rickard Green
* maint: Add clearer warnings about misuse of NIF and driver functionality Fix erlang:memory(ets) Conflicts: erts/emulator/beam/erl_db.c
2012-11-16Merge branch 'rickard/ets-mem-bug/OTP-10558' into maintRickard Green
* rickard/ets-mem-bug/OTP-10558: Fix erlang:memory(ets)
2012-11-16erts: Suppress lock assertion when dumping a crashBjörn-Egil Dahlberg
2012-11-15erts: Enable new header scheme without super alignment on 64-bitSverker Eriksson
2012-11-15erts: Ensure MBC limits due to super alignmentSverker Eriksson
2012-11-15erts: Add carrier pointer to header of free blockSverker Eriksson
2012-11-15erts: Refactor renaming a couple of macros in alloc_utilSverker Eriksson
To get a consistent naming scheme where FBLK = Free block ABLK = Allocated block
2012-11-15erts: Refactor removing dummy footer in carrier headerSverker Eriksson
2012-11-15erts: Save one word per block for thread preferred allocatorsSverker Eriksson
by making use of the new block header scheme to find the carrier header and thereby the allocator.
2012-11-15erts: Refactor erl_alloc_util.cSverker Eriksson
Make use of type FreeBlkFtr_t Rename GET_MB_CARRIER into BLK2MBC (like BLK2SBC) Remove some unused macros
2012-11-15erts: Change single carrier block header flagsSverker Eriksson
to allow realloc to determine block size (in MBC or SBC) without having to read the footer of the previous block that might be written to by concurrent thread.
2012-11-15erts: Use new mseg flag argument for carrier sizingSverker Eriksson
2012-11-15erts: Move carrier alignment define to erl_msg.hSverker Eriksson
2012-11-15erts: Add carrier offset to internal allocation headersSverker Eriksson
2012-11-13erts: Fix compiler warnings for halfword vmSverker Eriksson
2012-11-13erts: New mseg allocator cacheBjörn-Egil Dahlberg
* utilize the power of two
2012-11-12Fix merge from maintRickard Green
2012-11-12Merge branch 'maint'Rickard Green
* maint: ssl: Adopt test case to not take so long Fix bug in erts_port_task_schedule() Use reduction limit in order to determine when to do wakeup Conflicts: erts/emulator/beam/erl_port_task.c erts/emulator/beam/erl_process.c
2012-11-12Merge branch 'rickard/port-sched-bug/OTP-10556' into maintRickard Green
* rickard/port-sched-bug/OTP-10556: Fix bug in erts_port_task_schedule()
2012-11-12Merge branch 'rickard/sched-wakeup/OTP-10476' into maintRickard Green
* rickard/sched-wakeup/OTP-10476: Use reduction limit in order to determine when to do wakeup
2012-11-08Merge branch 'maint'Björn Gustavsson
* maint: Fix binary append exceptions
2012-11-08Merge branch 'bjorn/erts/binary-append/OTP-10524' into maintBjörn Gustavsson
* bjorn/erts/binary-append/OTP-10524: Fix binary append exceptions
2012-11-06Fix erlang:memory(ets)Rickard Green
2012-11-06Fix bug in erts_port_task_schedule()Rickard Green
2012-11-05Fix binary append exceptionsBjörn Gustavsson
Code such as the following should cause an exception: Bin = <<0:1>>, <<Bin/binary,...>> (Because the "binary" type implies that the binary must have a size in bits that is a multiple of 8.) Depending on the binary, either no exception was thrown or the wrong exception was thrown (because c_p->freason was not set). Noticed-by: Adam Rutkowski
2012-10-24Merge branch 'maint'Björn-Egil Dahlberg
Conflicts: erts/etc/common/heart.c
2012-10-24Merge branch 'egil/ensure-erl_crash.dump/OTP-10422' into maintBjörn-Egil Dahlberg
* egil/ensure-erl_crash.dump/OTP-10422: test: Relax timeouts for heart_SUITE erts: Fix crash dump write to port hack erts: Fix lock check assertion doc: Document ERL_CRASH_DUMP_SECONDS behaviour test: Add test for heart restart on crash test: Add test for heart restart on crash erts: Change ERL_CRASH_DUMP_SECONDS behaviour test: Refactor away ?line macros in heart_SUITE erts: Search for heart in ports that are alive heart: Refactor heart debugging erts, heart: Ensure erl_crash.dump is written
2012-10-23erts: Fix lock check assertionBjörn-Egil Dahlberg
2012-10-16erts: Change ERL_CRASH_DUMP_SECONDS behaviourBjörn-Egil Dahlberg
Not setting ERL_CRASH_DUMP_SECONDS will now terminate beam immediately on a crash without writing a crash dump file. Setting ERL_CRASH_DUMP_SECONDS to 0 will also terminate beam immediately on a crash without writing a crash dump file, i.e. same as not setting ERL_CRASH_DUMP_SECONDS environment variable. Setting ERL_CRASH_DUMP_SECONDS to a negative value will let the beam wait indefinitely on the crash dump file being written. Setting ERL_CRASH_DUMP_SECONDS to a positive value will let the beam wait that many seconds on the crash dump file being written. A positive value will set both an alarm in beam AND a heart timeout for restart if heart is running. This is due to the change of 'heart' behavior when 'heart' is listening for a crash.
2012-10-15erts: Search for heart in ports that are aliveBjörn-Egil Dahlberg
2012-10-15erts, heart: Ensure erl_crash.dump is writtenBjörn-Egil Dahlberg
When a crash dump is about to be written and we have heartbeat enabled on a system. We need time to write it before heart explicitly kills the beam.
2012-10-09crypto: Make unloading of crypto saferSverker Eriksson
Facts: crypto nif-lib registers callback functions that openssl uses for memory management and thread synchronization. The callback functions can only be set once, openssl does not allow changing the callback functions. Problem: If openssl is dynamicly linked to crypto, you might get s scenario where the crypto lib is unloaded while leaving openssl loaded with its old pointers to the unloaded crypto code intact. If crypto is then reloaded (by init:restart() for example), the crypto nif-lib might get relocated at a different address. crypto calls openssl which in turn calls the old invalid callback functions...kaboom. Solution: Break apart the callback functions into a separate dynamic lib that crypto loads with dlopen. When crypto is unloaded the callback lib is left in place to be reused if/when crypto is loaded again.
2012-10-09Use reduction limit in order to determine when to do wakeupRickard Green
2012-10-09Merge branch 'maint'Lukas Larsson
* maint: Add comment about eproviderfailedinit error Increase sbct for win64 as block alignment is 16
2012-10-09Add comment about eproviderfailedinit errorLukas Larsson
2012-10-08Merge branch 'egil/remove-unused-files'Björn-Egil Dahlberg
* egil/remove-unused-files: Remove unused files from old native dns resolver
2012-10-05Merge branch 'sverk/code-load-refactor-later-op'Sverker Eriksson
* sverk/code-load-refactor-later-op: erts: Fix faulty lock check assert erts: Refactor naming regarding code_write_permission erts: Refactor tracing to use erts_schedule_thr_prgr_later_op erts: Allow thr_prgr_later_op to reschedule erts: Refactor code loading to use erts_schedule_thr_prgr_later_op erts: Remove some compiler warnings
2012-09-26Remove unused files from old native dns resolverBjörn-Egil Dahlberg
2012-09-26Fix missing information in crash dump for native-compiled modulesBjörn Gustavsson
In the erl_crash.dump file, native-compiled modules did not have any information about attributes and compilation. The problem is that the code:make_stub_module/3 BIF (which is internally used when native code is loaded) did not copy the size field the attribute and compilation info chunks. Those size fields are only used when writing crash dumps.
2012-09-07erts: Fix faulty lock check assertSverker Eriksson
2012-09-07Replace sprintf with erts_snprintf in beamBjörn-Egil Dahlberg