77499 Commits

Author SHA1 Message Date
Hiroshi SHIBATA
3733ee835b [ruby/readline-ext] Expose Readline::GEM_VERSION
https://github.com/ruby/readline-ext/commit/70aa84b80e
2023-04-14 03:43:46 +00:00
Hiroshi SHIBATA
283c190374 [ruby/nkf] Expose NKF::GEM_VERSION
https://github.com/ruby/nkf/commit/0d0fb3a162
2023-04-14 03:43:17 +00:00
Hiroshi SHIBATA
8a06f1a69f [ruby/pathname] Expose Pathname::VERSION
https://github.com/ruby/pathname/commit/2b0b1a82ee
2023-04-14 12:42:36 +09:00
dependabot[bot]
389ea0ae4c Bump actions/checkout from 3.5.0 to 3.5.2
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.0 to 3.5.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](8f4b7f8486...8e5e7e5ab8)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-14 12:39:49 +09:00
Jeremy Evans
1f115f141d Speed up rebuilding the loaded feature index
Rebuilding the loaded feature index slowed down with the bug fix
for #17885 in 79a4484a072e9769b603e7b4fbdb15b1d7eccb15.  The
slowdown was extreme if realpath emulation was used, but even when
not emulated, it could be about 10x slower.

This adds loaded_features_realpath_map to rb_vm_struct. This is a
hidden hash mapping loaded feature paths to realpaths. When
rebuilding the loaded feature index, look at this hash to get
cached realpath values, and skip calling rb_check_realpath if a
cached value is found.

Fixes [Bug #19246]
2023-04-13 20:22:36 -07:00
Hiroshi SHIBATA
6beb755d81 [ruby/prettyprint] Expose PrettyPrint::VERSION
https://github.com/ruby/prettyprint/commit/c6f3947e96
2023-04-14 01:52:08 +00:00
Hiroshi SHIBATA
3f8756484f [ruby/pp] Expose PP::VERSION
https://github.com/ruby/pp/commit/3d0e65e79f
2023-04-14 01:49:51 +00:00
Hiroshi SHIBATA
652f273308 [ruby/resolv] Expose Resolv::VERSION
https://github.com/ruby/resolv/commit/6ab2385e89
2023-04-14 01:46:38 +00:00
Hiroshi SHIBATA
ebe620def6 [ruby/securerandom] Expose SecureRandom::VERSION
https://github.com/ruby/securerandom/commit/2e6434331d
2023-04-14 01:43:47 +00:00
Nobuyoshi Nakada
60f22ebf86 [Bug #19533] Add spec of infinite range inclusion 2023-04-14 10:22:09 +09:00
Nobuyoshi Nakada
fb17c833f5 [Bug #19533] Fix infinite range inclusion with numeric value 2023-04-14 10:22:09 +09:00
Nobuyoshi Nakada
1a149aab77 Extract range type check functions 2023-04-14 10:22:09 +09:00
Takashi Kokubun
8286eed20b Allow testing a different version 2023-04-13 17:53:41 -07:00
Jimmy Miller
08413f982c
YJIT: Add support for rest with option and splat args (#7698) 2023-04-13 16:21:02 -07:00
Peter Zhu
f7d41b9d7b Fix compiler warning with compiling on 32 bit
Fixes this compiler warning:

    vsnprintf.c:1074:43: warning: 'uqval' may be used uninitialized in this function [-Wmaybe-uninitialized]
2023-04-13 16:44:01 -04:00
John Hawthorn
acc5c74648
YJIT: Fix edge and total counts in exit_locations (#7702)
The stackprof-format raw samples are suffixed with a count (ie. how many
times did the previously recorded side-exit repeat). Previously we were
correctly using this value to increment the :samples count, but not the
:total_samples count or edges.

This made the stackprof aggregate results incorrect (though any
flamegraphs generated should have been correct, since those only rely on
raw samples).
2023-04-13 14:37:37 -04:00
Takashi Kokubun
bbe69fba59
YJIT: Use an enum to represent counters (#7701) 2023-04-13 13:54:09 -04:00
Takashi Kokubun
2fcd3ea6d8
YJIT: Move stack_opnd from Context to Assembler (#7700) 2023-04-13 12:20:29 -04:00
Alan Wu
847813ab13
[DOC] common.mk deals with various make varieties 2023-04-13 11:02:09 -04:00
Jean Boussier
ac123f167a Emit a performance warning when a class reached max variations
[Feature #19538]

This new `peformance` warning category is disabled by default.
It needs to be specifically enabled via `-W:performance` or `Warning[:performance] = true`
2023-04-13 16:36:17 +02:00
Adam Hess
854baee2c9
YJIT: Add a sampling option to exit tracing (#7693)
Add a sampling option to trace exits

Running YJIT with trace exits enabled can make very large metrics files.
This allows us to configure a sample rate to make tracing exits possible
on larger tests. This also updates the documented YJIT options.

Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
Co-authored-by: John Hawthorn <john@hawthorn.email>
Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
2023-04-13 10:07:07 -04:00
Peter Zhu
02a7e12b80 Ensure throw data is not set as cause
[Bug #19593]

rb_ec_setup_exception did not check if errinfo is a throw_data. This can
cause crashes in code since it is assumed that id_cause is an object.

We saw a crash in show_cause due to id_cause of errinfo being a
throw_data. It crashes on rb_obj_is_kind_of since it cannot be called on
T_IMEMO objects.

Unfortunately, we couldn't find a reproduction script, however we
debugged the core dump and rb_ec_setup_exception is the only place where
id_cause is assigned from errinfo without checking if it is a
throw_data.

```
0x0000556c5708e6dd in sigsegv (sig=11, info=0x7f301befa3f0, ctx=0x7f301befa2c0) at signal.c:964
0x00007f301d046420 in <signal handler called> () at /lib/x86_64-linux-gnu/libpthread.so.0
class_search_class_ancestor (c=139844586301760, cl=<optimized out>) at object.c:810
rb_obj_is_kind_of (obj=obj@entry=139839221734880, c=139844586301760) at object.c:861
0x0000556c56f2f00f in show_cause
    (errinfo=errinfo@entry=139838840645160, str=str@entry=139839221730520, opt=139839221730480, highlight=0, reverse=reverse@entry=0, backtrace_limit=backtrace_limit@entry=-1, shown_causes=0x7ffe9d1a2d68) at ./include/ruby/internal/special_consts.h:175
```

Co-Authored-By: Jean Boussier <byroot@ruby-lang.org>
2023-04-13 08:38:35 -04:00
卜部昌平
64e503eb62 avoid seeding
OpenSSL's man page previously stated that "the application is
responsible for seeding the PRNG by calling RAND_add" (see [1]).
So we had this code.  However things changed.  They no longer
say so, instead "manual (re-)seeding of the default OpenSSL
random generator is not necessary" now (see [2]).  It seems all
OpenSSL versions that we support now already behaves like this.
Let's follow that.

[1]: https://www.openssl.org/docs/man1.0.2/man3/RAND_add.html
[2]: https://www.openssl.org/docs/manmaster/man3/RAND_add.html
2023-04-13 19:50:00 +09:00
git
0a092d00cc Update default gems list at f09638fe25d86c4d619a1f45b1595c [ci skip] 2023-04-13 09:52:07 +00:00
Hiroshi SHIBATA
f09638fe25 [ruby/time] Expose Time::VERSION
https://github.com/ruby/time/commit/32793b56b7
2023-04-13 18:51:18 +09:00
Hiroshi SHIBATA
cf77f7b5e7 [ruby/time] Bump version to 0.2.2
https://github.com/ruby/time/commit/5f080cf700
2023-04-13 18:51:18 +09:00
Hiroshi SHIBATA
8b924ebdf2 [ruby/tempfile] Expose Tempfile::VERSION
https://github.com/ruby/tempfile/commit/6aa1f37dc4
2023-04-13 09:49:14 +00:00
Hiroshi SHIBATA
84d11498c2 [ruby/shellwords] Expose Shellwords::VERSION
https://github.com/ruby/shellwords/commit/e38b8b026a
2023-04-13 09:48:55 +00:00
Hiroshi SHIBATA
61bd69470a [ruby/open-uri] Expose OpenURI::VERSION
https://github.com/ruby/open-uri/commit/666768d960
2023-04-13 09:47:40 +00:00
Hiroshi SHIBATA
76aaaf6434 [ruby/un] Expose UN::VERSION
https://github.com/ruby/un/commit/47bcad1804
2023-04-13 09:47:22 +00:00
Nobuyoshi Nakada
de023b68aa Disable all warning categories other than RB_WARN_CATEGORY_ALL_BITS 2023-04-13 18:08:08 +09:00
Hiroshi SHIBATA
0ca9a4e743 [rubygems/rubygems] Extract alias variables for long name class
https://github.com/rubygems/rubygems/commit/33caea928e
2023-04-13 08:38:46 +00:00
Hiroshi SHIBATA
1f0974e654 [rubygems/rubygems] Downcase camel like cases of instance variable
https://github.com/rubygems/rubygems/commit/4eaac27107
2023-04-13 08:38:45 +00:00
Nobuyoshi Nakada
80fa9b0404 Fix declaration of rb_rjit_entry_stub_hit in rjit_c.c 2023-04-13 14:09:22 +09:00
Nobuyoshi Nakada
3612b1bed8 [Feature #19590] Show the invalid clock argument
Include the failed clock argument in the error message from
`Process.clock_gettime` and `Process.clock_getres`.
2023-04-13 14:07:27 +09:00
Nobuyoshi Nakada
86db7a1cb8
[DOC] Fix typos 2023-04-13 13:28:47 +09:00
Nobuyoshi Nakada
3785049c9f
Use RUBY_PROGRAM_VERSION as version in pkg-config file [ci skip]
So that ABI version is not included in it even on the develepment
branch.
2023-04-13 11:31:34 +09:00
John Hawthorn
be08e1b14c RJIT: argc check in known cfuncs 2023-04-12 17:48:34 -07:00
John Hawthorn
0ce2bdc76d YJIT: Fix missing argc check in known cfuncs
Previously we were missing a compile-time check that the known cfuncs
receive the correct number of arguments.

We noticied this because in particular when using ARGS_SPLAT, which also
wasn't checked, YJIT would crash on code which was otherwise correct
(didn't raise exceptions in the VM).

This still supports vararg (argc == -1) cfuncs. I added an additional
assertion that when we use the specialized codegen for one of these
known functions that the argc are popped off the stack correctly, which
should help ensure they're implemented correctly (previously the crash
was usually observed on a future `leave` insn).

[Bug #19595]
2023-04-12 17:48:34 -07:00
Marcin Rozmus
c8d8207aea [rubygems/rubygems] Fix broken hyperlinks in bundle cache documentation
https://github.com/rubygems/rubygems/commit/1ff3e7450a
2023-04-12 20:27:39 +00:00
Takashi Kokubun
00bbd31edb
YJIT: Let Assembler own Context (#7691)
* YJIT: Let Assembler own Context

* Update a comment

Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>

---------

Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
2023-04-12 12:11:44 -07:00
Nobuyoshi Nakada
0ac3f2c20e [Bug #19587] Fix reset_match_cache arguments 2023-04-12 18:35:32 +09:00
Nobuyoshi Nakada
1b697d7cb5 Constify 2023-04-12 18:35:32 +09:00
Nobuyoshi Nakada
2e1a95b569 Extract bsearch_cache_index function 2023-04-12 18:35:32 +09:00
Nobuyoshi Nakada
f06a48a92a [rubygems/rubygems] Close the server for test
https://github.com/rubygems/rubygems/commit/bf5e82fd14
2023-04-12 09:26:05 +00:00
Ashley Ellis Pierce
851344965a
Ensure api_key is sent if basic auth not provided on webauthn_verification_url
Co-authored-by: Jenny Shen <jenny.shen@shopify.com>
2023-04-12 12:00:25 +09:00
Eric Herscovich
1b1485ae4d
Add message for otp bypass
Update tests

Fix wording of message
2023-04-12 11:59:18 +09:00
Jenny Shen
b909ca94bd
Terminate interaction after wait for otp thread completes to support jruby 2023-04-12 11:58:03 +09:00
Jenny Shen
c7a8d63df8
Terminate interaction when rescuing WebauthnVerificationError during wait_for_otp
Co-authored-by: Betty Li <makewithbetty@gmail.com>
2023-04-12 11:57:43 +09:00
Jenny Shen
cd60113faa
Use Webauthn Listener in wait_for_otp 2023-04-12 11:57:15 +09:00