Age | Commit message (Collapse) | Author |
|
|
|
|
|
There is no reason to define a function that is never used.
|
|
|
|
|
|
In the erts/emulator/beam sources
#ifdef SOME_OPERATING_SYSTEM
should be avoided. Instead, call a function implemented in
sys/OPERATING_SYSTEM/sys.c.
|
|
Fix memory management bug causing crash of non-SMP emulator with async
threads enabled. The bug did first appear in R13B03.
|
|
New NIF API function enif_make_new_binary
|
|
The following code never terminates:
fail() ->
Str = "http:/www.flickr.com/slideShow/index.gne?group_id=&user_id=69845378@N0",
EMail_regex = "[a-z0-9!#$%&'*+/=?^_`{|}~-]+"
++ "(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*"
++ "@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+"
++ "(?:[a-zA-Z]{2}|com|org|net|gov|mil"
++ "|biz|info|mobi|name|aero|jobs|museum)",
io:format("about to run...~n"),
Ret = re:run(Str, EMail_regex),
io:format("Ret is ~p~n", [Ret]).
Fix it by having pcre_exec remember match_call_count between restarts.
Reported-by: Gordon Guthrie
Acked-by: Patrik Nyblom
|
|
* ms/pcre-compile-workspace-overrun:
re_SUITE: Add pcre_compile_workspace_overflow/1
MacOS X: Boost default stack size
Fix check for compile workspace overflow
OTP-8539 ms/pcre-compile-workspace-overrun
|
|
* jb/inet6-dist:
Support IPv6 addresses in long host names
Fix implementation of IPv6 TCP distribution protocol
Fix compilation of epmd with IPv6 enabled
OTP-8575 jb/inet6-dist
|
|
The default stack size on MacOS X for the SMP emulator is too small
to support all uses of pcre. For example, the following expression
N = 819, re:compile([lists:duplicate(N, $(), lists:duplicate(N, $))]).
will cause a stack overflow. By bisection of different values
for the +sss option, I found that 166 is the smallest value that
avoids the crash. Round that up to 256 to give a nice, round power
of 2 and a resonable safety margin. Use that value as a default stack
size on MacOS X only.
|
|
Patch from:
http://vcs.pcre.org/viewvc/code/trunk/pcre_compile.c?r1=504&r2=505&view=patch
Test case:
N = 819, re:compile([lists:duplicate(N, $(), lists:duplicate(N, $))]).
Compiling large regular expressions could overflow the workspace
buffer. Modify the test to check for a value smaller than the buffer
size.
|
|
* bg/fconv:
erts: Fix loading of modules with invalid floating point arithmetic
|
|
* ta/nif-documentation:
Fix typos in erl_nif.xml
Build erl_nif manpage
OTP-8558 ta/nif-documentation
|
|
* sk/old_heap-unused:
system_info(procs): Fix the value for "OldHeap unused"
|
|
The value for "OldHeap unused" in the output of
erlang:system_info(procs) and in crash dumps, was incorrectly
calculated as the size of the entire old heap.
|
|
Fix a couple trivial typos in erl_nif.xml.
Signed-off-by: Tuncer Ayaz <[email protected]>
|
|
The following program is supposed to cause an exception
at run-time:
foo() ->
Sum1 = Sum2 = N = 2,
pSum - (Sum1*(Sum2/N)).
but the loader fails to load because it contains the
following instruction:
fconv {atom,pSum} {fr,2}
Fix the loader so that it can handle fconv instructions
where the first operand is a non-numeric literal.
Reported-by: Torbjörn Törnkvist
|
|
Build and install erl_nif manpage.
Signed-off-by: Tuncer Ayaz <[email protected]>
|
|
If FOP is not found create PDF files with fakefop script.
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
|
|
Modify IPv6 variants of SET_ADDR_LOOPBACK and SET_ADDR_ANY to use
in6addr_loopback and in6addr_any.
|
|
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.
|