Age | Commit message (Collapse) | Author |
|
The getnameinfo function has been fixed:
1) Faulty sockaddr decode success check
2) Incorrect (name info) return value
OTP-15636
|
|
Add a (basically) placeholder test suite for the net module.
OTP-15635
|
|
* john/erts/fix-build-openindiana/OTP-15641:
erts: Fix erl_printf on Solaris
erts: Stop using madvise(2) on Solaris
|
|
* john/update-primary-bootstrap:
Update primary bootstrap
|
|
|
|
* maint:
crypto: Fix bad return value for aes_cfb8 and aes_cfb128 if FIPS_SUPPORT
crypto: Fix bad return code for eddsa if FIPS_SUPPORT
|
|
* hans/crypto/bad_ret_fips/master/OTP-15634:
crypto: Fix FIPS mode
|
|
* hans/crypto/bad_ret_fips/OTP-15634:
crypto: Fix bad return value for aes_cfb8 and aes_cfb128 if FIPS_SUPPORT
crypto: Fix bad return code for eddsa if FIPS_SUPPORT
|
|
* bjorn/cuddle-with-tests:
Fix failing test case binary_module_SUITE:copy/1
Fix failing test case qlc_SUITE:lookup2/1
|
|
`swap x y` is rarely or never used. I found a single use of
`swap_temp x y x` in the sample of modules compiled by
`scripts/diffable`.
|
|
Of the `move_dup` instructions, only `move_dup x x x` was
frequently used. Remove the other register combinations.
With those instruction `move_dup` instructions removed, it
is necessary to add new predicates to avoid unsafe translation
to `move_shift` and `move2_par`.
Also add additional transformations to transform more `move`
instructions into `move2_par`. The existing transformation
would require the `move` instructions to be in the "right"
order in order to be transformed.
Remove `move3 x y x y x y` because it turns out to be rarely
executed.
|
|
Consider this code:
foo(X) ->
case X of
{ok,A} -> A;
error -> X
end.
The `is_tagged_tuple` instruction would not be used
because not all instructions in the tuple matching
sequence had the same failure label:
function t:foo(_0) {
0:
@ssa_bool:7 = bif:is_tuple _0
br @ssa_bool:7, label 8, label 4
8:
@ssa_arity = bif:tuple_size _0
@ssa_bool:9 = bif:'=:=' @ssa_arity, literal 2
br @ssa_bool:9, label 6, label 3
6:
_4 = get_tuple_element _0, literal 0
@ssa_bool = bif:'=:=' _4, literal ok
br @ssa_bool, label 5, label 3
5:
_3 = get_tuple_element _0, literal 1
ret _3
4:
@ssa_bool:11 = bif:'=:=' _0, literal error
br @ssa_bool:11, label 10, label 3
10:
ret _0
3:
_2 = put_tuple literal case_clause, _0
%% t.erl:5
@ssa_ret:12 = call remote (literal erlang):(literal error)/1, _2
ret @ssa_ret:12
}
Enhance the ssa_opt_record optimization to use
`is_tagged_tuple` even if all failure labels are not the
same:
function t:foo(_0) {
0:
@ssa_bool:7 = bif:is_tuple _0
br @ssa_bool:7, label 8, label 4
8:
@ssa_bool:9 = is_tagged_tuple _0, literal 2, literal ok
br @ssa_bool:9, label 6, label 3
6:
_3 = get_tuple_element _0, literal 1
ret _3
4:
@ssa_bool:11 = bif:'=:=' _0, literal error
br @ssa_bool:11, label 10, label 3
10:
ret _0
3:
_2 = put_tuple literal case_clause, _0
%% t.erl:5
@ssa_ret:12 = call remote (literal erlang):(literal error)/1, _2
ret @ssa_ret:12
}
The tuple test will be repeated, but since four instructions
are replaced by two instructions, the code will still be faster
and smaller.
|
|
|
|
flockfile(3c) and friends are hidden behind the __EXTENSIONS__
feature macro.
|
|
inet_drv adds some arcane #defines to get SCTP working, which may
end up disabling madvise(2) locally in that file, breaking the
build in the process.
This commit disables madvise(2) altogether on Solaris as it's
far simpler than undoing the define dance in erl_mmap.h.
|
|
* john/compiler/refactor-validator-type-management:
beam_validator: Clarify a comment
beam_validator: Make call argument validation stricter
beam_validator: Don't explode when building terms in receive
beam_validator: Improve 'binary' type tracking
beam_validator: Infer tuple element types
beam_validator: Tolerate the 'receive' hack in prim_eval
beam_validator: Track types by value rather than by register
beam_validator: Disregard 'none' on join
beam_validator: Handle is_number, and join(float,int) -> number
beam_validator: Treat is_nil as is_eq_exact with nil
beam_validator: Simplify get_element_type
beam_validator: Fix literal handling in meet/2
beam_validator: Use literals as keys in container (tuple) elements
beam_validator: Refactor try/catch handling, again
beam_validator: Refactor register initialization
beam_validator: Refactor stack allocation
beam_validator: Handle argument/return types for more functions
beam_validator: Don't forget last element when using put_tuple
beam_jump: Fail label of select_val is unsafe for move elimination
cerl_sets: Use maps:filter/2 in filter/2
|
|
|
|
There were some bad values returned if FIPS mode was enabled. The exclusion of
algorithms were not completly correct either.
|
|
* maint:
crypto: Remove assertion
crypto: Fail if FIPS mode is present but can't be enabled
crypto: Remove blowfish_SUITE.
crypto: Update crypto_SUITE checking of FIPS
|
|
* hans/crypto/cuddle_tests:
crypto: Remove assertion
crypto: Fail if FIPS mode is present but can't be enabled
crypto: Remove blowfish_SUITE.
crypto: Update crypto_SUITE checking of FIPS
|
|
This is not needed any more
|
|
|
|
The tests are a subset of the newer and larger crypto_SUITE.
|
|
The testing for not supported were missing in some cases
|
|
We used to cheat by checking if it were possible to meet the Given
and Required types, which caught the most common problems but
potentially let tuple element conflicts pass through.
This was a compromise to let the thing "work" while we were
refactoring the validator, but we can be a lot stricter now that
its type tracking capabilities approach those of the type
optimization pass.
|
|
Building terms with fragile contents is okay because the GC is
disabled during loop_rec, and the resulting term won't be reachable
from the root set afterwards.
ERL-862
|
|
|
|
This is possible now that we track types on a per-value basis, and
no longer need to care whether the source tuple's register has been
clobbered by the time we infer the type.
|
|
|
|
This is a rather subtle but important distinction. While tracking
types on a per-register basis is fairly effective, it forces us to
track which registers alias each other, and makes it tricky to infer
types over large blocks of code as instruction arguments may have
been clobbered between definition and inference.
Tracking types on a per-value basis makes us immune to these
problems.
|
|
* maint:
edoc: Print a helpful message if reading source file fails
|
|
* hasse/edoc/helpful_message/OTP-15605/ERL-841:
edoc: Print a helpful message if reading source file fails
|
|
The stronger compiler optimizations made the test case fail.
|
|
5239eb0c62a9 removed some optimizations in `sys_core_fold`, and
because of that two warnings are no longer emitted.
|
|
This reverts commit 5c7787077e24b0da74cce248a91fcdb7e0d7bb3f.
|
|
This reverts commit df130102cdeca8d35fec95a0c926fd1cfec54eab.
|
|
|
|
|
|
I have no idea how this escaped us for so long...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Consider the following code:
bme(Int) ->
TagInt = Int band 2#111,
Tag = case TagInt of
0 -> a; 1 -> b; 2 -> c; 3 -> d;
4 -> e; 5 -> f; 6 -> g; 7 -> h
end,
case Tag of
g -> expects_g(TagInt, Tag);
h -> expects_h(TagInt, Tag);
_ -> Tag = id(Tag), ok
end.
expects_g(6, Atom) -> Atom = id(g), ok.
expects_h(7, Atom) -> Atom = id(h), ok.
The type optimization pass would recognize that TagInt can only be
[0 .. 7], so the first 'case' would select_val over [0 .. 6] and swap
out the fail label with the block for 7.
A later optimization would merge this block with 'expects_h' in the
second case, as the latter is only reachable from the former.
... but this broke down when the move elimination optimization didn't
take the fail label of the first select_val into account. This caused it
believe that the only way to reach 'expects_h' was through the second
case when 'Tag' =:= 'h', which made it remove the move instruction
added in the first case, passing garbage to expects_h/2.
|
|
|