Age | Commit message (Collapse) | Author |
|
|
|
* 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
|
|
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.
|
|
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.)
|
|
|
|
* 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.)
|
|
* ks/erts:
hipe_bif0.c: Remove $Id$
erts/preloaded: Add types and specs
|
|
|
|
|
|
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.
|
|
to not be allowed to garbage collect.
|
|
* egil/lcnt:
Add test suite for lcnt in tools
Add lcnt:rt_opt/1 bindings to erts_debug
Add runtime option to enable/disable lcnt stats
Add auto width on string output
Add lcnt documentation
Add lock profiling tool
OTP-8424 Add lock profiling tool.
The Lock profiling tool, lcnt, can make use of the internal lock
statistics when the runtime system is built with this feature
enabled.
This provides a mechanism to examine potential lock bottlenecks
within the runtime itself.
- Add erts_debug:lock_counters({copy_save, bool()}). This option
enables or disables statistics saving for destroyed processes and
ets-tables. Enabling this might consume a lot of memory.
- Add id-numbering for lock classes which is otherwise undefined.
|
|
Add erts_debug:lock_counters({copy_save, bool()}). This option
enables or disables statistics saving for destroyed processes and
ets-tables. Enabling this might consume a lot of memory.
Add id-numbering for lock classes which is otherwise undefined.
|
|
* gc/hipe_darwin_amd64:
Fix hipe memory allocation problems on darwin/amd64
Porting x86 darwin fixes to amd64 darwin hipe asm/m4 code
Automatically enable hipe for darwin/amd64 builds
Allow configure to enable_hipe for darwin/amd64 builds
OTP-8416 HiPE now works in the 64-bit emulator on Mac OS X. (Thanks to
Geoff Cant.)
|
|
tile-cc 2.0.1.78377 when compiling the runtime system.
|
|
HiPE on amd64 needs to be able to allocate memory in the 0x20000000+
range so that compiled code will be addressable with 32bit pointers
(when sign extended). By default, when building 64bit executables on
OS X, PAGEZERO occupies the first 4GB of virtual memory. The PAGEZERO
segment cannot be mmap(ed) or vm_allocate(d) into.
To avoid this problem we use the -pagezero_size linker flag to reduce
the size of PAGEZERO and free up the 0x20000000+ space.
|
|
Compared to GNU as, Mac OS X's assembler uses different directives for
text and global sections, and omits type and size directives
entirely. We also need to mangle symbol names in order to allow
linking with C object files.
|
|
|
|
|
|
* jb/atom-table-size:
Add the +t emulator option to change the maximum number of atoms
OTP-8405 There is a new +t emulator option for changing the maximum number
of atoms. (Thanks to Julien Barbot.)
|
|
erlang:system_flag(multi_scheduling, block | unblock) could
deadlock the runtime system.
|
|
It is now possible to increase or decrease the maximum number of atoms
the VM can handle. The default value is 1048576 (1024*1024).
|
|
|
|
* mp/hipe-smp-fixes:
work around hipe_mfa_info_table lock omission
fix hipe loader SMP non-atomicity error
OTP-8397 The loading of native code was not properly atomic in the SMP
emulator, which could cause crashes. Also a per-MFA information
table for the native code has now been protected with a lock
since it turns that it could be accessed concurrently in the SMP
emulator. (Thanks to Mikael Pettersson.)
|
|
HiPE maintains per-MFA information such as native code entry
point in a table. This table was thought to be read-only at
runtime, except when the loader populates it, so it employed
no locking. That turned out to be incorrect: if there is an
apply of a previously unseen MFA, a native code stub for that
MFA is created and recorded in the table, causing it to grow.
Work around this for now by slapping a mutex around accesses
to that table.
Signed-off-by: Mikael Pettersson <[email protected]>
|
|
The real problem is in the re:run/3 BIF.
Noticed-by: Rory Byrne
Tests-by: Rory Byrne
|
|
* ta/os_timestamp_no_mutex:
Remove mutex lock around sys_gettimeofday() in os:timestamp/0
OTP-8390 An unecessary lock operation in os:timestamp/0 has been
eliminated, making it slightly more efficient. (Thanks to Jonas
Falkevik and Tuncer Ayaz.)
|
|
ordered_set's to sometimes get out of synch and absurdly high.
|
|
In the erlang-questions thread "os:timestamp() uses mutex lock"
Jonas Falkevik questioned the need for a mutex lock in
os:timestamp/0. The mutex lock *is* needed in erlang:now()
to guarantee the uniqueness of the returned time, but serves
no useful purpose in os:timestamp().
Signed-off-by: Tuncer Ayaz <[email protected]>
|
|
erlang:system_flag(multi_scheduling, block | unblock) could
deadlock the runtime system.
|
|
(Thanks to Yamashina Hio.)
|
|
checking if CC equaled gcc. That is, the makefiles failed to
detect gcc C compilers with other command line names than gcc.
`configure' now substitute GCC into the makefiles. If CC is a gcc
C compiler, GCC will have the value yes. (Thanks to
Jean-S�bastien P�dron)
|
|
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.
|