| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
String could be wrong length if arg was quoted and changed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GCC warns about how `strncpy` is used in `erts/etc/common/escript.c`:
```
escript.c: In function ‘main’:
escript.c:289:17: warning: ‘__builtin_strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
289 | strncpy(dir, beg, sz);
| ^
In function ‘find_prog’,
inlined from ‘main’ at escript.c:483:25:
escript.c:282:26: note: length computed here
282 | sz = strlen(beg);
```
The warning is triggered as GCC understands that, as `sz =
strlen(beg)`, `strncpy` will never see and copy a terminating nul
character to `dir`.
As we manually null-terminate `dir`, by `dir[sz] = '\0';` on the line
following `strncpy` we can avoid the warning, and speed up the copy a
little (there is no need to look for a nul terminator), by using a
plain `memcpy`.
|
|
|
|
|
|
| |
Clang 16 now warns about functions using K&R syntax. Instead of
juggling with compiler warning options, it is better to just bite the
bullet and modernize the source code.
|
| |
|
|\
| |
| | |
[erts] Implement call_memory tracing
|
| |
| |
| |
| |
| | |
Similar to call_time, erlang:trace_pattern(..., [call_memory]) accumulates
memory allocations, allowing for basic heap profiling.
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Use 0.0.0.0 for non releases as productversion (and also seen as file
version) on the installer for non release builds.
Only integers works, so use 0.0.0.0 to indicate that this is not a
normal release.
|
|\ \ \
| |/ / |
|
| |\ \
| | | |
| | | |
| | | | |
Update various file and installer properties
OTP-18429
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Copyright year inside installer and resource file is NOT automaticly
updated by the release scripts so update them from the makefiles.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The ProductVersion must be of the format X.X.X.X so we can't use
the release version as ProductVersion.
Use OTP_VERSION instead this also makes sense for the windows
installer as we on windows always delivers a complete OTP.
|
| | | |
| | | |
| | | |
| | | | |
So they are named as they should be.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
We use ExecShellWait.
NSIS v3.02 added basic support for ExecShellWait.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fixes #4232
Show NSIS version
|
|\ \ \ \
| |/ / / |
|
| |\ \ \ |
|
| | |\ \ \
| | | |/ /
| | |/| | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
for running gdb in Emacs. Seems to have stopped working
in newer Ubuntu (Emacs) version.
|
| | | | | |
|
|\ \ \ \ \
| |/ / / /
| | | | /
| |_|_|/
|/| | | |
* maint:
[erts] Support for truly asynchronous distributed signaling
|
| |/ / |
|
|\ \ \
| | | |
| | | | |
erts: Fix race in fun loading
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Because funs are tied to their canonical module rather than a
specific instance of a module, they are "moved over" to the newest
instance whenever we reload _the exact same module_ over itself.
This quirk, together with how fun entries are updated when a module
is loaded, caused a small window where it was possible for a holder
of an "old" fun to call the new instance before it was fully loaded.
This commit fixes that by versioning funs in roughly the same way
we do exports. It also fixes a related bug where fun purging could
be messed up if a new module instance was loaded in the middle of
purging, solving the issue by disallowing code loading while
purging a module with funs.
|
|/ / / |
|
|\ \ \
| |/ / |
|
| | | |
|
|\ \ \
| |/ / |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This limit can be used to let erts_alloc know that it should
use MADV_FREE on any pages within a carrier that are currently
unused.
Before this change we have tried to have this as default, but that
caused performance issues as carriers oscillated in and out of the
migration pool. So in 25 we decided to remove it. However, this caused
MemAvailable from /proc/memory to become significantly lower and thus
machines that have a tight memory budget need this option.
So the solution is to add a new config option where the user can set
at which utilization limit that free pages in a carrier should be placed
in MemAvailable.
The option is by default set to 0, to mimic the behaviour of OTP 25.
|
| | |
| | |
| | |
| | |
| | |
| | | |
We create the TARGET folders in the makefiles instead
of in configure as then we can delete them without
having to re-run configure.
|
|\ \ \
| | | |
| | | | |
erts: Decouple use of single-mapped memory from `perf` support
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Running the JIT with single-mapped RWX memory for JIT:ed machine code
is needed for `perf` support. But as it is also useful for running
under QEMU user mode emulation [1] this patch adds a new flag
`+JMsingle bool` which controls the use of single-mapped RWX memory
without triggering the output of perf-related metadata.
The naming of the flag is intended to follow the (perceived) pattern
introduced by the `+JPperf`-flag, that is, `J` is a JIT-related option
and `M` stands for memory related things.
Thanks to Björn Gustavsson <bjorn@erlang.org> for suggesting how to
deal with Apple-silicon aarch64 and how to make the smoke test work on
Windows.
Personally I use the additional patch below in order to use the same
file system image for development on an amd64 build host and for
deployment to an aarch64-target board. The patch detects when the VM
is running using QEMU and if so, enables single-mapped memory. As the
patch only works on Linux and doesn't try to identify the version of
QEMU (if the bug gets fixed), I don't think it belongs on OTP
master. But as it is nevertheless useful, I include it here:
```
diff --git a/erts/emulator/beam/erl_init.c b/erts/emulator/beam/erl_init.c
index 42216da0b2..6f11c7586b 100644
--- a/erts/emulator/beam/erl_init.c
+++ b/erts/emulator/beam/erl_init.c
@@ -2408,6 +2408,40 @@ erl_start(int argc, char **argv)
erts_usage();
}
+
+#if defined(HAVE_LINUX_PERF_SUPPORT)
+ /* We want to detect if we are running under QEMU user mode
+ emulation in order to activate single-mapped RWX memory for the
+ JIT:ed code. This only works on Linux, so we use
+ HAVE_LINUX_PERF_SUPPORT to conditionally compile this piece of
+ detection code.
+
+ To detect QEMU user mode we make use of the fact that our
+ parent process will always be QEMU, we detect that by looking
+ up our parent process and then checking if the final path
+ component of the symlink /proc/<parent>/exe starts with
+ "qemu-".
+ */
+ {
+ char symlink_buf[21 + 11]; /* space for any 64 bit integer
+ + /proc/%d/exe and terminator */
+ char target_buf[MAXPATHLEN];
+ ssize_t l;
+ erts_snprintf(symlink_buf, sizeof(symlink_buf),
+ "/proc/%d/exe", getppid());
+ l = readlink(symlink_buf, target_buf, sizeof(target_buf));
+ if (l > 0 && l != sizeof(target_buf)) {
+ char *last_path_separator;
+
+ target_buf[l] = 0;
+ last_path_separator = memrchr(target_buf, '/', l);
+ if (last_path_separator && strncmp(last_path_separator + 1,
+ "qemu-", 5) == 0)
+ erts_jit_single_map = 1;
+ }
+ }
+#endif
+
/* Output format on windows for sprintf defaults to three exponents.
* We use two-exponent to mimic normal sprintf behaviour.
*/
```
[1] There is a bug in QEMU,
see https://gitlab.com/qemu-project/qemu/-/issues/1034
|
|/ / / |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Argument parsing by init is a bit naive. In the escript testcase
"-noshell xxxx...." was interpreted as the "-noshell" flag being
given the value "xxxx....". So to fix this, we push the "-boot file"
argument last and thus "xxxxx" will be seen as a separate argument
as it should.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit re-implements the entire tty driver for both Unix
and Windows to use a common nif instead of two seperate drivers.
The Unix implementation works pretty much as it did before only that
a lot more of the terminal logic has been moved from Erlang to C.
The windows implementation now uses Windows Terminal Sequences, i.e.
the same sequences as most Unixes to control the terminal. This means
that werl.exe is no longer needed and erl.exe will have the "newshell"
with all the features normally only found on Unix.
The new implementation also uses dirty I/O threads for all I/O which
means that it can leave the FDs in blocking mode. This fixes problems
when the Erlang tty is interacting with other systems such as bash.
Closes #3150
Closes #3390
Closes #4343
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When writing using erlang:display* when detached the
write operation would return an error on windows. So
we make sure that the handles are valid so that they
can always be written to.
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | | |
* maint:
[erts] Yield when adjusting large message queues
[erts] Improve flushing of signals
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
The log messages mess with testing and are really only meant
to help when debugging to_erl, not when running it in tests.
|
|/ / |
|
|\ \
| | |
| | |
| | | |
lukas/25/erts/fix-dist-fragment-exit-leak/OTP-18077
|
| |\ \
| | | |
| | | |
| | | | |
lukas/24/erts/fix-dist-fragment-exit-leak/OTP-18077
|
| | |\ \
| | | |/
| | |/|
| | | | |
lukas/23/erts/fix-dist-fragment-exit-leak/OTP-18077
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
If a process is suspended doing a fragmented send and then
receives an exit signal it was terminated before it could
finish sending the message leading to a memory leak on the
receiving side.
This change fixes that so that the message is allowed to
finish being sent before the process exits.
Closes #5876
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
erts: Add etp-dist for listing all dist entries
|
| | | | | |
|