Граф коммитов

78602 Коммитов

Автор SHA1 Сообщение Дата
Koichi Sasada 280419d0e0 `calling->cd` instead of `calling->ci`
`struct rb_calling_info::cd` is introduced and `rb_calling_info::ci`
is replaced with it to manipulate the inline cache of iseq while
method invocation process. So that `ci` can be acessed with
`calling->cd->ci`. It adds one indirection but it can be justified
by the following points:

1) `vm_search_method_fastpath()` doesn't need `ci` and also
`vm_call_iseq_setup_normal()` doesn't need `ci`. It means
reducing `cd->ci` access in `vm_sendish()` can make it faster.

2) most of method types need to access `ci` once in theory
so that 1 additional indirection doesn't matter.
2023-07-31 17:13:43 +09:00
git e40f8bbd20 Update bundled gems list at 2023-07-31 2023-07-31 06:59:54 +00:00
Mat Sadler a3c0e9d90d [rubygems/rubygems] update Magnus library in Rust extension gem template
https://github.com/rubygems/rubygems/commit/19a92a3367
2023-07-31 06:25:21 +00:00
Koichi Sasada 36023d5cb7 mark `cc->cme_` if it is for `super`
`vm_search_super_method()` makes orphan CCs (they are not connected
from ccs) and `cc->cme_` can be collected before without marking.
2023-07-31 14:04:31 +09:00
BurdetteLamar 60ac719acc [ruby/optparse] [DOC] Corrections to tutorial
https://github.com/ruby/optparse/commit/2940dbb65a
2023-07-31 03:26:47 +00:00
Nobuyoshi Nakada 52722ea37b
Extract common variables 2023-07-30 19:38:18 +09:00
Nobuyoshi Nakada b5c74d5488
Ease the `Encoding::CompatibilityError` test failure
At the time this test first started using `assert_raise_with_message`,
it did not touch `Encoding.default_internal`.
2023-07-30 15:13:58 +09:00
Nobuyoshi Nakada dfad14d83f [ruby/optparse] [DOC] Mark up constant and method names as code
https://github.com/ruby/optparse/commit/e8bee0be8f
2023-07-30 02:35:22 +00:00
Nobuyoshi Nakada 67be453d9d [rubygems/rubygems] Set thread configurations inside block in the thread local manner
https://github.com/rubygems/rubygems/commit/965e54b8f1
2023-07-30 01:37:43 +00:00
Nobuyoshi Nakada 0d86cc4caf [rubygems/rubygems] Use the dedicated method to convert file path
The dedicated method `File.path` to deal with pathname-like objects
has been provided since ruby 1.9.0.
Also adds a test for rubygems/rubygems#6837.

https://github.com/rubygems/rubygems/commit/258c6eda80
2023-07-30 01:36:23 +00:00
Takashi Kokubun bde4080b39
YJIT: Drop Copy trait from Context (#8138) 2023-07-29 21:14:04 -04:00
Koichi Sasada 087a2deccf check `cc->*` liveness strictly
to fix SEGV like
http://ci.rvm.jp/results/trunk-repeat20-asserts@ruby-sp2-docker/4664004
```
/tmp/ruby/build/trunk-repeat20-asserts/libruby.so.3.3(sigsegv+0x4f) [0x7fcb0343e7df] /tmp/ruby/src/trunk-repeat20-asserts/signal.c:920
/lib/x86_64-linux-gnu/libc.so.6(0x7fcb02e4d520) [0x7fcb02e4d520]
/tmp/ruby/build/trunk-repeat20-asserts/libruby.so.3.3(RB_SPECIAL_CONST_P+0x13) [0x7fcb03311ea3] /tmp/ruby/src/trunk-repeat20-asserts/include/ruby/internal/special_consts.h:329
/tmp/ruby/build/trunk-repeat20-asserts/libruby.so.3.3(RB_BUILTIN_TYPE) /tmp/ruby/src/trunk-repeat20-asserts/include/ruby/internal/value_type.h:183
/tmp/ruby/build/trunk-repeat20-asserts/libruby.so.3.3(gc_object_moved_p) /tmp/ruby/src/trunk-repeat20-asserts/gc.c:1624
/tmp/ruby/build/trunk-repeat20-asserts/libruby.so.3.3(gc_object_moved_p+0xe) [0x7fcb0331ed16] /tmp/ruby/src/trunk-repeat20-asserts/include/ruby/internal/special_consts.h:329
/tmp/ruby/build/trunk-repeat20-asserts/libruby.so.3.3(gc_ref_update_imemo) /tmp/ruby/src/trunk-repeat20-asserts/gc.c:10132
/tmp/ruby/build/trunk-repeat20-asserts/libruby.so.3.3(gc_update_object_references) /tmp/ruby/src/trunk-repeat20-asserts/gc.c:10411
/tmp/ruby/build/trunk-repeat20-asserts/libruby.so.3.3(gc_ref_update+0xab) [0x7fcb0331fcbb] /tmp/ruby/src/trunk-repeat20-asserts/gc.c:10570
/tmp/ruby/build/trunk-repeat20-asserts/libruby.so.3.3(gc_update_references) /tmp/ruby/src/trunk-repeat20-asserts/gc.c:10604
/tmp/ruby/build/trunk-repeat20-asserts/libruby.so.3.3(gc_compact_finish) /tmp/ruby/src/trunk-repeat20-asserts/gc.c:5425
/tmp/ruby/build/trunk-repeat20-asserts/libruby.so.3.3(gc_sweep_compact) /tmp/ruby/src/trunk-repeat20-asserts/gc.c:8476
/tmp/ruby/build/trunk-repeat20-asserts/libruby.so.3.3(gc_sweep) /tmp/ruby/src/trunk-repeat20-asserts/gc.c:6040
/tmp/ruby/build/trunk-repeat20-asserts/libruby.so.3.3(gc_start+0xe25) [0x7fcb03325795] /tmp/ruby/src/trunk-repeat20-asserts/gc.c:9323
/tmp/ruby/build/trunk-repeat20-asserts/libruby.so.3.3(rb_multi_ractor_p+0x0) [0x7fcb03326108] /tmp/ruby/src/trunk-repeat20-asserts/gc.c:9208
/tmp/ruby/build/trunk-repeat20-asserts/libruby.so.3.3(rb_vm_lock_leave) /tmp/ruby/src/trunk-repeat20-asserts/vm_sync.h:92
/tmp/ruby/build/trunk-repeat20-asserts/libruby.so.3.3(garbage_collect) /tmp/ruby/src/trunk-repeat20-asserts/gc.c:9210
/tmp/ruby/build/trunk-repeat20-asserts/libruby.so.3.3(rbimpl_atomic_exchange+0x0) [0x7fcb033262b9] /tmp/ruby/src/trunk-repeat20-asserts/gc.c:9646
/tmp/ruby/build/trunk-repeat20-asserts/libruby.so.3.3(gc_finalize_deferred) /tmp/ruby/src/trunk-repeat20-asserts/gc.c:4345
/tmp/ruby/build/trunk-repeat20-asserts/libruby.so.3.3(gc_start_internal) /tmp/ruby/src/trunk-repeat20-asserts/gc.c:9647
/tmp/ruby/build/trunk-repeat20-asserts/libruby.so.3.3(gc_compact) /tmp/ruby/src/trunk-repeat20-asserts/gc.c:10748
```
2023-07-30 08:11:53 +09:00
Joshua Young 4bdb61b665
[DOC] Fix missing word in a comment 2023-07-30 01:02:20 +09:00
Nobuyoshi Nakada 3d87eec94a Add examples of `return` in `eval` 2023-07-30 00:44:13 +09:00
Benoit Daloze df5330b04e [ruby/rdoc] Use a more portable way to check if code is parseable
* The same as used in irb: https://github.com/ruby/irb/pull/134/files
* This works on all Ruby implementations, unlike `return` in BEGIN which
  can be quite difficult to support.

https://github.com/ruby/rdoc/commit/d19f7c66fe
2023-07-29 15:31:48 +00:00
Nobuyoshi Nakada 628cc7e12d
Change `HOME` too when testing sync_default_gems.rb
As well as `GIT_CONFIG_GLOBAL`, which is supported since git 2.32.
2023-07-29 20:02:47 +09:00
Nobuyoshi Nakada 4b91d6abb9
Revert "Test sync_default_gems.rb only when git 2.32 is available"
This reverts commit b0f44cfa5d.
2023-07-29 20:02:13 +09:00
Koichi Sasada 7a7aba755d check liveness of cc->klass and cc->cme_
`cc->klass` and `cc->cme_` can be free'ed while last marking
so that it should be checked bofore updating the pointers.

Note that `T_MOVED` is living, but `is_live_object()` returns false.
2023-07-29 14:25:15 +09:00
Nobuyoshi Nakada b0f44cfa5d
Test sync_default_gems.rb only when git 2.32 is available
With older git, as `GIT_CONFIG_GLOBAL` environment variable is not
supported, these tests clobber user's configurations.
2023-07-29 11:49:53 +09:00
ko1 6dc15cc889 do not clear cme but invalidate cc
To invalidate a cc, we need to clear cc->klass by `vm_cc_invalidate()`.
I hope this patch fix the CI failures.
2023-07-29 09:06:14 +09:00
ko1 bcf823fddb Revert "[rubygems/rubygems] Set thread configurations inside block"
This reverts commit db80e947a3.

This patch uses `Thread.abort_on_exception = true` and it affects
all of threads. This is why CI systems fails.

How to modify:

- use `thread.abort_on_exception = true` for specific threads
- Run this code in a separated process
2023-07-29 07:39:10 +09:00
Jenny Shen 17b50cdb68 [rubygems/rubygems] Add charset to Webauthn response content-type
https://github.com/rubygems/rubygems/commit/442a3e8f37
2023-07-28 16:08:11 +00:00
Jenny Shen db80e947a3 [rubygems/rubygems] Set thread configurations inside block
https://github.com/rubygems/rubygems/commit/860b145359
2023-07-28 16:08:10 +00:00
Jenny Shen afca1a31d0 [rubygems/rubygems] Create MockServer object to test WebAuthn logic to prevent real TCPServers from being created and be leaked into other tests
https://github.com/rubygems/rubygems/commit/96d6cb33a2
2023-07-28 16:08:10 +00:00
Jenny Shen 3954a87d65 [rubygems/rubygems] Create MultifactorAuthFetcher to reduce duplication among tests
https://github.com/rubygems/rubygems/commit/dead211206
2023-07-28 16:08:09 +00:00
Jenny Shen e96b3138a8 [rubygems/rubygems] Use assert_raise in webauthn poller tests
https://github.com/rubygems/rubygems/commit/0969ad330e
2023-07-28 16:08:09 +00:00
Jenny Shen 24913e3dda [rubygems/rubygems] Move Webauthn listener thread to WebauthnListener class
https://github.com/rubygems/rubygems/commit/6ec474975e
2023-07-28 16:08:08 +00:00
Jenny Shen fce04f9a6c [rubygems/rubygems] Move WebauthnListener into the Gem::GemcutterUtilities namespace
https://github.com/rubygems/rubygems/commit/3080394f81
2023-07-28 16:08:08 +00:00
Jenny Shen 108cc38a76 [rubygems/rubygems] Extract polling logic into its own class
https://github.com/rubygems/rubygems/commit/218b83abed
2023-07-28 16:08:07 +00:00
Jenny Shen 023d0f662b [rubygems/rubygems] Add Webauthn verification poller to fetch OTP
https://github.com/rubygems/rubygems/commit/39c5e86a67
2023-07-28 16:08:07 +00:00
Jenny Shen 836e4eb3cd [rubygems/rubygems] Remove fetcher login in util_sign_in
https://github.com/rubygems/rubygems/commit/8e6bc4485a
2023-07-28 16:08:06 +00:00
Jenny Shen 812dbe79f0 [rubygems/rubygems] Create SignInFetcher
https://github.com/rubygems/rubygems/commit/38afc47899
2023-07-28 16:08:06 +00:00
Peter Zhu 91e13a5207 [ruby/strscan] Fix indentation in strscan.c
[ci skip]
2023-07-28 10:12:52 -04:00
Nobuyoshi Nakada 49b76e57cc
Test `SHARABLE_MIDDLE_SUBSTRING` [ci skip] 2023-07-28 22:22:12 +09:00
Nobuyoshi Nakada 9f059d908c
Freeze test string to be shared for sharable-middle-substring 2023-07-28 22:17:54 +09:00
Nobuyoshi Nakada af04e26924
Fill terminator properly 2023-07-28 22:17:53 +09:00
Nobuyoshi Nakada 7cfabe1acc
Preserve `ec` argument across `longjmp`
Fix segfault on icc 2023.2.
An optimizer may allocate this argument to a register, and it may be
clobbered by `longjmp`, e.g. exceptions.
2023-07-28 19:39:43 +09:00
Ruby 6391132c03 fix typo (CACH_ -> CACHE_) 2023-07-28 18:01:42 +09:00
git 5de82ed401 Update bundled gems list at 2023-07-28 2023-07-28 06:59:38 +00:00
Hiroshi SHIBATA 2deeb0e0bf Removed unnecessary methods 2023-07-28 14:57:10 +09:00
Hiroshi SHIBATA 35517baae5 Use Gem::BUNDLED_GEMS::SINCE 2023-07-28 14:57:10 +09:00
Nobuyoshi Nakada 989f3add62 Warn default gems which will be gemified in future 2023-07-28 14:57:10 +09:00
Hiroshi SHIBATA b9c2f4a424
Fixed gemfile path for upstream of bundler 2023-07-28 14:49:03 +09:00
Hiroshi SHIBATA ce6c6c7cfa
Exclude lockfile from sync target 2023-07-28 13:15:12 +09:00
Hiroshi SHIBATA 93f57dbcef
Update description for test-bundler on gitignore 2023-07-28 12:49:55 +09:00
Hiroshi SHIBATA 426434556f
Removed lockfile for test-bundler 2023-07-28 12:47:31 +09:00
Ruby c330037c1a `cc->cme` should not be marked.
cc is callcache.

cc->klass (klass) should not be marked because if the klass is
free'ed, the cc->klass will be cleared by `vm_cc_invalidate()`.

cc->cme (cme) should not be marked because if cc is invalidated
when cme is free'ed.
- klass marks cme if klass uses cme.
- caller classe's ccs->cme marks cc->cme.
- if cc is invalidated (klass doesn't refer the cc),
  cc is invalidated by `vm_cc_invalidate()` and cc->cme is
  not be accessed.
- On the multi-Ractors, cme will be collected with global GC
  so that it is safe if GC is not interleaving while accessing
  cc and cme.

fix [Bug #19436]

```ruby
10_000.times{|i|
  # p i if (i%1_000) == 0

  str = "x" * 1_000_000
  def str.foo = nil
  eval "def call#{i}(s) = s.foo"
  send "call#{i}", str
}
```

Without this patch:

```
real    1m5.639s
user    0m6.637s
sys     0m58.292s
```

and with this patch:

```
real    0m2.045s
user    0m1.627s
sys     0m0.164s
```
2023-07-28 10:51:11 +09:00
Takashi Kokubun 44b19b01e2 Remove an obsoleted initialization from Wasm 2023-07-27 17:36:07 -07:00
Takashi Kokubun 8c7cf2de98 Remove an unused argument in vm_exec_core 2023-07-27 17:31:27 -07:00
Takashi Kokubun 38be9a9b72
Clean up OPT_STACK_CACHING (#8132) 2023-07-27 17:27:05 -07:00