summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-10-28* 2021-10-28 [ci skip]git
2021-10-27YJIT: move --yjit-stats at_exit call into RubyAlan Wu
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
2021-10-27Expect multi-line -v output for -DRUBY_DEVEL in testsAlan Wu
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
2021-10-27Fix indentation in testAlan Wu
Notes: Merged: https://github.com/ruby/ruby/pull/5022
2021-10-27Fix yjit_asm_tests.c as C99 compliant (#5033)Nobuyoshi Nakada
* 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>
2021-10-27YJIT: Support newhash with values (#5029)John Hawthorn
* YJIT: Implement newhash with values * YJIT: Add test of duphash * Fix compilation on macos/clang Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2021-10-27Properly exclude test cases.Vít Ondruch
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
2021-10-27Sort URLs by issue numbers [ci skip]Kazuhiro NISHIYAMA
2021-10-27Check old-style definitionsNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5034
2021-10-27Update stdlib versionsKazuhiro NISHIYAMA
2021-10-27the core problem is the Proc is not shareableSatoshi Moris Tagomori
Notes: Merged: https://github.com/ruby/ruby/pull/4771
2021-10-27random.c: simplify Random object deallocationKazuki Yamaguchi
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
2021-10-27[rubygems/rubygems] Don't warn when a lockfile is locked to a dev versionDavid Rodríguez
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
2021-10-27[ruby/error_highlight] Make the formatter mechanism support RactorYusuke Endoh
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
2021-10-27Prefer ANSI-style prototypes over old K&R-style definitionsNobuyoshi Nakada
2021-10-26pack.c: add an offset argument to unpack and unpack1Jean Boussier
[Feature #18254] This is useful to avoid repeteadly copying strings when parsing binary formats
2021-10-26Add Class#descendantsJeremy Evans
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>
2021-10-26[Bug #18264] Fix memory leak in TracePointPeter Zhu
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
2021-10-26Fix TypoSteven Nunez
Notes: Merged: https://github.com/ruby/ruby/pull/5028
2021-10-27* 2021-10-27 [ci skip]git
2021-10-27Embed bare `double` if `sizeof(double) == sizeof(VALUE)`Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5027
2021-10-27Align `RFloat` at VALUE boundaryNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5027
2021-10-26Fix unaligned access to `double` in RFloatNobuyoshi Nakada
2021-10-26Make new object for negated float as `Float` is always frozen nowNobuyoshi Nakada
2021-10-26Make the metaclass of Refinement explicitlyShugo Maeda
Otherwise, singleton methods of Module are not inherited unless Refinement.singleton_class is called.
2021-10-26Revert "introduce check code for mysterious EBADF"Koichi Sasada
This reverts commit 7864efa105921eb3900c843126f2e0db02b9c6ae.
2021-10-26Revert "check other IO#close calls"Koichi Sasada
This reverts commit a1c4cab11d613d7df037a81a770ee44a23a2e9be.
2021-10-26Fix typoNobuyoshi Nakada
2021-10-26fix random EBADF problemKoichi Sasada
```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.
2021-10-26improve doc coverage [ci skip]卜部昌平
Just split the comment for struct's one and array's one.
2021-10-26just another evidence that @shyouhei is an idiot [ci skip]卜部昌平
(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)
2021-10-26more on eliminating $make卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/5005
2021-10-26GNUMAKEFLAGS is too new for mac卜部昌平
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
2021-10-26.github: use GNUMAKEFLAGS instead of JOBS卜部昌平
A bit readable to me. See also https://github.com/ruby/ruby/pull/4880 Notes: Merged: https://github.com/ruby/ruby/pull/5005
2021-10-26[rubygems/rubygems] Add support to build and sign certificates with multiple ↵Jenny Shen
key algorithms https://github.com/rubygems/rubygems/commit/967876f15d Co-Authored-By: Frederik Dudzik <frederik.dudzik@shopify.com>
2021-10-25Update YJIT code owners. Revert accidental commit.Maxime Chevalier-Boisvert
2021-10-25Test PRMaxime Chevalier-Boisvert
2021-10-25Add code owners for YJIT sourcesMaxime Chevalier-Boisvert
Code owners are automatically tagged as reviewers on pull requests
2021-10-25[Feature #18239] Implement VWA for stringsPeter Zhu
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
2021-10-25[Feature #18239] Refactor RVARGC alloc functionsPeter Zhu
The allocation functions no longer assume that one RVALUE needs to be allocated. Notes: Merged: https://github.com/ruby/ruby/pull/4933
2021-10-25[Feature #18239] Add struct for embedded stringsPeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/4933
2021-10-26ast.c: Use kept script_lines data instead of re-opening the source file (#5019)Yusuke Endoh
ast.c: Use kept script_lines data instead of re-open the source file Notes: Merged-By: mame <mame@ruby-lang.org>
2021-10-26* 2021-10-26 [ci skip]git
2021-10-26[rubygems/rubygems] Fix Bundler::Digest#sha1 on big-endian systemsJean Boussier
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
2021-10-25Strip out YJIT at build time when unsupported or disabled (#5003)Alan Wu
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>
2021-10-25YJIT: Implement duphash (#5009)Ian C. Anderson
`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>
2021-10-25test/ruby/test_jit.rb: Add a test for checkmatch insnYusuke Endoh
2021-10-25test/ruby/test_jit.rb: Print a hint at exit of the original processYusuke Endoh
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 ```
2021-10-25[rubygems/rubygems] Avoid loading the `digest` gem unnecessarilyDavid Rodriguez
OpenSSL includes what we need. https://github.com/rubygems/rubygems/commit/955f3b72ca
2021-10-25[rubygems/rubygems] Remove comment that seems no longer accurateDavid Rodriguez
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