aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
AgeCommit message (Collapse)Author
2014-11-26Sort keys before generatingLukas Larsson
This has to be done in order to consistently generate the same file so that we do not get rebuilds all the time.
2014-11-25Merge branch 'rickard/maint-17/activate-runq/OTP-12287' into maintRickard Green
* rickard/maint-17/activate-runq/OTP-12287: Do not let non-empty run-queue prevent activation of scheduler
2014-11-25Merge branch 'sverk/cpool-search-improvement' into maintSverker Eriksson
OTP-12323 * sverk/cpool-search-improvement: erts: Add internal docs for super carrier and new cpool search. erts: Fix bug causing mbc to be deleted from cpool before it was inserted erts: Fix bug causing mbc removed from cpool to be used at pool entrance erts: Add pooled_list and traitor_list
2014-11-25erts: Fix port data memory allocation bugSverker Eriksson
for non-immediate port data >= sizeof(Eterm)*2 words.
2014-11-24Merge branch 'lukas/erts/isfinite-fix/OTP-12268' into maintLukas Larsson
* lukas/erts/isfinite-fix/OTP-12268: erts: Use finite instead of isfinite with gcc
2014-11-24erts: Use finite instead of isfinite with gccLukas Larsson
Turns out that isfinite emits a function call and not an instruction in gcc, this makes estone float arith about 50-75% slower. finite emits the instruction so we use that instead.
2014-11-10Merge branch 'vinoski/dirty-nif-return-gc' into maintBruce Yinhe
OTP-12300 * vinoski/dirty-nif-return-gc: Fix gc-related problem with dirty NIFs
2014-11-07Merge branch 'lemenkov/expose_nif_version' into maintBruce Yinhe
OTP-12298 * lemenkov/expose_nif_version: Expose NIF version
2014-11-06erts: Add internal docs for super carrier and new cpool search.Sverker Eriksson
2014-11-06Merge branch 'vinoski/fix-smp-disable-with-ds/OTP-12295' into maintMarcus Arendt
* vinoski/fix-smp-disable-with-ds/OTP-12295: Fix "-smp disable" for emulator with dirty schedulers
2014-11-05Merge branch 'lukas/erts/fix_undefined_behaviour/OTP-12290' into maintLukas Larsson
* lukas/erts/fix_undefined_behaviour/OTP-12290: erts: Fix ub in list_to_integer and bignum div
2014-11-05Merge branch 'lukas/erts/fdopen_non_bound_win32_fix/OTP-12289' into maintLukas Larsson
* lukas/erts/fdopen_non_bound_win32_fix/OTP-12289: erts: getsockname is not allowed on non-bound sockets
2014-11-04Merge branch 'rickard/activate-runq/OTP-12287' into ↵Rickard Green
rickard/maint-17/activate-runq/OTP-12287 * rickard/activate-runq/OTP-12287: Do not let non-empty run-queue prevent activation of scheduler Conflicts: erts/emulator/beam/erl_process.c
2014-11-04Do not let non-empty run-queue prevent activation of schedulerRickard Green
Conflicts: erts/emulator/beam/erl_process.c
2014-11-04Fix gc-related problem with dirty NIFsSteve Vinoski
Ensure that the return value from a dirty NIF call is made part of the GC rootset. Add a new regression test to nif_SUITE. Thanks to Daniel Goertzen for reporting the error and providing a test case, and to Sverker Eriksson for making test case reproducible and finding the fix.
2014-11-03Merge branch 'sverk/beam-ranges-bug/OTP-12273' into maintSverker Eriksson
* sverk/beam-ranges-bug/OTP-12273: erts: Fix bug in beam_ranges
2014-11-02Expose NIF versionPeter Lemenkov
This patch allows checking for NIF API version in a way similar to driver version. E.g. by calling erlang:system_info(nif_version). Signed-off-by: Peter Lemenkov <[email protected]>
2014-10-29erts: Fix bug in beam_rangesSverker Eriksson
Symptom: VM on OSX (darwin11.4.2) with +Meamin running sasl tests, crashing when init:reboot() does erlang:purge_module(installer). Problem: Off-by-one bug in beam_ranges:find_range, returning the wrong range if the 'end' of one module is the 'start' of the next. This is only possible if using sys_alloc (+Meamin) as our own allocators always put block headers between allocated payload data.
2014-10-28Merge branch 'sverk/cpool_fetch-dc_list-bug/OTP-12249' into maintSverker Eriksson
* sverk/cpool_fetch-dc_list-bug/OTP-12249: erts: Fix bug when delayed deallocated carrier is reused by cpool_fetch
2014-10-28Merge branch 'lukas/erts/win32-read_file_info-links/OTP-12269' into maintLukas Larsson
* lukas/erts/win32-read_file_info-links/OTP-12269: erts: Initialize links when reading file info
2014-10-28Merge branch 'sv/isfinite/OTP-12268' into maintLukas Larsson
* sv/isfinite/OTP-12268: Use isfinite() instead of finite() when available
2014-10-28Use isfinite() instead of finite() when availableAnthony Ramine
OS X Mavericks builds result in a number of warnings about finite() being deprecated, like these: beam/erl_arith.c:451:7: warning: 'finite' is deprecated: first deprecated in OS X 10.9 [-Wdeprecated-declarations] ERTS_FP_ERROR(p, f1.fd, goto badarith); ^ sys/unix/erl_unix_sys.h:319:33: note: expanded from macro 'ERTS_FP_ERROR' ^ sys/unix/erl_unix_sys.h:244:51: note: expanded from macro '__ERTS_FP_ERROR' ^ /usr/include/math.h:718:12: note: 'finite' has been explicitly marked deprecated here extern int finite(double) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_9, __IPHONE_NA, __IPHONE_NA); Add checks to use isfinite() instead of finite() where available. Verified on OS X Mavericks 10.9.5 and Ubuntu 12.04.
2014-10-28Merge branch 'vinoski/erl-nif-init' into maintBruce Yinhe
OTP-12266 * vinoski/erl-nif-init: Fix missing field initializer in ERL_NIF_INIT macro
2014-10-26Fix "-smp disable" for emulator with dirty schedulersSteve Vinoski
Running "erl -smp disable" on an emulator built with dirty scheduler support caused problems such as segmentation violations and emulator status line outputs containing garbage. For example: $ erl -smp disable Segmentation fault (core dumped) and: $ erl -smp disable Erlang/OTP 17 [DEVELOPMENT] [erts-6.2] [source] [64-bit] [ds:10:4297895689:4299948152] [async-threads:280] This problem also caused the emulator smoke_test_SUITE to hit these same problems if run in an emulator started with the "-smp disable" option. Fix this segmentation violation by ensuring that dirty scheduler information is printed in the status line only when the emulator is compiled with ERTS_SMP enabled. With this fix in place, the smoke_test_SUITE now passes when the "-smp disable" option is used, and the emulator status line prints correctly for both "-smp enable" and "-smp disable": $ erl -smp enable Erlang/OTP 17 [DEVELOPMENT] [erts-6.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [kernel-poll:false] and: $ erl -smp disable Erlang/OTP 17 [DEVELOPMENT] [erts-6.2] [source] [64-bit] [async-threads:10] [kernel-poll:false]
2014-10-24Merge branch 'sverk/hipe-wrap-bif-disable-gc-fixes/OTP-12231' into maintSverker Eriksson
* sverk/hipe-wrap-bif-disable-gc-fixes/OTP-12231: erts: Fix bug when hipe tailcalls trapping BIF that disables GC erts: Fix hipe bug when gc-disabling bif traps with gc enabled
2014-10-23Merge branch 'rickard/maint-17/eager-check-io/OTP-12117' into maintRickard Green
* rickard/maint-17/eager-check-io/OTP-12117: No eager check I/O on OSE Introduce support for eager check I/O scheduling
2014-10-21erts: Fix bug when hipe tailcalls trapping BIF that disables GCSverker Eriksson
Symptom: base64_SUITE:roundtrip crashes with hipe compiled stdlib. Problem: HIPE_WRAPPER_BIF_DISABLE_GC pushed a "trap frame", but the frame was only popped if the call was recursive. Solution: Only reserve "trap frame" if BIF call is recursive.
2014-10-21erts: Fix hipe bug when gc-disabling bif traps with gc enabledSverker Eriksson
The trap_frame got pushed twice, first by the wrapper then by hipe_push_beam_trap_frame as it was looking at F_DISABLE_GC.
2014-10-20erts: Fix bug causing mbc to be deleted from cpool before it was insertedSverker Eriksson
Set IN_POOL flag _after_ mbc has been actually inserted. Earlier it did not matter if IN_POOL was set early as it was not possible to find a carrier before is was fully inserted. Now when searching pooled_list and traitor_list we must make sure a found carrier has been fully inserted into cpool before removing it.
2014-10-13Merge branch 'sverk/port_get_data-race/OTP-12208' into maintSverker Eriksson
* sverk/port_get_data-race/OTP-12208: erts: Mend port_set_data with non-immed data for halfword VM erts: Add test case for port_set_data and port_get_data erts: Fix race between port_set_data, port_get_data and port termination erts: Fix erlang:port_set_data/2 for non immediate data
2014-10-06erts: Fix bug causing mbc removed from cpool to be used at pool entranceSverker Eriksson
Clear both IN_POOL and BUSY flags when empty carrier is removed is removed from pool to be destroyed. Earlier it was enough to leave BUSY flag set but now with pooled_list we must clear IN_POOL to avoid using it as cpool_entrance in cpool_fetch().
2014-10-03erts: Add pooled_list and traitor_listSverker Eriksson
2014-10-03erts: Fix bug when delayed deallocated carrier is reused by cpool_fetchSverker Eriksson
The delayed dealloc queue destroyes one word but cpool_fetch() is expected to return healthy carriers. So we restore that overwritten word with a little bit of hackish code.
2014-10-02erts: Mend port_set_data with non-immed data for halfword VMSverker Eriksson
2014-10-02Fix missing field initializer in ERL_NIF_INIT macroSteve Vinoski
In the ERL_NIF_INIT macro, add a missing static initializer for the new options field which was added to the ErlNifEntry struct for 17.3. This fix prevents compile-time errors in NIFs when the compiler is instructed to treat missing field initializers as errors.
2014-09-30erts: Add test case for port_set_data and port_get_dataSverker Eriksson
2014-09-30erts: Fix race between port_set_data, port_get_data and port terminationSverker Eriksson
Always update prt->data with atomic xchg-op. Check for NULL data to detect racing port terminator. Use NULL, as THE_NON_VALUE can be a valid pointer on debug VM.
2014-09-30erts: Fix erlang:port_set_data/2 for non immediate dataSverker Eriksson
hsize field was not set leading to VM crash
2014-09-25No eager check I/O on OSERickard Green
2014-09-25Merge branch 'rickard/eager-check-io/OTP-12117' into ↵Rickard Green
rickard/maint-17/eager-check-io/OTP-12117 * rickard/eager-check-io/OTP-12117: Introduce support for eager check I/O scheduling Conflicts: erts/emulator/beam/erl_bif_info.c erts/emulator/beam/erl_init.c erts/emulator/beam/erl_process.c erts/preloaded/ebin/erlang.beam
2014-09-25Introduce support for eager check I/O schedulingRickard Green
2014-09-22erts: Fix ub in list_to_integer and bignum divLukas Larsson
2014-09-22Merge branch 'nox/fix-debug-hipe-lock-checking/OTP-12188' into maintMarcus Arendt
* nox/fix-debug-hipe-lock-checking/OTP-12188: Fix HiPE debug lock checking on OS X 64bit
2014-09-22erts: Initialize links when reading file infoLukas Larsson
2014-09-12erts: Remove enif_have_dirty_schedulers()Sverker Eriksson
and add 'dirty_scheduler_support' to ErlNifSysInfo
2014-09-12erts: getsockname is not allowed on non-bound socketsLukas Larsson
This only produces an error on win32, but should not really be called on *nix either.
2014-09-10erts: Correct dirty scheduler NIF API for WindowsSverker Eriksson
enif_schedule_nif() put LAST of the unconditional functions to keep the order which is vital for ABI compatibility on Windows. The conditional dirty scheduler stuff moved down at the end of the list to keep them out of the way. We don't want them mess things up then they become unconditional some day.
2014-09-05Merge branch 'rickard/memory_consuming_tuple_tests' into maintRickard Green
* rickard/memory_consuming_tuple_tests: Only run upper boundry tuple test with lots of memory
2014-09-05Only run upper boundry tuple test with lots of memoryRickard Green
2014-09-05Merge branch 'vinoski/enif-schedule-nif' into maintRickard Green
OTP-12128 * vinoski/enif-schedule-nif: Fix leak of NIF exports Use separate allocation type for NIF export