Age | Commit message (Collapse) | Author |
|
* lukas/otp/add-dialyzer-make-target/OTP-15915:
otp: Add make dialyzer and make xmllint documentation
Add 'make dialyzer' target to top and apps
|
|
|
|
|
|
Fix syntax error in logger_disk_log_h.xml
|
|
|
|
By keeping track of the tag types in the exception handler list,
we can reject direct jumps to try_case handlers such as those
provoked by OTP-15945.
|
|
By removing 'succeeded' tests on setelement/3 when we know it
succeeds, all sequences that are eligible for set_tuple_element
will be nicely bundled in the same block, so we won't need to
bother with special try/catch handling.
The new version is slightly worse in the case where the first
setelement/3 is used to infer the tuple size as that call will
remain in its own block, but in practice this only occurs when
the user manually spells them out and I couldn't find any
examples of this in OTP or Elixir. It's equivalent for record
updates.
|
|
|
|
|
|
Only adding them when in try/catch worked, but made the exceptions
implicit and forced all later optimization passes to keep them in
mind. Making them explicit lets us simplify later passes.
|
|
The test case alters the return value of a function that the
compiler expects will never return, resulting in undefined
behavior.
Note that the debugger (which may change variables/return values)
is unaffected since the affected module is purged and "replaced"
with an interpreted variant.
|
|
|
|
erts: Do not use named no_cpuid label in asm
|
|
* maint:
Ensure that the stack slots are initialized when matching maps
|
|
* bjorn/compiler/fix-stack-init/ERL-1017/OTP-15968:
Ensure that the stack slots are initialized when matching maps
|
|
When matching a map, the compiler could fail to generate code that
would initialize all stack slots (Y registers) properly. Here is a
general outline of code that *could* cause this problem:
foo(Key, Map) ->
Res = case Map of
#{Key := Val} ->
%% Do something with Val here.
.
.
.
#{} ->
[]
end,
%% The stack slot for Val might not have been initialized
%% here if the key was not present in the map.
.
.
.
%% Use Res.
.
.
.
The code generator would wrongly assume that the map matching would
always initialize the stack slot, and if nothing else happened to
force that stack slot to be initialized, it would remain
uninitialized, which would likely crash the runtime system at the next
garbage collection.
`beam_validator` is supposed to find these kind of problems, but a bug
in `beam_validator` prevented it from detecting this problem.
https://bugs.erlang.org/browse/ERL-1017
|
|
This commit adds two operations when handling literal
integers and literal utf8 segments in the v3_kernel pass.
The first operation is to expand all literal integers with
size more than 8 and literal utf8s into integers with size
of 8 (and potentially an integer with size less than 8 at
the end).
This expansion simplifies the code in other operations
inside v3_kernel and ensure they apply more consistently.
For instance, literal binary matching now applies to both
regular and utf8 strings. Furthermore, we can more
efficiently group clauses.
For instance, the following code:
foo(<<$á/utf8, X/binary>>) -> foo(X);
foo(<<$é/utf8, X/binary>>) -> foo(X);
foo(<<>>) -> ok.
Becomes a bs_get_integer_16 comparing 50089 and 50081,
allowing us to skip the utf8 conversion at runtime.
However, since expanding an integer of size 16 into two of
size 8 can be less efficient when matching at runtime,
later we do another pass, where we squeeze all of those
integers together into an integer with maximum size of 24.
This allows prefix matching, such as:
foo(<<"aaaa", X/binary>>) -> foo(X);
foo(<<"bbbb", X/binary>>) -> foo(X);
foo(<<>>) -> ok.
To run more than 2x faster (as long as all clauses match on
a given prefix).
Compilation times and binary size are roughly the same.
|
|
* maint:
beam_validator: Values referenced by other values must be merged
|
|
into maint
* john/compiler/fix-delayed-type-inference/OTP-15954/ERL-995:
beam_validator: Values referenced by other values must be merged
|
|
Optimize is_subset and is_disjoint in cerl_sets
|
|
* maint:
Avoid extremely long compilation times for huge functions
|
|
bjorng/bjorn/compiler/fix-slow-beam_ssa_dead/ERL-1014/OTP-15966
Avoid extremely long compilation times for huge functions
|
|
* maint:
Fix compiler crash when compiling with +no_type_opt
Eliminate a crash in the type optimizer pass
|
|
https://github.com/bjorng/otp into maint
OTP-15970
* 'bjorn/compiler/length-misuse/ERL-1013' of https://github.com/bjorng/otp:
Eliminate a crash in the type optimizer pass
|
|
https://github.com/bjorng/otp into maint
OTP-15969
* 'bjorn/compiler/fix-no_type_opt/ERL-997' of https://github.com/bjorng/otp:
Fix compiler crash when compiling with +no_type_opt
|
|
|
|
|
|
|
|
|
|
Compiling this example takes less than a second for OTP 21:
-define(B, {?A,?A,?A,?A,?A}).
-define(C, {?B,?B,?B,?B,?B}).
-define(D, {?C,?C,?C,?C,?C}).
-define(E, {?D,?D,?D}).
f() -> ?E = foo:bar().
The compilation time for OTP 22 is about 10 seconds. Most of the
time is spent in `beam_ssa_dead`.
This commit introduces several optimizations to bring the compilation
time down to about a second.
The most important of those optimizations is limiting the effort spent
searching forward for a joining point for the success and failure
labels for a two-way branch. This change is helped by the change of
representation of variable sets from `ordsets` to `cerl_sets`.
https://bugs.erlang.org/browse/ERL-1014
|
|
|
|
|
|
* maint:
Fix unsafe code sharing
|
|
Add ed25519 & ed448 support to crypto:generate_key
OTP-15967
|
|
* bjorn/compiler/fix-unsafe-sharing/OTP-15963:
Fix unsafe code sharing
|
|
|
|
* maint:
The linger option is not transferred on *BSD
|
|
* raimo/inherit-listen-options/OTP-15824:
The linger option is not transferred on *BSD
|
|
|
|
|
|
To provide more info when analyzing failed test cases
an "event" queue (of max size 10) is added to both the
test MG and MGC. This event queue is printed when the
process exist.
Also, the multi_ack_timeout is wonky, so add anther
platform (sunos) to the skip list...
|
|
|
|
* ingela/ssl/test-enhancment:
ssl: Extend tests
ssl: Fix better OpenSSL support in test framework
ssl: Avoid broken ALPN/NPN renegotiation in OpenSSL
|
|
|
|
|
|
All these test work fine with current OpenSSL master
|
|
|
|
|
|
* maint:
ssh: added log/4
ssh: Fix log problem in early stages of initialization
ssh: Fix potential crash if failure in init of client
|
|
* hans/ssh/early_crash_fail_logging/ERL-990/OTP-15962:
ssh: added log/4
ssh: Fix log problem in early stages of initialization
ssh: Fix potential crash if failure in init of client
|