Age | Commit message (Collapse) | Author |
|
|
|
This change fixes `-v --yjit-stats`. Previously in this situation,
YJIT._print_stats wasn't defined as yjit.rb is not evaluated when there
is only "-v" and no Ruby code to run.
Notes:
Merged: https://github.com/ruby/ruby/pull/5022
|
|
On -DRUBY_DEVEL builds, `ruby -v` can print extra info about the last
commit on a separate line, breaking some tests that expect a single
line. Assert only the first line instead.
Notes:
Merged: https://github.com/ruby/ruby/pull/5022
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5022
|
|
* rb_bug should be variadic
* Prefer ANSI-style prototypes over old K&R-style definitions
* Add missing argument types
Notes:
Merged-By: maximecb <maximecb@ruby-lang.org>
|
|
* YJIT: Implement newhash with values
* YJIT: Add test of duphash
* Fix compilation on macos/clang
Notes:
Merged-By: maximecb <maximecb@ruby-lang.org>
|
|
Lets consider the following scenario:
~~~
irb(#<Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8>):001:0> p suite
OpenSSL::TestEC
=> OpenSSL::TestEC
irb(#<Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8>):002:0> p all_test_methods
["test_ECPrivateKey", "test_ECPrivateKey_encrypted", "test_PUBKEY", "test_check_key", "test_derive_key", "test_dh_compute_key", "test_dsa_sign_asn1_FIPS186_3", "test_ec_group", "test_ec_key", "test_ec_point", "test_ec_point_add", "test_ec_point_mul", "test_generate", "test_marshal", "test_sign_verify", "test_sign_verify_raw"]
=>
["test_ECPrivateKey",
"test_ECPrivateKey_encrypted",
"test_PUBKEY",
"test_check_key",
"test_derive_key",
"test_dh_compute_key",
"test_dsa_sign_asn1_FIPS186_3",
"test_ec_group",
"test_ec_key",
"test_ec_point",
"test_ec_point_add",
"test_ec_point_mul",
"test_generate",
"test_marshal",
"test_sign_verify",
"test_sign_verify_raw"]
irb(#<Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8>):003:0> p filter
/\A(?=.*)(?!.*(?-mix:(?-mix:memory_leak)|(?-mix:OpenSSL::TestEC.test_check_key)))/
=> /\A(?=.*)(?!.*(?-mix:(?-mix:memory_leak)|(?-mix:OpenSSL::TestEC.test_check_key)))/
irb(#<Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8>):004:0> method = "test_check_key"
=> "test_check_key"
~~~
The intention here is to exclude the `test_check_key` test case.
Unfortunately this does not work as expected, because the negative filter
is never checked:
~~~
irb(#<Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8>):005:0> filter === method
=> true
irb(#<Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8>):006:0> filter === "#{suite}##{method}"
=> false
irb(#<Test::Unit::AutoRunner::Runner:0x0000560f68afc3c8>):007:0> filter === method || filter === "#{suite}##{method}"
=> true
~~~
Therefore always filter against the fully qualified method name
`#{suite}##{method}`, which should provide the expected result.
However, if plain string filter is used, keep checking also only the
method name.
This resolves [Bug #16936].
Notes:
Merged: https://github.com/ruby/ruby/pull/5026
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5034
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4771
|
|
This is a follow-up for commit 265c0022390e ("Do not allocate
ractor-local storage in dfree function during GC", 2021-02-09).
The comparison with the default rb_random_mt_t is useless in the first
place, since it is never equal: no actual Random object is associated
with it.
[Bug #17653] https://bugs.ruby-lang.org/issues/17653
Notes:
Merged: https://github.com/ruby/ruby/pull/4224
|
|
Even if it's newer than the running versions. Dev versions are not
released to rubygems.org, so the warning message suggests a command that
doesn't work. And dev versions are currently non deterministic
(2.3.0.dev can be many different versions), so the warning doesn't
really make sense at the moment.
https://github.com/rubygems/rubygems/commit/6f31af27ef
|
|
Now the formatter configuration is per Ractor. DefaultFormatter is used
if not set.
DefaultFormatter#message_for is now a class method to allow sub-Ractors
to call the method.
https://github.com/ruby/error_highlight/commit/9fbaa8ab7c
|
|
|
|
[Feature #18254]
This is useful to avoid repeteadly copying strings when parsing binary formats
|
|
Doesn't include receiver or singleton classes.
Implements [Feature #14394]
Co-authored-by: fatkodima <fatkodima123@gmail.com>
Co-authored-by: Benoit Daloze <eregontp@gmail.com>
Notes:
Merged: https://github.com/ruby/ruby/pull/4974
Merged-By: jeremyevans <code@jeremyevans.net>
|
|
TracePoint leaks memory because it allocates a `rb_tp_t` struct
without ever freeing it (it is created with `RUBY_TYPED_NEVER_FREE`).
Notes:
Merged: https://github.com/ruby/ruby/pull/5008
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5028
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5027
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5027
|
|
|
|
|
|
Otherwise, singleton methods of Module are not inherited unless
Refinement.singleton_class is called.
|
|
This reverts commit 7864efa105921eb3900c843126f2e0db02b9c6ae.
|
|
This reverts commit a1c4cab11d613d7df037a81a770ee44a23a2e9be.
|
|
|
|
```ruby
r, w = IO.pipe
r.close
IO.for_fd(w.fileno).close
```
This code closes a file descriptor `w.fileno`, but `w` doesn't know
the closing. Another code can open same file descriptor with opening
file (`f`). After that, the `w` will GCed and `w.fileno` is closed
again, and `f.fileno` is closed too, so IO operations for `f` (`f.close`)
will cause EBADF.
To fix this issue, do this test in another process.
|
|
Just split the comment for struct's one and array's one.
|
|
(gdb) ptype/o struct RString
/* offset | size */ type = struct RString {
/* 0 | 16 */ struct RBasic {
/* 0 | 8 */ VALUE flags;
/* 8 | 8 */ const VALUE klass;
/* total size (bytes): 16 */
} basic;
/* 16 | 24 */ union {
/* 24 */ struct {
/* 16 | 8 */ long len;
/* 24 | 8 */ char *ptr;
/* 32 | 8 */ union {
/* 8 */ long capa;
/* 8 */ VALUE shared;
/* total size (bytes): 8 */
} aux;
/* total size (bytes): 24 */
} heap;
/* 24 */ struct {
/* 16 | 24 */ char ary[24];
/* total size (bytes): 24 */
} embed;
/* XXX 8-byte padding */
/* total size (bytes): 24 */
} as;
/* total size (bytes): 40 */
}
(gdb)
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5005
|
|
It is relatively well known that mac does not update its command line
tools, and make is no exception. They ship GNU make 3.x, which didn't
yet implemented GNUMAKEFLAGS.
Resort to MAKEFLAGS there.
Notes:
Merged: https://github.com/ruby/ruby/pull/5005
|
|
A bit readable to me.
See also https://github.com/ruby/ruby/pull/4880
Notes:
Merged: https://github.com/ruby/ruby/pull/5005
|
|
key algorithms
https://github.com/rubygems/rubygems/commit/967876f15d
Co-Authored-By: Frederik Dudzik <frederik.dudzik@shopify.com>
|
|
|
|
|
|
Code owners are automatically tagged as reviewers on pull requests
|
|
This commit adds support for embedded strings with variable capacity and
uses Variable Width Allocation to allocate strings.
Notes:
Merged: https://github.com/ruby/ruby/pull/4933
|
|
The allocation functions no longer assume that one RVALUE needs to be
allocated.
Notes:
Merged: https://github.com/ruby/ruby/pull/4933
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4933
|
|
ast.c: Use kept script_lines data instead of re-open the source file
Notes:
Merged-By: mame <mame@ruby-lang.org>
|
|
|
|
As noticed by @nobu https://github.com/rubygems/rubygems/pull/4989#discussion_r735674633
From wikipedia: https://en.wikipedia.org/wiki/SHA-1#SHA-1_pseudocode
> append ml, the original message length in bits, as a 64-bit big-endian integer.
`Q` is native endian, so little-endian on most modern hardware.
The original code from RubyDigest reverses the bytes:
https://github.com/Solistra/ruby-digest/blob/d15f906caf09171f897efc74645c9e31373d7fd1/lib/ruby_digest.rb#L521
But that makes the code non-portable, the correct way is to directly ask
for a big-endian representation.
https://github.com/rubygems/rubygems/commit/ba2be01ea4
|
|
In an effort to minimize build issues on non x64 platforms, we can
decide at build time to not build the bulk of YJIT. This should fix
obscure build errors like this one on riscv64:
yjit_asm.c:137:(.text+0x3fa): relocation truncated to fit: R_RISCV_PCREL_HI20 against `alloc_exec_mem'
We also don't need to bulid YJIT on `--disable-jit-support` builds.
One wrinkle to this is that the YJIT Ruby module will not be defined
when YJIT is stripped from the build. I think that's a fair change as
it's only meant to be used for YJIT development.
Notes:
Merged-By: maximecb <maximecb@ruby-lang.org>
|
|
`duphash` showed up in the top-20 most frequent exit ops for @jhawthorn's benchmark that renders github.com/about
The implementation was almost exactly the same as `duparray`
Co-authored-by: John Hawthorn <john@hawthorn.email>
Co-authored-by: John Hawthorn <john@hawthorn.email>
Notes:
Merged-By: maximecb <maximecb@ruby-lang.org>
|
|
|
|
Otherwise, the hint is printed whenever fork is called.
http://rubyci.s3.amazonaws.com/debian9/ruby-master/log/20211025T093004Z.log.html.gz
```
[20244/21156] TestThread#test_fork_while_lockedyou may want to add tests for following insns, when you have a chance: checkmatch
you may want to add tests for following insns, when you have a chance: checkmatch
you may want to add tests for following insns, when you have a chance: checkmatch
= 0.19 s
```
|
|
OpenSSL includes what we need.
https://github.com/rubygems/rubygems/commit/955f3b72ca
|
|
We require things inline or autoload them for efficiency and to avoid as
much as possible conflicting with user's choice of gems.
But I removed the require and observed no deadlocks when activating
gems.
https://github.com/rubygems/rubygems/commit/7d6333e842
|