aboutsummaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)Author
2016-05-23Merge branch 'ingela/ssl/test-enhancment'Ingela Anderton Andin
* ingela/ssl/test-enhancment: ssl: Increase timeout ssl: Remove use of test_server config macro ssl: Disable DTLS test for now ssl: move TLS/DTLS version logging into helper ssl: tests for DTLS
2016-05-23Merge branch 'bjorn/compiler/misc'Björn Gustavsson
* bjorn/compiler/misc: beam_bool_SUITE: Cover one more line beam_utils_SUITE: Cover more lines in beam_utils beam_reorder: Don't confuse beam_validator beam_bool: Reject potentially unsafe optimization v3_core: Don't depend on sys_core_fold for cleaning up beam_type: Eliminate crash beam_type: Correct handling of setelement/3 beam_validator: Handle cons literals better beam_validator: Keep better track of tuple literals
2016-05-23Merge branch 'richcarl/eunit/debug-val-depth/PR-1061/OTP-13612'Björn Gustavsson
* richcarl/eunit/debug-val-depth/PR-1061/OTP-13612: Replace suggested debugValAll/1 macro with debugVal/2
2016-05-23beam_bool_SUITE: Cover one more lineBjörn Gustavsson
2016-05-23beam_utils_SUITE: Cover more lines in beam_utilsBjörn Gustavsson
By first adding a call to error/1 to each uncovered line, QuickCheck could find test cases that would cover the lines.
2016-05-23beam_reorder: Don't confuse beam_validatorBjörn Gustavsson
Make sure we don't optimize code such as: is_tuple Fail Src test_arity Fail Src Arity get_tuple_element Src Pos Dst is_map Fail Src If we would reorder the instructions like this: is_tuple Fail Src test_arity Fail Src Arity is_map Fail Src get_tuple_element Src Pos Dst beam_validator would complain that the type for Src is a map instead of a tuple. Since the code has problems to begin with, there is no need to do the optimization.
2016-05-23beam_bool: Reject potentially unsafe optimizationBjörn Gustavsson
When calculating the sets of registers that must be killed or unused, registers set in a {protected,_,_,_} block were not considered. That could result in a crash in the assertion in beam_utils:live_opt_block/4.
2016-05-23v3_core: Don't depend on sys_core_fold for cleaning upBjörn Gustavsson
a3ec2644f5 attempted to teach v3_core not to generate code with unbound variables. The approach taken in that commit is to discard all expressions following a badmatch. That does not work if the badmatch is nested: {[V] = [] = foo,V}, V That would be rewritten to: {error({badmatch,foo})}, V where V is unbound. If we were to follow the same approach, the tuple construction code would have to look out for a badmatch. As would list construction, begin...end, and so on. Therefore, as it is impractical to discard all expressions that follow a badmatch, the only other solution is to ensure that the variables that the pattern binds will somehow be bound. That can be arranged by rewriting the pattern to a pattern that binds the same variables. Thus: error({badmatch,foo}), E = foo, case E of {[V],[]} -> V; Other -> error({badmatch,Other} end
2016-05-23beam_type: Eliminate crashBjörn Gustavsson
The following code: simple() -> case try 0 after [] end of 0 -> college; 1 -> 0 end. would crash the compiler like this: crash reason: {case_clause, {'EXIT', {function_clause, [{beam_type,simplify_select_val_int, [{select,select_val, {x,0}, {f,7}, [{integer,1},{f,9},{integer,0},{f,8}]}, 0], [{file,"beam_type.erl"},{line,169}]}, {beam_type,simplify_basic_1,3, [{file,"beam_type.erl"},{line,155}]}, {beam_type,opt,3,[{file,"beam_type.erl"},{line,57}]}, {beam_type,function,1,[{file,"beam_type.erl"},{line,36}]}, {beam_type,'-module/2-lc$^0/1-0-',1, [{file,"beam_type.erl"},{line,30}]}, {beam_type,module,2,[{file,"beam_type.erl"},{line,30}]}, {compile,'-select_passes/2-anonymous-2-',2, [{file,"compile.erl"},{line,521}]}, {compile,'-internal_comp/4-anonymous-1-',2, [{file,"compile.erl"},{line,306}]}]}}} The root cause is that the type representation is not well-defined. Integers could be represented in three different ways: integer {integer,{1,10}} {integer,0} However, only the first two forms were handled. To avoid similar problems in the future: * Make the type representation stricter. Make sure that integers are only represented as 'integer' or {integer,{Min,Max}}. * Call verify_type/1 whenever a new type is added (not only when merging types) to ensure that only the supported types are added to the type database). (ERL-150)
2016-05-20Merge branch 'sverker/os_mon/FreeBSD-EXIT_WITH'Sverker Eriksson
2016-05-20Fix spelling of "atomicity" in ets.xmlMagnus Henoch
2016-05-20Merge branch 'binarin/fix-absolute-paths/PR-1056/OTP-13617'Björn-Egil Dahlberg
* binarin/fix-absolute-paths/PR-1056/OTP-13617: Fix program paths used in build process
2016-05-20Merge branch 'kostis/compiler/cerl-arity/PR-1059'Björn Gustavsson
* kostis/compiler/cerl-arity/PR-1059: Use arity() consistently
2016-05-20beam_type: Correct handling of setelement/3Björn Gustavsson
We must be careful how we treat the type info for the result of: setelement(Index, Tuple, NewValue) If Tuple had type information, the result of setelement/3 (in x(0)) would be assigned the same type information. But that is not safe for: setelement(1, Tuple, NewValue) since the type for the first element will be changed. Therefore, we must take care to remove the type information for the first element of the tuple if might have been modified by setelement/3.
2016-05-20beam_validator: Handle cons literals betterBjörn Gustavsson
As a preparation for better optimizations in beam_type, a list literal must be accepted as a 'cons'.
2016-05-20beam_validator: Keep better track of tuple literalsBjörn Gustavsson
As a preparation for upcoming better optimizations in beam_type, we will need to keep better track of tuple literals so that beam_validator will not falsely reject safe code.
2016-05-20Merge branch 'dgud/observer/process-display-binary'Dan Gudmundsson
* dgud/observer/process-display-binary: observer: sync close to avoid process crash reports Test cuddling observer: Align system info boxes Change binary debug tuple to size and refc info
2016-05-20Merge branch 'dgud/tools/emacs-xref/PR-1051'Dan Gudmundsson
* dgud/tools/emacs-xref/PR-1051: Add xref support in erlang.el Conflicts: lib/tools/emacs/erlang.el
2016-05-20Replace suggested debugValAll/1 macro with debugVal/2Richard Carlsson
Also make the default depth for debugVal/1 possible to override by defining the macro EUNIT_DEBUG_VAL_DEPTH.
2016-05-20ssl: Increase timeoutIngela Anderton Andin
We want to avoid tests timeing out regularly on slow test machines.
2016-05-20ssl: Remove use of test_server config macroIngela Anderton Andin
2016-05-20ssl: Disable DTLS test for nowIngela Anderton Andin
We are working on including DTLS support. And we want to include the contributed tests now before making planned enhancements to the test suits.
2016-05-20ssl: move TLS/DTLS version logging into helperAndreas Schultz
Consolidate code that logs TLS/DTLS version during testing into ssl_test_lib.
2016-05-20ssl: tests for DTLSAndreas Schultz
2016-05-20Add xref support in erlang.elJohan Claesson
In GNU Emacs 25 xref will be introduced. It is a framework for cross referencing commands, in particular commands for finding definitions. It does not replace etags. It rather resides on top of it and provides user-friendly commands. The idea is that the user commands should be the same regardless of what back-end does the actual finding of definitions. Add to the xref commands awareness of the module:tag syntax in a similar way that is already done for the old etags commands. Xref completion support is not included in this commit. Remove all compilation warnings for GNU Emacs 24.5 and current 25 (4ffec91). Remove XEmacs incompatibility in erlang-font-lock-exported-function-name-face. Add file erlang-test.el with a single unit test. Add TAGS to .gitignore.
2016-05-20Merge branch 'ingela/ssl/gen-statem-setopts/ERL-147'Ingela Anderton Andin
* ingela/ssl/gen-statem-setopts/ERL-147: ssl: Setopts should be allowed in all states
2016-05-19Merge branch 'mururu/eunit/debugvalall/PR-1024/OTP-13612'Björn Gustavsson
* mururu/eunit/debugvalall/PR-1024/OTP-13612: eunit: Add ?debugValAll macro
2016-05-19ssl: Setopts should be allowed in all statesIngela Anderton Andin
2016-05-19Merge branch 'egil/odbc/fix-unmatched_return/OTP-13595'Björn-Egil Dahlberg
* egil/odbc/fix-unmatched_return/OTP-13595: odbc: Fix unmatched return warnings
2016-05-18Use arity() consistentlyKostis Sagonas
Specs of various *_arity functions in this module used different types (integer(), non_neg_integer(), byte()) to refer to the type arity().
2016-05-18[inets] Remove calls to the inets_time_compat moduleLars Thorsen
2016-05-18[inets] Remove usage of erlang:now()Lars Thorsen
2016-05-18odbc: Fix unmatched return warningsBjörn-Egil Dahlberg
2016-05-18Merge branch 'egil/xmerl/fix-unmatched_return/OTP-13595'Björn-Egil Dahlberg
* egil/xmerl/fix-unmatched_return/OTP-13595: xmerl: Fix unmatched return warnings
2016-05-18Merge branch 'egil/percept/fix-unmatched_return/OTP-13595'Björn-Egil Dahlberg
* egil/percept/fix-unmatched_return/OTP-13595: egd: Fix unmatched return warnings egd: Small code style refactoring percept: Fix unmatched return warnings percept: Small code style refactoring
2016-05-18Merge branch 'dgud/tools/emacs/PR-1054/OTP-13610'Dan Gudmundsson
* dgud/tools/emacs/PR-1054/OTP-13610: Fix line-initial commas' indentation in type specs
2016-05-18Fix line-initial commas' indentation in type specsDániel Szoboszlay
Inside type specs, line-initial commas shall align with open curly braces. This also applies to record definitions with type specs for the fields. For example: -type foo() :: { a :: integer() , b :: integer() }. For type specs for functions, the commas shall align with the opening parenthese. So do a closing parenthese when put on a new line. For example: -spec foo( X :: integer() , Y :: integer() ) -> integer(). This does not affect coding styles that don't put commas at the beginning of lines.
2016-05-18Merge branch 'hasse/erl_docgen/datatype_anchors/OTP-13600/ERL-141'Hans Bolinder
* hasse/erl_docgen/datatype_anchors/OTP-13600/ERL-141: kernel: Remove no longer needed anchors in documentation stdlib: Remove no longer needed anchors in documentation erts: Remove no longer needed anchors in documentation erl_docgen: Add anchors to datatypes without name attribute
2016-05-18Merge branch 'bjorn/handle-bad-path/ERL-142'Björn Gustavsson
* bjorn/handle-bad-path/ERL-142: Tolerate bad directories in the code path
2016-05-17os_mon: Fix compile error on FreeBSDSverker Eriksson
implicit declaration of function 'EXIT_WITH' Move code chunk up a bit to #define EXIT_WITH before it's used.
2016-05-17Merge branch 'sverker/test-einode-core'Sverker Eriksson
2016-05-17Merge branch 'sverker/runtime_tools/trace_ip_drv/OTP-13576/ERL-119'Sverker Eriksson
2016-05-17Merge branch 'sverker/trace-send-receive-matchspec/OTP-13507'Sverker Eriksson
Second merge of this branch to master with some more docs
2016-05-17xmerl: Fix unmatched return warningsBjörn-Egil Dahlberg
2016-05-17Fix program paths used in build processAlexey Lebedeff
Followup to https://github.com/erlang/otp/pull/1023 - make/make_emakefile is fixed because otherwise './otp_build tests' fails early. - And grep showed that there is only one other file that also should be fixed - lib/public_key/priv/generate
2016-05-17Merge branch 'dgud/wx/cmd-queue-bug'Dan Gudmundsson
* dgud/wx/cmd-queue-bug: Fix compilation warning wx: Fix generated defines in gl.hrl wx: Fix driver command queue
2016-05-17observer: sync close to avoid process crash reportsDan Gudmundsson
Try to make observer stop nicer, i.e. without async crash reports
2016-05-17Merge branch 'jrobhoward/os_mon/fix-freebsd_get_os_wordsize/PR-1039/OTP-13601'Björn-Egil Dahlberg
* jrobhoward/os_mon/fix-freebsd_get_os_wordsize/PR-1039/OTP-13601: Fix memsup:get_os_wordsize() on 64-bit Linux PPC os_mon: Test wordsize of memsup:get_os_wordsize/0 Fix memsup:get_os_wordsize() on 64-bit FreeBSD
2016-05-17egd: Fix unmatched return warningsBjörn-Egil Dahlberg
2016-05-17egd: Small code style refactoringBjörn-Egil Dahlberg