When these test cases were written, we did not know the exact OpenSSL
and LibreSSL version number in which they would be implemented. Now that
we know it, we can use that information to ensure the tests are run
whenever they should be.
- OpenSSL 1.1.0 added X25519 support
- OpenSSL 1.1.1 added Ed25519 support and
EVP_PKEY_new_raw_private_key()
- LibreSSL 3.7.0 added X25519 and Ed25519 support in EVP_PKEY and
EVP_PKEY_new_raw_private_key()
- LibreSSL 3.8.1 allowed ASN1_item_sign() to use Ed25519
https://github.com/ruby/openssl/commit/6cb6663c91
test/openssl/fixtures/pkey/p256_too_large.pem and p384_invalid.pem are
invalid keys where the encoded public key doesn't match the private key.
They are only useful for test cases for OpenSSL::PKey::EC#check_key and
will not be reused elsewhere. Let's directly include the PEM encoding
as a heredoc for clarity.
p384_invalid.pem is dropped because it is redundant.
https://github.com/ruby/openssl/commit/2f807ff30f
Remove files from test/openssl/fixtures/pkey/ which are not pkeys.
The test cases for OpenSSL::X509::Certificate.load_file can simply use
issue_cert and Tempfile.
https://github.com/ruby/openssl/commit/11216b8bec
Depending on the allocator, `malloc_usable_size` may be very cheap or quite
expensive. On `macOS` for instance, it's about as expensive as `malloc`.
In many case we call `objspace_malloc_size` with as size we initially
requested as `hint`. The real usable size may be a few bytes bigger,
but since we only use that data to feed GC heuristics, I don't think
it's very important to be perfectly accurate.
It would make sense to call `malloc_usable_size` after growing a String
or Array to use the extra capacity, but here we don't do that, so
the call isn't worth its cost.
code
(https://github.com/ruby/reline/pull/800)
* Remove invalid encoding string "\M-[char]" from test code, remove unused code/arg/options
* Omit unicode unnoralized input test in non-utf8 testcase
* Remove helper method and constant no longer used in testcode
* Change key binding test to use realistic bytes instead of invalid byte sequence
* Remove invalid byte sequence input from rendering test
yamatanooroti handles invalid byte sequence input "\M-[char]" and converts it to "\e[char]"
We don't need to use these invalid byte sequence and rely on the hack implemented in yamatanooroti
https://github.com/ruby/reline/commit/f09e7b154c
Parsing `-> do it end` in parse.y leaks memory. We can see this in the
Valgrind output:
56 bytes in 1 blocks are definitely lost in loss record 1 of 6
at 0x484E0DC: calloc (vg_replace_malloc.c:1675)
by 0x188970: calloc1 (default.c:1472)
by 0x188970: rb_gc_impl_calloc (default.c:8208)
by 0x188970: ruby_xcalloc_body (gc.c:4598)
by 0x18B8BC: ruby_xcalloc (gc.c:4592)
by 0x21DCCA70: new_locations_lambda_body (ripper.y:12844)
by 0x21DCCA70: ripper_yyparse (ripper.y:5194)
by 0x21DDA521: rb_ruby_ripper_parse0 (ripper.y:15798)
There are warnings emitted from test_flip2_locations and test_flip3_locations.
This commit changes ast_parse to suppress all warnings.
warning: integer literal in flip-flop
warning: string literal in flip-flop
Previously, the code for dropping surplus arguments when yielding
into blocks erroneously attempted to drop keyword arguments when there
is in fact no surplus arguments. Fix the condition and test that
supplying the exact number of keyword arguments as require compiles
without fallback.
Code like the following is crashing for us on 3.4.1:
```ruby
def a(&) = yield(x: 0)
1000.times { a { |x:| x } }
```
Crash:
```
ruby: YJIT has panicked. More info to follow...
thread '<unnamed>' panicked at ./yjit/src/codegen.rs:8018:13:
assertion `left == right` failed
left: 0
right: 1
```
Co-authored-by: Dani Acherkan <dtl.117@gmail.com>