Age | Commit message (Collapse) | Author |
|
when erlang:system_flag(multi_scheduling, block) was used.
Processes, and/or ports could get stuck on an offline scheduler
when schedulers online were reduced using
erlang:system_flag(schedulers_online, SchedulersOnline).
|
|
* bg/compiler-beam_validator:
beam_validator: fix incorrect assumptions about GC guard BIFs
OTP-8378 In rare circumstances when using garbaging collecting guard BIFs,
the validation pass (beam_validator) would signal that the code
was unsafe, when it in fact was correct. (Thanks to Kiran
Khaladkar.)
|
|
In an SMP emulator, two of the test cases in statistics_SUITE
frequently fail.
Remove the runtime_zero_update/1 test case, because you can't
really expect an SMP emulator not to spend any CPU time at
all even if no Erlang process is active.
Adjust the runtime_update/1 test case to not fail if the
measured times are note close enough. It will still fail
if statistics(runtime) would fail or return the wrong type.
|
|
* egil/binary-gc:
Add documentation for binary heap size settings.
Add tracing capabilities for binary virtual heap
Add min heap size start options to beam and erl
Improve binary garbage collection
OTP-8370 The default settings for garbage collection of binaries has been
adjusted to be less aggressive than in R13B03. It is now also
possible configure the settings for binary GC. See the
documentation for spawn_opt/2-5, erlang:system_info/1,
erlang:system_flag/2, process_flag/2-3, erlang:trace/3, and the
documenation for erl for the new command line options +hms and
+hmbs.
|
|
The beam_validator pass incorrectly assumes that a GC guard
BIF (such as length/1) may first do a garbage collection
and then fail. That assumption is not correct (guards BIF
only do garbage collection when it is known that the BIF
call will succeed), and will cause the compiler to reject
valid programs.
Modify the beam_validator to assume that if the branch is
taken for a gc_bif instruction, all registers are unchanged
and no garbage collection has occurred. Also add a comment
in the emulator about that assumption.
|
|
Documentation of min_heap_size and min_bin_vheap size for:
* spawn_opt/2, spawn_opt/3, spawn_opt/4, spawn_opt/5
* erlang:system_flag/2
* erlang:system_info/1
* process_flag/2
* process_info/2
* erlang:trace/3
Documentation for the new beam start arguments:
+hms Size, Default minimum heap size for processes.
+hmbs Size, Default minimum binary virtual heap size.
|
|
|
|
The erl (and beam) start arguments are extended with
the following options:
* +hms Size, sets the default minimum heap size
for processes.
* +hmbs Size, sets the default minimum binary virtual heap
size for processes.
The previous +h Size argument can still be used for backward
compatibility purposes.
|
|
The garbage collector in r13b03 is too aggressive in some cases. This
commit raises the level of default initial allowed binary garbage
(virtual heap for binaries) before collecting from 233 words to
46368 words (181 kB on 32-bit).
A new option, min_bin_vheap_size, has been added to spawn_opt,
system_flag and process_flag can be used to change the default values.
The option can also be used with system_info and process_info to
inspect the values.
For symmetry the option min_heap_size has been added to the above
functions where it was previously missing.
Add testcases for min_bin_vheap_size and min_heap_size for
functions process_flag/2, process_info/2, system_info/2 and
spawn_opt/2.
|
|
fragments was created. This will mainly benefit NIFs that return
large compound terms.
|
|
* jv/binary_to_term-opts:
document ErtsExternalDist flags and CON_ID mask
add options to binary_to_term
OTP-8367 There is new erlang:binary_to_binary/2 BIF that takes an option
list. The option safe can be used to prevent creation of
resources that are not garbage collected (such as atoms). (Thanks
to Jayson Vantuyl.)
|
|
* tc/premodern-fpe:
Add -D_XOPEN_SOURCE to CPPFLAGS on Darwin platforms
Test for reliable fpes on Darwin platforms without DARWIN_MODERN_MCONTEXT
OTP-8368 The configure test for reliable floating point exceptions has
been update to work on modern versions of Mac OS X. (Thanks to
Trannie Carter.)
|
|
* kj/epmd-port2resp-trunc-extra:
Handle "extra" field according to specs in ALIVE2_REQ and PORT2_RESP.
OTP-8361 EPMD now correctly handles the extra data field which can be
given in the ALIVE2_REQ request and retrieved in the PORT2_RESP
response. (Thanks to Klas Johansson.)
|
|
In the ErtsExternalDist structure, the flags field holds a combination of flags
(tagged into the high bits) and the connection ID (in the low bits). This
wasn't clearing indicated anywhere. This patch adds a comment before the flags
and mask that indicates their use and relation to each other. This will help
guide people through the code and reduce the likelihood that someone will add a
flag without adjusting the mask.
|
|
term_to_binary and binary_to_term are powerful tools that can be used easily in
lieu of a custom binary network protocol. Unfortunately, carefully crafted
data can be used to exhaust the memory in an Erlang node by merely attempting
to decode binaries. This makes it unsafe to receive data from untrusted
sources.
This is possible because binary_to_term/1 will allocate new atoms and new
external function references. These data structures are not garbage collected.
This patch implements the new form of binary_to_term that takes a list of
options, and a simple option called 'safe'. If specified, this option will
cause decoding to fail with a badarg error if an atom or external function
reference would be allocated.
In the general case, it will happily decode any Erlang term other than those
containing new atoms or new external function references. However, fun, pid,
and ref data types can embed atoms. They might fail to decode if one of these
embedded atoms is new to the node. This may be an issue if encoded binaries
are transferred between nodes or persisted between invocations of Erlang.
|
|
|
|
|
|
Don't let the length field pollute the value of the "extra" field in
ALIVE2_REQ. Extra was read, starting at the second byte of the two
byte length field, which meant that it was included in the result and
the last byte of the value was skipped:
if "extra" is <<1, 2>>, return <<0, 2, 1, 2>> not <<0, 2, 2, 1>>
Increment the offset correctly when sending PORT2_RESP, in order to
make sure the "extra" field won't be truncated:
if "extra" is <<>>, return <<0, 0>> not <<0>>
if "extra" is <<1, 2>>, return <<0, 2, 1, 2>> not <<0, 2, 1>>
Allow null characters in "extra".
|
|
Place HighestVersion before LowestVersion, since that is what the
source code does (erl_epmd.erl and epmd_srv.c).
|
|
ucontext routines are deprecated in Snow Leopard and defining
_XOPEN_SOURCE is the suggested remedy.
|
|
The mcontext_t structure changed between Tiger & Leopard and the erts
configure script doesn't take this into account when testing for
reliable floating point exceptions. HiPE is not enabled when reliable
fpes are not detected.
The PPC test preserves the pre-modern mcontext_t and so builds on Tiger,
but I suspect that PPC/Leopard is broken. I don't have the header files
to check modern PPC mcontext_t so I haven't changed that part of the test.
|
|
* at/windows_build_fixes:
Updated README.win32 for compiling with VS2008 and issues with mc.exe
Allow mc.sh and rc.sh to work when path to mc/rc.exe has spaces
OTP-8345 Building on Windows will now work if the paths to mc.exe and
rc.exe contain spaces. The README.win32 file has been updated
with some information about building using Visual Studio 2008.
(Thanks to Andrew Thompson.)
|
|
It must be unsigned so that prim_inet will not reject
when it is sent down again.
(Suggested fix by Raimo for a bug reported by Simon Cornish.)
|
|
The eval call in these scripts was failing for me because the path to
them on my windows machine contained spaces. I also fixed some
copy/paste-os from when (evidently) the mc.sh script was created by
copying the rc.sh script and modifying it.
|
|
* sc/darwin_build_rm_dSYMN:
Fix 'make clean' in erts with debug builds under Darwin
|
|
The Apple compiler creates DWARF debugging symbols in a bundle (ie. a
directory) named <name>.dSYM
In order for make clean to work correctly, the rm command needs -r
|
|
* bg/on_load:
Test on_load functions that don't return 'ok'
Change the expected return value for on_load functions
OTP-8339 The expected return value for an on_load function has been
changed. (See the section about code loading in the Reference
manual.)
|
|
|
|
An on_load function is supposed to return 'true' to indicate
that the module should be loaded, and 'false' if it should be
unloaded. But returning any other term, as well as causing an
exception, will also unload the module.
Since we don't like boolean values mixed with other values,
change the expected return value as follows:
* If 'ok' is returned, the module will remain loaded and become
callable.
* If any other value is returned (or an exception is generated),
the module will be unloaded. Also, if the returned value is
not an atom, send a warning message to the error_logger
(using error_logger:warning_msg/2).
The new interpretation of the return value means that an on_load
function can now directly return the return value from
erlang:load_nif/2.
|
|
new mandatory configuration variable that replaces all other
previously mandatory configuration variables, and better
documentation. Note that old cross compilation configurations
cannot be used without modifications.
For more information see the $ERL_TOP/xcomp/README file.
|
|
* bg/slimmer-history:
beam_makepos: Do not put any dates in generated files
compiler: Teach 'slim' to omit compilation info
|
|
We don't want to have dates in files that are checked-in as
part of the bootstrap compiler (such as beam_opcodes.{erl,hrl})
as a new version will be created every time.
|
|
|
|
NIF function prototypes in order to allow more than 3 function
arguments. Also an incompatible change in the return value of
erlang:load_nif/2. Added support for references, floats and term
comparison in NIFs. Read more in the documentation of erl_nif and
erlang:load_nif/2.
|
|
NIF function prototypes in order to allow more than 3 function
arguments. Also an incompatible change in the return value of
erlang:load_nif/2. Added support for references, floats and term
comparison in NIFs. Read more in the documentation of erl_nif and
erlang:load_nif/2.
|
|
The correct value for the second argument to erlang:split_binary/2
(Pos) is 0, not 1.
|
|
* mh/to_erl-error-messages:
to_erl: Include strerror(errno) in error messages
OTP-8325 to_erl will now include the system error string in error messages
to make it easier to understand what the real problem is. (Thanks
to Magnus Henoch.)
|
|
The MIB compiler in the snmp applications formats its warnings slightly
differently, so we'll need to update the regexp that should match the
expected output.
|
|
* ks/dialyzer-wx-fix:
dialyzer: make -wx always start the SMP emulator
|
|
The erlang:make_stub_module/3 BIF (which is only used for
loading native code) does not zero the word that points out
an on_load routine (if any). As that word most proably will
contain a non-zero value, the erlang:module_loaded/1 BIF will
think that the module has an on_load routine which has not
returned and will always return 'false'. That in turns causes
various problems for the native code test cases.
|
|
to_erl likes to print the message "No running Erlang on pipe ...",
no matter what the problem actually was. The wording might make
you forget that you just need to run to_erl as another user,
for example.
With this change, to_erl will print the system error message
in addition to its own.
Example output:
No running Erlang on pipe pipes/erlang.pipe.5: Permission denied
(wrong user, wrong permissions, etc)
No running Erlang on pipe pipes/erlang.pipe.5: No such device or address
(this actually means "no running Erlang")
No running Erlang on pipe pipes/erlang.pipe: No such file or directory
(not only is there no running Erlang, there are also no pipes at all)
|
|
The wx application will only work in the SMP emulator,
so the -wx option for 'dialyzer' must force the -smp
option when starting the emulator.
Make sure that -wx in *any* position on the command
line (not only as the first argument) forces the
SMP emulator.
|
|
|
|
|