Age | Commit message (Collapse) | Author |
|
|
|
The HiPE compiler was leaking exceptions out of guards involving
binaries with `strange' arithmetic in them. Fixed by the set of
changes in this pull request.
|
|
Some more cases (taken from the BEAM bs_construct suite) that used to
show different behaviour than BEAM when compiled to native code were
included in the appropriate test file of the HiPE test suite.
|
|
This allows us to compile bs_match_int_SUITE with HiPE without a
system_limit crash.
|
|
Bugs were fixed in
hipe_rtl_binary_match:{first_part/3,make_size/3,set_high/1} in commit
5aea81c49, but it turns out these had been copy-pasted verbatim into
hipe_rtl_binary_construct, where they were causing further bugs. They
have now moved to hipe_rtl_binary, from where they are included by the
other two modules.
Furthermore, first_part/3 (reamed get_word_integer/3, since it loads
integers that fits into an unsigned word), and make_size/3 now accepts a
fourth argument to distinguish too large arguments (which should cause a
system_limit exception) from negative or non-integral arguments.
The use of first_part/3 (get_word_integer/3) from 5aea81c49 in
hipe_rtl_binary_construct now allows several binary construction
instructions to accept bignum sizes, as they were supposed to.
Additionally, calls to
hipe_rtl_binary_construct:check_and_untag_fixnum/3 were replaced with
get_word_integer/4 since all of them were also supposed to accept
sufficiently small bignums, but didn't, and check_and_untag_fixnum/3 was
essentially identical to first_part/3 anyway.
HiPE is now capable of passing bs_construct_SUITE completely unmodified.
|
|
Expressions like <<0:(fun(X)->X end(anka))>> would fail with 'badarith'
in HiPE, but 'badarg' in BEAM.
hipe_beam_to_icode was attempting to optimise the amount of code
generated by letting the arithmetic error propagate instead of
catching it. However, since it was emitting a block to throw 'badarg' in
that case anyway, we can just reuse it to achieve just as compact code
that behaves exactly like BEAM.
|
|
hipe_rtl_arith is only used by hipe_rtl_ssa_const_prop, which applies it
to any RTL, including RTL where the intent is to do unsigned math. Since
signed and unsigned operations produce the same 2's complement result,
this change is harmless.
On 32-bit architectures it caused HiPE crashes when compiling code like
<<0:((1 bsl 32)-1)>>, because the size of the field is too large to fit
in a signed integer.
|
|
The unit size field was previously completely discarded when lowering
this instruction from BEAM to Icode.
This feature was previously missing and expressions such as <<0,
<<1:1>>/binary>> would succeed construction when compiled with HiPE.
|
|
This feature was previously missing and expressions such as
<<<<1:1>>/binary>> would succeed construction when compiled with HiPE.
A primop is_divisible is introduced to handle the case when the unit
size is not a power of two.
|
|
Relying on double-precision floating-point arithmetic to compute the
log2 of an integer up to 64 bits long leads to rounding errors.
|
|
The shell command 'rp' prints strings as lists of integers
when pretty printing of lists is 'false'.
|
|
* hans/ssh/optimize_sftp_window_handling/OTP-13130:
ssh: sftpd callback takes new option 'recv_window_size', defaults to 1000000
ssh: added 'pending' in recv_window handling and limit sending
|
|
* legoscia/ssl_connection_terminate_crash:
Avoid crash for SSL connections with nonexistent keyfile
OTP-13144
|
|
* legoscia/tls_dist_nodelay:
Add test for dist_nodelay option
Honour dist_nodelay socket option in tls_dist proxy
OTP-13143
|
|
* legoscia/ssl-dist-error-handling:
In ssl_tls_dist_proxy, pass along EPMD registration errors
OTP-13142
|
|
* zandra/fix-24h-macro-in-suite:
fix 24h macro in test suite
|
|
* ppikula/fix-24h-macro:
fix incorrect number of seconds in 24h macro The previous commit - 7b93f5d8a224a0a076a420294c95a666a763ee60 fixed the macro only in one place.
OTP-13141
|
|
|
|
|
|
* hans/ssh/fd_more/OTP-12966:
ssh: testcases for starting daemon with given fd
ssh: Make it possible for more than one daemon started with option fd
|
|
* hans/ssh/aes_gcm_crypto/OTP-13018:
ssh: fix dialyzer reported error
ssh: renegotiate test group for AES_GCM
ssh: documentation updates
ssh: AEAD_AES_(128|256)_GCM and aes(128|256)[email protected] crypto
ssh: refactor packet reception
|
|
* tuncer/musl:
musl: fix gethostbyname_r/gethostbyaddr_ selection
|
|
* legoscia/tls-dist-shutdown:
Adjust shutdown strategies for distribution over TLS
OTP-13134
|
|
|
|
|
|
|
|
Note that the rfc5647 is ambigous so this implementation of AEAD_AES_(128|256)_GCM
may or may not be compatible with others. They are note enabled by default but may
be enabled by the user. See the Reference Manual, Application SSH for details of
how we interpret the rfc.
To be safe, use [email protected] or [email protected] instead.
|
|
There was an assymetric relationship between receiving a ssh-packet (decrypting-mac-decompress) and sending one. When sending, most of the work was defined in the ssh_transport module, while at reception the ssh_connection_handler was the one knowing what to do.
This commit moves the reception down to the ssh_transport module where it belongs.
|
|
* bjorn/compiler/fix-missing-filename/OTP-13113:
Fix missing filename and line number in warning
|
|
When the 'bin_opt_info' is given, warnings without filenames
and line numbers could sometimes be produced:
no_file: Warning: INFO: matching non-variables after
a previous clause matching a variable will prevent delayed
sub binary optimization
The reason for the missing information is that #c_alias{} records lack
location information. There are several ways to fix the problem. The
easiest seems to be to get the location information from the
code).
Noticed-by: José Valim
|
|
|
|
* ia/ssl/tls-client-hello-version/OTP-13114:
ssl: Client should send the hello message in the lowest version it is willing to support
|
|
* weisslj/fix-inets-crash-on-invalid-chunk-size:
inets: Terminate really gracefully on bad chunk
OTP-13117
|
|
* weisslj/allow-whitespace-after-chunk-size:
inets: Allow whitespace after HTTP chunk again
OTP-13116
|
|
* riverrun/maint:
Recommend against using crypto:rand_bytes
|
|
|
|
willing to support
Refactor highest_protocol_version so that code is symmetrical with lowest_protocol_version. For clarity and possible future use cases of highest_protocol_version/2
|
|
Fix mistakes found by 'xmllint'.
|
|
Fix mistakes found by 'xmllint'.
|
|
Fix mistakes found by 'xmllint'.
|
|
Fix mistakes found by 'xmllint'.
|
|
Fix mistakes found by 'xmllint'.
|
|
* hans/ssh/doc_updates/OTP-12003:
ssh: alternative look
ssh: list supported rfcs
ssh: moved "supported" section from ssh module man page to SSH_app man page
ssh: links to crypto and public_key in the ssh app ref
ssh: updated ssh_app.xml with ecdsa info
ssh: removed pre-historic ssh specs from the doc-dir
ssh: document function dependencies in ssh_connection.erl
|
|
* hans/ssh/cuddle_tests:
ssh: Add env var info printout to ssh_algorithms_SUTE:init_per_suite
ssh: more public keys added to test suite
|
|
* hans/ssh/sshdir_search_order/OTP-13109:
ssh: ssh_file:default_user_dir/0 - try HOME env var first
|
|
Needed after the fix in 120975c4fcb57ecd14031ac046f483e56a3daa4d.
|
|
* deadok22/jinterface-input-stream-read-any-etf-113:
OtpInputStream: external fun terms in read_any()
OTP-13106
|
|
* legoscia/erl-make-exit-code:
Make erl -make return non-zero exit code on failure
OTP-13107
|
|
* kanatohodets/ssh-subsystem-typo:
Fix spelling of ssh 'subsystem'
OTP-13108
|
|
Without this fix, httpc:request/1 crashes the httpc_handler when an
invalid chunked length header is encountered (since 77acb47):
=ERROR REPORT==== 14-Nov-2015::17:19:30 ===
** Generic server <0.651.0> terminating
** Last message in was {tcp,#Port<0.5714>,
<<"HTTP/1.1 200 ok\r\nTransfer-Encoding:chunked\r\n\r\nåäö\r\n">>}
** When Server state == {state,
[...]
** Reason for termination ==
** {bad_return_value,{error,{chunk_size,"åäö"}}}
|