aboutsummaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)Author
2015-09-09Merge branch 'maint'Hans Bolinder
* maint: dialyzer: Correct the handling of parameters of opaque types
2015-09-09dialyzer: Correct the handling of parameters of opaque typesHans Bolinder
Prior to this commit, the fact that parameters of opaque types are expanded differently depending on the current values of limits used during expansion, caused problems later when the types of parameters are used for determining if opaque types are comparable.
2015-09-07Merge branch 'maint'Sverker Eriksson
2015-09-07Merge branch 'sverk/crypto-ec_curves/OTP-12944' into maintSverker Eriksson
* sverk/crypto-ec_curves/OTP-12944: crypto: Make ec_curves/0 return empty list if not supported
2015-09-07Merge branch 'maint'Björn-Egil Dahlberg
2015-09-07Merge branch 'egil/fix-compiler-map-register/OTP-12967' into maintBjörn-Egil Dahlberg
2015-09-07Merge branch 'maint'Hans Bolinder
* maint: dialyzer: Fix erlang:abs/1
2015-09-04compiler: Fix get_map_elements register corruptionBjörn-Egil Dahlberg
Instruction get_map_elements might destroy target registers when the fail-label is taken. Only seen for patterns with two, and only two, target registers. Specifically: we copy one register, and then jump. foo(A,#{a := V1, b := V2}) -> ... foo(A,#{b := V}) -> ... call foo(value, #{a=>whops, c=>42}). corresponding assembler: {test,is_map,{f,5},[{x,1}]}. {get_map_elements,{f,7},{x,1},{list,[{atom,a},{x,1},{atom,b},{x,2}]}}. %% if 'a' exists but not 'b' {x,1} is overwritten, jump {f,7} {move,{integer,1},{x,0}}. {call_only,3,{f,10}}. {label,7}. {get_map_elements,{f,8},{x,1},{list,[{atom,b},{x,2}]}}. %% {x,1} (src) is read with a corrupt value {move,{x,0},{x,1}}. {move,{integer,2},{x,0}}. {call_only,3,{f,10}}. The fix is to remove 'opt_moves' pass for get_map_elements instruction in the case of two or more destinations. Reported-by: Valery Tikhonov
2015-09-04compiler: Add extra checks for get_map_elements in validatorBjörn-Egil Dahlberg
2015-09-04compiler: Add test for corrupt register in get_map_elementsBjörn-Egil Dahlberg
2015-09-04dialyzer: Fix erlang:abs/1Hans Bolinder
Fix the range type of erlang:abs/1.
2015-08-31Merge branch 'maint'Sverker Eriksson
2015-08-31Merge branch 'sverk/hipe-fix-literal-crc' into maintSverker Eriksson
* sverk/hipe-fix-literal-crc: erts,hipe,dialyzer: Fix hipe checkum of target runtime system erts: Change THE_NON_VALUE to not be hard coded in hipe compiler OTP-12962 OTP-12963 OTP-12964
2015-08-31erts,hipe,dialyzer: Fix hipe checkum of target runtime systemSverker Eriksson
Main problem: A faulty HIPE_LITERAL_CRC was not detected by the loader. Strangeness #1: Dialyzer should ask the hipe compiler about the target checksum, not an internal bif. Strangeness #2: The HIPE_SYSTEM_CRC checksum was based on the HIPE_LITERALS_CRC checksum. Solution: New HIPE_ERTS_CHECKSUM which is an bxor of the two (now independent) HIPE_LITERALS_CRC and HIPE_SYSTEM_CRC. HIPE_LITERALS_CRC represents values that are assumed to stay constant for different VM configurations of the same arch, and are therefor hard coded into the hipe compiler. HIPE_SYSTEM_CRC represents values that may differ between VM variants. By default the hipe compiler asks the running VM for this checksum, in order to create beam files for the same running VM. The hipe compiler can be configured (with "make XCOMP=yes ...") to create beam files for another VM variant, in which case HIPE_SYSTEM_CRC is also hard coded. ToDo: Treat all erts properties the same. Either ask the running VM or hard coded into hipe (if XCOMP=yes). This will simplify and reduce the risk of dangerous mismatches. One concern might be the added overhead from more frequent calls to hipe_bifs:get_rts_param.
2015-08-31Merge branch 'maint'Hans Nilsson
* maint: ssh: dh_gex defautl values increased. Groups added
2015-08-30ssh: dh_gex defautl values increased. Groups addedHans Nilsson
2015-08-30Merge branch 'maint'Hans Nilsson
* maint: ssh: Reorganize and extend the test suites
2015-08-30ssh: Reorganize and extend the test suitesHans Nilsson
Add ssh_trpt_test_lib:instantiate/2, ssh_test_lib:default_algoritms/2 and algo_intersection/2 ssh_to_openssh_SUITE uses only algos that sshd and ssh client supports raised timeout limit in ssh_basic_SUITE:ssh_connect_arg4_timeout Break out ssh_renegotiate_SUITE from ssh_basic_SUITE Move std_daemon/4 to ssh_test_lib.erl Add ssh_algorithms_SUITE Add ssh_options_SUITE Add assymetric testing of algorithms Add openssh tests to ssh_algorithms_SUITE Remove algo tests from ssh_sftp_SUITE (now in ssh_algorithms_SUITE) Removed kex algo tests from in ssh_basic_SUITE because they are now in ssh_algorithm_SUITE. fixed test case ssh_protocol_SUITE:no_common_alg_server_disconnects/1
2015-08-29Merge branch 'maint'Hans Nilsson
* maint: ssh: Elliptic Curve Diffie-Hellman (ECDH)
2015-08-29Merge branch 'hans/ssh/kex_ecdh/OTP-12622' into maintHans Nilsson
* hans/ssh/kex_ecdh/OTP-12622: ssh: Elliptic Curve Diffie-Hellman (ECDH)
2015-08-29ssh: Elliptic Curve Diffie-Hellman (ECDH)Hans Nilsson
Adds ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp512 and OTP-12938 hmac-sha2-512
2015-08-28Merge branch 'maint'Hans Nilsson
2015-08-28ssh: update vsn.mkHans Nilsson
2015-08-26Merge branch 'maint'Dan Gudmundsson
* maint: Optimize zip:unzip/2 when uncompressing to memory wx: Fix assert log test debugger: Fix broken debugger:quick/3 start Remove erlang:now() and random usage in tests
2015-08-26Merge branch 'dgud/stdlib/zip-optimize/OTP-12950' into maintDan Gudmundsson
* dgud/stdlib/zip-optimize/OTP-12950: Optimize zip:unzip/2 when uncompressing to memory
2015-08-26Merge branch 'dgud/debugger/fix-case-clause/OTP-12911' into maintDan Gudmundsson
* dgud/debugger/fix-case-clause/OTP-12911: debugger: Fix broken debugger:quick/3 start
2015-08-26Merge branch 'dgud/wx/fix-test' into maintDan Gudmundsson
* dgud/wx/fix-test: wx: Fix assert log test
2015-08-26Merge branch 'dgud/mnesia/use_now_in_tests' into maintDan Gudmundsson
* dgud/mnesia/use_now_in_tests: Remove erlang:now() and random usage in tests
2015-08-26Merge branch 'maint'Hans Nilsson
2015-08-25ssh: add extra random length padding in packetsHans Nilsson
A new experimental option 'max_random_length_padding', not documented so it might change...
2015-08-25Merge branch 'maint'Hans Nilsson
2015-08-25Merge branch 'hans/ssh/deps_in_src_Makefile' into maintHans Nilsson
* hans/ssh/deps_in_src_Makefile: ssh: dependencies added in ssh/src/Makefile
2015-08-25Merge branch 'hans/ssh/prolong_short_timetrap' into maintHans Nilsson
* hans/ssh/prolong_short_timetrap: ssh: doubled short timetrap in testcase
2015-08-25Merge branch 'maint'Henrik Nord
2015-08-25Merge branch 'eksperimental/patch-1' into maintHenrik Nord
* eksperimental/patch-1: Improve success message when 2 tests have passed OTP-12952
2015-08-25Merge branch 'maint'Hans Bolinder
* maint: dialyzer: Correct the timing of the phase called 'remote' dialyzer: Optimize expansion of parameters of opaque types dialyzer: Optimize the expansion of parameterized types somewhat dialyzer: Improve the handling of recursive parameterized opaque types dialyzer: Generalize an argument of erl_types:t_from_form()
2015-08-25dialyzer: Correct the timing of the phase called 'remote'Hans Bolinder
2015-08-25dialyzer: Optimize expansion of parameters of opaque typesHans Bolinder
Opaque recursive parameters are expanded faster.
2015-08-25dialyzer: Optimize the expansion of parameterized types somewhatHans Bolinder
Expand parameters when needed only. The opaqueness is removed from types expanded to any().
2015-08-25dialyzer: Improve the handling of recursive parameterized opaque typesHans Bolinder
2015-08-25dialyzer: Generalize an argument of erl_types:t_from_form()Hans Bolinder
Add more information about the caller of t_from_form(). Instead of just the module, also provide name of the type, spec, or record where the type form resides.
2015-08-24ssh: doubled short timetrap in testcaseHans Nilsson
2015-08-24erts: Change THE_NON_VALUE to not be hard coded in hipe compilerSverker Eriksson
Instead ask running VM for the value of THE_NON_VALUE, which is different between opt and debug VM. Same hipe compiler can now compile for both opt and debug VM.
2015-08-24ssh: dependencies added in ssh/src/MakefileHans Nilsson
2015-08-24Optimize zip:unzip/2 when uncompressing to memoryDan Gudmundsson
Optimize the case where we are appending to the end of the binary, use binary syntax to create binaries with room for expansion in the next loop, instead of using iolist_to_binary which creates a binary of the exact size and needs to be copied in each loop. Also remove support the unused Acc as iolists.
2015-08-24Merge branch 'bjorn/compiler/opt/OTP-12951'Björn Gustavsson
* bjorn/compiler/opt/OTP-12951: beam_validator: Don't allow x(1023) to be used v3_core: Improve code generation for guards Move rewriting of select_val to is_boolean from beam_peep to beam_dead Put 'try' in blocks to optimize allocation instructions Reorder instructions across try/catch Delay get_tuple_element instructions until they are needed Optimize get_tuple_element instructions by moving them forward beam_block: Improve the move optimizations beam_block: Clean up optimization of move optimizations beam_block: Eliminate redundant wasteful call to opt/1 Teach the compiler the 'da' and 'dz' options
2015-08-24Merge branch 'maint'Hans Bolinder
* maint: hipe/dialyzer: Fix a bug concerning opaque types and keydelete/3
2015-08-21beam_validator: Don't allow x(1023) to be usedBjörn Gustavsson
In 45f469ca0890, the BEAM loader started to use x(1023) as scratch register for some instructions. Therefore we should not allow x(1023) to be used in code emitted by the compiler.
2015-08-21v3_core: Improve code generation for guardsBjörn Gustavsson
When translating guards to Core Erlang, it is sometimes necessary to add an is_boolean/1 guard test. Here is an example when it is necessary: o(A, B) when A or B -> ok. That would be translated to something like: o(A, B) when ((A =:= true) or (B =:= true)) and is_boolean(A) and is_boolean(B) -> ok. The is_boolean/1 tests are necessary to ensure that the guard fails for calls such as: o(true, not_boolean) However, because of a bug in v3_core, is_boolean/1 tests were added when they were not necessary. Here is an example: f(B) when not B -> ok. That would be translated to: f(B) when (B =:= false) and is_boolean(B) -> ok. The following translation will work just as well. f(B) when B =:= false -> ok. Correct the bug to suppress those unnecessary is_boolean/1 tests.
2015-08-21Move rewriting of select_val to is_boolean from beam_peep to beam_deadBjörn Gustavsson
We can rewrite more instances of select_val to is_boolean because it is not necessary that a particular label follows the select_val.