Age | Commit message (Collapse) | Author |
|
Fix a couple trivial typos in erl_nif.xml.
Signed-off-by: Tuncer Ayaz <[email protected]>
|
|
Build and install erl_nif manpage.
Signed-off-by: Tuncer Ayaz <[email protected]>
|
|
The runtime system crashed if fewer logical processors were found than
reported by sysconf( SC_NPROCESSORS_CONF).
|
|
The use of mmap() was unnecessarily disabled when cross compiling.
The configure arguments --with-ssl, and --with-odbc refused to accept
libraries outside of $erl_xcomp_sysroot when cross compiling for no good
reason.
The configure argument --with-odbc didn't handle the value yes correct.
The configure arguments --with-odbc, and --without-odbc have also been
added to the configure help.
(Thanks to Steve Vinoski for reporting these issues)
|
|
* mh/doc-loose-lose:
Fix spelling: "loose" is not a verb
|
|
* se/decode_packet:
Fix erlang:decode_packet(httph_bin,..) to not return faulty header strings
OTP-8548 se/decode_packet
erlang:decode_packet(httph_bin,..) could return corrupt header strings or
even crash the VM. This has been fixed. It only happened on 32-bit VM if
the header name was unknown and between 16 and 20 characters long. Sockets
with simular packet option did not suffer from this bug.
|
|
Unrecognized Http header names was sometimes returned as corrupt
sub-binaries pointing to a stack allocated buffer. This only happened
on 32-bit VM if the header name was between 16 and 20 characters
long. It could in some cases lead to segmentation fault.
The solution was to avoid creating sub-binary if the returned string
was not part of the original binary.
|
|
"Lose" means not "not win", but "loose" means "not tight".
Change "loose" to "lose" where appropriate.
|
|
* bg/compiler-remove-r11-support:
compiler: Don't support the no_binaries option
erts: Don't support the put_string/3 instruction
compiler: Don't support the no_constant_pool option
compiler: Don't support the r11 option
test_server: Don't support communication with R11 nodes
binary_SUITE: Don't test bit-level binary roundtrips with R11 nodes
erts: Test compatibility of funs with R12 instead of R11
OTP-8531 bg/compiler-remove-r11-support
|
|
Since R14 does not need to load code that can also be loaded
in an R11 run-time system, support for the put_string/3
instruction can be removed.
|
|
|
|
|
|
* pan/otp_8332_halfword:
Teach testcase in driver_suite the new prototype for driver_async
wx: Correct usage of driver callbacks from wx thread
Adopt the new (R13B04) Nif functionality to the halfword codebase
Support monitoring and demonitoring from driver threads
Fix further test-suite problems
Correct the VM to work for more test suites
Teach {wordsize,internal|external} to system_info/1
Make tracing and distribution work
Turn on instruction packing in the loader and virtual machine
Add the BeamInstr data type for loaded BEAM code
Fix the BEAM dissambler for the half-word emulator
Store pointers to heap data in 32-bit words
Add a custom mmap wrapper to force heaps into the lower address range
Fit all heap data into the 32-bit address range
|
|
* hawk/escript-add-create-and-extract:
Add type info for record fields
Remove the undocumented function escript:foldl/3
Make reltool independent of the function escript:foldl/3
Add functions to create and extract escripts
Add function zip:foldl/3 to iterate over zip archives
OTP-8521 hawk/escript-add-create-and-extract
Added function zip:foldl/3 to iterate over zip archives.
Added functions to create and extract escripts. See escript:create/2 and
escript:extract/2.
The undocumented function escript:foldl/3 has been removed. The same
functionality can be achieved with the more flexible functions
escript:extract/2 and zip:foldl/3.
Record fields has been annotated with type info. Source files as been
adapted to fit within 80 chars and trailing whitespace hasd been removed.
|
|
Both reltool and rebar needs to parse escripts. They are currently
using an undocumented function called escript:foldl/3. It folds a
function over all files in the body of an escript. If the body
contains source code the function compiles it and the gives debug
compiled beam code to the fold fun. If the body is an archive the fun
is applied for all files in the archive.
Instead of making the undocumented function public, the new functions
escript:create/2 and escript:extract/2 has been introduced. Together
with the new zip:foldl/3 function they have the same functionality as
escript:foldl/3 in a more flexible and generic way.
escript:foldl/3 should be removed as soon as reltool and rebar has
been adopted to use the new functions. The simplest way for reltool
and rebar to do this is to just copy the code from
escript_SUITE:escript_foldl/3, which happens to provide a future
compatible implementation of an emulated escript:foldl/3 function.
I was quite hesitant when I introduced the compile_source option. It
feels that it does not belong there but the alternative felt worse.
The rationale for the compile_source option is that it is a bit
cumbersome to compile the source code, as the source in most cases is
partial. In order to do compile the source you need to know about some
internals in escript. Without compile_source I think that these
internals should be documented. Further you need to duplicate parts of
the code.
Without the compile_source option you need to first parse the source
to forms, using an undocumented function in epp with an extended
format of predefined macros which also is undocumented. Then you need
to investigate the forms to see if you need to add an export form for
main. When that is done you can run the rest of the compiler passes as
usual. It is not so much code (60 lines or so) to write, but I do not
want to urge people to write it. I actually wrote the code (see
escript_SUITE:escript_foldl/3) before I decided to introduce the
compile_source option.
|
|
This is the public interface of prim_zip:open/3,
which has been used in earlier releases by both
erl_prim_loader and escript. The new function
can be used as a replacement for the undocumented
function escript:foldl/3 that is likely to be
removed without further notice.
The error handling of prim_zip:open/3 (and
prim_zip:foldl/3) has been improved in order to
better suite a public interface. For example it
could happen that a file or a zlib port could be
left open in some errors cases.
The documentation of the FileSpec parameter to
zip:create/3 has been updated to show that
file info can be explicitly specified. A FileSpec
may contain {Filename, binary(), #file_info{}}
elements. The function zip:create/3 was already
prepared to partly support this, but now after
a few minor fixes it is fully supported.
|
|
|
|
The documentation (*.xml) in the otp tree has a common grammatical
problem, "it's" and "its" are often interchanged. That is annoying
for some readers.
This commit consists entirely of "it's" -> "its" changes. I went
through every .xml file in the tree. If there are any remaining
bugs of this type, it's because I missed them, not because I
didn't look.
|
|
The testcase core dunmped. Also made sure the key could actually store
long integers in driver_async (which is more of a cosmetic change).
|
|
Change erl_int_sizes_config to include HALFWORD_HEAP_EMULATOR,
which make it possible for the NIFs to figure out the term size.
|
|
The driver in the wx application does monitoring (and
demonitoring) from non-scheduler threads. In the non-half-word
emulators, data will be modified without the protection of a
lock (which is potentially bad), but the half-word emulator will
crash in that situation.
While at it, also correct an old bug which make assertions
fail in the Kernel test suite.
|
|
Fix safe_mul in the loader, which caused failures in the bit
syntax test cases.
Fix yet another Uint in erl_alloc.h (ERTS_CACHE_LINE_SIZE) causing
segmentation fault when we have many schedulers (why only in that
situation?).
Clean up erl_mseg (remove old code for the Linux 32-bit mmap flag).
While at it, also remove compilation warnings.
|
|
The following test suites now work:
send_term_SUITE
trace_nif_SUITE
binary_SUITE
match_spec_SUITE
node_container_SUITE
beam_literals_SUITE
Also add a testcases for system_info({wordsize,internal|external}).
|
|
Some test suites need to differentiate between 32-bit terms
and 32-bit pointers.
While at it, remove some more warnings in process.c for SMP and debug.
|
|
Rewrite trace code and external coding. Also slightly correct
the interface to the match-spec engine to make tracing work.
That will make the test suites runnable.
|
|
|
|
For cleanliness, use BeamInstr instead of the UWord
data type to any machine-sized words that are used
for BEAM instructions. Only use UWord for untyped
words in general.
|
|
|
|
Store Erlang terms in 32-bit entities on the heap, expanding the
pointers to 64-bit when needed. This works because all terms are stored
on addresses in the 32-bit address range (the 32 most significant bits
of pointers to term data are always 0).
Introduce a new datatype called UWord (along with its companion SWord),
which is an integer having the exact same size as the machine word
(a void *), but might be larger than Eterm/Uint.
Store code as machine words, as the instructions are pointers to
executable code which might reside outside the 32-bit address range.
Continuation pointers are stored on the 32-bit stack and hence must
point to addresses in the low range, which means that loaded beam code
much be placed in the low 32-bit address range (but, as said earlier,
the instructions themselves are full words).
No Erlang term data can be stored on C stacks (enforced by an
earlier commit).
This version gives a prompt, but test cases still fail (and dump core).
The loader (and emulator loop) has instruction packing disabled.
The main issues has been in rewriting loader and actual virtual
machine. Subsystems (like distribution) does not work yet.
|
|
The free list is still rudimentary for the mmap wrapper and
a better implementation will be needed for production quality.
|
|
This is the first step in the implementation of the half-word emulator,
a 64-bit emulator where all pointers to heap data will be stored
in 32-bit words. Code specific for this emulator variant is
conditionally compiled when the HALFWORD_HEAP define has
a non-zero value.
First force all pointers to heap data to fall into a single 32-bit range,
but still store them in 64-bit words.
Temporary term data stored on C stack is moved into scheduler specific
storage (allocated as heaps) and macros are added to make this
happen only in emulators where this is needed. For a vanilla VM the
temporary terms are still stored on the C stack.
|
|
This problems occurs in some recent versions of Emacs.
|
|
Driver threads, such as async threads, using <seealso
marker="erl_driver#ErlDrvPDL">port data locks</seealso> peeked at the port
status field without proper locking when looking up the driver queue.
|
|
A call to the BIF unregister(RegName) when a port had the name RegName
registered in the runtime system without SMP support caused a runtime
system crash. (Thanks to Per Hedeland for the bugfix and test case.)
|
|
|
|
|
|
|
|
|
|
Driver API for multi-threading made available for NIFs.
Support for mempory managed (garbage collected) resource objects.
A way to pass "pointers" to native data structures between C and
Erlang in a safe way.
Support for references, floats and term comparison.
Various new functions, like enif_inspect_iolist_as_binary,
enif_make_sub_binary, enif_get_string, enif_get_atom,
enif_make_tuple_from_array, enif_make_list_from_array,
enif_make_existing_atom.
|
|
Driver API for multi-threading made available for NIFs.
Support for mempory managed (garbage collected) resource objects.
A way to pass "pointers" to native data structures between C and
Erlang in a safe way.
Support for references, floats and term comparison.
Various new functions, like enif_inspect_iolist_as_binary,
enif_make_sub_binary, enif_get_string, enif_get_atom,
enif_make_tuple_from_array, enif_make_list_from_array,
enif_make_existing_atom.
|
|
Driver API for multi-threading made available for NIFs.
Support for mempory managed (garbage collected) resource objects.
A way to pass "pointers" to native data structures between C and
Erlang in a safe way.
Support for references, floats and term comparison.
Various new functions, like enif_inspect_iolist_as_binary,
enif_make_sub_binary, enif_get_string, enif_get_atom,
enif_make_tuple_from_array, enif_make_list_from_array,
enif_make_existing_atom.
|
|
|
|
|
|
Driver API for multi-threading made available for NIFs.
Support for mempory managed (garbage collected) resource objects.
A way to pass "pointers" to native data structures between C and
Erlang in a safe way.
Various new functions, like enif_inspect_iolist_as_binary,
enif_make_sub_binary, enif_get_string, enif_get_atom,
enif_make_tuple_from_array, enif_make_list_from_array,
enif_make_existing_atom.
|
|
* 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.)
|
|
improvements.
Most notable:
Lots of cross compilation improvements. The old cross compilation
support was more or less non-existing as well as broken. Please,
note that the cross compilation support should still be
considered as experimental. Also note that old cross compilation
configurations cannot be used without modifications. For more
information on cross compiling Erlang/OTP see the
$ERL_TOP/xcomp/README file.
Support for staged install using <url
href="http://www.gnu.org/prep/standards/html_node/DESTDIR.html">D
ESTDIR</url>. The old broken INSTALL_PREFIX has also been fixed.
For more information see the $ERL_TOP/README file.
Documentation of the release target of the top Makefile. For more
information see the $ERL_TOP/README file.
make install now by default creates relative symbolic links
instead of absolute ones. For more information see the
$ERL_TOP/README file.
$ERL_TOP/configure --help=recursive now works and prints help for
all applications with configure scripts.
Doing make install, or make release directly after make all no
longer triggers miscellaneous rebuilds.
Existing bootstrap system is now used when doing make install, or
make release without a preceding make all.
The crypto and ssl applications use the same runtime library path
when dynamically linking against libssl.so and libcrypto.so. The
runtime library search path has also been extended.
The configure scripts of erl_interface and odbc now search for
thread libraries and thread library quirks the same way as erts
do.
The configure script of the odbc application now also looks for
odbc libraries in lib64 and lib/64 directories when building on a
64-bit system.
The config.h.in file in the erl_interface application is now
automatically generated in instead of statically updated which
reduces the risk of configure tests without any effect.
(Thanks to Henrik Riomar and Winston Smith for testing)
|
|
|
|
* ks/erts:
hipe_bif0.c: Remove $Id$
erts/preloaded: Add types and specs
|
|
|