Age | Commit message (Collapse) | Author |
|
* maint:
Fix typo in erl_parse type unary_op()
|
|
Fix typo in erl_parse type unary_op()
|
|
|
|
Use erlang:system_info(ets_count) and improve docs
|
|
|
|
* sverker/cerl-fixing:
erts: Remove "-pz $PRELOADED" arguments added by cerl
erts: Remove dead code in cerl script
|
|
|
|
|
|
|
|
into maint-20
* john/erts/fix-process-schedule-after-free/OTP-15067/ERL-573:
Don't enqueue system tasks if target process is in fail_state
Fix erroneous schedule of freed/exiting processes
Fix deadlock in run queue evacuation
Fix memory leak of processes that died in the run queue
|
|
* sverker/ic/encode-atom-overrun/ERIERL-191/OTP-15160:
ic: Fix buffer overrun bug in oe_ei_encode_atom
|
|
maint-20
* sverker/erl_interface/simultaneous-connect/OTP-15161:
erl_interface: Fix simultaneous connection setup
|
|
* sverker/kernel/tick-fixes/OTP-15162:
kernel: Fix tick count bug when pending writes
kernel: Send tick to hidden node even if pending writes
|
|
|
|
as c-nodes need ticks to send ticks.
|
|
Add support of non-whole-byte binaries to `abtract/1`, `concrete/1` and
`is_literal/1`. (They are literals in the beam file)
|
|
bug exists since OTP-20.3.4
1d3acb70debd134c8346b7e98347171d5cf6fc62
|
|
Add missing bracket to erlang:spawn_opt/4 docs priority tuple option
|
|
|
|
* maint:
stdlib: Add a few uses of erl_anno
|
|
* hasse/stdlib/fix_erl_anno_usage:
stdlib: Add a few uses of erl_anno
|
|
|
|
|
|
|
|
|
|
The counter used for generating async operation ids was a plain int
shared between all ports, which was incorrect but mostly worked
fine since the ids only had to be unique on a per-port basis.
However, some compilers (notably GCC 8.1.1) generated code that
assumed that this value didn't change between reads. Using a
shortened version of enq_async_w_tmo as an example:
int id = async_ref++;
op->id = id; //A
return id; //B
In GCC 7 and earlier, `async_ref` would be read once and assigned
to `id` before being incremented, which kept the values at A and B
consistent. In GCC 8, `async_ref` was read when assigned at A and
read again at B, and then incremented, which made them inconsistent
if we raced with another port.
This commit fixes the issue by removing `async_ref` altogether and
replacing it with a per-port counter which makes it impossible to
race with someone else.
|
|
Code such as that the following:
Val = map_get(a, Map),
Map#{a:=z} %Could be any map update
would incorrectly cause an internal consistency check failure:
Internal consistency check failed - please report this bug.
Instruction: {put_map_exact,{f,0},{x,0},{x,0},1,{list,[{atom,a},{atom,z}]}}
Error: {bad_type,{needed,map},{actual,term}}:
Update beam_validator so that it understands that the second
argument for map_get/2 is a map.
|
|
beam_type assumed that the operand for the bs_context_to_binary
instruction must be a binary. That is not correct;
bs_context_to_binary accepts anything. Based on the incorrect
assumption, beam_type would remove other test instructions.
The bug was introduced in eee8655788d2, which was supposed
to be just a refactoring commit.
https://bugs.erlang.org/browse/ERL-655
|
|
When a system task was enqueued on a process between being
scheduled and the check altered in this commit, we'd run dirty
code on a normal scheduler as the RUNNING_SYS flag wasn't set
and we wouldn't migrate back.
This change migrates us to a dirty scheduler instead, which will
immediately bounce us back to a normal scheduler where
RUNNING_SYS will be set appropriately.
This is caught fairly reliably by
process_SUITE:system_task_failed_enqueue on machines with a lot of
cores.
|
|
Fold is_function/1,2 during compilation
|
|
Optimise beam_jump
|
|
uri_string: support key without value in query string
|
|
Thoose were added by 598629aeba9de98e8cdf5637043eb34e5d407751 but are not universaly supported.
|
|
|
|
|
|
* maint:
Updated OTP version
Prepare release
Fix unsafe optimization when running beam_block the second time
Fix environment case sensitivity issues on Windows
|
|
* maint-21:
Updated OTP version
Prepare release
Fix unsafe optimization when running beam_block the second time
Fix environment case sensitivity issues on Windows
|
|
* maint:
Updated OTP version
Prepare release
ssh: Report the signal name if there is an exit-signal to sftpd
ssh: Bug fix sftp error codes
ssh: Fix ssh_xfer decode_ATTR error for Vsn=4
ftp: Disallow 'packet_size' for low-level options
ftp: Socket options
syntax_tools: Fix a bug regarding reverting map types.
|
|
* maint-20:
Updated OTP version
Prepare release
ssh: Report the signal name if there is an exit-signal to sftpd
ssh: Bug fix sftp error codes
ssh: Fix ssh_xfer decode_ATTR error for Vsn=4
syntax_tools: Fix a bug regarding reverting map types.
Conflicts:
OTP_VERSION
lib/inets/doc/src/notes.xml
lib/inets/vsn.mk
lib/ssh/doc/src/notes.xml
lib/ssh/vsn.mk
lib/syntax_tools/doc/src/notes.xml
lib/syntax_tools/vsn.mk
otp_versions.table
|
|
* hans/ftp/21socket_opts/ERIERL-192/OTP-15120:
ftp: Disallow 'packet_size' for low-level options
ftp: Socket options
|
|
* maint:
Don't enqueue system tasks if target process is in fail_state
Fix erroneous schedule of freed/exiting processes
Fix deadlock in run queue evacuation
Fix memory leak of processes that died in the run queue
|
|
* john/erts/merge-OTP-15067:
Don't enqueue system tasks if target process is in fail_state
Fix erroneous schedule of freed/exiting processes
Fix deadlock in run queue evacuation
Fix memory leak of processes that died in the run queue
|
|
|
|
|
|
|
|
* bjorn/compiler/fix-beam_utils/ERL-650/OTP-15150:
Fix unsafe optimization when running beam_block the second time
|
|
maint-21
* john/erts/win32-case-insensitive-osenv/OTP-15147/ERL-644:
Fix environment case sensitivity issues on Windows
|
|
The compiler would crash when compiling code such as:
serialize(#{tag := value, id := Id, domain := Domain}) ->
[case Id of
nil ->
error(id({required, id}));
_ ->
<<10, 1:16/signed, Id:16/signed>>
end,
case Domain of
nil ->
error(id({required, domain}));
_ ->
<<8, 2:16/signed, Domain:32/signed>>
end].
The crash would look like this:
Function: serialize/1
t.erl: internal error in block2;
crash reason: {badmatch,false}
in function beam_utils:live_opt/4 (beam_utils.erl, line 861)
in call from beam_utils:live_opt/1 (beam_utils.erl, line 285)
in call from beam_block:function/2 (beam_block.erl, line 47)
in call from beam_block:'-module/2-lc$^0/1-0-'/2 (beam_block.erl, line 33)
in call from beam_block:'-module/2-lc$^0/1-0-'/2 (beam_block.erl, line 33)
in call from beam_block:module/2 (beam_block.erl, line 33)
in call from compile:block2/2 (compile.erl, line 1358)
in call from compile:'-internal_comp/5-anonymous-1-'/3 (compile.erl, line 349)
The reason for the crash is an assertion failure caused by a previous
unsafe optimization. Here is the code before the unsafe optimization:
.
.
.
{bs_init2,{f,0},7,0,0,{field_flags,[]},{x,1}}.
{bs_put_string,3,{string,[8,0,2]}}.
{bs_put_integer,{f,0},{integer,32},1,{field_flags,[signed,big]},{y,1}}.
{move,{x,1},{x,0}}.
{test_heap,4,1}.
.
.
.
beam_block:move_allocate/1 moved up the test_heap/2 instruction past the
move/2 instruction, adjusting the number of live registers at the same
time:
.
.
.
{bs_init2,{f,0},7,0,0,{field_flags,[]},{x,1}}.
%% Only x1 is live now.
{bs_put_string,3,{string,[8,0,2]}}.
{bs_put_integer,{f,0},{integer,32},1,{field_flags,[signed,big]},{y,1}}.
{test_heap,4,2}. %Unsafe. x0 is dead.
{move,{x,1},{x,0}}.
.
.
.
This optimization is unsafe because the bs_init2 instruction killed
x0.
The bug is in beam_utils:anno_defs/1, which adds annotations indicating
the registers that are defined at the beginning of each block. The
annotation before the move/2 instruction incorrectly indicated that
x0 was live.
https://bugs.erlang.org/browse/ERL-650
https://github.com/elixir-lang/elixir/issues/7782
|
|
With DEBUG=true in erl_anno, erl_parse, and erl_pp a few (harmless)
non-opaque accesses of annotations were found.
|
|
|