aboutsummaryrefslogtreecommitdiffstats
path: root/erts
AgeCommit message (Collapse)Author
2011-08-08Merge branch 'ms/inet-socket-domain-error' into devHenrik Nord
* ms/inet-socket-domain-error: inet: error if fd does not match socket domain OTP-9455
2011-08-08Merge branch 'cg/fix-constant-logical-operand' into devHenrik Nord
* cg/fix-constant-logical-operand: Fix use of logical operator && with constant operand instead of bitwise &. OTP-9454
2011-08-08Merge branch 'pg/fix-freebsd-dualcore-detection' into devHenrik Nord
* pg/fix-freebsd-dualcore-detection: Fix bug in FreeBSD topology detection code OTP-9453
2011-08-08Merge branch 'pg/fix-hibernate-scheduling-with-hipe' into devHenrik Nord
* pg/fix-hibernate-scheduling-with-hipe: Fix bug related to hibernate and HiPE (clear F_HIBERNATE_SCHED flag) OTP-9452
2011-08-03Fix binary construction with huge literal sizesBjörn Gustavsson
Constructing binaries using the bit syntax with literals sizes that would not fit in an Uint will either cause an emulator crash or the loading to be aborted. Use the new TAG_o tag introduced in the previous commit to make sure that the attempt to create huge binary literals will generate a system_limit exception at run-time.
2011-08-03beam_load.c: Add overflow check of tag valuesBjörn Gustavsson
The handling of large values for other tags than TAG_i (integer) is buggy. Any tag value equal to or greater than 2^40 (5 bytes) will abort loading. Tag values fitting in 5 bytes will be truncated to 4 bytes values. Those bugs cause real problems because the bs_init2/6 and bs_init_bits/6 instructions unfortunately use TAG_u to encode literal sizes (using TAG_i would have been a better choice, but it is too late to change that now). Any binary size that cannot fit in an Uint should cause a system_limit exception at run-time, but instead the buggy handling will either cause an emulator crash (for values in the range 2^32 to 2^40-1) or abort loading. In this commit, implement overflow checking of tag values as a preparation for fixing the binary construction instructions. If any tag value cannot fit in an Uint (except for TAG_i), change the tag to the special TAG_o overflow tag.
2011-08-03beam_makeops: Add some sanity checksBjörn Gustavsson
We want to make sure that a tag/type name is not defined more than once and that we don't define too many primitive tags. Primitive tags must be named with lowercase letters (or they will be confused with variable names in transformations in the ops.tab file).
2011-08-03Fix construction of <<0:((1 bsl 32)-1)>>Björn Gustavsson
Attempting to construct <<0:((1 bsl 32)-1)>>, the largest bitstring allowed in a 32 bit emulator, would cause an emulator crash because of integer overflow. Fix the problem by using an Uint64 to avoid integer overflow. Do not attempt to handle construction of <<0:((1 bsl 64)-1>> in a 64-bit emulator, because that will certainly cause the emulator to terminate anyway because of insufficient memory.
2011-07-29Merge branch 'sverker/allocator-aoff/OTP-9424' into devSverker Eriksson
* sverker/allocator-aoff/OTP-9424: New allocator: Address order first fit (aoff)
2011-07-27Merge branch 'sverker/fun_SUITE-refc_dist-gcfix' into devSverker Eriksson
* sverker/fun_SUITE-refc_dist-gcfix: Fix test case fun_SUITE:refc_dist
2011-07-27Merge branch 'sverker/epmd-vxworks-select-bug/OTP-9427' into devSverker Eriksson
* sverker/epmd-vxworks-select-bug/OTP-9427: Fix epmd crash on vxworks caused by faulty argument to select
2011-07-27Fix epmd crash on vxworks caused by faulty argument to selectSverker Eriksson
The first argument g->max_conn to select() in epmd_srv.c seems to be wrong as it excludes the listening socket(s). Instead we keep track of the highest fd seen. However I still don't understand why select() started to fail for vxworks with R14B03 when the feature of more than one listening socket was introduced. The default is still 1 listening socket (num_sockets=1), which would make the first argument to select() unchanged.
2011-07-26Merge branch 'sverker/testcase/OTP-9422' into devSverker Eriksson
* sverker/testcase/OTP-9422: Test case for OTP-9422
2011-07-26Fix test case fun_SUITE:refc_distSverker Eriksson
It failed sometimes depending on GC invocation.
2011-07-22Test case for OTP-9422Sverker Eriksson
2011-07-20Small fixups for rickard/sbmbc/OTP-9339Sverker Eriksson
alloc_no of sbmbc_low_alloc was set to ERTS_ALC_A_STANDARD_LOW
2011-07-18New allocator: Address order first fit (aoff)Sverker Eriksson
2011-07-13Correct return values from write-functions in erl_printfPatrik Nyblom
2011-07-13Let epmd ignore empty ERL_EPMD_ADDRESSHolger Weiß
If the environment variable ERL_EPMD_ADDRESS is set to the empty string, empd now behaves like it does by default when ERL_EPMD_ADDRESS is unset. That is, in this case, epmd now listens on all available interfaces instead of using only the loopback interface, which happened because epmd added the loopback address to the (in this case empty) list of addresses specified via ERL_EPMD_ADDRESS. Also, epmd now ignores ERL_EPMD_ADDRESS if it contains only separator characters (comma and space). The same applies to epmd's -address option.
2011-07-13Merge branch 'sverker/enif_make_int64-halfword/OTP-9394' into devSverker Eriksson
* sverker/enif_make_int64-halfword/OTP-9394: Fix halfword bug in enif_make_int64
2011-07-12Merge branch 'maint-r14' into devSverker Eriksson
Conflicts: erts/vsn.mk
2011-07-11Prepare releasemaint-r14b03Erlang/OTP
2011-07-11Merge branch 'rickard/sbmbc/OTP-9339' into maint-r14Erlang/OTP
* rickard/sbmbc/OTP-9339: Use separate memory carriers for small blocks
2011-07-11Merge branch 'sverker/ets_delete-deadlock-race/OTP-9423' into maint-r14Erlang/OTP
* sverker/ets_delete-deadlock-race/OTP-9423: Fix bug in ets:delete for write_concurrency that could lead to deadlock
2011-07-08Use separate memory carriers for small blocksRickard Green
2011-07-08Move init of smp rw mutex from init to sys_args to make sure that it is ↵Lukas Larsson
initialized before the first erts_sys_getenv call
2011-07-07Fix a match-spec trace bug that could cause emulator crashSverker Eriksson
A trace matchspec with 'enable_trace' or 'disable_trace' in body could cause an emulator crash if a concurrent process altered the trace setting of the traced function by calling erlang:trace_pattern. The effect was a deallocation of the binary holding the matchspec program while it was running. Fixed by increasing reference count of ms-binary in the cases when 'enable_trace' or 'disable_trace' may cause a system block that may alter the ongoing trace. The paradox here is that db_prog_match() is using erts_smp_block_system() to do 'enable_trace' and 'disable_trace' in a safe (atomic) way. But that also have the (non-atomic) effect that racing thread might block the system and change the trace settings with erlang:trace_pattern.
2011-07-07Fix bug in ets:delete for write_concurrency that could lead to deadlockSverker Eriksson
Relocking in ets_delete_1() and remove_named_tab() was done by unlocking the table without clearing the is_thread_safe flag. A racing thread could then read-lock the table and then incorrectly write-unlock the table as db_unlock() looked at is_thread_safe to determine which kind of lock to unlock. Several fixes: 1. Make db_unlock() use argument 'kind' instead of is_thread_safe to determine lock type. 2. Make relock logic use db_lock() and db_unlock() instead of directly accessing lock primitives. 3. Do ownership transfer earlier in ets_delete_1 to avoid racing owner process to also start deleting the same table.
2011-06-30Fix halfword bug in enif_make_int64Sverker Eriksson
The bug was creating an invalid bignum instead of a small integer, causing strange comparing behavior (=:= failed but == succeeded).
2011-06-22Merge branch 'hw/fix-doc-typos' into devHenrik Nord
* hw/fix-doc-typos: Fix typos in the epmd documentation OTP-9387
2011-06-20Add more specs and typesHans Bolinder
An incorrect spec, rpc:yield/1, has been fixed.
2011-06-15Merge branch 'pan/win_erlsrv_stop/OTP-9344' of super:pan_otp into ↵Patrik Nyblom
pan/win_erlsrv_stop/OTP-9344
2011-06-15Move erts_sys_env_init() to erts_sys_pre_init()Patrik Nyblom
2011-06-15Merge branch 'siri/sasl/release_handler-windows/OTP-9306' into devSiri Hansen
* siri/sasl/release_handler-windows/OTP-9306: Make release_handler work with windows services
2011-06-15Make release_handler work with windows servicesSiri Hansen
This commit adds test cases from release_handler_SUITE on windows, including some corrections in erlsrv and release_handler.
2011-06-13Document fdatasync -lrt requirement (SunOS <= 5.10)Tuncer Ayaz
2011-06-13Do not abort emulator when buggy pthread impl return EBUSYRickard Green
2011-06-09Move fdatasync autoconf checks to proper placeTuncer Ayaz
2011-06-09Merge branch 'pan/win_erlsrv_stop/OTP-9344' of super:pan_otp into ↵Patrik Nyblom
pan/win_erlsrv_stop/OTP-9344
2011-06-09Remove _DEBUG from start_erl.cPatrik Nyblom
2011-06-08Update preloaded moduleRaimo Niskanen
2011-06-08Replace atom in DRV macro in prim_file with stringStavros Aronis
An experimental version of Dialyzer discovered that the atom that replaced the DRV macro in prim_file ends up in calls to erlang:open_port({spawn, Driver}, Portopts) as the Driver argument. The documentation states that this call requires a string there. This change is also consistent with the one introduced in commit 0f03b1e9d2bef3bc830c31a369261af4c5234727 by Kostis Sagonas.
2011-06-07epmd: fix compiler warningsMichael Santos
Suppress compiler warnings about ignored return values.
2011-06-07Spelling correction in erlsrv docPatrik Nyblom
2011-06-07Detect the available CPUs on IRIXHolger Weiß
Add support for querying the number of configured and online processors on SGI systems running IRIX.
2011-06-01Fix typos in the epmd documentationHolger Weiß
2011-05-30Update version numbersBjörn-Egil Dahlberg
2011-05-27Convert windows start_erl to take rootdir on command linePatrik Nyblom
2011-05-27Add command start_disabled to erlsrvPatrik Nyblom
2011-05-26Add global lock for erlsrv to avoid racesPatrik Nyblom