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
  • ----- 2026 -----
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • 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

April 2023

  • 2 participants
  • 193 discussions
[ruby-core:112948] [Ruby master Bug#19543] Resizing IO::Buffer to zero bytes fails
by hanazuki (Kasumi Hanazuki) 25 Jul '23

25 Jul '23
Issue #19543 has been reported by hanazuki (Kasumi Hanazuki). ---------------------------------------- Bug #19543: Resizing IO::Buffer to zero bytes fails https://bugs.ruby-lang.org/issues/19543 * Author: hanazuki (Kasumi Hanazuki) * Status: Open * Priority: Normal * ruby -v: ruby 3.3.0dev (2023-03-20T04:02:21Z master 7f696b8859) [x86_64-linux] * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- ``` irb(main):001:0> IO::Buffer.new(1).resize(0) /home/kasumi/.local/src/github.com/ruby/ruby/-e:1: warning: IO::Buffer is experimental and both the Ruby and C interface may change in the future! /home/kasumi/.local/src/github.com/ruby/ruby/-e:1: [BUG] rb_sys_fail(rb_io_buffer_resize:realloc) - errno == 0 ruby 3.3.0dev (2023-03-20T04:02:21Z master 7f696b8859) [x86_64-linux] # full trace is attached to this ticket ``` `IO::Buffer#resize(0)` will result in calling `realloc(data->base, size)` with size = 0 in [rb_io_buffer_resize](https://bugs.ruby-lang.org/projects/ruby-master/reposi…. Zero-sized `realloc` is deprecated in C (and will be UB in C23). ---Files-------------------------------- bug.txt (40 KB) -- https://bugs.ruby-lang.org/
4 5
0 0
[ruby-core:111698] [Ruby master Bug#19318] Float#round rounds incorrectly for some cases
by Eregon (Benoit Daloze) 25 Jul '23

25 Jul '23
Issue #19318 has been reported by Eregon (Benoit Daloze). ---------------------------------------- Bug #19318: Float#round rounds incorrectly for some cases https://bugs.ruby-lang.org/issues/19318 * Author: Eregon (Benoit Daloze) * Status: Open * Priority: Normal * Backport: 2.7: UNKNOWN, 3.0: REQUIRED, 3.1: REQUIRED, 3.2: REQUIRED ---------------------------------------- This was discovered by @aardvark179. The following spec in `spec/ruby/core/float/round_spec.rb` fails on CRuby: ```ruby ruby_bug "", ""..."3.3" do # These numbers are neighbouring floating point numbers round a # precise value. They test that the rounding modes work correctly # round that value and precision is not lost which might cause # incorrect results. it "does not lose precision during the rounding process" do 767573.1875850001.round(5, half: nil).should eql(767573.18759) 767573.1875850001.round(5, half: :up).should eql(767573.18759) 767573.1875850001.round(5, half: :down).should eql(767573.18759) 767573.1875850001.round(5, half: :even).should eql(767573.18759) -767573.1875850001.round(5, half: nil).should eql(-767573.18759) -767573.1875850001.round(5, half: :up).should eql(-767573.18759) -767573.1875850001.round(5, half: :down).should eql(-767573.18759) -767573.1875850001.round(5, half: :even).should eql(-767573.18759) 767573.187585.round(5, half: nil).should eql(767573.18759) 767573.187585.round(5, half: :up).should eql(767573.18759) 767573.187585.round(5, half: :down).should eql(767573.18758) 767573.187585.round(5, half: :even).should eql(767573.18758) -767573.187585.round(5, half: nil).should eql(-767573.18759) -767573.187585.round(5, half: :up).should eql(-767573.18759) -767573.187585.round(5, half: :down).should eql(-767573.18758) -767573.187585.round(5, half: :even).should eql(-767573.18758) 767573.1875849998.round(5, half: nil).should eql(767573.18758) 767573.1875849998.round(5, half: :up).should eql(767573.18758) 767573.1875849998.round(5, half: :down).should eql(767573.18758) 767573.1875849998.round(5, half: :even).should eql(767573.18758) -767573.1875849998.round(5, half: nil).should eql(-767573.18758) -767573.1875849998.round(5, half: :up).should eql(-767573.18758) -767573.1875849998.round(5, half: :down).should eql(-767573.18758) -767573.1875849998.round(5, half: :even).should eql(-767573.18758) end end ``` Yet this test to the best of our knowledge is correct. This was fixed on master by @mrkn in https://github.com/ruby/ruby/pull/7023 (thanks!). The question is should we backport this? I think yes. -- https://bugs.ruby-lang.org/
3 2
0 0
[ruby-core:112146] [Ruby master Bug#19394] cvars in instance of cloned class point to source class's cvars even after class_variable_set on clone
by jamescdavis (James Davis) 25 Jul '23

25 Jul '23
Issue #19394 has been reported by jamescdavis (James Davis). ---------------------------------------- Bug #19394: cvars in instance of cloned class point to source class's cvars even after class_variable_set on clone https://bugs.ruby-lang.org/issues/19394 * Author: jamescdavis (James Davis) * Status: Open * Priority: Normal * ruby -v: ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [x86_64-darwin21] * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- This unexpected change in behavior happens between Ruby 3.0.x and 3.1.x. In Ruby >= 3.1, when a class with a cvar is cloned (or duped), the cvar in instances of the cloned class continues to point to the source class’s cvar after the clone has its cvar updated with `class_variable_set`. In Ruby < 3.1, the cloned class instance points to the updated cvar, as expected. It seems likely that this is a bug in the [cvar cache](https://bugs.ruby-lang.org/issues/17763) introduced in Ruby 3.1. Repro: ```rb class Foo @@bar = 'bar' def print_bar puts "#{self.class.name} (from instance): #{@@bar} #{@@bar.object_id}" end end foo_bar = Foo.class_variable_get(:@@bar) puts "Foo (class_variable_get): #{foo_bar} #{foo_bar.object_id}" Foo.new.print_bar FooClone = Foo.clone FooClone.class_variable_set(:@@bar, 'bar_clone') foo_clone_bar = FooClone.class_variable_get(:@@bar) puts "FooClone (class_variable_get): #{foo_clone_bar} #{foo_clone_bar.object_id}" FooClone.new.print_bar ``` Ruby 3.0.5: ``` Foo (class_variable_get): bar 60 Foo (from instance): bar 60 FooClone (class_variable_get): bar_clone 80 FooClone (from instance): bar_clone 80 ``` Ruby 3.1.3, 3.2.0: ``` Foo (class_variable_get): bar 60 Foo (from instance): bar 60 FooClone (class_variable_get): bar_clone 80 FooClone (from instance): bar 60 ``` Something similar happens when there are multiple clones and a cvar that the source class does not have defined is set on the clones. In this case, the cvars in instances of the clones all point to the first clone’s cvar. Repro: ```rb class Foo def print_bar puts "#{self.class.name} (from instance): #{@@bar} #{@@bar.object_id}" end end Foo1 = Foo.clone Foo2 = Foo.clone Foo3 = Foo.clone Foo1.class_variable_set(:@@bar, 'bar1') Foo2.class_variable_set(:@@bar, 'bar2') Foo3.class_variable_set(:@@bar, 'bar3') foo1_bar = Foo1.class_variable_get(:@@bar) foo2_bar = Foo2.class_variable_get(:@@bar) foo3_bar = Foo3.class_variable_get(:@@bar) puts "Foo1 (class_variable_get): #{foo1_bar} #{foo1_bar.object_id}" puts "Foo2 (class_variable_get): #{foo2_bar} #{foo2_bar.object_id}" puts "Foo3 (class_variable_get): #{foo3_bar} #{foo3_bar.object_id}" Foo1.new.print_bar Foo2.new.print_bar Foo3.new.print_bar ``` Ruby 3.0.5: ``` Foo1 (class_variable_get): bar1 60 Foo2 (class_variable_get): bar2 80 Foo3 (class_variable_get): bar3 100 Foo1 (from instance): bar1 60 Foo2 (from instance): bar2 80 Foo3 (from instance): bar3 100 ``` Ruby 3.1.3, 3.2.0: ``` Foo1 (class_variable_get): bar1 60 Foo2 (class_variable_get): bar2 80 Foo3 (class_variable_get): bar3 100 Foo1 (from instance): bar1 60 Foo2 (from instance): bar1 60 Foo3 (from instance): bar1 60 ``` -- https://bugs.ruby-lang.org/
5 7
0 0
[ruby-core:111565] [Ruby master Bug#19293] The new Time.new(String) API is nice... but we still need a stricter version of this
by matsuda (Akira Matsuda) 22 Jul '23

22 Jul '23
Issue #19293 has been reported by matsuda (Akira Matsuda). ---------------------------------------- Bug #19293: The new Time.new(String) API is nice... but we still need a stricter version of this https://bugs.ruby-lang.org/issues/19293 * Author: matsuda (Akira Matsuda) * Status: Open * Priority: Normal * ruby -v: ruby 3.3.0dev (2023-01-01T07:39:00Z master 542e984d82) +YJIT [arm64-darwin21] * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- The Ruby 3.2 style `Time.new(String)` API works very well so far, but since the original `Time.new(Integer, Integer, Integer...)` API actually accepts String objects as its arguments, there's one ambiguous case as follows: `Time.new('20230123') #=> 20230123-01-01 00:00:00 +0900` Then the problem that I'm facing is that we cannot tell if `Time.new` would parse the given String as ISO8601-ish or just a year, and in order to avoid this ambiguity, we still need to somehow parse the String beforehand in our application side (like we're doing this way in Ruby on Rails https://github.com/rails/rails/blob/c49b8270/activemodel/lib/active_model/t…) then dispatch to the new `Time.new` only when the String is validated to be conforming the ISO format. Otherwise, if we just optimistically pass in given Strings to `Time.new`, we'll occasionally get a Time object with an unintended buggy value. Therefore, it unfortunately seems that my feature request on #16005 still continues... I have to keep proposing that we need either of the following: 1. A trustworthy version of ISO8601 parser method perhaps with another name than `.new` that accepts strict ISO8601-ish String only (but with the T delimiter, I still don't know what the proper name of this format is). 2. Change `Time.new(Integer-ish, Integer-ish, Integer-ish...)` not to accept Integer-ish Strings but to accept only Integers. But I can imagine that this direction is very unlikely acceptable, due to the incompatibility. -- https://bugs.ruby-lang.org/
7 7
0 0
[ruby-core:113160] [Ruby master Bug#19585] Ruby Fails to Build on macOS with --enable-shared and --with-jemalloc
by eviljoel (evil joel) 21 Jul '23

21 Jul '23
Issue #19585 has been reported by eviljoel (evil joel). ---------------------------------------- Bug #19585: Ruby Fails to Build on macOS with --enable-shared and --with-jemalloc https://bugs.ruby-lang.org/issues/19585 * Author: eviljoel (evil joel) * Status: Open * Priority: Normal * ruby -v: 3.2.2, 3.1.3 * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- Ruby fails to build on macOS 12.6.4 when configured with --enable-shared and --with-jemalloc. I receive the following linking error: ``` building spec/ruby/optional/capi/ext/bignum_spec.bundle Undefined symbols for architecture x86_64: "_je_free", referenced from: _bignum_spec_rb_big_pack_array in bignum_spec-f7dc36.o "_je_malloc", referenced from: _bignum_spec_rb_big_pack_array in bignum_spec-f7dc36.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [spec/ruby/optional/capi/ext/bignum_spec.bundle] Error 1 ``` It appears that the bignum C API spec requires "-undefined dynamic_lookup" to be enabled. I can get the build to succeed with: ``` ./configure --enable-shared --with-jemalloc DLDFLAGS='-Wl,-undefined,dynamic_lookup' ``` I’ve created several bash scripts to demonstrate that: 1) This is an error with the current production release of Ruby. Running jemallocBug-ruby3.2.2-20230407.sh demonstrates that building Ruby with these parameters fails in Ruby 3.2.2. 2) This is a regression in at least the Ruby 3.1 branch. Running jemallocSucceeds-ruby3.1.2-20230407.sh demonstrates that building Ruby with these parameters worked with Ruby 3.1.2 and running jemallocBug-ruby3.1.3-20230407.sh demonstrates that building Ruby with these parameters fails in Ruby 3.1.3. In the Ruby 3.1 branch, the first commit where this broke appears to be 2244fc9aa7ef8e03ac966e59b581baa021106b46. ld version information: ``` $ ld -v @(#)PROGRAM:ld PROJECT:ld64-820.1 BUILD 20:07:01 Nov 7 2022 configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em LTO support using: LLVM version 14.0.0, (clang-1400.0.29.202) (static support for 29, runtime is 29) TAPI support using: Apple TAPI version 14.0.0 (tapi-1400.0.11) $ ``` clang version information: ``` $ clang -v Apple clang version 14.0.0 (clang-1400.0.29.202) Target: x86_64-apple-darwin21.6.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin $ ``` I’m using jemalloc version 5.3.0. MacBook Specs are: ``` Model: MacBook Pro (16-inch, 2019) Processor: 2.4 GHz 8-Core Intel Core i9 Memory: 32 GB 2667 MHz DDR4 Graphics: AMD Radeon Pro 5300M 4 GB and Intel UHD Graphics 630 1536 MB ``` I’ve attached the config.log and config.status for the failed Ruby 3.2.2 build. Please let me know if you need any more information. ---Files-------------------------------- jemallocSucceeds-ruby3.1.2-20230407.sh (804 Bytes) jemallocBug-ruby3.2.2-20230407.sh (804 Bytes) jemallocBug-ruby3.1.3-20230407.sh (804 Bytes) ruby-3.2.2-config.status (34.4 KB) ruby-3.2.2-config.log (1.57 MB) -- https://bugs.ruby-lang.org/
4 3
0 0
[ruby-core:112918] [Ruby master Bug#19532] Handling of 6-byte codepoints in left_adjust_char_head in CESU-8 encoding is broken
by Eregon (Benoit Daloze) 21 Jul '23

21 Jul '23
Issue #19532 has been reported by Eregon (Benoit Daloze). ---------------------------------------- Bug #19532: Handling of 6-byte codepoints in left_adjust_char_head in CESU-8 encoding is broken https://bugs.ruby-lang.org/issues/19532 * Author: Eregon (Benoit Daloze) * Status: Open * Priority: Normal * Backport: 2.7: UNKNOWN, 3.0: REQUIRED, 3.1: REQUIRED, 3.2: REQUIRED ---------------------------------------- Fix in https://github.com/ruby/ruby/pull/7510 -- https://bugs.ruby-lang.org/
4 3
0 0
[ruby-core:112926] [Ruby master Misc#19535] Instance variables order is unpredictable on objects with `OBJ_TOO_COMPLEX_SHAPE_ID`
by byroot (Jean Boussier) 21 Jul '23

21 Jul '23
Issue #19535 has been reported by byroot (Jean Boussier). ---------------------------------------- Misc #19535: Instance variables order is unpredictable on objects with `OBJ_TOO_COMPLEX_SHAPE_ID` https://bugs.ruby-lang.org/issues/19535 * Author: byroot (Jean Boussier) * Status: Open * Priority: Normal ---------------------------------------- ### Context I've been helping the Mastodon folks in investigating a weird Marshal deserialization bug they randomly experience since they upgraded to Ruby 3.2: https://github.com/mastodon/mastodon/issues/23644 Ultimately the bug comes from a circular dependency issues in the object graph that is serialized when one call `Marshal.dump` on an `ActiveRecord::Base` object. A simplified reproduction to better explain the problem is: ```ruby class Status def normal_order @attributes = { id: 42 } @relations = { self => 1 } self end def inverse_order @relations = nil @attributes = { id: 42 } @relations = { self => 1 } self end def hash @attributes.fetch(:id) end end s = Marshal.load(Marshal.dump(Status.new.normal_order)) s = Marshal.load(Marshal.dump(Status.new.inverse_order)) ``` In short, that `Status` object is both the top level object, and is referenced as a key in a hash, in that same payload. It also defined a custom `#hash` method, that requires some other attribute to be set. It all "works" as long as `@attributes` is dumped before `@relations`. ### Problem The above micro-reproduction uses two different shapes to demonstrate the ordering issues, but in both case the ordering is predictable. However if you generate too many shapes from a single class, it will be marked as `TOO_COMPLEX` and future instance will have their instance variables backed by an `id_table`, which is unordered, and will cause a similar issue. I definitely consider this a bug on the Rails side, and I will do what I can so that Rails doesn't depend on that implicit ordering. However it's unlikely we'll be able to fix older version, and other users may run into this issue when upgrading to Ruby 3.2, so I think it may be worth to try to preserve some sort of predicable ordering, at least for a few more versions. Additionally, debugging it was made particularly difficult, because it would work fine initially, and then break after enough shapes had been generated. Generally speaking I think such semi-predictable behavior is much worse than a fully random behavior (similar to how Go randomize keys order in their maps). ### Historical behavior On Ruby 3.1 and older, the instance variables ordering was defined by the order in which each ivar appeared for the very first time: ```ruby class Foo def set @a = 1 @b = 2 @c = 3 self end def inverse_order @c = 3 @b = 2 @a = 1 self end end p Foo.new.set.instance_variables # => [:@a, :@b, :@c] p Foo.new.inverse_order.instance_variables # => [:@a, :@b, :@c] ``` This means that the order could be different from once execution of the program to another, but would remain stable inside a single process. On 3.2, it's now defined by the order in which each ivar appeared in that specific object instance: ```ruby [:@a, :@b, :@c] [:@c, :@b, :@a] ``` Except, if the object is backed by an `id_table`, in which case it's fully unpredictable. ### Possible changes I discussed this with @tenderlovemaking, and he suggested we could change the `id_table` for an `st_table` so that the ordering could be predictable again, and would behave like objects with a non-complex shape. Another possibility would be to preserve the observable behavior of 3.1 and older. Or of course we could clearly specify that the ordering is random, but if so I think it would be wise to make it always random so that this class of bugs has a much higher chance to be caught early in testing rather than in production. cc @Eregon as I presume this has implications on TruffleRuby as well. -- https://bugs.ruby-lang.org/
5 7
0 0
[ruby-core:113380] [Ruby master Bug#19623] Ruby 3.2 MJIT crashes on railsbench
by k0kubun (Takashi Kokubun) 21 Jul '23

21 Jul '23
Issue #19623 has been reported by k0kubun (Takashi Kokubun). ---------------------------------------- Bug #19623: Ruby 3.2 MJIT crashes on railsbench https://bugs.ruby-lang.org/issues/19623 * Author: k0kubun (Takashi Kokubun) * Status: Closed * Priority: Normal * Backport: 3.0: DONTNEED, 3.1: DONTNEED, 3.2: REQUIRED ---------------------------------------- Ruby 3.2 MJIT crashes on railsbench when you use `--mjit-max-cache=10000`. ``` [2023-04-29T22:49:00.915217 #412381] FATAL -- : [bc56d52f-5930-4307-8af7-3f58a44eb089] [bc56d52f-5930-4307-8af7-3f58a44eb089] NoMethodError (undefined method `[]' for #<Class:Object>): [bc56d52f-5930-4307-8af7-3f58a44eb089] [bc56d52f-5930-4307-8af7-3f58a44eb089] activesupport (6.0.4) lib/active_support/inflector/inflections.rb:65:in `instance' [bc56d52f-5930-4307-8af7-3f58a44eb089] activesupport (6.0.4) lib/active_support/inflector/inflections.rb:252:in `inflections' [bc56d52f-5930-4307-8af7-3f58a44eb089] activesupport (6.0.4) lib/active_support/inflector/methods.rb:71:in `block in camelize' [bc56d52f-5930-4307-8af7-3f58a44eb089] activesupport (6.0.4) lib/active_support/inflector/methods.rb:71:in `sub' [bc56d52f-5930-4307-8af7-3f58a44eb089] activesupport (6.0.4) lib/active_support/inflector/methods.rb:71:in `camelize' [bc56d52f-5930-4307-8af7-3f58a44eb089] activesupport (6.0.4) lib/active_support/core_ext/string/inflections.rb:94:in `camelize' [bc56d52f-5930-4307-8af7-3f58a44eb089] actionpack (6.0.4) lib/action_dispatch/http/request.rb:87:in `controller_class_for' [bc56d52f-5930-4307-8af7-3f58a44eb089] actionpack (6.0.4) lib/action_dispatch/http/parameters.rb:100:in `binary_params_for?' [bc56d52f-5930-4307-8af7-3f58a44eb089] actionpack (6.0.4) lib/action_dispatch/http/parameters.rb:91:in `set_binary_encoding' [bc56d52f-5930-4307-8af7-3f58a44eb089] actionpack (6.0.4) lib/action_dispatch/http/parameters.rb:69:in `path_parameters=' [bc56d52f-5930-4307-8af7-3f58a44eb089] actionpack (6.0.4) lib/action_dispatch/journey/router.rb:47:in `block in serve' [bc56d52f-5930-4307-8af7-3f58a44eb089] actionpack (6.0.4) lib/action_dispatch/journey/router.rb:32:in `each' [bc56d52f-5930-4307-8af7-3f58a44eb089] actionpack (6.0.4) lib/action_dispatch/journey/router.rb:32:in `serve' [bc56d52f-5930-4307-8af7-3f58a44eb089] actionpack (6.0.4) lib/action_dispatch/routing/route_set.rb:834:in `call' [bc56d52f-5930-4307-8af7-3f58a44eb089] rack (2.2.6.3) lib/rack/tempfile_reaper.rb:15:in `call' [bc56d52f-5930-4307-8af7-3f58a44eb089] rack (2.2.6.3) lib/rack/etag.rb:27:in `call' [bc56d52f-5930-4307-8af7-3f58a44eb089] rack (2.2.6.3) lib/rack/conditional_get.rb:27:in `call' [bc56d52f-5930-4307-8af7-3f58a44eb089] rack (2.2.6.3) lib/rack/head.rb:12:in `call' [bc56d52f-5930-4307-8af7-3f58a44eb089] actionpack (6.0.4) lib/action_dispatch/http/content_security_policy.rb:18:in `call' [bc56d52f-5930-4307-8af7-3f58a44eb089] rack (2.2.6.3) lib/rack/session/abstract/id.rb:266:in `context' [bc56d52f-5930-4307-8af7-3f58a44eb089] rack (2.2.6.3) lib/rack/session/abstract/id.rb:260:in `call' [bc56d52f-5930-4307-8af7-3f58a44eb089] actionpack (6.0.4) lib/action_dispatch/middleware/cookies.rb:654:in `call' [bc56d52f-5930-4307-8af7-3f58a44eb089] actionpack (6.0.4) lib/action_dispatch/middleware/callbacks.rb:27:in `block in call' [bc56d52f-5930-4307-8af7-3f58a44eb089] activesupport (6.0.4) lib/active_support/callbacks.rb:101:in `run_callbacks' [bc56d52f-5930-4307-8af7-3f58a44eb089] actionpack (6.0.4) lib/action_dispatch/middleware/callbacks.rb:26:in `call' [bc56d52f-5930-4307-8af7-3f58a44eb089] actionpack (6.0.4) lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call' [bc56d52f-5930-4307-8af7-3f58a44eb089] actionpack (6.0.4) lib/action_dispatch/middleware/debug_exceptions.rb:32:in `call' [bc56d52f-5930-4307-8af7-3f58a44eb089] actionpack (6.0.4) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call' [bc56d52f-5930-4307-8af7-3f58a44eb089] railties (6.0.4) lib/rails/rack/logger.rb:37:in `call_app' [bc56d52f-5930-4307-8af7-3f58a44eb089] railties (6.0.4) lib/rails/rack/logger.rb:26:in `block in call' [bc56d52f-5930-4307-8af7-3f58a44eb089] activesupport (6.0.4) lib/active_support/tagged_logging.rb:80:in `block in tagged' [bc56d52f-5930-4307-8af7-3f58a44eb089] activesupport (6.0.4) lib/active_support/tagged_logging.rb:28:in `tagged' [bc56d52f-5930-4307-8af7-3f58a44eb089] activesupport (6.0.4) lib/active_support/tagged_logging.rb:80:in `tagged' [bc56d52f-5930-4307-8af7-3f58a44eb089] railties (6.0.4) lib/rails/rack/logger.rb:26:in `call' [bc56d52f-5930-4307-8af7-3f58a44eb089] actionpack (6.0.4) lib/action_dispatch/middleware/remote_ip.rb:81:in `call' [bc56d52f-5930-4307-8af7-3f58a44eb089] actionpack (6.0.4) lib/action_dispatch/middleware/request_id.rb:27:in `call' [bc56d52f-5930-4307-8af7-3f58a44eb089] rack (2.2.6.3) lib/rack/method_override.rb:24:in `call' [bc56d52f-5930-4307-8af7-3f58a44eb089] rack (2.2.6.3) lib/rack/runtime.rb:22:in `call' [bc56d52f-5930-4307-8af7-3f58a44eb089] activesupport (6.0.4) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call' [bc56d52f-5930-4307-8af7-3f58a44eb089] actionpack (6.0.4) lib/action_dispatch/middleware/executor.rb:14:in `call' [bc56d52f-5930-4307-8af7-3f58a44eb089] rack (2.2.6.3) lib/rack/sendfile.rb:110:in `call' [bc56d52f-5930-4307-8af7-3f58a44eb089] actionpack (6.0.4) lib/action_dispatch/middleware/host_authorization.rb:76:in `call' [bc56d52f-5930-4307-8af7-3f58a44eb089] railties (6.0.4) lib/rails/engine.rb:527:in `call' [bc56d52f-5930-4307-8af7-3f58a44eb089] benchmarks/railsbench/benchmark.rb:28:in `block (2 levels) in <main>' [bc56d52f-5930-4307-8af7-3f58a44eb089] benchmarks/railsbench/benchmark.rb:25:in `each' [bc56d52f-5930-4307-8af7-3f58a44eb089] benchmarks/railsbench/benchmark.rb:25:in `block in <main>' [bc56d52f-5930-4307-8af7-3f58a44eb089] /home/k0kubun/src/github.com/Shopify/yjit-bench/harness/harness.rb:29:in `block in run_benchmark' [bc56d52f-5930-4307-8af7-3f58a44eb089] /opt/rubies/mjit/lib/ruby/3.2.0+3/benchmark.rb:311:in `realtime' [bc56d52f-5930-4307-8af7-3f58a44eb089] /home/k0kubun/src/github.com/Shopify/yjit-bench/harness/harness.rb:29:in `run_benchmark' [bc56d52f-5930-4307-8af7-3f58a44eb089] benchmarks/railsbench/benchmark.rb:24:in `<main>' ``` This PR https://github.com/ruby/ruby/pull/7774 fixes the problem. This ticket is to request a backport for Ruby 3.2. -- https://bugs.ruby-lang.org/
2 1
0 0
[ruby-core:113382] [Ruby master Bug#19625] Ruby 3.2 MJIT never triggers JIT compaction
by k0kubun (Takashi Kokubun) 21 Jul '23

21 Jul '23
Issue #19625 has been reported by k0kubun (Takashi Kokubun). ---------------------------------------- Bug #19625: Ruby 3.2 MJIT never triggers JIT compaction https://bugs.ruby-lang.org/issues/19625 * Author: k0kubun (Takashi Kokubun) * Status: Closed * Priority: Normal * Backport: 3.0: DONTNEED, 3.1: DONTNEED, 3.2: REQUIRED ---------------------------------------- [This patch](https://github.com/ruby/ruby/pull/6900) accidentally removed a condition to trigger JIT compaction from Ruby 3.2. This PR https://github.com/ruby/ruby/pull/7777 makes it work again. This ticket is to request a backport for Ruby 3.2. -- https://bugs.ruby-lang.org/
2 1
0 0
[ruby-core:112906] [Ruby master Bug#19531] ObjectSpace::WeakMap: replaced values still clear the key they were assigned to
by byroot (Jean Boussier) 21 Jul '23

21 Jul '23
Issue #19531 has been reported by byroot (Jean Boussier). ---------------------------------------- Bug #19531: ObjectSpace::WeakMap: replaced values still clear the key they were assigned to https://bugs.ruby-lang.org/issues/19531 * Author: byroot (Jean Boussier) * Status: Open * Priority: Normal * Backport: 2.7: WONTFIX, 3.0: REQUIRED, 3.1: REQUIRED, 3.2: REQUIRED ---------------------------------------- ### Reproduction script ```ruby wmap = ObjectSpace::WeakMap.new a = "A" b = "B" wmap[1] = a wmap[1] = b # the table entry with 1 is still in the list of entries to clear when `a` is GCed a = nil GC.start p wmap[1] # Should be `"B"`, but is `nil` ``` ### Explanation What happens is that when we set `wmap[1] = "A"`, WeakMap internally keeps a list of keys to clear when `"A"` is GCed, e.g. pseudo code: ```ruby class WeakMap def []=(key, value) @hash[key] = value @reverse[value] << key end end ``` But it doesn't clear previously kept mapping when a key is overwritten. I'll work on a fix. ### References https://github.com/protocolbuffers/protobuf/pull/12216 -- https://bugs.ruby-lang.org/
2 2
0 0
  • ← Newer
  • 1
  • ...
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • ...
  • 20
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.