Age | Commit message (Collapse) | Author |
|
The Erlang code preprocessor (epp) sent extra messages on the form
{eof,Location} to the client when parsing the file attribute. This bug,
introduced in R11B, has been fixed.
|
|
|
|
escript:foldl/3 was not completely adapted to the changes introduced
in 6af2ac91005276add18b1c9bbf4c8fe4f8c6e040.
A partial fix has already been applied by Hakan Mattson in
4ec4a06edb5baaa0af2840943230c4a0be3a93cf.
Signed-off-by: Tuncer Ayaz <[email protected]>
|
|
|
|
|
|
* bd/doc-fixes:
Fix minor documentation errors
|
|
* ms/pcre-security:
Fix CVE-2008-2371 (outer level option with alternatives caused crash).
OTP-8438 The re module: A regular expression with an option change at the
start of a pattern that had top-level alternatives could cause
overwriting and/or a crash. (Thanks to Michael Santos.)
|
|
* jn/supervisor_child_count_only:
Add count_children/1 to supervisor.erl to determine the number of
OTP-8436 Added supervisor:count_children/1 to count the number of children
being managed without the memory impact of which_children/1.
(Thanks to Jay Nelson.)
|
|
* ks/stdlib-cleanups:
stdlib: clean up as suggested by tidier
OTP-8435: ks/stdlib-cleanups
|
|
The patch is from:
http://vcs.pcre.org/viewvc?revision=360&view=revision
Test case:
re:compile(<<"(?i)[\xc3\xa9\xc3\xbd]|[\xc3\xa9\xc3\xbdA]">>, [unicode]).
An option change at the start of a pattern that had top-level
alternatives could cause overwriting and/or a crash.
This potential security problem was recorded as CVE-2008-2371.
|
|
|
|
children being managed without the memory impact of which_children/1
The function which_children/1 returns a list of the child processes
currently being supervised, but it has the penalty of creating a new
list thereby consuming more memory. In low memory situations it is
often desirable to know which supervisor may have generated many
processes, but the act of discovering the culprit should not cause the
node to crash (or worse a different node if the kernel kills one
randomly). The new function count_children/1 can give an indication
of which supervisor is taxing resources the most without adding to the
burden. Rather than creating a new list, it walks the supervisor's
internal children structure using an accumulator function so that any
used memory can be incrementally collected yet the resulting count can
still be obtained.
The return result of count_children/1 is a property list of counts
containing:
- {specs, Total_Num_Child_Specs}
- {active, Num_Active_Child_Processes_Of_Supervisor_Or_Worker_Type}
- {supervisors, Num_Supervisor_Type_Children_Including_Dead_Processes}
- {workers, Num_Worker_Type_Children_Including_Dead_Processes}
This patch was made in response to mailing list discussions of the
problem diagnosing heavily taxed production systems. I cannot find
the original request, but http://www.erlang.org/cgi-bin/ezmlm-cgi/4/35060
is my original post of the patch.
|
|
prompt strings (io:get_line/{1,2}). io_lib is also updated to
format prompts with the 't' modifier (i.e. ~ts instead of ~s).
|
|
* ks/erl_lint:
erl_lint_SUITE: adjust failing test case
Allow recursive types and check for undefined types
OTP-8421: ks/erl_lint
|
|
|
|
Hans Bolinder (the author/maintainer of qlc) prefers
for readability reasons to use length/1 in a guard
when it is known that the list is guaranteed to be
short, so the change suggested by tidier for line 875
of qlc_pt has not been included.
|
|
Fix three minor typos and reorder one of a pair of lists of functions so that
the ordering is consistent.
|
|
Errors are now reported slightly differently, so we'll
need to adjust the test case.
|
|
Contains four kinds of changes:
* Allows recursive types and type definitions to be in any order.
* Because the checking is not performed from top to bottom, there
is a separate pass which checks for undefined module-local types.
* Behaviour callbacks which allow specs in them.
* Clean up the code as suggested by tidier.
|
|
configuration parameter shell_prompt_func can be used for
customizing the Erlang shell prompt.
|
|
|
|
|
|
|
|
Now, when we have only the constant definition of a macro (without
arguments), we always use it. In all other cases, we try to find the
exact matching definition. We throw an error if we don't find it.
|
|
This feature simplifies the definition of macros by avoiding to have a
different name for each version (with different arities) of the same
macros. New rules:
- can have multiple definitions of the same macro with different arities
- cannot overload macro with the same arity
- the overloading of predefined macros (?MODULE, ?LINE, ...) is forbidden
- the directive '-undef' removes all definitions of a macro
|
|
The dict St#epp.uses that helps to find circular macros was not correctly
updated.
|
|
* bg/hipe-fixes:
compiler: make ignore_native_errors also handle internal hipe errors
re tests: disable native-code compilation for huge modules
Teach the compiler the no_native option
|
|
* bg/cleanup-tests:
file_SUITE: eliminate a warning for an unused variable
kernel tests: modernize guard tests
unicode_SUITE: replace deprecated concat_binary/1 with list_to_binary/1
stdlib tests: modernize guard tests
Test suites: fix creation of Emakefiles
|
|
Two generated modules contains too big functions for the
native-code compiler to handle (even the BEAM compiler
struggles when compiling them).
|
|
|
|
* ta/ensure_dir_eexist:
filelib_SUITE: strenghten tests of filelib:ensure_dir/1
Don't return a false {error,eexist} in filelib:ensure_dir/1
OTP-8389 Because of a race condition, using filelib:ensure_dir/1 from
multiple processes to create the same path or parts of the same
directory structure, filelib:ensure_dir/1 could return a
meaningless {error,eexist}. That race condition has been
eliminated, and {error,eexist} will now be returned only if there
exists a regular file, device file, or some other non-directory
file with the same name. (Thanks to Tuncer Ayaz.)
|
|
|
|
Don't change any guard tests in the id_transform_SUITE
module, because it intentionally use the old guard tests
to test that id_transform can handle them.
|
|
The Emakefiles in some test suite directories are only appended
to, never created from scratch, which can cause problems
especially when swithching branches in a git repository.
|
|
* rb/stdlib_re_unicode_fixes:
Fix lost unicode option in re:compile()
Refactor out repeated block in re module
Fix re:replace/4 to handle unicode charlist Replacement argument
Fix re:replace/4 to handle unicode charlist RE argument
Fix re:replace/4 to handle binary unicode output when nothing replaced
OTP-8394 A number of bugs concerning re and unicode are corrected:
- re:compile no longer loses unicode option, which also fixes bug
in re:split.
- re:replace now handles unicode charlist replacement argument
- re:replace now handles unicode RE charlist argument correctly
- re:replace now handles binary unicode output correctly when
nothing is replaced.
Most code, testcases and error isolation done by Rory Byrne.
|
|
Noticed-by: Rory Byrne
|
|
|
|
A bug in re:replace/4 causes a badarg exception to be thrown when the
Replacement argument is a charlist containing non-ascii codepoints.
The problem is that the code incorrectly assumes that the Replacement
text is iodata() and calls iolist_to_binary/1 on it. This patch fixes
it to obey the 'unicode' option and handle charlist() Replacement
arguments correctly.
|
|
The real problem is in the re:run/3 BIF.
Noticed-by: Rory Byrne
Tests-by: Rory Byrne
|
|
A bug with re:replace/4 causes an exception when: (a) it's given a
unicode charlist as input; (b) it's set to {return,binary}; and
(c) it finds nothing to replace.
The problem is: when re:replace/4 does not find anything to replace
in its Subject input, it calls iolist_to_binary on this data. This
fails if the original input is a charlist with non-ascii codepoints.
|
|
For example, if an archive (app-vsn.ez) just contains an
app-vsn/ebin/mod.beam file, the file info for the app-vsn and
app-vsn/ebin directories are faked using the file info from the
archive file as origin. The virtual direcories can also be
listed. For short, the top directories are virtual if they does
not exist.
|
|
deletion of files when compiled with debug option. Changed LC_CTYPE for sunos of certain versions.
|
|
environment after a number of bugs are fixed and some features
are added in the documentation build process.
- The arity calculation is updated.
- The module prefix used in the function names for bif's are
removed in the generated links so the links will look like
http://www.erlang.org/doc/man/erlang.html#append_element-2
instead of
http://www.erlang.org/doc/man/erlang.html#erlang:append_element-2
- Enhanced the menu positioning in the html documentation when a
new page is loaded.
- A number of corrections in the generation of man pages (thanks
to Sergei Golovan)
- Moved some man pages to more apropriate sections, pages in
section 4 moved to 5 and pages in 6 moved to 7.
- The legal notice is taken from the xml book file so OTP's
build process can be used for non OTP applications.
|
|
Test that filelib:ensure_dir/1 returns {error,eexist} if
there already exists a regular file with the name as
a directory that should be created.
While at it, slightly strenghten the otp_5960/1 test case
by repeating each call to filelib:ensure_dir/1.
|
|
* uw/shell-tab-completion:
Shell tab completion now works for quoted module and function names
OTP-8383 Shell tab completion now works for quoted module and function
names. (Thanks to Ulf Wiger.)
|
|
This is about the non-atomicity of filelib:ensure_dir/1.
When using filelib:ensure_dir/1 from multiple processes to create
the same path or parts of the same directory structure (which happens
with rebar's worker processes) it happens quite a lot that between
a file:read_file_info/1 and file:make_dir/1 one of the other procs
has already created the directory we want to create.
mkdir(1) says one of the following for -p depending on which Unix
like system you're on:
"no error if existing"
"no error will be reported if a directory given as an operand already
exists"
I've seen more than one Erlang project where the return value of
ensure_dir/1 is ignored completely.
To eliminate the race condition, call file:make_dir/1 without first
testing whether the directory exists. If it succeeds everything
is fine. Otherwise, if the error code is {error,eexists}, check
whether the directory exists. If it does, everything is fine;
if not, return {error,eexist} (which indicates that there
exists a regular file with the same name, or (more unlikely)
that another process removed the directory after the call
to file:make_dir/1).
Signed-off-by: Tuncer Ayaz <[email protected]>
|
|
fragments was created. This will mainly benefit NIFs that return
large compound terms.
|
|
* bg/otp_build-improvements:
Fix spelling, remove obsolete command
Support updating preloaded files in a git repository
Support updating the primary bootstrap in a git repository
Determine which VCS is being used
stdlib makefile: Add explicit rule
OTP-8369: bg/otp_build-improvements
|
|
When building a primary bootstrap in a git repository, the file
bootstrap/lib/stdlib/egen/erl_parse.erl would not get updated.
With clearmake, this file is updated.
Adding an explicit rule for the file make it it work with GNU Make.
While at it, remove an out-commented rule.
|
|
While quoted atoms in module and function names are not common,
they are allowed, and sometimes quite useful. In OTP, they are
commonplace in ORBER, and can also be found in XMERL. Tab completion
needs to recognize quoted atoms and act accordingly. This patch
includes changes in edlin:over_word/1. It should be noted that these
changes also affect the 'kill word', 'forward word' and 'backward word'
commands in the line editor. The author thinks that the changes are
for the better. There are also minor changes in edlin_expand.erl -
mainly in regard to the conversion between atoms and strings.
Another change is that the list of matches is now sorted, partly
to simplify testing, but also because it seems sensible to present
the matches that way. A test suite, edlin_expand_SUITE, has been
added to the stdlib test suites.
(amended 2009-12-18 to actually include the modified files too
and again to rename the capitalized test modules for portability.)
|