| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Now that we no longer execute code inside them, they no longer
need to be allocated at runtime.
|
|
|
|
|
|
|
|
| |
This is needed as BeamAsm needs the export entries to
be executable, which means that we need to allocate them.
Co-authored-by: John Högberg <john@erlang.org>
Co-authored-by: Dan Gudmundsson <dgud@erlang.org>
|
| |
|
| |
|
|\
| |
| |
| |
| |
| | |
* rickard/unicode-bin/OTP-16002:
Update runtime dependency to erts
Return heap binary from unicode:characters_to_binary() when result is small
|
| | |
|
|/
|
|
|
| |
"(void)result" will silence warning about unused variable
and compiler will optimize away such unused variables.
|
|
|
|
|
|
|
|
|
|
| |
and let compiler determine string lengths.
These were actually wrong in erl_db.c:
count_trap\0
replace_tra
select_tra
|
| |
|
|\
| |
| |
| |
| | |
* maint:
Fix encoding of filenames in stacktraces
|
| | |
|
| |
| |
| |
| |
| | |
This reverts commit 0717a2194e863f3a78595184ccc5637697f03353, reversing
changes made to 71a40658a0cef8b3e25df3a8e48a72d0563a89bf.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Previously we accepted trailing NULs, which was backwards compatible
as such usage never resulted in misbehavior in the first place. The
downside is that it prevented erts_native_filename_need from
returning an accurate number of *actual characters*, needlessly
complicating encoding-agnostic code like erts_osenv.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Various places that now reject null chars inside strings
- Primitive file operations reject it in filenames.
- Primitive environment variable operations reject it in
names and values.
- os:cmd() reject it in its input.
Also '=' characters are rejected by primitive environment
variable operations in environment variable names.
Documentation has been updated to document null characters
in these types of data as invalid. Currently these operations
accept null chars at the end of strings, but that will change
in the future.
|
| |
|
|
|
|
|
| |
A magic destructor can return 0 and thereby take control
and prolong the lifetime of a magic binary.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
| |
- use Sint for 'left' and Uint for 'pos'
- cost_to_proc(): adjust types, remove unused return value
- copy_utf8_bin(): return Uint
- characters_to_utf8_trap(): remove harmful cast
- unicode_characters_to_binary_2(): correct types in debug code
- erts_convert_filename_to_encoding(): remove useless cast
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is mostly a pure refactoring.
Except for the buggy cases when calling erlang:halt() with a positive
integer in the range -(INT_MIN+2) to -INT_MIN that got confused with
ERTS_ABORT_EXIT, ERTS_DUMP_EXIT and ERTS_INTR_EXIT.
Outcome OLD erl_exit(n, ) NEW erts_exit(n, )
------- ------------------- -------------------------------------------
exit(Status) n = -Status <= 0 n = Status >= 0
crashdump+abort n > 0, ignore n n = ERTS_ERROR_EXIT < 0
The outcome of the old ERTS_ABORT_EXIT, ERTS_INTR_EXIT and
ERTS_DUMP_EXIT are the same as before (even though their values have
changed).
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
OTP-11408
* sverk/load-nif-unicode:
erts: Fix bug in atom to filename conversions
Fix open_ddll for win
erts, crypto: Support NIF library with unicode filename on windows
erts: Factor out erts_convert_filename_to_wchar()
erts: Fix compiler warning
erts: Fix loading of NIF library with unicode in path
erts: Remove unused constant DRIVER_TAB_SIZE
|
| |
| |
| |
| | |
Buggy old code assumed latin1 atoms.
|
| |
| |
| |
| | |
from erts_convert_filename_to_encoding()
|
|\ \
| |/
|/|
| |
| | |
Conflicts:
erts/preloaded/ebin/erlang.beam
|
| |
| |
| |
| |
| |
| |
| |
| | |
* Coalescing and trimming of free segments in supercarrier
* Management of super aligned and super unaligned areas in
supercarrier
* Management of reservation of physical memory
* erts_mseg usage of erts_mmap
|
|\ \
| |/ |
|
| | |
|
|/
|
|
|
|
| |
Previously only 'spawn_executable' handled unicode input.
Also change 'cd' option to always handle unicode.
Update open_port documentation and tests
|
| |
|
|
|
|
|
|
|
|
|
| |
This is the base for implementing configurable
~tp printouts, so that the user can define which
characters to view as actually printable in the shell and
by io_lib:format.
The functionality is neither documented nor used in this commit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have decided that we don't want to deal with the compilations
of prim_file:get_cwd() returning a binary when the current
directory name cannot be translated losslessly to a list (i.e.
when the run-time system was started with +fnu and the current directory
name contains bytes that are not part of a valid UTF-8 sequence).
Therefore, if prim_file:set_cwd() is given a binary as the pathname,
we will need to check the binary to make sure it can be translated
to a list. We will introduce a new BIF, called prim_file:is_translatable/1,
which will check both filename encoding mode, and if it is one of
Unicode modes, the binary as well.
We don't need to do anything special if prim_file:set_cwd() is passed
a list.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The fix affects list_dir and read_link. Raw filenames are now
never produced, just consumed even if +fnu or +fna is used on
Linux etc.
This also adds the options to get error return or error handler
warning messages with +fn{u|a}{i|w|e} as an option to erl.
This is still not documented and there needs to be other versions
of read_dir and read_link to facilitate reading of all types
of filenames and links.
A check that we will not change to an invalid directory is also needed.
|
|\
| |
| |
| |
| |
| | |
* sverk/enc_atom-opt:
erts: Optimize atom encoding to use memcpy for pure ascii
erts: Refactor erts_atom_get to use ErtsAtomEncoding
|
| |
| |
| |
| | |
instead of 'is_latin1' boolean argument.
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| | |
Conflicts:
lib/diameter/autoconf/vxworks/sed.general
xcomp/README.md
|
| | |
|
|\ \
| |/
| |
| |
| |
| |
| |
| | |
Conflicts:
erts/doc/src/erlang.xml
erts/preloaded/ebin/init.beam
lib/kernel/doc/src/os.xml
lib/stdlib/test/filename_SUITE.erl
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Putenv and getenv needs to convert to the proper environment
strings in Unicode depending on platform and user settings for filename
encoding. Also erlexec needs to pass environment strings in an appropriate
way for kernel to pick up. All environment strings on the command
line, as well as home directory, is now passed in UTF8 on windows
and in whatever encoding you have on Unix, kernel tries to convert all
parameters and environments from UTF8 before making strings.
|
|/ |
|