aboutsummaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)Author
2015-11-27hipe: Fix constructing huge binariesMagnus Lång
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.
2015-11-27hipe: Fix binary constructions failing with badarithMagnus Lång
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.
2015-11-27hipe: Allow unsigned args in hipe_rtl_arithMagnus Lång
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.
2015-11-27hipe: test unit size match in bs_put_binary_allMagnus Lång
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.
2015-11-27hipe: test unit size match in bs_appendMagnus Lång
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.
2015-11-27Fix hipe_rtl_binary_construct:floorlog2/1Magnus Lång
Relying on double-precision floating-point arithmetic to compute the log2 of an integer up to 64 bits long leads to rounding errors.
2015-11-27stdlib: Fix the shell command rp and pretty-printingHans Bolinder
The shell command 'rp' prints strings as lists of integers when pretty printing of lists is 'false'.
2015-11-26Merge branch 'hans/ssh/optimize_sftp_window_handling/OTP-13130' into maintHans Nilsson
* 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
2015-11-26Merge branch 'legoscia/ssl_connection_terminate_crash' into maintZandra
* legoscia/ssl_connection_terminate_crash: Avoid crash for SSL connections with nonexistent keyfile OTP-13144
2015-11-26Merge branch 'legoscia/tls_dist_nodelay' into maintZandra
* legoscia/tls_dist_nodelay: Add test for dist_nodelay option Honour dist_nodelay socket option in tls_dist proxy OTP-13143
2015-11-26Merge branch 'legoscia/ssl-dist-error-handling' into maintZandra
* legoscia/ssl-dist-error-handling: In ssl_tls_dist_proxy, pass along EPMD registration errors OTP-13142
2015-11-26Merge branch 'zandra/fix-24h-macro-in-suite' into maintZandra
* zandra/fix-24h-macro-in-suite: fix 24h macro in test suite
2015-11-26Merge branch 'ppikula/fix-24h-macro' into maintZandra
* 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
2015-11-25ssh: sftpd callback takes new option 'recv_window_size', defaults to 1000000Hans Nilsson
2015-11-25ssh: added 'pending' in recv_window handling and limit sendingHans Nilsson
2015-11-24Merge branch 'hans/ssh/fd_more/OTP-12966' into maintHans Nilsson
* 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
2015-11-24Merge branch 'hans/ssh/aes_gcm_crypto/OTP-13018' into maintHans Nilsson
* 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
2015-11-24Merge branch 'tuncer/musl' into maintZandra
* tuncer/musl: musl: fix gethostbyname_r/gethostbyaddr_ selection
2015-11-24Merge branch 'legoscia/tls-dist-shutdown' into maintZandra
* legoscia/tls-dist-shutdown: Adjust shutdown strategies for distribution over TLS OTP-13134
2015-11-23ssh: fix dialyzer reported errorHans Nilsson
2015-11-23ssh: renegotiate test group for AES_GCMHans Nilsson
2015-11-23ssh: documentation updatesHans Nilsson
2015-11-23ssh: AEAD_AES_(128|256)_GCM and aes(128|256)[email protected] cryptoHans Nilsson
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.
2015-11-23ssh: refactor packet receptionHans Nilsson
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.
2015-11-20Merge branch 'bjorn/compiler/fix-missing-filename/OTP-13113' into maintBjörn Gustavsson
* bjorn/compiler/fix-missing-filename/OTP-13113: Fix missing filename and line number in warning
2015-11-20Fix missing filename and line number in warningBjörn Gustavsson
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
2015-11-20ssh: testcases for starting daemon with given fdHans Nilsson
2015-11-20Merge branch 'ia/ssl/tls-client-hello-version/OTP-13114' into maintIngela Anderton Andin
* ia/ssl/tls-client-hello-version/OTP-13114: ssl: Client should send the hello message in the lowest version it is willing to support
2015-11-20Merge branch 'weisslj/fix-inets-crash-on-invalid-chunk-size' into maintZandra
* weisslj/fix-inets-crash-on-invalid-chunk-size: inets: Terminate really gracefully on bad chunk OTP-13117
2015-11-20Merge branch 'weisslj/allow-whitespace-after-chunk-size' into maintZandra
* weisslj/allow-whitespace-after-chunk-size: inets: Allow whitespace after HTTP chunk again OTP-13116
2015-11-20Merge branch 'riverrun/maint' into maintZandra
* riverrun/maint: Recommend against using crypto:rand_bytes
2015-11-19ssh: Make it possible for more than one daemon started with option fdHans Nilsson
2015-11-18ssl: Client should send the hello message in the lowest version it is ↵Ingela Anderton Andin
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
2015-11-17[crypto] Correct documentationHans Bolinder
Fix mistakes found by 'xmllint'.
2015-11-17[compiler] Correct documentationHans Bolinder
Fix mistakes found by 'xmllint'.
2015-11-17[ssh] Correct documentationHans Bolinder
Fix mistakes found by 'xmllint'.
2015-11-17[snmp] Correct documentationHans Bolinder
Fix mistakes found by 'xmllint'.
2015-11-17[eunit] Correct documentationHans Bolinder
Fix mistakes found by 'xmllint'.
2015-11-17Merge branch 'hans/ssh/doc_updates/OTP-12003' into maintHans Nilsson
* 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
2015-11-17Merge branch 'hans/ssh/cuddle_tests' into maintHans Nilsson
* 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
2015-11-17Merge branch 'hans/ssh/sshdir_search_order/OTP-13109' into maintHans Nilsson
* hans/ssh/sshdir_search_order/OTP-13109: ssh: ssh_file:default_user_dir/0 - try HOME env var first
2015-11-16fix 24h macro in test suiteZandra
Needed after the fix in 120975c4fcb57ecd14031ac046f483e56a3daa4d.
2015-11-16Merge branch 'deadok22/jinterface-input-stream-read-any-etf-113' into maintHenrik Nord
* deadok22/jinterface-input-stream-read-any-etf-113: OtpInputStream: external fun terms in read_any() OTP-13106
2015-11-16Merge branch 'legoscia/erl-make-exit-code' into maintHenrik Nord
* legoscia/erl-make-exit-code: Make erl -make return non-zero exit code on failure OTP-13107
2015-11-16Merge branch 'kanatohodets/ssh-subsystem-typo' into maintHenrik Nord
* kanatohodets/ssh-subsystem-typo: Fix spelling of ssh 'subsystem' OTP-13108
2015-11-15inets: Terminate really gracefully on bad chunkJohannes Weißl
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,"åäö"}}}
2015-11-15inets: Allow whitespace after HTTP chunk againJohannes Weißl
Before 77acb47 http:request/1 could parse server responses with whitespace after the HTTP chunk size (some embedded legacy devices still do this). This patch restores this functionality.
2015-11-14musl: fix gethostbyname_r/gethostbyaddr_ selectionTuncer Ayaz
To fix conditional selection of the actually available gethostbyname_r and gethostbyaddr_r, we replace __GLIBC__ with __linux__. @zenhack tested this to work with gcc and clang targeting glibc, uclibc, musl, and bionic. The proper way to check this is through configure.in.
2015-11-13Add test for dist_nodelay optionMagnus Henoch
Run the 'basic' test with dist_nodelay set to false.
2015-11-13ssh: ssh_file:default_user_dir/0 - try HOME env var firstHans Nilsson