Age | Commit message (Collapse) | Author |
|
Also, some of the branches were testing sizes in bits against a constant
?MAX_BINSIZE, which was in bytes. The signed comparisons masked this
mistake. These branches have been removed since all sizes in bits that
fit in a machine word are valid binary sizes.
Finally, a test that reproduces the issue was added to bs_construct,
along with a test for one of the cases (bs_init<0>(...)) when the test
against ?MAX_BINSIZE must be changed to unsigned rather than removed.
|
|
The test whether the result would fit in a smallnum could overflow into
a negative number that would fit a smallnum. A test that reproduces the
issue was added to bs_construct_SUITE.
|
|
|
|
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.
|
|
huge_binary/1 did not consider that the Shift variable is not a
constant, and misses the case of a literal size.
|
|
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.
|
|
* hb/stdlib/fix_shell_strings/OTP-13145:
stdlib: Fix the shell command rp and pretty-printing
|
|
The shell command 'rp' prints strings as lists of integers
when pretty printing of lists is 'false'.
|
|
* sverk/setnode-rename-bug/OTP-13076:
erts: Fix bug in setnode/2
erts: Remove ERTS_PSD_DIST_ENTRY
erts: Remove faulty ASSERT in erts_proc_*_refc
|
|
* 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.
|
|
* dgud/erts/fix-mixed-msys-cygwin:
win32: Fix mixed cygwin and msys configure tests
|
|
* egil/18/fix-maps-binary_to_term/OTP-13125:
erts: More testcases for map binary_to_term/1
erts: Fix maps decode in erlang:binary_to_term/1
|
|
|
|
Decoding a term with a large (HAMT) map in an small (FLAT) map could cause
a critical error if the external format was not produced by beam.
|
|
* 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
|
|
* lrascao/fix/vm_crash_on_init_restart:
Fix crash on init restart
OTP-13115
|
|
|
|
* bjorn/erts/erl_prim_loader-doc/OTP-13102:
erl_prim_loader doc: Remove description of custom loaders
|
|
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'.
|