Age | Commit message (Collapse) | Author |
|
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).
|
|
|
|
|
|
|
|
* jj1bdx/jj1bdx-18.2-freebsd-hipe-fix-2:
hipe_x86_signal.c: add FreeBSD sigaction code
|
|
* egil/fix-windows-paths/OTP-13202:
Revert "Fix erroneous splitting of emulator path"
|
|
This reverts commit 731890f3b4ac62eed1221aa7d9fd2bfa6bf51d8c.
|
|
* erts/emulator/hipe/hipe_x86_signal.c:
add FreeBSD sigaction code, based on the Darwin (OS X) code
|
|
=== OTP-18.2 ===
Changed Applications:
- asn1-4.0.1
- common_test-1.11.1
- compiler-6.0.2
- crypto-3.6.2
- dialyzer-2.8.2
- diameter-1.11.1
- erl_docgen-0.4.1
- erl_interface-3.8.1
- erts-7.2
- eunit-2.2.12
- hipe-3.14
- inets-6.1
- jinterface-1.6.1
- kernel-4.1.1
- observer-2.1.1
- parsetools-2.1.1
- public_key-1.1
- runtime_tools-1.9.2
- sasl-2.6.1
- snmp-5.2.1
- ssh-4.2
- ssl-7.2
- stdlib-2.7
- test_server-3.9.1
- tools-2.8.2
- typer-0.9.10
- wx-1.6
- xmerl-1.3.9
Unchanged Applications:
- cosEvent-2.2
- cosEventDomain-1.2
- cosFileTransfer-1.2
- cosNotification-1.2
- cosProperty-1.2
- cosTime-1.2
- cosTransactions-1.3
- debugger-4.1.1
- edoc-0.7.17
- eldap-1.2
- et-1.5.1
- gs-1.6
- ic-4.4
- megaco-3.18
- mnesia-4.13.2
- odbc-2.11.1
- orber-3.8
- os_mon-2.4
- ose-1.1
- otp_mibs-1.1
- percept-0.8.11
- reltool-0.7
- syntax_tools-1.7
- webtool-0.9
|
|
* ia/libressl:
ssl: Print openssl version string
ssl: Do not use environment variables in openSSL config file
|
|
|
|
|
|
|
|
|
|
* ia/libressl:
ssl: Print openssl version string
ssl: Do not use environment variables in openSSL config file
|
|
* siri/appups-18.2:
Update appups in kernel, stdlib and sasl for OTP-18.2
|
|
* ia/inets/dialyzer-custom:
inets: Include behaviour modules in install target
inets: Fix dialyzer warning
|
|
|
|
|
|
* zandra/update-windows-docs:
update the howto build and install on windows documentation
OTP-13192
|
|
OTP-13188 ticket for: 192c4a80c7d6fe9949aecb864901c4a3d9549f36
|
|
|
|
* zandra/fix-snmp-appup:
correct the snmp app up file
|
|
LibreSSL does not allow it.
|
|
|
|
|
|
* dgud/wx/fix-observer-display:
wx: Revert part of 617387025b698c
|
|
* ia/pr/919/OTP-13189:
ssl: fix hibernate_after with instant or near instant timeouts
|
|
Causes issues on mac and observer
|
|
* sverk/setnode-rename-bug/OTP-13076:
erts: Fix correct node name for DTRACE
|
|
broken by 949de78331b9c4ecb9.
|
|
|
|
* sverk/dist-ctrl-msg-overflow:
erts: Fix faulty cleanup when receiving broken dist msg
|
|
Bug introduced in ce8279d6a48d41f9.
Thank you valgrind.
|
|
* siri/sasl/doc-editors/OTP-13000:
sasl: Editorial changes
|
|
|
|
|
|
* ia/ssl/ECC-tests:
ssl: Fix typos
|
|
|
|
* ia/ssl/windows-tests:
ssl: Use test case time out instead
ssl: Use spawn_executable
|
|
* ia/ssl/renegotiate-tests:
ssl: Add renegotiation exception
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* lars/erl_docgen/fix-dtd-tags:
[erl_docgen] Update element section in DTD
[erl_docgen] Update element d in DTD
[erl_docgen] Update item element in DTD
|
|
Allow sections in sections for reference manuals.
|