aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/drivers
AgeCommit message (Collapse)Author
2017-02-14Fixed typos in ertsAndrew Dryga
2017-02-08Merge branch 'maint'Raimo Niskanen
Conflicts: OTP_VERSION
2017-02-07Use fstat if it exists in efile_openfileRaimo Niskanen
2017-01-17erts: Fix zlib crash on mac for inflateGetDictionarySverker Eriksson
Work around broken build system by checking actual zlib version in runtime.
2016-12-19erts: Tidy up in efile_drv.cSverker Eriksson
ERL_DRV_USE_NO_CALLBACK only meaningful when deselecting.
2016-09-15Merge branch 'maint'Raimo Niskanen
2016-09-14Tune 'tclass' semanticsRaimo Niskanen
2016-09-12Implement IPV6_TCLASSRaimo Niskanen
2016-08-26Merge branch 'g-andrade/kernel/fetch_ztream_dictionary/PR-1139/OTP-13842'Lukas Larsson
* g-andrade/kernel/fetch_ztream_dictionary/PR-1139/OTP-13842: Update preloaded modules Specify min zlib ver on inflateGetDictionary doc Skip inflateGetDictionary test case if unsupported zlib: Only link inflateGetDictionary if available zlib: Add test case for inflateGetDictionary zlib: support extraction of inflation dictionary
2016-08-22zlib: Only link inflateGetDictionary if availableGuilherme Andrade
Which at the moment means zlib versions >= 1.2.8.
2016-07-28Fix SCTP send stats in inet_drvRaimo Niskanen
2016-07-23zlib: support extraction of inflation dictionaryGuilherme Andrade
2016-06-16Return eafnosupport when not supportedRaimo Niskanen
2016-06-08Remove internal state BOUND from inet_drvRaimo Niskanen
2016-06-02Merge branch 'saleyn/uds/PR-612/OTP-13572'Raimo Niskanen
* saleyn/uds/PR-612/OTP-13572: AF_UNIX is more portable
2016-06-02AF_UNIX is more portableRaimo Niskanen
Fix dialyzer warning for improper list in prim_inet by not using an improper list.
2016-06-02Merge branch 'saleyn/uds/PR-612/OTP-13572'Raimo Niskanen
* saleyn/uds/PR-612/OTP-13572: Rewrite inet* for address family 'local' Rewrite inet_drv for AF_LOCAL Assign externally open fd to gen_tcp (UDS support) Conflicts: erts/preloaded/ebin/prim_inet.beam lib/kernel/doc/src/gen_tcp.xml lib/kernel/doc/src/gen_udp.xml lib/kernel/src/inet6_sctp.erl lib/kernel/test/inet_SUITE.erl
2016-06-01Rewrite inet_drv for AF_LOCALRaimo Niskanen
2016-04-13Merge branch 'henrik/update-copyrightyear'Henrik Nord
* henrik/update-copyrightyear: update copyright-year
2016-04-07Merge branch 'bjorn/erts/huge-file-fix/OTP-13461'Björn Gustavsson
* bjorn/erts/huge-file-fix/OTP-13461: Handle multi-giga byte writes to files
2016-04-04Handle multi-giga byte writes to filesBjörn Gustavsson
Test cases that write 4Gb to a file at once would fail on OS X and FreeBSD. By running a simple test program on OS X (El Capitan 10.11.4/Darwin 15.4.0), I found that writev() can handle more than 4Gb of data, while write() only can handle less than 2Gb. (Note that efile_drv.c will use write() if there is only one element in the io vector, and writev() if there is more than one.) It is tempting to attempt to piggy-back on the existing mechanism for segmenting write operations in efile_drv.c, but because of the complex code I find it too dangerous, both from a correctness and performance perspective. Instead do the change in unix_efile.c, which is considerably simpler.
2016-03-31Refactor time_t in efile_drvBjörn-Egil Dahlberg
2016-03-30erts: Fix "hanging" VM caused by exiting tty_sl driverSverker Eriksson
Bug introduced on master in a31eab5469b7740d.
2016-03-15Fix ttsl_drv logging without TERMCAPBjörn-Egil Dahlberg
2016-03-15update copyright-yearHenrik Nord
2016-03-15Merge branch 'egil/fix-fdatasync-mac/OTP-13411'Björn-Egil Dahlberg
* egil/fix-fdatasync-mac/OTP-13411: erts: Use fcntl(fd, F_FULLFSYNC) instead of fdatasync on Mac OSX
2016-03-15erts: Use fcntl(fd, F_FULLFSYNC) instead of fdatasync on Mac OSXBjörn-Egil Dahlberg
The syscall fdatasync does not work as intended on Mac OSX. Both the function fsync and fdatasync now uses fcntl(fd, F_FULLFSYNC) on Mac OSX.
2016-03-14erts: Increase ttsl_drv logging capabilitiesBjörn-Egil Dahlberg
2016-02-24Merge branch 'master' into sverk/master/halt-INT_MINSverker Eriksson
2016-02-24erts: Change erl_exit into erts_exitSverker Eriksson
This is mostly a pure refactoring. Except for the buggy cases when calling erlang:halt() with a positive integer in the range -(INT_MIN+2) to -INT_MIN that got confused with ERTS_ABORT_EXIT, ERTS_DUMP_EXIT and ERTS_INTR_EXIT. Outcome OLD erl_exit(n, ) NEW erts_exit(n, ) ------- ------------------- ------------------------------------------- exit(Status) n = -Status <= 0 n = Status >= 0 crashdump+abort n > 0, ignore n n = ERTS_ERROR_EXIT < 0 The outcome of the old ERTS_ABORT_EXIT, ERTS_INTR_EXIT and ERTS_DUMP_EXIT are the same as before (even though their values have changed).
2016-02-02Merge branch 'maint'Rickard Green
* maint: Fix inet driver multi timers using new time API
2016-02-02Merge branch 'rickard/tcp-accept-tmo-bug/OTP-13254' into maintRickard Green
* rickard/tcp-accept-tmo-bug/OTP-13254: Fix inet driver multi timers using new time API
2016-01-27Merge branch 'maint'Lukas Larsson
* maint: erts: Fix sendfile:ing of large files on FreeBSD
2016-01-27Merge branch 'theom/freebsd-sendfile-patch-2/OTP-13271' into maintLukas Larsson
* theom/freebsd-sendfile-patch-2/OTP-13271: erts: Fix sendfile:ing of large files on FreeBSD
2016-01-27erts: Fix sendfile:ing of large files on FreeBSDJP
If the file was larger than the OS send buffer the call would fail before this patch.
2016-01-27Merge branch 'maint'Lukas Larsson
* maint: efile_drv: logic error in compressed file write
2016-01-21Fix inet driver multi timers using new time APIRickard Green
2016-01-12Assign externally open fd to gen_tcp (UDS support)Serge Aleynikov
When a AF_LOCAL file descriptor is created externally (e.g. Unix Domain Socket) and passed to `gen_tcp:listen(0, [{fd, FD}])`, the implementation incorrectly assigned the address family to be equal to `inet`, which in the inet_drv driver translated to AF_INET instead of AF_LOCAL (or AF_UNIX), and an `einval` error code was returned. This patch fixes this problem such that the file descriptors of the `local` address family are supported in the inet:fdopen/5, gen_tcp:connect/3, gen_tcp:listen/2, gen_udp:open/2 calls
2015-12-20efile_drv: logic error in compressed file writeMikael Pettersson
Compiling OTP 18.2.1 with gcc-5.3 shows the following warning: drivers/common/efile_drv.c:1538:23: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] The code in question is: if (! (status = erts_gzwrite((ErtsGzFile)d->fd, iov[i].iov_base, iov[i].iov_len)) == iov[i].iov_len) { d->errInfo.posix_errno = d->errInfo.os_errno = errno; /* XXX Correct? */ break; } If we hoist the assignment out of the if for clarity, it becomes: status = erts_gzwrite(..., iov[i].iov_len); if (! status == iov[i].iov_len) { ...; break; } iov_len is > 0 here, and status will equal iov_len if erts_gzwrite succeeded, but will be less than iov_len if an error occurred. "! status" is 0 or 1, which can only equal iov_len if iov_len is 1 and erts_gzwrite detected an error and returned 0. The effect of this mistake is that any error when iov_len >= 2 will skip the conditional code and break statement. In particular, partial writes (0 < status && status < iov_len) will not be flagged as errors. All releases since OTP R8B-0 are affected. The variable "status" is really a boolean, which is to be set to zero on error. The fix is to set status to 1 if erts_gzwrite() returned iov_len and 0 otherwise, and to change the condition to "if (! status) ...". I'm also hoisting the assignment out of the condition since it obscures the code while providing not benefit (the condition in a while or for loop would be a different matter).
2015-12-04Merge branch 'maint'Henrik Nord
2015-12-04Merge branch 'maint-17' into maintHenrik Nord
Conflicts: OTP_VERSION erts/doc/src/notes.xml erts/vsn.mk lib/kernel/doc/src/notes.xml lib/kernel/src/kernel.appup.src lib/kernel/vsn.mk lib/ssl/doc/src/notes.xml lib/ssl/src/ssl.appup.src lib/ssl/src/ssl_cipher.erl lib/ssl/vsn.mk otp_versions.table
2015-11-27Merge branch 'maint'Sverker Eriksson
2015-11-27Merge branch 'sverk/cpool_fetch-dc_list-fix' into maintSverker Eriksson
OTP-13147 * sverk/cpool_fetch-dc_list-fix: erts: Reduce alloc_SUITE:rbtree runtime for valgrind erts: Remove double free in efile_drv erts: Improve alloc_SUITE:migration test erts: Pass free mem and build type to alloc_SUITE tests erts: Fix snprintf in alloc_SUITE for windows erts: Workaround for strange crash on win64 in alloc_SUITE test code erts: Refactor alloc_SUITE to use NIFs instead of drivers erts: Add enif_getenv erts: Make key argument constant for erl_drv_{get|put}env erts: Add alloc_SUITE:migration erts: Add TEST allocator erts: Fix confusion of callbacks destroying_mbc() vs remove_mbc() erts: Fix resurrection of carriers from dc_list
2015-11-26erts: Remove double free in efile_drvSverker Eriksson
That double free is probably very seldom invoked as the port is already gone leading to free_data being called instead of file_async_ready.
2015-11-19Fix error propagate from setoptsRaimo Niskanen
2015-10-26erts: Add {line_delimiter, byte()} option to inet:setopts/2Serge Aleynikov
A new {line_delimiter, byte()} option allows line-oriented TCP-based protocols to use a custom line delimiting character. It is to be used in conjunction with {packet, line}. This option also works with erlang:decode_packet/3 when its first argument is 'line'.
2015-10-26Update primary bootstrapIngela Anderton Andin
2015-10-26erts: Add {line_delimiter, byte()} option to inet:setopts/2Serge Aleynikov
A new {line_delimiter, byte()} option allows line-oriented TCP-based protocols to use a custom line delimiting character. It is to be used in conjunction with {packet, line}. This option also works with erlang:decode_packet/3 when its first argument is 'line'.
2015-09-17Merge branch 'maint'Rickard Green
* maint: erts: Make sure to deal with EINTR write failures
2015-09-17Merge branch 'lukas/erts/ttsl_eintr/OTP-12987' into maintRickard Green
* lukas/erts/ttsl_eintr/OTP-12987: erts: Make sure to deal with EINTR write failures