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

77381 Коммитов

Автор SHA1 Сообщение Дата
Takashi Kokubun 9f426491ca Put misc/gdb.py [experimental]
This works like:

```
(gdb) cfp
CFP (count=3, addr=0x7ffff73fef50):
$1 = {pc = 0x555556bf7818, sp = 0x7ffff72ff078, iseq = 0x7ffff2603270, self = 140737344619296, ep = 0x7ffff72ff058, block_code = 0x0,
  __bp__ = 0x7ffff72ff060, jit_return = 0x555558c2b000}

Stack (size=3):
[0] FIXNUM: 1
[1] T_STRING: "" bytesize:0 (embed) encoding:1 coderange:7bit $2 = (struct RString *) 0x7ffff249ea80
[2] [PROMOTED] T_OBJECT: $3 = {flags = 21474844769, klass = 140737344040416}
$4 = {0x24, 0x24, 0x24}

(gdb) cfp + 1
CFP (count=3, addr=0x7ffff73fef90):
$5 = {pc = 0x5555567a78f8, sp = 0x7ffff72ff040, iseq = 0x7ffff26032d0, self = 140737344619296, ep = 0x7ffff72ff038, block_code = 0x0,
  __bp__ = 0x7ffff72ff040, jit_return = 0x555558c2b000}

Stack (size=0):
```
2023-03-31 00:20:40 -07:00
Takashi Kokubun f500df097f Fix ivar dump for RVARGC in .gdbinit
It was crashing with:
No symbol "ROBJECT_EMBED_LEN_MAX" in current context.
2023-03-30 23:58:09 -07:00
Koichi Sasada fbc6661a72 Revert "dump `RUBY_DEBUG_LOG` logs into `/dev/null`"
This reverts commit 83667008b9.

because not stable yet.
2023-03-31 14:23:37 +09:00
Hiroshi SHIBATA bc0a7a641b [ruby/net-http] typofix
https://github.com/ruby/net-http/commit/4d31bde125
2023-03-31 03:47:56 +00:00
NAKAMURA Usaku eedcd696a5 [ruby/net-http] Fix previous commit
https://github.com/ruby/net-http/commit/1b276e2654
2023-03-31 03:22:41 +00:00
NAKAMURA Usaku d8b8294c28 [ruby/net-http] Limit header length
https://github.com/ruby/net-http/commit/c245f7f9c8
2023-03-31 03:22:40 +00:00
Koichi Sasada 2093e4c2db `nt->serial` for `RUBY_DEBUG_LOG`
Show native thread's serial on `RUBY_DEBUG_LOG`.
`nt->serial` is also stored into `ruby_nt_serial` if the compiler
supports `RB_THREAD_LOCAL_SPECIFIER`.
2023-03-31 11:28:18 +09:00
Koichi Sasada 83667008b9 dump `RUBY_DEBUG_LOG` logs into `/dev/null`
to test debug printing.
2023-03-31 11:28:02 +09:00
Nobuyoshi Nakada bccdc04166
Check if `Bundler::EnvironmentPreserver` is defined
Only `Bundler` might be defined.  `EnvironmentPreserver` and its
`BUNDLER_PREFIX` would be defined together in the same file.
2023-03-31 11:11:45 +09:00
Nobuyoshi Nakada 5116e8bdf8 [ruby/rdoc] Read generated files in binary mode
So that fixes crash with "invalid byte sequence in US-ASCII" on
ci.rvm.jp and some RubyCIs.

https://github.com/ruby/rdoc/commit/4b416644f0
2023-03-31 01:14:34 +00:00
Nobuyoshi Nakada cd65e4adca [ruby/rdoc] Use `File.binread`
https://github.com/ruby/rdoc/commit/987c609df9
2023-03-31 01:14:34 +00:00
dependabot[bot] 8523892d08 Bump ossf/scorecard-action from 2.1.2 to 2.1.3
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.1.2 to 2.1.3.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](e38b1902ae...80e868c13c)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-31 09:56:32 +09:00
yui-knk 3488eda41d Fix gc_verify_internal_consistency error for pattern_matching in ripper
`gc_verify_internal_consistency` reports "found internal inconsistency"
for "test_pattern_matching.rb".

http://ci.rvm.jp/results/trunk-gc-asserts@ruby-sp2-docker/4501173

Ruby's parser manages objects by two different ways.

1. For parser

* markable node holds objects
* call `RB_OBJ_WRITTEN` with `p->ast` as parent
* `mark_ast_value` marks objects

2. For ripper

* unmarkable node, NODE_RIPPER/NODE_CDECL, holds objects
* call `rb_ast_add_mark_object`. This function calls `rb_hash_aset` then
  `RB_OBJ_WRITTEN` is called with `mark_hash` as parent
* `mark_hash` marks objects

However in current pattern_matching implementation

* markable node holds objects
* call `rb_ast_add_mark_object`

This commit fix it to be #2.

This was inconsistency however always `mark_hash` is
made young by `rb_ast_add_mark_object` call then objects
are not collected.
2023-03-31 09:38:34 +09:00
Jimmy Miller a8782c454c YJIT: Test more kw and rest cases and change exit name 2023-03-30 18:01:26 -04:00
Matt Valentine-House dabeec8034 [ci skip] LLDB: Fix rp for arrays 2023-03-30 22:38:30 +01:00
Takashi Kokubun 9a617c067f
YJIT: Generate side exits as late as possible (#7612)
* YJIT: Generate side exits late as possible

* YJIT: s/for_stack_size/with_stack_size/

* YJIT: s/get_counter/exit_counter/
2023-03-30 14:15:59 -07:00
Nobuyoshi Nakada 339295dd7c
Fix missing receiver [ci sip] 2023-03-31 01:16:44 +09:00
Samuel Williams 648870b5c5
Support `IO#pread` / `IO#pwrite` using fiber scheduler. (#7594)
* Skip test if non-blocking file IO is not supported.
2023-03-31 00:48:55 +13:00
Nobuyoshi Nakada 6f122965cf [Bug #19547] Add token for unescaped backslash
This token is exposed only when `RubyVM::AbstractSyntaxTree` with
`keep_tokens` option.
2023-03-30 19:47:36 +09:00
Nobuyoshi Nakada cbfd029985 [ruby/time] Make RFC2822 regexp linear
https://hackerone.com/reports/1485501

https://github.com/ruby/time/commit/51034bda4c
2023-03-30 10:44:39 +00:00
Nobuyoshi Nakada aa3885501f [ruby/time] Fix quadratic backtracking on invalid time
https://hackerone.com/reports/1485501

https://github.com/ruby/time/commit/2444456fc1
2023-03-30 10:44:38 +00:00
Nobuyoshi Nakada 623027bf0b [ruby/time] Test for quadratic backtracking on invalid time
https://hackerone.com/reports/1485501

https://github.com/ruby/time/commit/b30b7bc6e6
2023-03-30 10:44:37 +00:00
Koichi Sasada f5b824c745 show debug log for `ractor_terminal_interrupt_all` 2023-03-30 14:56:37 +09:00
Koichi Sasada 30b43f4f1a `rb_ractor_thread_list()` only for current ractor
so that no need to lock the ractor.
2023-03-30 14:56:37 +09:00
Koichi Sasada 94e4182267 `rb_current_ractor_raw(b)`
`rb_current_ractor()` expects it has valid `ec` and `r`.
`rb_current_ractor_raw()` with a parameter `false` allows to return
NULL if `ec` is not available.
2023-03-30 14:56:23 +09:00
Koichi Sasada ba72849a3f cosmetic change 2023-03-30 14:56:10 +09:00
Koichi Sasada f89c348234 enable GH actions on `USE_RUBY_DEBUG_LOG=1` 2023-03-30 14:55:25 +09:00
Alan Wu 1b06422767
YJIT: Leave cfp->pc uninitialized for VM_FRAME_MAGIC_CFUNC
C function frames don't need to use the VM-specific pc field to run
properly. When pushing a control frame from output code, save one
instruction by leaving the field uninitialized.

Fix-up rb_vm_svar_lep(), which is used while setting local variables via
Regexp#=~. Use cfp->iseq as a secondary signal so it can stop assuming
that all CFUNC frames always have zero pc's.
2023-03-29 17:57:52 -04:00
Alan Wu a1a4d77472 YJIT: code_gc(): Assert self is inline to avoid other_cb()
The derived `&mut` from `other_cb()` overlapped with the parameter
`ocb`.

Use `cfg!()` instead of `#[cfg...]` to avoid unused warnings.
2023-03-29 14:53:49 -04:00
Alan Wu cdededf24d YJIT: Take VM lock in RubyVM::YJIT.code_gc
Code GC needs synchronization.
2023-03-29 14:53:49 -04:00
Alan Wu 93b6997103 YJIT: Fix overlapping &mut in Assembler::code_gc()
Making overlapping `&mut`s triggers Undefined Bahavior. This function
previously had them through `cb` and `ocb` aliasing with `self` or live
references in the caller.

To fix the overlap, take `ocb` as a parameter and don't use `get_inline_cb()`
in the body of the function.
2023-03-29 14:53:49 -04:00
Jimmy Miller a8c6ba23a6
YJIT: Rest and keyword (non-supplying) (#7608)
* YJIT: Rest and keyword (non-supplying)

* Update yjit/src/codegen.rs

---------

Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
2023-03-29 12:31:41 -04:00
Stan Lo b168141c78 [ruby/reline] Drop Dialog#scrollbar_pos as we can store it in a
local variable
(https://github.com/ruby/reline/pull/529)

https://github.com/ruby/reline/commit/d0139975fd

Co-authored-by: tomoya ishida <tomoyapenguin@gmail.com>
2023-03-29 13:51:27 +00:00
Stan Lo 02ecdf85c5 [ruby/reline] Drop Unicode.take_range's optional arg as it's never
used
(https://github.com/ruby/reline/pull/528)

https://github.com/ruby/reline/commit/428fed4a6a
2023-03-29 10:20:29 +00:00
Hiroshi SHIBATA 3155b76eb4 Added ~\scoop\shims to PATH 2023-03-29 18:36:17 +09:00
Hiroshi SHIBATA 54ddf58a29 Don't need to specify YACC name for scoop bison 2023-03-29 18:36:17 +09:00
Hiroshi SHIBATA a807fa6f9b Use scoop instead of Chocolatey
chocolatey often returns 503 status.
2023-03-29 18:36:17 +09:00
Takashi Kokubun 9a1f6975c5 RJIT: Propagate a set of args as a CallingInfo 2023-03-29 00:44:31 -07:00
git f8f15e247d Update bundled gems list at 2023-03-29 2023-03-29 07:00:50 +00:00
tomoya ishida e26908dc4b [ruby/reline] Improve OSC sequence regexp. OSC sequence can end with
ST(ESC\) and it should not to include \a and \e inside.
(https://github.com/ruby/reline/pull/527)

https://github.com/ruby/reline/commit/a88052adec
2023-03-29 06:54:08 +00:00
Hiroshi SHIBATA 8c8d068016 [ruby/win32ole] Skip test failure with mswin platform
https://github.com/ruby/win32ole/actions/runs/4507614838/jobs/7935550685?pr=18

https://github.com/ruby/win32ole/commit/39ae6c2bc7
2023-03-29 04:00:22 +00:00
Nobuyoshi Nakada f241a8de56
[ruby/uri] Increase rehearsals 2023-03-29 09:52:33 +09:00
Maxime Chevalier-Boisvert 39a34694a0
YJIT: Add `--yjit-pause` and `RubyVM::YJIT.resume` (#7609)
* YJIT: Add --yjit-pause and RubyVM::YJIT.resume

This allows booting YJIT in a suspended state. We chose to add a new
command line option as opposed to simply allowing YJIT.resume to work
without any command line option because it allows for combining with
YJIT tuning command line options. It also simpifies implementation.

Paired with Kokubun and Maxime.

* Update yjit.rb

Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>

---------

Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
2023-03-28 15:21:19 -04:00
Takashi Kokubun 2f8a598dc5
YJIT: Stop using the starting_context pattern (#7610) 2023-03-28 11:40:48 -07:00
NARUSE, Yui 2488b4dd0d gem related automation must run only on master 2023-03-29 00:47:37 +09:00
Stan Lo 1e9a218ade [ruby/reline] Expand the scanned array to later case statement more
straightforward
(https://github.com/ruby/reline/pull/526)

* Improve test coverage on Unicode.take_range

* Add test for Unicode.calculate_width

* Expand the scanned array to later case statement more straightforward
2023-03-28 12:49:49 +00:00
Peter Zhu 417b1a3644 Fix memory leak for iclass
[Bug #19550]

If !RCLASS_EXT_EMBEDDED (e.g. 32 bit systems) then the rb_classext_t is
allocated throug malloc so it must be freed.

The issue can be seen in the following script:

```
20.times do
  100_000.times do
    mod = Module.new
    Class.new do
      include mod
    end
  end

  # Output the Resident Set Size (memory usage, in KB) of the current Ruby process
  puts `ps -o rss= -p #{$$}`
end
```

Before this fix, the max RSS is 280MB, while after this change, it's
30MB.
2023-03-28 08:20:06 -04:00
NARUSE, Yui 6ce6b4d1e7 Use merge_group 2023-03-28 21:01:59 +09:00
Nobuyoshi Nakada c86ccccbd7
Revert "RBS: Pathname#taint and Pathname#untaint are removed"
This reverts commit 46132e78b7438389bf49a860a0cd8957f685dcb3, in favor
of 298cb57c11.
2023-03-28 18:02:50 +09:00
Nobuyoshi Nakada 6b05f125bb Skip commits only for tools
Get rid of accidents like 67feb782f9.
2023-03-28 17:17:51 +09:00