aboutsummaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)Author
2014-01-21Merge remote-tracking branch 'upstream/maint'Ingela Anderton Andin
2014-01-21Merge branch 'ia/odbc/configure/OTP-11574' into maintIngela Anderton Andin
* ia/odbc/configure/OTP-11574: odbc: Fix configure check to work proparly on windows
2014-01-21Merge remote-tracking branch 'upstream/maint'Ingela Anderton Andin
2014-01-21Merge branch 'hawk/reltool_undefined_regexp'Henrik Nord
* hawk/reltool_undefined_regexp: Add missing default value for regexps in reltool It caused a function clause in lists:sort/1: OTP-11591 OTP-11592
2014-01-21Merge branch 'hawk/reltool_test_server'Henrik Nord
* hawk/reltool_test_server: Adapted reltool test server to common test usage of tc_status
2014-01-21Merge branch 'josevalim/jv-console-i'Henrik Nord
* josevalim/jv-console-i: Handle binary input in console helpers OTP-11589
2014-01-20Merge branch 'sverk/jinterface/unicode-test-bug'Sverker Eriksson
* sverk/jinterface/unicode-test-bug: jinterface: Fix unicode bug in test code
2014-01-20Merge branch 'bjorn/compiler/optimizations/OTP-11584'Björn Gustavsson
* bjorn/compiler/optimizations/OTP-11584: Generalize optimizations of case statements Ignore warnings when running sys_core_fold after inlining
2014-01-20Merge branch 'bjorn/fix-line-number-in-bs-exception/OTP-11572'Björn Gustavsson
* bjorn/fix-line-number-in-bs-exception/OTP-11572: compiler: Correct line number in exception from binary construction
2014-01-17compiler: Silence false warning for unmatched return in 'after' clauseBjörn Gustavsson
Because 26940a8c0c lifted code in the 'after' clause of 'try' to a new function, Dialyzer could produce false warnings for code such as: try ... after file:close(F) end. Mark the the call to the generated function as 'compiler_generated' to silence the warning.
2014-01-17Merge branch 'RoadRunnr/ecdh_crypto'Henrik Nord
* RoadRunnr/ecdh_crypto: crypto: selective support for GF2m curves ssl: add brainpool elliptic curves to TLS (RFC-7027) public_key: add brainpool elliptic curves (RFC-5639) crypto: document ec_curves/0 and ec_curve/1 crypto: add brainpool (RFC 5639) curves crypto: move elitic curve definitions from OpenSSL built-ins to Erlang crypto: add ECDH test vectors for more curves OTP-11578
2014-01-16Merge branch 'rickard/ts_install_mXX_build'Rickard Green
* rickard/ts_install_mXX_build: Teach ts_install --enable-mXX-build flag
2014-01-16Teach ts_install --enable-mXX-build flagRickard Green
Pick up --enable-m32-build and --enable-m64-build configure flags from the CONFIG_FLAGS environment variable and pass along to the ts configure script.
2014-01-16jinterface: Fix unicode bug in test codeSverker Eriksson
2014-01-16Generalize optimizations of case statementsBjörn Gustavsson
Case expressions such as: case {Expr1,Expr} of {V1,V2} -> ... end are already optimized to not actually build the tuple. Generalize the optimization to avoid building any kind of composite term, such as: case {ok,[A,B]} of {ok,[X,Y]} -> ... end We don't expect programmers to write such code directly, but inlining can produce such code. We need to be careful about the warnings we produce. If the case expression is a literal, it is expected that no warnings should be produced for clauses that don't match. We must make sure that we continue to suppress those warnings.
2014-01-16compiler: Correct line number in exception from binary constructionBjörn Gustavsson
Reported-by: Stanislav Seletskiy
2014-01-15odbc: Fix configure check to work proparly on windowsIngela Anderton Andin
2014-01-15ssl: Prepare for releaseIngela Anderton Andin
2014-01-14ssl: fix elliptic curve selection in server modeAndreas Schultz
The server code erroneously took the list of curves supported by the client from it's own hello extension, effectively breaking curve selection all together. Also the default fallback secp256k1 curve is not supported by all clients. secp256r1 is recommended as part of the NIST Suite B cryptographic suites. The chances are much better that all clients support it, so use that as fallback.
2014-01-14ssl: Prepare for releaseIngela Anderton Andin
2014-01-14Merge branch 'nox/odbcserver-tolower'Henrik Nord
* nox/odbcserver-tolower: Include ctype.h in odbcserver.c for tolower() OTP-11569
2014-01-14ssl: Add missing options validation of server_name_indicationIngela Anderton Andin
2014-01-14Merge branch 'puzza007/remove-query-reserved-word-from-emacs-mode'Henrik Nord
* puzza007/remove-query-reserved-word-from-emacs-mode: remove support for query keyword from emacs mode OTP-11568
2014-01-14Merge branch 'ad/ssh_expand_test'Henrik Nord
* ad/ssh_expand_test: fix calculation of variable thanks to Alexander Demidenko OTP-11566
2014-01-13crypto: selective support for GF2m curvesAndreas Schultz
Newer OpenSSL versions allow to selectively disable GF2m elliptic curves. Selectively enable GF2m curves is support for them is available.
2014-01-13ssl: add brainpool elliptic curves to TLS (RFC-7027)Andreas Schultz
2014-01-13public_key: add brainpool elliptic curves (RFC-5639)Andreas Schultz
2014-01-13crypto: document ec_curves/0 and ec_curve/1Andreas Schultz
2014-01-13crypto: add brainpool (RFC 5639) curvesAndreas Schultz
RFC-5649, Section 1, documents the advantages that these curves might have over others (ANSI, SEC1/2)
2014-01-13crypto: move elitic curve definitions from OpenSSL built-ins to ErlangAndreas Schultz
Decouple eliptic curve definition from OpenSSL and define them in Erlang.
2014-01-13crypto: add ECDH test vectors for more curvesAndreas Schultz
Vectors have been taken from NIST's CRYPTOGRAPHIC ALGORITHM VALIDATION PROGRAM (CAVP) (http://csrc.nist.gov/groups/STM/cavp/)
2014-01-10Include ctype.h in odbcserver.c for tolower()Anthony Ramine
odbcserver.c:2772:12: warning: implicit declaration of function 'tolower' is invalid in C99 [-Wimplicit-function-declaration] str[i] = tolower(str[i]); ^
2014-01-10Remove support for query keyword from emacs modePaul Oliver
2014-01-10fix calculation of variableHenrik Nord
thanks to Alexander Demidenko
2014-01-10hipe: Fix compilation with 'no_remove_comments'Johannes Weißl
To reproduce the error: $ echo '-module(hello).' > hello.erl $ erl 1> c(hello, [native,{hipe,[no_remove_comments]}]). [...] <HiPE (v 3.10.2.1)> Error: [hipe:834]: ERROR: {{case_clause, {icode_comment,call_ext_only}}, [{hipe_icode,successors,1, [{file,"hipe_icode.erl"}, {line,1444}]}, [...]
2014-01-10Add missing default value for regexps in reltoolHåkan Mattsson
It caused a function clause in lists:sort/1: reltool_server_SUITE.erl(2512): <ERROR> Not matching actual result was: {error, {function_clause, [{lists,sort, [[{regexp,"^priv", {re_pattern,0,1, <<69,82,67,80,64,0,0,0,16,8,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,93,0,12,25,27,112,27,114,27,105,27,118,84, 0,12,0>>}}| undefined]], [{file,"lists.erl"},{line,465}]}, {reltool_server,decode,2,[{file,"reltool_server.erl"},{line,1499}]}, {reltool_server,decode,2,[{file,"reltool_server.erl"},{line,1363}]}, {reltool_server,read_config,2, [{file,"reltool_server.erl"},{line,1335}]}, {reltool_server,parse_options,4, [{file,"reltool_server.erl"},{line,224}]}, {reltool_server,do_init,1,[{file,"reltool_server.erl"},{line,154}]}, {reltool_server,init,1,[{file,"reltool_server.erl"},{line,133}]}, {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}} Expected { ok , _ }
2014-01-10Adapted reltool test server to common test usage of tc_statusHåkan Mattsson
2014-01-10Handle binary input in console helpersJosé Valim
The standard_input may be set to binary mode via io:getopts/2 and in case such cases the "i/0" console helper got stuck as it was unable to match new lines in binaries.
2014-01-09Merge branch 'sv/faster-orddict-from_list/OTP-11552'Björn Gustavsson
* sv/faster-orddict-from_list/OTP-11552: improve performance for orddict:from_list/1
2014-01-09Merge branch 'nox/fix-dbg_ieval-exporting-rules/OTP-11553'Björn Gustavsson
* nox/fix-dbg_ieval-exporting-rules/OTP-11553: compiler tests: Test exporting rules for andalso/orelse Fix evaluation of andalso and orelse in the debugger
2014-01-08compiler tests: Test exporting rules for andalso/orelseBjörn Gustavsson
2014-01-08Ignore warnings when running sys_core_fold after inliningBjörn Gustavsson
The new inliner (cerl_inline) does not mark inlined code as compiler generated. Therefore, when sys_core_fold is run after inlining, it may generate spurious warnings. The easiest way out (for now, at least) is to discard all warnings found when running sys_core_fold after inlining.
2014-01-08Merge branch 'bjorn/compiler/fix-slow-compilation/OTP-10652'Björn Gustavsson
* bjorn/compiler/fix-slow-compilation/OTP-10652: Eliminate bottlenecks in sys_core_fold
2013-12-20Merge branch 'florianZ/crypto/error-fixes'Sverker Eriksson
OTP-11550 * florianZ/crypto/error-fixes: crypto: Fix memory leaks and invalid deallocations
2013-12-20Merge branch 'dgud/remove-gs-apps/OTP-10915'Dan Gudmundsson
2013-12-20Merge remote-tracking branch 'origin/kostis/dialyzer_hipe-remove-gs'Dan Gudmundsson
2013-12-19improve performance for orddict:from_list/1Steve Vinoski
Improve the performance of orddict:from_list/1 by reimplementing it using the lists module in a way that preserves backward compatibility. The QuickCheck programs linked below were used to verify backward compatibility: * https://gist.github.com/vinoski/3bd216efa421c581174a * https://gist.github.com/vinoski/c6db70e8dc725083843d Both tests, which were run on R16B03, require the original orddict module to be renamed to olddict, and that code:unstick_mod/1 be applied to orddict in order to allow it to be replaced with the revised orddict. The first QuickCheck test first generates a list of pairs of terms, then uses the list to create both an original and revised orddict using from_list/1, then verifies that the results of the operation are the same for both instances. The second QuickCheck test is similar except that it first creates an instance of the original and revised orddicts and then folds over a randomly-generated list of orddict functions, applying each function to each orddict instance and verifying that the results match. The revised orddict:from_list/1 function was also tested to assess performance against the original orddict implementation. The test program used is available here: * https://gist.github.com/vinoski/61772a052f3501e1e128 Since an orddict instance is implemented as a list, the test program creates ordicts of length 1, 10, 100, and 1000 and uses them to assess performance at each length. Performance was measured using timer:tc/3 to time a number of iterations of various tests against the original orddict and against the revised orddict. To test from_list/1, orddicts of lengths 1, 10, 100, and 1000 are created from a list of random pairs with integer keys. For lengths greater than 1, two different tests are performed: one passing a list of pairs in sorted key order, and the other passing a list of pairs in reverse sorted key order. Since orddicts are ordered, these orderings effect worst-case and best-case behavior of the original orddict:from_list/2 implementation respectively. These tests were performed against R16B02 on a Macbook Pro with an Intel Core i7 processor running at 2.7GHz and 16GB of RAM running OS X 10.8.5, and on a Dell system with a 3.4GHz Intel Core i7 and 16GB of RAM running Ubuntu Linux 12.04. The tables below show results for OS X and Linux respectively. Each table lists the name of each test followed by two numbers, each a time in microseconds of the average of 10 runs of the test. The first number is the result for the original orddict, the second for the revised orddict. As the numbers for both platforms show, the revised from_list/1 function is always faster than the original version, in some cases quite a bit faster. Results from OS X: ------------------ from_list length 1: 1.789 0.116 from_list length 10 ordered: 10.082 3.040 from_list length 10 reverse ordered: 4.853 3.604 from_list length 100 ordered: 397.213 20.134 from_list length 100 reverse ordered: 25.473 20.745 from_list length 1000 ordered: 37490.26 251.46 from_list length 1000 reverse ordered: 307.94 215.96 Results from Linux: ------------------- from_list length 1: 0.146 0.025 from_list length 10 ordered: 4.729 0.815 from_list length 10 reverse ordered: 1.687 0.956 from_list length 100 ordered: 144.467 5.896 from_list length 100 reverse ordered: 6.694 5.816 from_list length 1000 ordered: 13755.19 79.413 from_list length 1000 reverse ordered: 91.54 64.308
2013-12-19Merge branch 'siri/master-cuddle-with-tests'Siri Hansen
* siri/master-cuddle-with-tests: [sasl] Fix error printout in release_handler_SUITE to handle unicode path
2013-12-19Eliminate bottlenecks in sys_core_foldBjörn Gustavsson
Compiling programs with very many uses of the "dot notation" for extracting a record element could be very slow. The reason is that each extraction of a record element (R#r.a) would first be transformed to code like this: case R of {r,rec0,_,_} -> rec0; _ -> error({badrecord,r}) end In Core Erlang, each '_' would be become a new variable. The resulting code would be optimized by sys_core_fold, but the optimization process could be very slow. Profiling shows that sub_del_var/2 was the worst bottleneck, and the sub_is_val/2 the second worst bottleneck. In both cases, the culprit is the linear traversal of a very long list (the list of variable substitutions). Fortunately, there already is a gb_set (the scope) which contains all variables that are currently live. If a variable is not known to be live, it is no point in doing the linear operation on the list.
2013-12-18Officially support building core filesTuncer Ayaz
erlc is wired to treat *.core files as core and build them as compile:file(File, [from_core]), but this is not documented. There's also an udocumented compile:file/2 option called 'from_core'. This has been in place and in use for a long time. Therefore, it should be supported officially. To fix that, make the following changes: * document erlc handling of *.core files * document 'from_core'