Age | Commit message (Collapse) | Author |
|
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.)
|
|
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.
|
|
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.)
|
|
* 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
|
|
|
|
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 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.
|
|
|