Age | Commit message (Collapse) | Author |
|
* maint:
Fixed #Ref ordering bug
Test #Ref ordering in lists and ets
|
|
|
|
I did not find any legitimate use of "can not", however skipped
changing e.g RFCs archived in the source tree.
|
|
|
|
* lukas/kernel/logger-config/OTP-13295:
erts: Fix emulator log messages to use erlang:system_time
kernel: Add LOGGER_SERVER_TAG to logger_server
|
|
This was changed in the logger in 8aa64c90ddd20ec0ca8cc5fe92a6124324c51da5.
|
|
and let compiler determine string lengths.
These were actually wrong in erl_db.c:
count_trap\0
replace_tra
select_tra
|
|
|
|
fix integer truncation bugs in error logger path
|
|
Sending a large term to the error logger has two problems related
to the size and sign of the variables used to represent lengths:
- the API functions (erts_send_error_term_to_logger() et al) perform
an unchecked narrowing conversion from size_t to int when passing
dsbufp->str_len to the internal functions; this may both truncate
the length and make it negative
- do_send_term_to_logger() and do_send_to_logger() multiply the
int-typed length by 2 before widening it to Uint and adding a few
more values; the intermediate product may overflow causing loss
of high bits and a change of sign; if the intermediate product is
negative the final size will be an extremely large positive value
The end result is that the computed buffer size can be arbitrarily
wrong, either too small or too large.
While reviewing this code I also found and fixed a potential narrowing
bug in erts_set_hole_marker().
|
|
|
|
This commit brings the perform of a non-strict equality check of
binaries into the same range as strict ones.
Currently, these checks can be significantly slower because they go
through the general comparison code which doesn't have an optimization
to check the size before comparing contents in the case that it's
checking equality.
|
|
putenv(3) and friends aren't thread-safe regardless of how you slice
it; a global lock around all environment operations (like before)
keeps things safe as far as our own operations go, but we have
absolutely no control over what libc or a library dragged in by a
driver/NIF does -- they're free to call getenv(3) or putenv(3)
without honoring our lock.
This commit solves this by setting up an "emulated" environment which
can't be touched without going through our interfaces. Third-party
libraries can still shoot themselves in the foot but benign uses of
os:putenv/2 will no longer risk crashing the emulator.
|
|
|
|
OTP-14520
|
|
|
|
* maint:
Unicode support for erlang:display_string/1
|
|
* rickard/unicode-display_string/OTP-14545:
Unicode support for erlang:display_string/1
|
|
|
|
|
|
* sverker/halt-unicode-slogan/OTP-14553:
erts: Allow any unicode string as crash dump slogan
erts: Generate crash_dump slogan string as UTF8
erts: Refactor erts_unicode_list_to_buf
|
|
|
|
This refactor was done using the unifdef tool like this:
for file in $(find erts/ -name *.[ch]); do unifdef -t -f defile -o $file $file; done
where defile contained:
#define ERTS_SMP 1
#define USE_THREADS 1
#define DDLL_SMP 1
#define ERTS_HAVE_SMP_EMU 1
#define SMP 1
#define ERL_BITS_REENTRANT 1
#define ERTS_USE_ASYNC_READY_Q 1
#define FDBLOCK 1
#undef ERTS_POLL_NEED_ASYNC_INTERRUPT_SUPPORT
#define ERTS_POLL_ASYNC_INTERRUPT_SUPPORT 0
#define ERTS_POLL_USE_WAKEUP_PIPE 1
#define ERTS_POLL_USE_UPDATE_REQUESTS_QUEUE 1
#undef ERTS_HAVE_PLAIN_EMU
#undef ERTS_SIGNAL_STATE
|
|
to get bytes written when truncated.
|
|
This allows us to enable/disable lock counting at will, and greatly improves
the performance of erts_debug:lock_counters/1 since we no longer have to
worry about the lock counters "dying" while we're enumerating them.
OTP-14412
|
|
|
|
Support hashing terms from NIF code
|
|
No need for the xor-trick, to be order independent, as both
flatmaps and hashmaps have a constant key-value order internally.
|
|
* sverker/refactor:
erts: Introduce struct binary_internals
erts: Introduce erts_bin_release
erts: Init refc=1 in erts_bin_drv_alloc*
erts: Init refc=1 in erts_bin_nrml_alloc
erts: Remove deliberate leak of hipe fun entries
erts: Remove hipe_bifs:remove_refs_from/1
Refactor hipe specific code to use ErtsCodeInfo
erts: Refactor ErtsCodeInfo.native
|
|
|
|
|
|
|
|
These allow one to hash VM terms from NIF code.
|
|
to replace macro ERTS_INTERNAL_BINARY_FIELDS
as header in Binary and friends.
|
|
OTP-14331
* rickard/pcre-8.40:
Update documentation
Update README.pcre_update.md
Stack guard for PCRE
Adjust for incompatibility between PCRE 8.40 and perl 5.22.1
Generate re replacement and split tests with perl vsn 5.22.1
Fix re_SUITE:pcre_compile_workspace_overflow/1
Skip line with lockout of modifiers in PCRE tests
Update tests for PCRE version 8.40
Update PCRE to version 8.40
Conflicts:
erts/emulator/beam/beam_debug.c
|
|
|
|
|
|
|
|
Magic references are *intentionally* indistinguishable from ordinary
references for the Erlang software. Magic references do not change
the language, and are intended as a pure runtime internal optimization.
An ordinary reference is typically used as a key in some table. A
magic reference has a direct pointer to a reference counted magic
binary. This makes it possible to implement various things without
having to do lookups in a table, but instead access the data directly.
Besides very fast lookups this can also improve scalability by
removing a potentially contended table. A couple of examples of
planned future usage of magic references are ETS table identifiers,
and BIF timer identifiers.
Besides future optimizations using magic references it should also
be possible to replace the exposed magic binary cludge with magic
references. That is, magic binaries that are exposed as empty
binaries to the Erlang software.
|
|
* maint:
Atomic reference count of binaries also in non-SMP
Conflicts:
erts/emulator/beam/erl_fun.c
|
|
NIF resources was not handled in a thread-safe manner in the runtime
system without SMP support.
As a consequence of this fix, the following driver functions are now
thread-safe also in the runtime system without SMP support:
- driver_free_binary()
- driver_realloc_binary()
- driver_binary_get_refc()
- driver_binary_inc_refc()
- driver_binary_dec_refc()
|
|
* josevalim/atu8-chunk/PR-1078/OTP-14178:
Add new AtU8 beam chunk
|
|
The new chunk stores atoms encoded in UTF-8.
beam_lib has also been modified to handle the new
'utf8_atoms' attribute while the 'atoms' attribute
may be a missing chunk from now on.
The binary_to_atom/2 BIF can now encode any utf8
binary with up to 255 characters.
The list_to_atom/1 BIF can now accept codepoints
higher than 255 with up to 255 characters (thanks
to Björn Gustavsson).
|
|
erlang:hash/2 has been deprecated for a while, time to remove it.
|
|
|
|
|
|
warning: array subscript is below array bounds
and ok, it's technically undef behavior to set pointer
before first array element.
|
|
Instead of passing around a file descriptor
use a function pointer to facilitate more advanced
backend write logic such as size limitation or compression.
|
|
This commit adds two new structs to be used to represent
erlang code in erts.
ErtsCodeInfo is used to describe the i_func_info header
that is part of all Export entries and the prelude of
each function. This replaces all the BeamInstr * that
were previously used to point to these locations.
After this change the code should never use BeamInstr *
with offsets to figure out different parts of the
func_info header.
ErtsCodeMFA is a struct that is used to descripe a
MFA in code. It is used within ErtsCodeInfo and also
in Process->current.
All function that previously took Eterm * or BeamInstr *
to identify a MFA now use the ErtsCodeMFA or ErtsCodeInfo
where appropriate.
The code has been tested to work when adding a new field to the
ErtsCodeInfo struct, but some updates are needed in ops.tab to
make it work.
|
|
|