aboutsummaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)Author
2011-11-07beam_asm: Strenghten the calculation of Uniq for funsBjörn Gustavsson
Funs are identified by a triple, <Module,Uniq,Index>, where Module is the module name, Uniq is a 27 bit hash value of some intermediate representation of the code for the fun, and index is a small integer. When a fun is loaded, the triple for the fun will be compared to previously loaded funs. If all elements in the triple in the newly loaded fun are the same, the newly loaded fun will replace the previous fun. The idea is that if Uniq are the same, the code for the fun is also the same. The problem is that Uniq is only based on the intermediate representation of the fun itself. If the fun calls local functions in the same module, Uniq may remain the same even if the behavior of the fun has been changed. See http://erlang.org/pipermail/erlang-bugs/2007-June/000368.htlm for an example. As a long-term plan to fix this problem, the NewIndex and NewUniq fields was added to each fun in the R8 release (where NewUniq is the MD5 of the BEAM code for the module). Unfortunately, it turns out that the compiler does not assign unique value to NewIndex (if it isn't tested, it doesn't work), so we cannot use the <Module,NewUniq,NewIndex> triple as identification. It would be possible to use <Module,NewUniq,Index>, but that seems ugly. Therefore, fix the problem by making Uniq more unique by taking 27 bits from the MD5 for the BEAM code. That only requires a change to the compiler. Also update a test case for cover, which now fails because of the stronger Uniq calculation. (The comment in test case about why the Pid2 process survived is not correct.)
2011-11-07EEP-23: Allow variables in fun M:F/ABjörn Gustavsson
Currently, the external fun syntax "fun M:F/A" only supports literals. That is, "fun lists:reverse/1" is allowed but not "fun M:F/A". In many real-life situations, some or all of M, F, A are not known until run-time, and one is forced to either use the undocumented erlang:make_fun/3 BIF or to use a "tuple fun" (which is deprecated). EEP-23 suggests that the parser (erl_parse) should immediately transform "fun M:F/A" to "erlang:make_fun(M, F, A)". We have not followed that approach in this implementation, because we want the abstract code to mirror the source code as closely as possible, and we also consider erlang:make_fun/3 to be an implementation detail that we might want to remove in the future. Instead, we will change the abstract format for "fun M:F/A" (in a way that is not backwards compatible), and while we are at it, we will move the translation from "fun M:F/A" to "erlang:make_fun(M, F, A)" from sys_pre_expand down to the v3_core pass. We will also update the debugger and xref to use the new format. We did consider making the abstract format backward compatible if no variables were used in the fun, but decided against it. Keeping it backward compatible would mean that there would be different abstract formats for the no-variable and variable case, and tools would have to handle both formats, probably forever. Reference: http://www.erlang.org/eeps/eep-0023.html
2011-11-07OTP-9683Ingela Anderton Andin
Merge branch 'ssl-cbc-fix' * ssl-cbc-fix: fix handling of block_decipher/5 failure
2011-11-04Minor improvements to the meas tools.Micael Karlberg
OTP-9604 Merge branch 'bmk/megaco/20111003/improving_mstone1/OTP-9604' into bmk/megaco/r15_integration Conflicts: lib/megaco/doc/src/notes.xml
2011-11-04The profiling test tool has been rewritten.Micael Karlberg
H�kan Mattsson. OTP-9679 Merge branch 'bmk/megaco/improving_profiling_tool/OTP-9679' into bmk/megaco/r15_integration
2011-11-04Updated release notes and appup file.Micael Karlberg
OTP-9679
2011-11-04beam_type: Improve FP optimizations in the presence of line numbersBjörn Gustavsson
Allow line/1 instructions to be part of a sequence of floating point instructions to avoid outputting fclearerror / fcheckerror around every floating point instruction.
2011-11-02Test calling a parameterized module within a funBjörn Gustavsson
It is tempting to transform code such as: fun(X) -> M:foo(X) end to: fun M:foo/1 Unfortunately, that transformation is not safe if M happens to be a parameterized module. Add a test case so that we don't attempt to do such an optimization in the future.
2011-11-02Fix re:split spec not to accept option 'global'Shunichi Shinohara
2011-11-01[httpd] GET request with malformed header date causedMicael Karlberg
server crash (non-fatal) with no reply to client. Will now result in a reply with status code 400. OTP-9674
2011-11-01Clean up of public_key code adding specs and documentationSverker Eriksson
2011-11-01Added PKCS-8 support in sslIngela Anderton Andin
2011-11-01Additions to crypto and public_key needed for full PKCS-8 supportIngela Anderton Andin
2011-11-01Add PKCS-8 support to public_keyIngela Anderton Andin
2011-11-01Added versions 5.2, 5.1.3 and 5.1.2 again.Micael Karlberg
OTP-9655
2011-11-01Skipping the dist test case. Needs a major re-write (sometime).Micael Karlberg
2011-11-01Merge branch 'lukas/kernel/tc_fixes'Lukas Larsson
* lukas/kernel/tc_fixes: Kill nodes inbetween tests
2011-11-01Merge branch 'rc/remote-shell-completion'Henrik Nord
OTP-9673
2011-11-01Merge branch 'lukas/megaco/remove_driver_warning/OTP-9672'Lukas Larsson
* lukas/megaco/remove_driver_warning/OTP-9672: Remove the warning that driver option is replaced by nif
2011-10-28Handle undefined pid when reporting error from supervisorSiri Hansen
2011-10-28Merge branch 'siri/observer/ttb-test-cleanup-slave-nodes/OTP-9644'Siri Hansen
* siri/observer/ttb-test-cleanup-slave-nodes/OTP-9644: Adjust ttb_SUITE to work better on windows Cleanup after testcases in ttb_SUITE
2011-10-28Merge branch 'siri/observer/close-ip-to-file-trace-port/OTP-9665'Siri Hansen
* siri/observer/close-ip-to-file-trace-port/OTP-9665: Close ip_to_file trace port in ttb:stop
2011-10-27Remove unused */doc/src/make.dep filesBjörn Gustavsson
These dependency files was once used when building the documentation, but are no longer needed.
2011-10-27doc Makefiles: Eliminate DOCSUPPORT ifdefsBjörn Gustavsson
Some applications still have support for an ancient documentation build system. Eliminate the DOCSUPPORT define in otp.mk.in and the not taken arm of the ifdefs in the Makefiles.
2011-10-27Merge branch 'bjorn/eliminate-regexp-usage'Björn Gustavsson
* bjorn/eliminate-regexp-usage: erl_tidy: Eliminate two references to 'regexp' in the documentation erts/z_SUITE: Eliminate use of deprecated regexp module erts/nt_SUITE: Eliminate use of deprecated regexp module erl_html_tools: Eliminate mention of deprecated regexp module erl_interface tests: Eliminate use of deprecated regexp module tools test suite: Eliminate compilation warnings for the eed module tools test suite: Eliminate use of deprecated regexp module xmerl test suite: Eliminate use of deprecated regexp module appmon: Eliminate use of deprecated regexp module tv: Eliminate use of deprecated regexp module gs: Eliminate use of deprecated regexp module inviso: Eliminate use of deprecated regexp module
2011-10-27erl_tidy: Eliminate two references to 'regexp' in the documentationBjörn Gustavsson
2011-10-27erl_interface tests: Eliminate use of deprecated regexp moduleBjörn Gustavsson
2011-10-27tools test suite: Eliminate compilation warnings for the eed moduleBjörn Gustavsson
2011-10-27tools test suite: Eliminate use of deprecated regexp moduleBjörn Gustavsson
Also extend the test suite so that the changed code will be executed.
2011-10-27xmerl test suite: Eliminate use of deprecated regexp moduleBjörn Gustavsson
2011-10-27Close ip_to_file trace port in ttb:stopSiri Hansen
This is a relay port opened from the IP trace client when tracing diskless nodes. The port was not closed properly in ttb:stop, which caused problems on windows since the file could not be moved to the upload directory before the file descriptor was closed.
2011-10-27Adjust ttb_SUITE to work better on windowsSiri Hansen
There is a problem with long paths on windows, which causes some of the ttb logs in this suite not to be created. To go around this, the original priv_dir from the Config is no longer used for writing the logs. Instead a new priv_dir is created in the data_dir - which makes the path much shorter. There is also a problem caused by the lower resolution of the system clock on windows. It makes the test cases for sorting trace messages fail. To get around this a sleep of 2 ms is added in "appropriate places", and also the messages sent between client and server when creating the trace log for these test cases is now better synched. The cleanup functions, which terminate slave nodes, was called in end_per_testcase. However, it seems to be a bug in the test_server which causes this to hang if the test case failed with a timetrap_timeout. Workaround for this is to do the cleanup in init_per_testcase instead - i.e. make sure that nodes that are to be started by the test case do not already live when the test case starts.
2011-10-27Cleanup after testcases in ttb_SUITESiri Hansen
Slave nodes were earlier stopped inside each test case. If a test case failed before this point, a slave node would survive and it might interfere with the next test case causing multiple failures. This commit moves the stopping of slave nodes out to a separate function for each test case - called during end_per_testcase. A minor correction is also done in ttb:ensure_no_overloaded_nodes - the reply message sent back from the ttb process is tagged so only the expected message will be picked from the message queue. Otherwise, for instance nodedown messages from the monitoring of slave nodes (by the test cases) could be received here. Finally, the sleep timer when waiting for trace messages to arrive over tcp/ip is extended a bit since test cases sometimes failed with missing trace messages here.
2011-10-27Merge branch ↵Siri Hansen
'siri/runtime_tools/dbg-flush-trace-file-driver-before-stop/OTP-9651' * siri/runtime_tools/dbg-flush-trace-file-driver-before-stop/OTP-9651: Flush trace file driver before stopping dbg
2011-10-26appmon: Eliminate use of deprecated regexp moduleBjörn Gustavsson
2011-10-26tv: Eliminate use of deprecated regexp moduleBjörn Gustavsson
2011-10-26gs: Eliminate use of deprecated regexp moduleBjörn Gustavsson
2011-10-26inviso: Eliminate use of deprecated regexp moduleBjörn Gustavsson
2011-10-26Uncommented ipv6 test cases.Micael Karlberg
OTP-9655
2011-10-26Fixed HTML encode. First *try* to hex decode uri, and thenMicael Karlberg
do the actual html encode. OTP-9655
2011-10-26Skip catching hex decode failure.Micael Karlberg
OTP-9655
2011-10-26Fixed hex-decoding.Micael Karlberg
OTP-9655
2011-10-25Problems with proxy test cases.Micael Karlberg
OTP-9655
2011-10-25Added release notes, appup and correct version.Micael Karlberg
OTP-9655
2011-10-25Merge branch 'maint-r13' of super:otp into ↵Micael Karlberg
bmk/inets/httpd/xss_when_erl_encoded/OTP-9655
2011-10-25The XSS prevention methods used was confused if theMicael Karlberg
URL was encoded (hex-encoded). OTP-9655
2011-10-25H�kan Mattsson rewrote the profile tool.Micael Karlberg
2011-10-25Upped the version number. Some cosmetics related to theMicael Karlberg
profile tool.
2011-10-24fix handling of block_decipher/5 failureAndreas Schultz
A wrong decryption key would cause a badmatch in generic_block_cipher_from_bin/2. The try in block_decipher/5 was probably intendend to deal with that, but was misplace for this. Additionaly, generating a failure alert erly, without computing the record MAC, creates vector for a timing attack on CBC padding (for details check TLS 1.2 RFC 5246, Sect. 6.2.3.2.). This attach vector and the counter meassure applies to all SSL/TLS versions. As a counter messure, compute the MAC even when decryption or padding checks fail. A invalid padding will force a MAC failure by intentionaly invalidating the content.
2011-10-21eprof: Fix invalid references to removed functionsBjörn-Egil Dahlberg