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

72141 Коммитов

Автор SHA1 Сообщение Дата
Alan Wu a687756284 Fix use-after-free with interacting TracePoints
`vm_trace_hook()` runs global hooks before running local hooks.
Previously, we read the local hook list before running the global hooks
which led to use-after-free when a global hook frees the local hook
list. A global hook can do this by disabling a local TracePoint, for
example.

Delay local hook list loading until after running the global hooks.

Issue discovered by Jeremy Evans in GH-5862.

[Bug #18730]
2022-05-30 13:54:22 -04:00
git 3bef9584a8 * 2022-05-31 [ci skip] 2022-05-31 02:30:23 +09:00
Burdette Lamar c50c9d4051 [ruby/fileutils] [DOC] Enhanced RDoc (https://github.com/ruby/fileutils/pull/77)
Treats:
    ::copy_entry
    ::copy_file
    ::copy_stream
    ::mv

https://github.com/ruby/fileutils/commit/d6d7e5330d
2022-05-31 02:30:07 +09:00
Hiroshi SHIBATA a78f003c30
Skip failing test with freebsd 2022-05-30 18:40:31 +09:00
David Rodríguez d6684f063b [rubygems/rubygems] Fix crash when commenting out a mirror in configuration
https://github.com/rubygems/rubygems/commit/2d99277328
2022-05-30 17:43:12 +09:00
David Rodríguez ea31c5bcd1 [rubygems/rubygems] Fix crash when installing gems with symlinks
If BUNDLE_PATH is configured to a symlinked path, installing gems with
symlinks would crash with an error like this:

```
Gem::Package::SymlinkError: installing symlink 'man/man0/README.markdown' pointing to parent path /usr/home/stevewi/srv/mail/lib/tools/.vendor/ruby/3.1.0/gems/binman-5.1.0/README.markdown of /srv/mail/lib/tools/.vendor/ruby/3.1.0/gems/binman-5.1.0 is not allowed
```

This commit fixes the problem by changing the bundle path to be the
realpath of the configured value, right after we're sure the path has
been created.

https://github.com/rubygems/rubygems/commit/3cd3dd142a
2022-05-30 17:42:39 +09:00
David Rodríguez 0d7d8f3777 [rubygems/rubygems] No need to use `FileUtils` to create symlinks
https://github.com/rubygems/rubygems/commit/70ff7cee9f
2022-05-30 17:42:38 +09:00
David Rodríguez 7001e34323 [rubygems/rubygems] Fix failing spec on Windows
https://github.com/rubygems/rubygems/commit/8e68c57457
2022-05-30 17:42:37 +09:00
David Rodríguez 0a974e4700 [rubygems/rubygems] Remove seemingly unnecessary code
https://github.com/rubygems/rubygems/commit/f5dd5204ca
2022-05-30 17:42:37 +09:00
Nobuyoshi Nakada 7976142791 [ruby/stringio] Fix extracting encoding names in the fallback code
https://github.com/ruby/stringio/commit/0fe2e0c1e5
2022-05-30 14:48:45 +09:00
Nobuyoshi Nakada d3e986d9ab [ruby/stringio] Accept external and internal encodings pair
Fix https://github.com/ruby/stringio/pull/16

https://github.com/ruby/stringio/commit/c8a69e80d2
2022-05-30 14:48:44 +09:00
Hiroshi SHIBATA 4cc880e994
Also skip failing test with freebsd 12 2022-05-30 14:28:32 +09:00
Jeremy Evans 12e34a4276 Update rubyspec for stringio bug fix 2022-05-29 21:25:05 -07:00
Jeremy Evans 609d73e892 [ruby/stringio] Fix handling of chomp with paragraph separator
Try to mirror IO behavior, where chomp takes out the entire paragraph
separators between entries, but does not chomp a single line separator
at the end of the string.

Partially Fixes [Bug #18768]

https://github.com/ruby/stringio/commit/a83ddbb7f0
2022-05-30 13:10:46 +09:00
Jeremy Evans 7e3920f0d9 [ruby/stringio] Update ext/stringio/stringio.c
https://github.com/ruby/stringio/commit/1edc88587e

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2022-05-30 13:01:18 +09:00
Jeremy Evans adaaf12857 [ruby/stringio] Ignore chomp keyword for nil separator
nil separator means no separator at all, so nothing should be
chomped.

Partial fix for Ruby [Bug #18770]

https://github.com/ruby/stringio/commit/feaa2ec631
2022-05-30 13:01:17 +09:00
Jeremy Evans 1f82269f4e [ruby/stringio] Fix each with multiple character string and chomp
Previously, this could result in an infinite loop.  Always update
the e pointer in this case, setting w when chomping so the chomped
data is not included in the output.

Fixes [Bug #18769]

https://github.com/ruby/stringio/commit/4bf64d5130
2022-05-30 12:55:47 +09:00
Nobuyoshi Nakada bb6357cddd [ruby/stringio] Fix expanding size at ungetc/ungetbyte
https://github.com/ruby/stringio/commit/a35268a3ac
2022-05-30 12:51:37 +09:00
Nobuyoshi Nakada 11793f897c
Reduce duplicate replacements
Reduce duplicate replacements so that reflect macros in command lines
consitently.  So that reflect macros in command lines.  Others than
`nmake` have no problems with nested expansions.
2022-05-30 12:03:57 +09:00
Hiroshi SHIBATA cc63718694
Skip failing test with freebsd 2022-05-30 10:53:45 +09:00
Alan Wu 899c90cf8a
YJIT: Relax minimum Rust version requirement to 1.58.1
We want to make it convenient for people to build YJIT and Rust version 1.58.1
or above is available on Ubuntu Jammy, Debian testing, and Fedora 36 through
the usual package manager on those systems. This saves the need to install
`rustup` for some people.

Our code is already 1.58.1 compatible so this commit simply tweaks CI to make
sure that we keep supporting that version. We still test against the latest Rust
version in `--enable-yjit=dev` builds through the Rust version available in
GitHub's CI image.

Rust versions older than 1.58.1 might build YJIT today, but we might make
incompatible changes in the future.

Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
2022-05-29 13:43:02 -04:00
git 93d1eb71b8 * 2022-05-30 [ci skip] 2022-05-30 00:27:59 +09:00
David Rodríguez 08b82e6b40 [rubygems/rubygems] Ignore `Errno::EROFS` errors when creating `bundler.lock`
Apparently old versions of MacOS would set `GEM_HOME` to a `/System`
folder, and trying to create a file there raises `Errno::EROFS`.

We ignore the error. Any permission issues should be better handled
further down the line.

https://github.com/rubygems/rubygems/commit/ef90c071d0
2022-05-30 00:27:43 +09:00
David Rodríguez 373dabe00a [rubygems/rubygems] Ignore `Errno::EPERM` errors when creating `bundler.lock`
This kind of error can happen when setting `GEM_HOME` to a path
under MacOS System Integrity Protection.

We ignore the error. Any permission issues should be better handled
further down the line.

https://github.com/rubygems/rubygems/commit/174cb66863
2022-05-29 22:19:35 +09:00
git 931b013b9f * 2022-05-29 [ci skip] 2022-05-29 04:20:27 +09:00
Burdette Lamar 8038d5e40a
Revert flawed doc for slice_after, slice_when, and chunk_while (#5952)
Restores doc for the methods that were cited in https://bugs.ruby-lang.org/issues/18765.
2022-05-28 14:20:00 -05:00
David Rodríguez 6e3295e554 [rubygems/rubygems] Make code to find target update version easier to follow
https://github.com/rubygems/rubygems/commit/a7f81cc7ee
2022-05-28 19:22:54 +09:00
David Rodríguez e9c4e37f1f [rubygems/rubygems] Remove unnecessary name and platform filter
It's already done before.

https://github.com/rubygems/rubygems/commit/49d28cfde5
2022-05-28 19:22:53 +09:00
David Rodríguez e78c1ddb1e [rubygems/rubygems] Fix rubygems update when non default `--install-dir` is configured
https://github.com/rubygems/rubygems/commit/9f3b21192d
2022-05-28 19:22:15 +09:00
Samuel Williams 6b0131db6f Make `Kernel#p` completely uninterruptible. 2022-05-28 15:44:18 +12:00
Samuel Williams 753d305503 Tidy up usage of write_lock. 2022-05-28 15:44:18 +12:00
Samuel Williams 1589ac6291 Improve handling of zero length writes. 2022-05-28 15:44:18 +12:00
Samuel Williams 4efccd28e4 Improve consistency of `io_binwritev_internal` implementaiton. 2022-05-28 15:44:18 +12:00
Samuel Williams ac499bb511 Improve error handling in `finish_writeconv`. 2022-05-28 15:44:18 +12:00
Samuel Williams c6cd9e180e Better handling of `error`. 2022-05-28 15:44:18 +12:00
machty 585e97142d Always allocate write_lock 2022-05-28 15:44:18 +12:00
Samuel Williams 216593f59b Add IO write throughput/locking overhead benchmark. 2022-05-28 15:44:18 +12:00
Samuel Williams 15ebfe2849 Make `io_binwritev` atomic. 2022-05-28 15:44:18 +12:00
Samuel Williams ce23cfa518 Make `io_binwrite` atomic. 2022-05-28 15:44:18 +12:00
Jemma Issroff 8a13a2e8d1 RCLASS uses FLUSER bits 0 through 3 2022-05-27 13:45:47 -07:00
Jemma Issroff ac405dc214 Add more information to lldb dump_page helper 2022-05-27 13:45:33 -07:00
git c3fd2e497b * 2022-05-28 [ci skip] 2022-05-28 05:38:55 +09:00
John Hawthorn fc184ca1f7 Only check class ancestors for ivar in memory_view
rb_class_get_superclass returns the immediate SUPER, including T_ICLASS.
rb_ivar_lookup isn't implemented for T_ICLASS so it uses the default
behaviour, which always returns Qnil.

This commit avoids checking T_ICLASS for ivars.
2022-05-27 13:38:40 -07:00
Kouhei Yanagita 8b4d2a5014
[DIC] Fix typo in documentation 2022-05-27 20:18:54 +09:00
David Rodríguez 6778d321a7 [rubygems/rubygems] Show better error when previous installation fails to be removed
Instead of guessing on the culprit.

We actually have a helper, `Bundler.rm_rf`, with exactly the behavior
that we want:

* Allow the passed folder to not exist.
* No exception swallowing other than that.

https://github.com/rubygems/rubygems/commit/5fa3e6f04a
2022-05-27 17:26:22 +09:00
Nobuyoshi Nakada 45177129a7
Support old Mac OS X SDK and gcc
Follow up of https://github.com/ruby/ruby/pull/5927

`pthread_threadid_np()` is not even be declared in outdated SDKs.

Also, the `__API_AVAILABLE` macro does not work on gcc, which does not
support the [availability] attribute of clang, so an additional weak
symbol declaration is required to check for weakly linked symbols.

[availability]: https://clang.llvm.org/docs/AttributeReference.html#availability
2022-05-27 15:08:30 +09:00
Nobuyoshi Nakada 7d9da4c33d
Use `$(CHDIR)` so works with symlink [ci skip] 2022-05-27 09:56:01 +09:00
Nobuyoshi Nakada be26f40682
Revert "Stop rebuilding miniruby always [ci skip]"
This reverts commit 2f5edfa47d.
2022-05-27 09:54:45 +09:00
Jemma Issroff a04d8c9513
Remove trailing comma from FL_USER3 (#5958) 2022-05-26 15:40:34 -07:00
Jemma Issroff 33fdff3c30 Remove unused RMODULE_INCLUDED_INTO_REFINEMENT flag 2022-05-26 12:09:04 -07:00