aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
AgeCommit message (Collapse)Author
2019-02-22[socket-nif] Fix buggy use of NULL-monitorSverker Eriksson
Assert failed in enif_demonitor when called with "NULL-monitor". Replaced null monitor with separate 'is_active' boolean and added my_make_monitor_term for printing (to be replaced with enif_make_monitor_term).
2019-02-22[socket-nif] Fix bug in message sendingSverker Eriksson
Asserts failed in debug vm as msg term was built from mixed ErlNifEnv's.
2019-02-22[socket|test] Some improvements to (esock) ttestMicael Karlberg
Add a quiet mode for ttest which is used when running in a (terminal) shell. Moved the esock-ttest script(s) into their own directory. Minor improvements to the (client) result printout. Also fixed copyright (end) dates. OTP-14831
2019-02-22[socket] Local address on macOS MojaveMicael Karlberg
Fixed how to figure out local address on macOS Mojave. OTP-14831
2019-02-22[socket-nif] Fix memorys leaks in recv error casesSverker Eriksson
and collapsed some duplicate code
2019-02-22[socket-nif] Fix currentReader/Writer always set at enif_selectSverker Eriksson
2019-02-22[socket-nif] Rename 'nosup' -> 'notsup'Sverker Eriksson
as called in crypto.erl and erlang.erl.
2019-02-04Merge branch 'bmk/20180918/nififying_inet/OTP-14831' into ↵Micael Karlberg
bmk/20190204/socket_as_nif/OTP-14831
2019-02-01[socket-nif] nosup expection of win32 and type(s) replacementsMicael Karlberg
The nif callback functions (nif_open) now instead cause an 'nosup' exception if called (instead of badarg). The basic type uint16_t, uint32_t and int32_t (C99) replaced "own" (that is, defined by "us") types Uint16, Uint32 and Sint32. The point of this is that our Windows build system seems to be a bit lacking when it comes to types... Removed "some stuff" that was if-defed. Different solution when win32 support for sockets has been improved. Make sure the socket_*.c util modules are not included in the building for windows. OTP-15526
2019-02-01Merge branch 'maint'Lukas Larsson
2019-02-01erts: Fix erlang:system_info(kernel_poll) to return correct valueLukas Larsson
2019-02-01Merge branch 'maint'Lukas Larsson
2019-02-01fix: erts: Remove dead ERTS_MAGIC_REF_BIF_TIMERS codeLukas Larsson
2019-02-01Merge branch 'maint'Lukas Larsson
2019-02-01erts: Remove dead ERTS_MAGIC_REF_BIF_TIMERS codeLukas Larsson
Using magic refs for big timers caused too large a stress on the off_heap GC implementation to be viable, so it was never enable. The code is now broken because of other changes to we might as well remove it.
2019-01-31Merge branch 'maint'Sverker Eriksson
2019-01-30[socket-nif] Preliminary windows adaptionsMicael Karlberg
Added preliminary, and temporary, windows adaptions. Basically they amount to letting all nif-callback functions returning badarg for all calls if on windows (this has been accomplished by if-defing the nif-code; if win32 then badarg else do-something). OTP-15526
2019-01-29[socket-nif] The otp rcvbuf option updatedMicael Karlberg
Its now possible to set a rcvbuf (otp) option value of {N :: pos_integer(), BufSz :: pos_integer()}. This value is used for type stream and protocol tcp, when calling the function recv with length = 0 (zero). The second value, BufSz, is the actual size of the receive buffer used when calling the socket recv function, and the first value, N, is the max number of possible reads that will be performed (at most), even if there is more data to read. This is limit the effect of DoS attacks. OTP-15497
2019-01-28erts: Add magic port control numbersSverker Eriksson
to increase the probablity of a nice badarg from erlang:port_control.
2019-01-25[socket-nif] Correct state checks when calling read and write functionsMicael Karlberg
The read and write functions now *only* use the isReadable and isWritable fields, respectively, to decide if the "socket" can be read from and written to (previously the state field was used outside of the mutex lock). Also made it possible to enable / disable test suite groups individually, via environment variables (ESOCK_TEST_...). Specifically, the ttest group has been excluded by default (takes to long a time). OTP-15549
2019-01-24Merge pull request #2100 from jhogberg/john/compiler/module-type-optimizationJohn Högberg
Apply type optimizations across local function calls
2019-01-24compiler: Introduce module-level type optimizationJohn Högberg
This commit lets the type optimization pass work across functions, tracking return and argument types to eliminate redundant tests.
2019-01-23Merge branch 'maint'Lukas Larsson
2019-01-23Merge branch 'lukas/erts/set_logger_process/OTP-15375' into maintLukas Larsson
* lukas/erts/set_logger_process/OTP-15375: erts: Fix type of system_logger variable
2019-01-23erts: Fix type of system_logger variableLukas Larsson
2019-01-23Merge branch 'bjorn/erts/optimize-is_function2'Björn Gustavsson
* bjorn/erts/optimize-is_function2: Optimize the is_function/2 guard test
2019-01-23Merge branch 'maint'Lukas Larsson
2019-01-23Merge branch 'lukas/erts/scheduler-pollset-fixes/OTP-15538' into maintLukas Larsson
* lukas/erts/scheduler-pollset-fixes/OTP-15538: erts: Fix getting of poll events on linux >= 4.15.0 erts: Use reduction based polling for starved poll-set erts: Fix pollset test cases
2019-01-23Merge branch 'lukas/erts/fix_spawn_driver_early_close/OTP-15537' into maintLukas Larsson
* lukas/erts/fix_spawn_driver_early_close/OTP-15537: erts: Fix too early close of spawn driver fd
2019-01-23Merge branch 'lukas/erts/fix_inet_multitimer_cleanup/OTP-15536' into maintLukas Larsson
* lukas/erts/fix_inet_multitimer_cleanup/OTP-15536: erts: Fix cleanup of the inet MultiTimer
2019-01-22erts: Fix cleanup of the inet MultiTimerLukas Larsson
2019-01-21[socket-nif] Add support for otp option fdMicael Karlberg
Add a way to *get* the file descriptor (fd) of a socket. Useful mostly for debugging. OTP-15528
2019-01-21Optimize the is_function/2 guard testBjörn Gustavsson
The is_function2 instruction is executed surprisingly frequently when running dialyzer or the compiler. It cannot hurt to optimize it a little.
2019-01-21erts: Fix getting of poll events on linux >= 4.15.0Lukas Larsson
2019-01-18erts: Use reduction based polling for starved poll-setLukas Larsson
When the schedulers never go to sleep (and thus never polls) it may be that the fds in schedulers poll-sets are never polled. Before this commit, this was solved by starting a timer when an overload was detected. This had issues as overloads were not always detected in time. So this commit reverts to the pre OTP-21 behaviour so keep a global counter makes that the poll is called when it should.
2019-01-18erts: Fix too early close of spawn driver fdLukas Larsson
2019-01-18Merge branch 'bjorn/erts/fix-pt-dumping'Björn Gustavsson
* bjorn/erts/fix-pt-dumping: Fix incorrect dumping of some persistent terms
2019-01-18Merge pull request #2055 from ↵Lukas Larsson
josevalim/jv-no-bin-alloc-on-empty-append/OTP-15535 Do not allocate new bitstring/binary on empty append
2019-01-17Fix incorrect dumping of some persistent termsBjörn Gustavsson
There seems to be an incorrect merge conflict resolution in abde22933f5a that merged maint to master. Dumping of references (and possibly other terms) were broken.
2019-01-16Merge branch 'maint'Rickard Green
* maint: Fix bug causing dirty scheduler sleeper list inconsistency
2019-01-16Merge branch 'rickard/dirty_scheduler_collapse/maint-21/OTP-15509' into maintRickard Green
* rickard/dirty_scheduler_collapse/maint-21/OTP-15509: Fix bug causing dirty scheduler sleeper list inconsistency
2019-01-15Merge branch 'maint'Lukas Larsson
2019-01-15Merge branch 'lukas/erts/spawn_opt_max_heap_tc_fix' into maintLukas Larsson
* lukas/erts/spawn_opt_max_heap_tc_fix: erts: Fix process_SUITE:max_heap tests
2019-01-15Merge branch 'maint'Lukas Larsson
2019-01-15erts: Remove dead gdb functions from codeLukas Larsson
2019-01-15erts: Make sure to take main lock when dumping proc infoLukas Larsson
If the main lock is not taken then any process running on a dirty scheduler may cause all kinds of problems.
2019-01-15Merge branch 'maint'Lukas Larsson
Conflicts: erts/emulator/beam/bif.c erts/preloaded/ebin/erlang.beam erts/preloaded/ebin/erts_internal.beam erts/preloaded/ebin/prim_file.beam
2019-01-15Merge branch 'lukas/erts/set_logger_process/OTP-15375' into maintLukas Larsson
* lukas/erts/set_logger_process/OTP-15375: Update preloaded modules erts: Add erlang:system_flag(system_logger,_)
2019-01-11Merge branch 'rickard/dirty_scheduler_collapse/OTP-15509' into ↵Rickard Green
rickard/dirty_scheduler_collapse/maint-21/OTP-15509 * rickard/dirty_scheduler_collapse/OTP-15509: Fix bug causing dirty scheduler sleeper list inconsistency
2019-01-11Fix bug causing dirty scheduler sleeper list inconsistencyRickard Green