summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-11-24merge revision(s) 4f1e0bfacd93c28bff549e2f3603c3b4942429a3:nagachika
Followed up CVE-2022-39253 for bundler examples --- spec/bundler/cache/git_spec.rb | 3 +++ spec/bundler/install/gemfile/git_spec.rb | 9 +++++++++ spec/bundler/update/git_spec.rb | 3 +++ 3 files changed, 15 insertions(+)
2022-11-24merge revision(s) 36f297e62108072b9377d927321928b994f66a93:nagachika
Use valid tokens as cookie names --- spec/ruby/library/cgi/cookie/name_spec.rb | 12 ++++++------ spec/ruby/library/cgi/cookie/parse_spec.rb | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-)
2022-11-24merge revision(s) ↵nagachika
dae843f6b7502f921a7e66f39e3714a39d860181,86096a91d55f72620e0f8ca8634da5fa342dc35b: Bypass git submodule add/update with git config protocol.file.allow=always option. Co-authored-by: Nobuyoshi Nakada <[email protected]> --- test/rubygems/test_gem_source_git.rb | 5 +++++ 1 file changed, 5 insertions(+) [rubygems/rubygems] Use [] instead of double-quotes --- test/rubygems/test_gem_source_git.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
2022-11-24Merge CGI-0.2.2Hiroshi SHIBATA
2022-10-15* 2022-10-15 [ci skip]git
2022-10-15Upgrade zlib_version on AppVeyorTakashi Kokubun
They removed https://zlib.net/zlib1212.zip because https://zlib.net/zlib1213.zip was released :thinking_face: Fix CI failures like: https://ci.appveyor.com/project/ruby/ruby/builds/45064876/job/bb9biogolh0u2595
2022-10-15Update zlib versionNobuyoshi Nakada
2022-10-01* 2022-10-01 [ci skip]git
2022-10-01Initialize Objective-C classes before fork() for macOS 13Yuta Saito
Since macOS 13, CFString family API used in `rb_str_append_normalized_ospath` may internally use Objective-C classes (`NSTaggedPointerString` and `NSPlaceholderMutableString`) for small strings. On the other hand, Objective-C classes should not be used for the first time in a `fork()`'ed but not `exec()`'ed process. Violations for this rule can result deadlock during class initialization, so Objective-C runtime conservatively crashes on such cases by default. Therefore, we need to use CFString API to initialize Objective-C classes used internally *before* `fork()`. For more details, see https://bugs.ruby-lang.org/issues/18912
2022-10-01[Bug #19005] dynamic_lookup linker option in external librariesNobuyoshi Nakada
The warning against `-undefined dynamic_lookup` is just a warning yet, and many gems seem to pay no attention to warnings. Until it fails actually, keep it as a migration path, except for standard extension libraries and bundled extension gems.
2022-10-01-undefined dynamic_lookup is obsoleteNobuyoshi Nakada
2022-09-20* 2022-09-20 [ci skip]git
2022-09-20The tzdata 2022c removed Amsterdam Mean TimeNobuyoshi Nakada
2022-09-16* 2022-09-16 [ci skip]git
2022-09-16Backport https://github.com/ruby/ruby/pull/6193Hiroshi SHIBATA
Co-authored-by: Yuta Saito <[email protected]>
2022-07-25merge revision(s) edf01d4e82d8e44ee30ec41fbcb7f802bc8b8c5d: [Backport #18772]NAKAMURA Usaku
Treat NULL fake string as an empty string And the NULL string must be of size 0. --- string.c | 5 +++++ 1 file changed, 5 insertions(+)
2022-06-18merge revision(s) 7f81f335478a3ca873f34e3bc0af6927819d3e84: [Backport #18734]NAKAMURA Usaku
Return `false` where sticky-bit is not provided [Bug #18734] --- file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
2022-06-18merge revision(s): a0040af6715d85f416f1282588974e151a8164ebNAKAMURA Usaku
[Win32] Fix mode of character/pipe device stat [Bug #18732]
2022-04-12Fix dtoa buffer overrunv3_0_4nagachika
2022-04-12Just free compiled pattern if no space is usednagachika
2022-04-12* 2022-04-12 [ci skip]git
2022-04-12Fix spec to not touch the networkDavid Rodríguez
And not depend on the state of rack's master branch, in particular, on their Ruby support range.
2022-04-12Expect to receive a non-keywords hashNobuyoshi Nakada
`RSpec::Mocks::ArgumentListMatcher#args_match?` fails when a non-keywords hash is passed while a keyword hash is expected. This is a change in `rspec-mocks` 3.10.3, so we need to adapt to it.
2022-04-12Merge Bundler-2.2.33Hiroshi SHIBATA
2022-04-12Merge RubyGems-3.2.33Hiroshi SHIBATA
2022-04-02merge revision(s) 035b75c8f4097a48cde3cebc5db5e2efddc21546:nagachika
Update zlib version to 1.2.12 --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
2022-04-02remove bundled zlib patch file for mswin platform. It's already applied at ↵nagachika
zlib-1.2.12.
2022-04-02remove bundled zlib patch file for mswin platform. It's already applied at ↵nagachika
zlib-1.2.12.
2022-04-02rename filepath in patch for zlib.nagachika
2022-04-02rename bundled zlib patch file for mswin platform.nagachika
2022-04-02* 2022-04-02 [ci skip]git
2022-04-02bundle zlib-1.2.12 instead of 1.2.11.nagachika
2022-03-21merge revision(s) ↵nagachika
d0d6227a0da5925acf946a09191f172daf53baf2,fff1edf23ba28267bf57097c269f7fa87530e3fa: [Backport #17529] alen should be actions number on ractor_select() alen was number of rs, but it should be actions number (taking ractors + receiving + yielding). --- ractor.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) fix Ractor.yield(obj, move: true) Ractor.yield(obj, move: true) and Ractor.select(..., yield_value: obj, move: true) tried to yield a value with move semantices, but if the trial is faild, the obj should not become a moved object. To keep this rule, `wait_moving` wait status is introduced. New yield/take process: (1) If a ractor tried to yield (move:true), make taking racotr's wait status `wait_moving` and make a moved object by `ractor_move(obj)` and wakeup taking ractor. (2) If a ractor tried to take a message from a ractor waiting fo yielding (move:true), wakeup the ractor and wait for (1). --- bootstraptest/test_ractor.rb | 25 +++++++++++++++ ractor.c | 73 +++++++++++++++++++++++++++++++++++--------- ractor_core.h | 1 + 3 files changed, 84 insertions(+), 15 deletions(-)
2022-03-21update common.mk dependency to follow up the previous commit.nagachika
2022-03-21class.c: include gc.h to suppress 'implicit declaration of function' on some ↵nagachika
environments.
2022-03-21merge revision(s) 97426e15d721119738a548ecfa7232b1d027cd34: [Backport #18627]nagachika
[Bug #18627] Fix crash when including module During lazy sweeping, the iclass could be a dead object that has not yet been swept. However, the chain of superclasses of the iclass could already have been swept (and become a new object), which would cause a crash when trying to read the object. --- class.c | 48 ++++++++++++++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 18 deletions(-)
2022-03-13merge revision(s) 496591de96b261b8789332c7f8b2bfbd17658955: [Backport #18578]nagachika
st.c: Do not clear entries_bound when calling Hash#shift for empty hash tab->entries_bound is used to check if the bins are full in rebuild_table_if_necessary. Hash#shift against an empty hash assigned 0 to tab->entries_bound, but didn't clear the bins. Thus, the table is not rebuilt even when the bins are full. Attempting to add a new element into full-bin hash gets stuck. This change stops clearing tab->entries_bound in Hash#shift. [Bug #18578] --- st.c | 1 - test/ruby/test_hash.rb | 13 +++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-)
2022-03-13merge revision(s) 29f6f79e7396018962eb25c5f5e409f5fe28a73b: [Backport ↵nagachika
#17788] [Backport #18574] Get `ruby_nonempty_memcpy` to have C linkage Fixes [Bug #17788] --- include/ruby/internal/memory.h | 2 ++ 1 file changed, 2 insertions(+)
2022-03-13merge revision(s) c79d2e54748f52c5023b0a1ee441561df9826c17: [Backport #18562]nagachika
Fix TAG_THROW through require [Bug #18562] Previously this was being incorrectly swapped with TAG_RAISE in the next line. This would end up checking the T_IMEMO throw_data to the exception handling (which calls Module#===). This happened to not break existing tests because Module#=== returned false when klass is NULL. This commit handles throw from require correctly by jumping to the tag retaining the TAG_THROW state. --- load.c | 2 +- test/ruby/test_exception.rb | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-)
2022-03-13merge revision(s) b555e659c4974acc423083b71b1bd5ec6a926046: [Backport #18388]nagachika
Do not use `fcopyfile` if appending to non-empty file [Bug #18388] `fcopyfile` appends `src` to `to` and then truncates `to` to it's original size. --- io.c | 7 +++++++ test/ruby/test_io.rb | 12 ++++++++++++ 2 files changed, 19 insertions(+)
2022-03-13merge revision(s) ↵nagachika
7ff1bf317887c0d7b21e91ad548d07b9f05c540c,e89d80702bd98a8276243a7fcaa2a158b3bfb659: [Backport #18516] An alias can suppress method redefinition warning --- test/ruby/test_alias.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) Fix memory leak at the same named alias [Bug #18516] When aliasing a method to the same name method, set a separate bit flag on that method definition, instead of the reference count increment. Although this kind of alias has no actual effect at runtime, is used as the hack to suppress the method re-definition warning. --- method.h | 1 + test/ruby/test_alias.rb | 18 ++++++++++++++++++ vm_method.c | 9 ++++++++- 3 files changed, 27 insertions(+), 1 deletion(-)
2022-03-13merge revision(s) 6a6227e0168b059c3ed34c9f0ace2e5dc2364221: [Backport #18517]nagachika
Shifting zero always results in zero [Bug #18517] --- numeric.c | 2 ++ 1 file changed, 2 insertions(+)
2022-03-13merge revision(s) ↵nagachika
5c7af72304d0ad33cd3f21b24a4bc44e8acd5b2c,d650b17686d49c2ce8e6a87039861154e93d4621: [Backport #18497] Assuming EXIT_SUCCESS equals 0 is not portable --- test/ruby/test_fiber.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) `rb_fiber_terminate` must not return [Bug #18497] In a forked process from a fiber, the fiber becomes the only fiber, `fiber_switch` does nothing as there is no other fibers, `rb_fiber_terminate` does not terminate the fiber. In that case, reaches the end of `fiber_entry` finaly, which is declared as "COROUTINE" and should never return. --- cont.c | 3 ++- eval_intern.h | 2 +- test/fiber/test_process.rb | 15 +++++++++++++++ test/ruby/test_fiber.rb | 5 +++++ 4 files changed, 23 insertions(+), 2 deletions(-)
2022-03-13merge revision(s) ae5458f228a5477383e9c00425d85d50a3867817: [Backport #18475]nagachika
thread.c: Convert TAG_BREAK to a normal exception at thread top-level [Bug #18475] --- test/ruby/test_enum.rb | 11 +++++++++++ thread.c | 3 +++ 2 files changed, 14 insertions(+)
2022-03-12merge revision(s) 9e0a91d0640600f2dfd7fc1d5fae6667019c9ca5: [Backport #18458]nagachika
Don't segfault if Warning.warn is undefined Check that there is a method entry for the method before passing it to rb_method_entry_arity. Fixes [Bug #18458] --- error.c | 3 ++- test/ruby/test_exception.rb | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-)
2022-03-12merge revision(s) bcc2bb28b04054106f4a36e8fd69b2af6ecb033a: [Backport #18500]nagachika
Fix stack buffer overflow https://hackerone.com/reports/1306859 --- include/ruby/internal/memory.h | 6 +++--- random.c | 7 ++----- 2 files changed, 5 insertions(+), 8 deletions(-)
2022-03-12merge revision(s) fdf39963490cf2cf95b30d91bb9b35964c2c2350: [Backport #18421]nagachika
Empty and return the buffer if zero size is given [Bug #18421] In `IO#readpartial` and `IO#read_nonblock`, as well as `IO#read`. --- io.c | 8 ++++++-- test/ruby/test_io.rb | 21 +++++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-)
2022-03-12merge revision(s) ↵nagachika
d6c5a30cfdf658280338dbb8c8b17fab3190b928,a2d4e1cda68a49980a4f9f353f400efbde7e7884: [Backport #18392] ObjectSpace::WeakMap#inspect: check if living object [Bug #18392] --- gc.c | 29 +++++++++++++++++++++++------ test/ruby/test_weakmap.rb | 9 +++++++++ 2 files changed, 32 insertions(+), 6 deletions(-) Fixed the check order in wmap_live_p [Bug #18392] Check if the object is a pointer to heap before check the flag in that object. --- gc.c | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-)
2022-03-12merge revision(s) 737e4432b978eb4b9f5b10fb6cc6d9c883a5d17a: [Backport #18409]nagachika
configure: add -Wl,--no-as-needed It is reported that combination of `--enable-shared --with-jemalloc` breaks on Debian bullseye (testig). Deeper investigation revealed that this system's `ld(1)` is patched, to turn `ld --as-needed` on by default. This linker flag strips "unnecessary" library dependencies from an executable. In case of `ruby(1)` (of `--enable-shared`), because everything is in `libruby.so`, the binary itself doesn't include any calls to `malloc(3)` at all. So in spite of our explicit `-ljemalloc` flag, it is ignored. Libc's one is chosen instead. This is not what we want. Let's force our `ruby(1)` link what we want. Fixes https://github.com/ruby/ruby/pull/4627 The author would like to acknowledge Akihiko Odaki <[email protected]> for their contributions. --- configure.ac | 5 +++++ 1 file changed, 5 insertions(+)
2022-03-12merge revision(s) e2ec97c4b823a0b2e0c31e7a6d77b1dcdc0dfada: [Backport #18415]nagachika
[DOC] How to get the longest last match [Bug #18415] --- string.c | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-)