aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2013-02-11Add file:list_dir_all/1 and file:read_link_all/1Björn Gustavsson
2013-02-11prim_file: Add list_dir_all() and read_link_all()Björn Gustavsson
2013-02-11Teach prim_file:set_cwd() to avoid entering non-translatable directoriesBjörn Gustavsson
We have decided that we don't want to deal with the compilations of prim_file:get_cwd() returning a binary when the current directory name cannot be translated losslessly to a list (i.e. when the run-time system was started with +fnu and the current directory name contains bytes that are not part of a valid UTF-8 sequence). Therefore, if prim_file:set_cwd() is given a binary as the pathname, we will need to check the binary to make sure it can be translated to a list. We will introduce a new BIF, called prim_file:is_translatable/1, which will check both filename encoding mode, and if it is one of Unicode modes, the binary as well. We don't need to do anything special if prim_file:set_cwd() is passed a list.
2013-02-11Make prim_file skip invalid filenames in unicode modePatrik Nyblom
The fix affects list_dir and read_link. Raw filenames are now never produced, just consumed even if +fnu or +fna is used on Linux etc. This also adds the options to get error return or error handler warning messages with +fn{u|a}{i|w|e} as an option to erl. This is still not documented and there needs to be other versions of read_dir and read_link to facilitate reading of all types of filenames and links. A check that we will not change to an invalid directory is also needed.
2013-02-11prim_file: Refactor functions that return filenamesBjörn Gustavsson
2013-02-11prim_file: Refactor handling of responsesBjörn Gustavsson
Currently, the format of the return value from drv_command/3 is determined solely by the efile driver's response. In a future commit, we will need to produce different return values that also dependend on which function in prim_file that was called; thus, we will need some way to pass down some sort of state to drv_get_response/2. As a preparation for that, allow the third argument of drv_command/3 to be a fun. That also allows us to remove the convoluted special case handling of the list_dir operation.
2013-02-11prim_file: Always open non-file ports in binary modeBjörn Gustavsson
Ports for operations that did not directly operate on a file (such as listing the files in a directory) was always opened in a binary mode, but there was still code that supported such port opened in non-binary mode. Since we are about to update the code reading directories, and we don't want to bother we supporting non-binary ports, make sure that we force the use of binary mode.
2013-02-08Test that list_dir("non-existing-dir") fails with the correct errorBjörn Gustavsson
2013-02-08Merge branch 'hb/stdlib/bug_fixes/OTP-10622'Hans Bolinder
* hb/stdlib/bug_fixes/OTP-10622: [stdlib] Fix a bug that could cause the Erlang shell to loop [stdlib] Fix bugs in eval_bits
2013-02-08Merge branch 'fredrik/odbc/update-vsn'Fredrik Gustafsson
* fredrik/odbc/update-vsn: Bumped version number
2013-02-08Bumped version numberFredrik Gustafsson
2013-02-08Merge branch 'kp/odbc-empty-params/OTP-10798'Fredrik Gustafsson
* kp/odbc-empty-params/OTP-10798: Add testcases for odbc:param_query Fix odbc:param_query/3 and odbc:param_query/4.
2013-02-07[stdlib] Fix a bug that could cause the Erlang shell to loopHans Bolinder
2013-02-07[stdlib] Fix bugs in eval_bitsHans Bolinder
Unicode related.
2013-02-07Merge branch 'siri/ts-and-tp-in-test-logs/OTP-10780'Siri Hansen
* siri/ts-and-tp-in-test-logs/OTP-10780: [test_server] Add error printouts in case writing to test case html log fails [test_server] Don't write unicode strings to latin1 log files
2013-02-07Merge branch 'siri/sasl/appup-R16/OTP-10806'Siri Hansen
* siri/sasl/appup-R16/OTP-10806: Update sasl.appup.src with R16 release and remove R13 versions
2013-02-07Merge branch 'maint'Björn Gustavsson
* maint: Prepare release Don't run testX420/1 on old slow Sparc systems testX420: Pass Options to the ASN.1 compiler asn1_erl_nif: Correct broken length encoding asn1_SUITE: Mend broken test_modified_x420/1 Revert "Prepare release" Conflicts: lib/asn1/doc/src/notes.xml lib/asn1/test/asn1_SUITE.erl
2013-02-07Merge branch 'maint-r15' into maintBjörn Gustavsson
* maint-r15: Prepare release Don't run testX420/1 on old slow Sparc systems testX420: Pass Options to the ASN.1 compiler asn1_erl_nif: Correct broken length encoding asn1_SUITE: Mend broken test_modified_x420/1 Fix a bug for multiple extension addition groups
2013-02-07[test_server] Add error printouts in case writing to test case html log failsSiri Hansen
Errors are printed to unexpected_io log.
2013-02-07Update primary bootstrapBjörn Gustavsson
2013-02-07Merge branch 'bjorn/compiler/dialyzer-warnings'Björn Gustavsson
* bjorn/compiler/dialyzer-warnings: compile: Eliminate warnings for unmatched return values beam_receive: Eliminate dialyzer warning for unmatched return beam_validator: Eliminate dialyzer warnings for unmatched returns
2013-02-06Update primary bootstrapBjörn Gustavsson
2013-02-06Merge branch 'bjorn/stdlib/erl_lint-coverage'Björn Gustavsson
* bjorn/stdlib/erl_lint-coverage: Test calling deprecated or removed functions Test deprecating list_to_atom/1 to cover more code Cover binary syntax errors and warnings Remove unused error message {bittype_mismatch,_,_,_} Remove unused error message for importing an auto-imported BIF Remove the error message for future reserved keyword Test a few more kinds of illegal guard expressions Remove error handling for calling a BIF that is not auto-imported Provoke basic semantic errors to improve test coverage
2013-02-06Merge branch 'nox/fix-seq-opt/OTP-10818'Fredrik Gustafsson
* nox/fix-seq-opt/OTP-10818: Add two tests for unused multiple values in effect context Forbid multiple values in Core Erlang sequence arguments
2013-02-06Merge branch 'mh/duplicate_name_error_message/OTP-10797'Fredrik Gustafsson
* mh/duplicate_name_error_message/OTP-10797: Slightly nicer error message when node start fails due to duplicate name
2013-02-06Merge branch 'fredrik/tools/version_bumps'Fredrik Gustafsson
* fredrik/tools/version_bumps: Bumped version number
2013-02-06Bumped version numberFredrik Gustafsson
2013-02-06compile: Eliminate warnings for unmatched return valuesBjörn Gustavsson
2013-02-06beam_receive: Eliminate dialyzer warning for unmatched returnBjörn Gustavsson
2013-02-06beam_validator: Eliminate dialyzer warnings for unmatched returnsBjörn Gustavsson
The assert_fls/2 and assert_type/3 functions both return the Vst passed to them, but all callers ignore the return value. Given the name of the functions, they are not expected to return anything. Make it so by changing the return value to 'ok'. There are two calls to bsm_get_context/2 used only to validate that the match context is valid. Call bsm_validate_context/2 instead. In bsm_validate_context/2, explicitly match the return value of bsm_get_context/2 to '_' to make it clear that it is not used.
2013-02-06Prepare releaseErlang/OTP
2013-02-06Merge branch 'bjorn/asn1/open-type-error/OTP-10805' into maint-r15Erlang/OTP
* bjorn/asn1/open-type-error/OTP-10805: asn1_erl_nif: Correct broken length encoding asn1_SUITE: Mend broken test_modified_x420/1
2013-02-06Merge branch 'bjorn/asn1/extension-addition-groups/OTP-10811' into maint-r15Erlang/OTP
* bjorn/asn1/extension-addition-groups/OTP-10811: Fix a bug for multiple extension addition groups
2013-02-06Merge branch 'bjorn/asn1/test-cases' into maint-r15Erlang/OTP
* bjorn/asn1/test-cases: Don't run testX420/1 on old slow Sparc systems testX420: Pass Options to the ASN.1 compiler
2013-02-06Don't run testX420/1 on old slow Sparc systemsBjörn Gustavsson
One and a half hour is not enough for it to finish.
2013-02-06testX420: Pass Options to the ASN.1 compilerBjörn Gustavsson
When the caller passed the 'der' option, it was ignored.
2013-02-05Merge branch 'jv/cover-patches/OTP-10778'Fredrik Gustafsson
* jv/cover-patches/OTP-10778: Fix a bug in cover when used with no_auto_import Ensure cover keeps the proper file source cover now relies on the compile info to find file sources
2013-02-04[test_server] Don't write unicode strings to latin1 log filesSiri Hansen
The unicode update of test_server for R16A introduced a few potential errors when logging to files. Sometimes ~tp or ~ts was used for formatting also when writing to files that were not opened with the {encoding,utf8} option. If then the argument contained unicode characters above 255, the file descriptor would crash. This has been corrected by the following modifications: * Since the 'unexpected_io' log file is used only when the test case HTML file is not available (e.g. between test cases), this file is now also a HTML file and as other test_server HTML logs it is always UTF-8 encoded * Since it is possible to change which information is going to which log file (with test_server_ctrl:set_levels/3), we do not have full control over which information is written to which file. This means that any printout could be written to the 'major' log file (suite.log), which was earlier encoded as latin1. To avoid crashing this file descriptor due to unicode strings, the 'major' log file is now also encoded in UTF-8 (possible incopatibility). * The cross_cover.info file is no longer a text file which can be read with file:consult/1, instead it is written as a pure binary file using term_to_binary when writing and binary_to_term when reading. * The encoding of the file named 'last_name', which only content is the path to the last run.<timestamp> directory, is now dependent on the file name mode of the VM. If file names are expected to be unicode, then the 'last_name' file is UTF-8 encoded, else it is latin1 encoded. Also, ~tp is changed back to ~p unless it is somehow likely that the argument includes strings. It is not obvious that this is the correct thing to do, but some decission had to be taken...
2013-02-04asn1_erl_nif: Correct broken length encodingBjörn Gustavsson
The ber_bin_v2 backend calls a NIF function to decode all tags and lengths. Even open types that should not be decoded will also be decoded, which makes it necessary to later re-encode the data using a NIF function. The NIF function incorrectly encoded lengths.
2013-02-04asn1_SUITE: Mend broken test_modified_x420/1Björn Gustavsson
The test_modified_x420/1 test case had several problems that prevented it to detect the bugs it was supposed to find: 1) There was a 'catch' at the top-level so that it could never fail. 2) There was a call to the now non-existing ssl_base64 module. 3) It did not test all options for the BER backend. While at it, also clean way the remaining ?line macros and some out-commented code.
2013-02-04Add two tests for unused multiple values in effect contextAnthony Ramine
2013-02-04Merge branch 'maint-r15' into maintFredrik Gustafsson
2013-02-04Revert "Prepare release"Fredrik Gustafsson
This reverts commit a0e362765d9d4afb0211f49eb787d2139b3eb7be.
2013-02-04Update primary bootstrapBjörn Gustavsson
2013-02-04Merge branch 'bjorn/remove-packages/OTP-10348'Björn Gustavsson
* bjorn/remove-packages/OTP-10348: kernel docs: Remove references to specs_packages.xml
2013-02-04Merge branch 'bjorn/compiler/crash/OTP-10794'Björn Gustavsson
* bjorn/compiler/crash/OTP-10794: Test setelement(1, not_a_tuple, NewValue) Fix crash in the compiler when compiling element(2, not_a_tuple)
2013-02-04Merge branch 'bjorn/compiler/float/OTP-10788'Björn Gustavsson
* bjorn/compiler/float/OTP-10788: beam_type: Convert integer to float at compile time compiler: Use the literal pool for floating point constants
2013-02-04Update sasl.appup.src with R16 release and remove R13 versionsSiri Hansen
2013-02-04Update version numbersBjörn-Egil Dahlberg
2013-02-03Forbid multiple values in Core Erlang sequence argumentsAnthony Ramine
It does not make sense to return multiple values from a sequence argument and the Kernel Erlang passes can't cope with it. The linting pass now knows how to detect this kind of defunct code and the Core code folding pass is changed to not generate code like that when optimizing away multiple-valued lets in effect mode. Reported-by: José Valim