ml.ruby-lang.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

ruby-core

Thread Start a new thread
Download
Threads by month
  • ----- 2025 -----
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
ruby-core@ml.ruby-lang.org

July 2024

  • 5 participants
  • 216 discussions
[ruby-core:118269] [Ruby master Bug#20570] Nokey behavior changed since 3.3.
by ksss (Yuki Kurihara) 08 Jul '24

08 Jul '24
Issue #20570 has been reported by ksss (Yuki Kurihara). ---------------------------------------- Bug #20570: Nokey behavior changed since 3.3. https://bugs.ruby-lang.org/issues/20570 * Author: ksss (Yuki Kurihara) * Status: Open * ruby -v: ruby 3.3.2 (2024-05-30 revision e5a195edf6) [arm64-darwin22] * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- I am using code that transfers the following method call, but found that the behavior has changed since CRuby 3.3. ```ruby receiver_value = Set.new method_name = :merge args = [1] kwargs = {} block = nil receiver_value.__send__(method_name, *args, **kwargs, &block) # => no keywords accepted (ArgumentError) ``` Upon investigation, I found that the behavior of calling a method using `**nil` has changed starting from version 3.3. ``` $ docker run -it --rm rubylang/all-ruby env ALL_RUBY_SINCE=ruby-2.6 ./all-ruby -e 'def foo(*, **nil); end; p foo(*[], **{})' WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested ruby-2.6.0 -e:1: syntax error, unexpected nil, expecting ')' def foo(*, **nil); end; p foo(*[], **{}) ^~~ exit 1 ... ruby-2.6.10 -e:1: syntax error, unexpected nil, expecting ')' def foo(*, **nil); end; p foo(*[], **{}) ^~~ exit 1 ruby-2.7.0-preview1 -e:1: syntax error, unexpected `nil', expecting ')' def foo(*, **nil); end; p foo(*[], **{}) ^~~ exit 1 ruby-2.7.0-preview2 nil ... ruby-3.2.4 nil ruby-3.3.0-preview1 -e:1:in `<main>': no keywords accepted (ArgumentError) def foo(*, **nil); end; p foo(*[], **{}) ^^^^^^^^^ exit 1 ... ruby-3.3.2 -e:1:in `<main>': no keywords accepted (ArgumentError) def foo(*, **nil); end; p foo(*[], **{}) ^^^^^^^^^ exit 1 ruby-3.4.0-preview1 -e:1:in '<main>': no keywords accepted (ArgumentError) def foo(*, **nil); end; p foo(*[], **{}) ^^^^^^^^^ exit 1 ``` Is this change intentional? -- https://bugs.ruby-lang.org/
5 7
0 0
[ruby-core:116597] [Ruby master Bug#20239] Segmentation fault when using Regex on a large String
by martinsp (Martins Polakovs) 08 Jul '24

08 Jul '24
Issue #20239 has been reported by martinsp (Martins Polakovs). ---------------------------------------- Bug #20239: Segmentation fault when using Regex on a large String https://bugs.ruby-lang.org/issues/20239 * Author: martinsp (Martins Polakovs) * Status: Open * Priority: Normal * ruby -v: ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [aarch64-linux] * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- Since v3.2.0 ruby crashes with segmentation fault on the following script with a `[BUG] Segmentation fault at ...` ``` ruby require "rbconfig/sizeof" ("\u{0101}" + "a" * RbConfig::LIMITS["INT_MAX"] + "b").match(/b/) ``` Crash can be reproduced on the following ruby versions: - ruby 3.2.0 (2022-12-25 revision a528908271) [aarch64-linux] - ruby 3.2.3 (2024-01-18 revision 52bb2ac0a6) [aarch64-linux] - ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [aarch64-linux] ruby 3.1.4p223 (2023-03-30 revision 957bb7cb81) [aarch64-linux] works as expected It seems that call to `enclen` inside `str_lower_case_match` returns negative offset in this case https://bugs.ruby-lang.org/projects/ruby-master/repository/git/revisions/v3… -- https://bugs.ruby-lang.org/
3 2
0 0
[ruby-core:118399] [Ruby master Bug#20598] Corruption of internal encoding string
by peterzhu2118 (Peter Zhu) 08 Jul '24

08 Jul '24
Issue #20598 has been reported by peterzhu2118 (Peter Zhu). ---------------------------------------- Bug #20598: Corruption of internal encoding string https://bugs.ruby-lang.org/issues/20598 * Author: peterzhu2118 (Peter Zhu) * Status: Open * Backport: 3.1: DONTNEED, 3.2: DONTNEED, 3.3: REQUIRED ---------------------------------------- GitHub PR: https://github.com/ruby/ruby/pull/11068 Just like #20595, Encoding#name_list and Encoding#aliases can have their strings corrupted when Encoding.default_internal is set to nil. -- https://bugs.ruby-lang.org/
2 1
0 0
[ruby-core:118391] [Ruby master Bug#20595] Corruption of encoding name string
by peterzhu2118 (Peter Zhu) 08 Jul '24

08 Jul '24
Issue #20595 has been reported by peterzhu2118 (Peter Zhu). ---------------------------------------- Bug #20595: Corruption of encoding name string https://bugs.ruby-lang.org/issues/20595 * Author: peterzhu2118 (Peter Zhu) * Status: Open * Backport: 3.1: DONTNEED, 3.2: DONTNEED, 3.3: REQUIRED ---------------------------------------- GitHub PR: https://github.com/ruby/ruby/pull/11062 enc_set_default_encoding will free the C string if the encoding is nil, but the C string can be used by the encoding name string. This will cause the encoding name string to be corrupted. Consider the following code: ```ruby Encoding.default_internal = Encoding::ASCII_8BIT names = Encoding.default_internal.names p names Encoding.default_internal = nil p names ``` It outputs: ``` ["ASCII-8BIT", "BINARY", "internal"] ["ASCII-8BIT", "BINARY", "\x00\x00\x00\x00\x00\x00\x00\x00"] ``` -- https://bugs.ruby-lang.org/
2 2
0 0
[ruby-core:118345] [Ruby master Bug#20585] Size of memory allocated by String.new(:capacity) is different from the specified value
by os (Shigeki OHARA) 08 Jul '24

08 Jul '24
Issue #20585 has been reported by os (Shigeki OHARA). ---------------------------------------- Bug #20585: Size of memory allocated by String.new(:capacity) is different from the specified value https://bugs.ruby-lang.org/issues/20585 * Author: os (Shigeki OHARA) * Status: Open * ruby -v: ruby 3.3.2 (2024-05-30 revision e5a195edf6) [x86_64-freebsd14.0] * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- IMHO, if :capacity is specified in String.new, capa will be its value. In fact, Ruby 3.2 seems to allocate the size as specified. ``` % cat string_capacity.rb unless /\A3\.[23]\./ =~ RUBY_VERSION raise NotImplementedError, 'Not Supported Ruby Version' end require 'inline' class String def super_inspect self.class.superclass.instance_method(:inspect).bind(self).call end inline do |builder| builder.include '<stdio.h>' builder.add_compile_flags '-Wall' builder.c_raw <<~CODE VALUE capacity(int argc, VALUE *argv, VALUE self) { struct RString *rstring = RSTRING(self); if (! (RBASIC(self)->flags & RSTRING_NOEMBED)) { return rb_to_symbol(rb_str_new_cstr("EMBED")); } else { if (RBASIC(self)->flags & ELTS_SHARED) { return rb_to_symbol(rb_str_new_cstr("SHARED")); } else { return LONG2NUM(rstring->as.heap.aux.capa); } } return Qnil; /* NOTREACHED */ } CODE end end ``` ``` % irb -I. -rstring_capacity irb(main):001:0> [RUBY_PLATFORM, RUBY_VERSION] => ["x86_64-freebsd14.0", "3.2.4"] irb(main):002:0> String.new('', capacity: 1024).capacity => 1024 irb(main):003:0> String.new('*'*1024, capacity: 1024).capacity => 1024 irb(main):004:0> ``` This is what I expect. However, Ruby 3.3 seems to behave differently. ``` % irb -I. -rstring_capacity irb(main):001> [RUBY_PLATFORM, RUBY_VERSION] => ["x86_64-freebsd14.0", "3.3.2"] irb(main):002> String.new('', capacity: 1024).capacity => 1023 irb(main):003> String.new('*'*1024, capacity: 1024).capacity => 2047 irb(main):004> ``` * If only :capacity is specified, one byte less is allocated. * If the initial string and its bytesize are specified, about twice the size is allocated. Is this intentional? -- https://bugs.ruby-lang.org/
4 4
0 0
[ruby-core:118320] [Ruby master Bug#20581] Ruby 3.3.3 install has missing deps for bundled net-pop gem
by MatzFan (Bruce Steedman) 08 Jul '24

08 Jul '24
Issue #20581 has been reported by MatzFan (Bruce Steedman). ---------------------------------------- Bug #20581: Ruby 3.3.3 install has missing deps for bundled net-pop gem https://bugs.ruby-lang.org/issues/20581 * Author: MatzFan (Bruce Steedman) * Status: Open * ruby -v: ruby 3.3.3 (2024-06-12 revision f1c7b6f435) [x86_64-linux] * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- A stackoverflow question and answer has identified an issue with the Ruby 3.3.3 install which can cause a failure when bundler installs gem dependencies. https://stackoverflow.com/a/78620570/4114896 A workaround has been described. There is a related issue with the net-pop gem here: https://github.com/ruby/net-pop/issues/26 -- https://bugs.ruby-lang.org/
3 3
0 0
[ruby-core:118226] [Ruby master Bug#20562] Categorize `RUBY_FREE_AT_EXIT` warning
by nobu (Nobuyoshi Nakada) 08 Jul '24

08 Jul '24
Issue #20562 has been reported by nobu (Nobuyoshi Nakada). ---------------------------------------- Bug #20562: Categorize `RUBY_FREE_AT_EXIT` warning https://bugs.ruby-lang.org/issues/20562 * Author: nobu (Nobuyoshi Nakada) * Status: Open * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- ```sh $ RUBY_FREE_AT_EXIT=1 ruby -W:no-experimental -ep ruby: warning: Free at exit is experimental and may be unstable ``` It should be categorized as experimental as its message. -- https://bugs.ruby-lang.org/
2 1
0 0
[ruby-core:118417] [Ruby master Bug#20602] RangeError: integer 128496650801200 too big to convert to 'int' without YJIT since cdf33ed5f37f9649c482c3ba1d245f0d80ac01ce
by yahonda (Yasuo Honda) 08 Jul '24

08 Jul '24
Issue #20602 has been reported by yahonda (Yasuo Honda). ---------------------------------------- Bug #20602: RangeError: integer 128496650801200 too big to convert to 'int' without YJIT since cdf33ed5f37f9649c482c3ba1d245f0d80ac01ce https://bugs.ruby-lang.org/issues/20602 * Author: yahonda (Yasuo Honda) * Status: Open * ruby -v: ruby 3.4.0dev (2024-07-02T11:33:48Z master cee62c6738) [x86_64-linux] * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- I have opened https://bugs.ruby-lang.org/issues/20588 and the test case has been fixed via 4cbc41d5e5cb6793174d5964975fdb4470323ca1 , It looks like there are another test case that still reproduces against the latest master branch like cee62c6738c42ce774e96e180cf2d46afb8e9cbe since cdf33ed5f37f9649c482c3ba1d245f0d80ac01ce ### Steps to reproduce ``` git clone https://github.com/rails/rails cd rails/activejob bundle install AJ_ADAPTER=test bin/test "test/cases/test_helper_test.rb" --seed 36347 -n "/^(?:EnqueuedJobsTest#(?:test_assert_enqueued_with_supports_matcher_procs|test_assert_no_enqueued_jobs_with_except_and_queue_option))$/" ``` ### Expected behavior It should pass. ### Actual behavior It always gets the RangeError. ``` $ AJ_ADAPTER=test bin/test "test/cases/test_helper_test.rb" --seed 36347 -n "/^(?:EnqueuedJobsTest#(?:test_assert_enqueued_with_supports_matcher_procs|test_assert_no_enqueued_jobs_with_except_and_queue_option))$/" /home/yahonda/rails/activesupport/lib/active_support/logger_thread_safe_level.rb:4: warning: logger was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.5.0. Add logger to your Gemfile or gemspec. Using test Run options: --seed 36347 -n "/^(?:EnqueuedJobsTest#(?:test_assert_enqueued_with_supports_matcher_procs|test_assert_no_enqueued_jobs_with_except_and_queue_option))$/" # Running: .E Error: EnqueuedJobsTest#test_assert_no_enqueued_jobs_with_except_and_queue_option: RangeError: integer 136797572683520 too big to convert to 'int' lib/active_job/configured_job.rb:15:in 'ActiveJob::ConfiguredJob#perform_later' test/cases/test_helper_test.rb:496:in 'block (2 levels) in EnqueuedJobsTest#test_assert_no_enqueued_jobs_with_except_and_queue_option' /home/yahonda/rails/activesupport/lib/active_support/testing/assertions.rb:49:in 'ActiveSupport::Testing::Assertions#assert_nothing_raised' /home/yahonda/rails/activesupport/lib/active_support/testing/assertions.rb:266:in 'ActiveSupport::Testing::Assertions#_assert_nothing_raised_or_warn' lib/active_job/test_helper.rb:128:in 'ActiveJob::TestHelper#assert_enqueued_jobs' lib/active_job/test_helper.rb:189:in 'ActiveJob::TestHelper#assert_no_enqueued_jobs' test/cases/test_helper_test.rb:495:in 'block in EnqueuedJobsTest#test_assert_no_enqueued_jobs_with_except_and_queue_option' /home/yahonda/rails/activesupport/lib/active_support/testing/assertions.rb:49:in 'ActiveSupport::Testing::Assertions#assert_nothing_raised' test/cases/test_helper_test.rb:494:in 'EnqueuedJobsTest#test_assert_no_enqueued_jobs_with_except_and_queue_option' bin/test test/cases/test_helper_test.rb:493 Finished in 0.010521s, 190.0966 runs/s, 1140.5794 assertions/s. 2 runs, 12 assertions, 0 failures, 1 errors, 0 skips $ ``` -- https://bugs.ruby-lang.org/
2 1
0 0
[ruby-core:118484] [Ruby master Bug#20616] <jemalloc>: Error in munmap(): Invalid argument
by damuz91 08 Jul '24

08 Jul '24
Issue #20616 has been reported by damuz91 (David Muñoz). ---------------------------------------- Bug #20616: <jemalloc>: Error in munmap(): Invalid argument https://bugs.ruby-lang.org/issues/20616 * Author: damuz91 (David Muñoz) * Status: Open * ruby -v: 3.3.2 * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- Good day! Description: I am getting the following error randomly. I run the offending code every 10 minutes and some times it crashes and some it doesn't, I am clueless. The error states: ``` <jemalloc>: Error in munmap(): Invalid argument [BUG] Segmentation fault at 0x0000ffff69bfe000 ruby 3.3.2 (2024-05-30 revision e5a195edf6) [aarch64-linux] ``` I've published the backtrace: https://gist.github.com/damuz91/429bed215c7ff13ee33e3968d52a4729 My app runs Sidekiq which runs the offending code, i've submitted the code in Sidekiq but maintainer says it's not related to Sidekiq. ``` OS: Amazon Linux 2 aarch64 Ruby version: 3.3.2 Rails version: 7.1.3.4 ``` The offending line states: ``` Jul 05 05:00:01 subsystems-sync sidekiq[11766]: c:0048 p:0049 s:0277 e:000276 METHOD /home/ec2-user/production/sync-backend/releases/370/app/services/scheduler/partial_sync_scheduler_job.rb:6 ``` and my source code looks like this: ``` class Scheduler::PartialSyncSchedulerJob include Sidekiq::Job def perform(location_ids = []) locations = location_ids.any? ? Location.where(id: location_ids) : Location.enabled.should_sync.includes(:customer).where.not(customers: {service_object: ['xxx', 'yyy']}) locations.each do |location| # <- Line 6 if location.use_workflow PartialSync::Workflow.perform_async(location.id) else queue = location.customer.service_object.underscore.to_sym Sync::PartialSyncJob.set(queue: queue).perform_later(location.id) end end end end ``` I am not sure where to start looking, I would really appreciate any insight to try to find out if this is indeed a bug in Ruby or if this is a jemalloc issue. Thanks in advance. -- https://bugs.ruby-lang.org/
2 1
0 0
[ruby-core:118482] [Ruby master Feature#20613] Implement shadow stack part of (CET) for coroutines
by vo.x (Vit Ondruch) 08 Jul '24

08 Jul '24
Issue #20613 has been reported by vo.x (Vit Ondruch). ---------------------------------------- Feature #20613: Implement shadow stack part of (CET) for coroutines https://bugs.ruby-lang.org/issues/20613 * Author: vo.x (Vit Ondruch) * Status: Open ---------------------------------------- To fully enable CET, shadow stack needs to be implemented for coroutines. The initial implementation was proposed [here](https://github.com/ruby/ruby/pull/5895) by @ioquatix as part of #18061 -- https://bugs.ruby-lang.org/
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.