[ruby-core:112052] [Ruby master Bug#19381] SEGV - ivars, both Ubuntu & Windows

Issue #19381 has been reported by MSP-Greg (Greg L). ---------------------------------------- Bug #19381: SEGV - ivars, both Ubuntu & Windows https://bugs.ruby-lang.org/issues/19381 * Author: MSP-Greg (Greg L) * Status: Open * Priority: Normal * ruby -v: ruby 3.3.0dev (2023-01-26T07:31:08Z master 6422fef90c) [x86_64-linux] * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- I've used code similar to the below for a long time. When max is set to 50, it runs. When max is set to 51, it SEGV faults. Rubies tested: ruby 3.3.0dev (2023-01-26T07:31:08Z master 6422fef90c) [x86_64-linux] ruby 3.3.0dev (2023-01-26T07:31:08Z master 6422fef90c) [x64-mingw-ucrt] ruby 3.3.0dev (2023-01-26T07:31:08Z master 6422fef90c) [x64-mswin64_140] I suspect it involves the changes in https://github.com/ruby/ruby/pull/7183 'Limit maximum number of IVs on a shape' ```ruby module Test class << self def run max = 51 (1..max).each do |v| instance_variable_set("@iv#{v}".to_sym, nil) end end end end Test.run puts Test.instance_variables ``` -- https://bugs.ruby-lang.org/

Issue #19381 has been updated by luke-gru (Luke Gruber). Recently there was a change to object shapes, and there were no tests made for that commit. I think they'll add some now :) The change is here, made on Jan. 25: https://github.com/ruby/ruby/commit/78fcc9847a9db6d42c8c263154ec05903a370b6b ---------------------------------------- Bug #19381: SEGV - ivars, both Ubuntu & Windows https://bugs.ruby-lang.org/issues/19381#change-101488 * Author: MSP-Greg (Greg L) * Status: Open * Priority: Normal * ruby -v: ruby 3.3.0dev (2023-01-26T07:31:08Z master 6422fef90c) [x86_64-linux] * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- I've used code similar to the below for a long time. When max is set to 50, it runs. When max is set to 51, it SEGV faults. Rubies tested: ruby 3.3.0dev (2023-01-26T07:31:08Z master 6422fef90c) [x86_64-linux] ruby 3.3.0dev (2023-01-26T07:31:08Z master 6422fef90c) [x64-mingw-ucrt] ruby 3.3.0dev (2023-01-26T07:31:08Z master 6422fef90c) [x64-mswin64_140] I suspect it involves the changes in https://github.com/ruby/ruby/pull/7183 'Limit maximum number of IVs on a shape' ```ruby module Test class << self def run max = 51 (1..max).each do |v| instance_variable_set("@iv#{v}".to_sym, nil) end end end end Test.run puts Test.instance_variables ``` -- https://bugs.ruby-lang.org/

Issue #19381 has been updated by MSP-Greg (Greg L). Thanks. That's the commit for the PR I listed (#7183). I should have listed it... ---------------------------------------- Bug #19381: SEGV - ivars, both Ubuntu & Windows https://bugs.ruby-lang.org/issues/19381#change-101489 * Author: MSP-Greg (Greg L) * Status: Open * Priority: Normal * ruby -v: ruby 3.3.0dev (2023-01-26T07:31:08Z master 6422fef90c) [x86_64-linux] * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- I've used code similar to the below for a long time. When max is set to 50, it runs. When max is set to 51, it SEGV faults. Rubies tested: ruby 3.3.0dev (2023-01-26T07:31:08Z master 6422fef90c) [x86_64-linux] ruby 3.3.0dev (2023-01-26T07:31:08Z master 6422fef90c) [x64-mingw-ucrt] ruby 3.3.0dev (2023-01-26T07:31:08Z master 6422fef90c) [x64-mswin64_140] I suspect it involves the changes in https://github.com/ruby/ruby/pull/7183 'Limit maximum number of IVs on a shape' ```ruby module Test class << self def run max = 51 (1..max).each do |v| instance_variable_set("@iv#{v}".to_sym, nil) end end end end Test.run puts Test.instance_variables ``` -- https://bugs.ruby-lang.org/

Issue #19381 has been updated by tenderlovemaking (Aaron Patterson). Thanks. I'm going to revert the commit for now. 🙇🏻♀️ ---------------------------------------- Bug #19381: SEGV - ivars, both Ubuntu & Windows https://bugs.ruby-lang.org/issues/19381#change-101490 * Author: MSP-Greg (Greg L) * Status: Open * Priority: Normal * ruby -v: ruby 3.3.0dev (2023-01-26T07:31:08Z master 6422fef90c) [x86_64-linux] * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- I've used code similar to the below for a long time. When max is set to 50, it runs. When max is set to 51, it SEGV faults. Rubies tested: ruby 3.3.0dev (2023-01-26T07:31:08Z master 6422fef90c) [x86_64-linux] ruby 3.3.0dev (2023-01-26T07:31:08Z master 6422fef90c) [x64-mingw-ucrt] ruby 3.3.0dev (2023-01-26T07:31:08Z master 6422fef90c) [x64-mswin64_140] I suspect it involves the changes in https://github.com/ruby/ruby/pull/7183 'Limit maximum number of IVs on a shape' ```ruby module Test class << self def run max = 51 (1..max).each do |v| instance_variable_set("@iv#{v}".to_sym, nil) end end end end Test.run puts Test.instance_variables ``` -- https://bugs.ruby-lang.org/

Issue #19381 has been updated by jeremyevans0 (Jeremy Evans). Status changed from Open to Closed Fixed by commit:28da9909849dc02abe74de8170fe4036534361ba ---------------------------------------- Bug #19381: SEGV - ivars, both Ubuntu & Windows https://bugs.ruby-lang.org/issues/19381#change-101783 * Author: MSP-Greg (Greg L) * Status: Closed * Priority: Normal * ruby -v: ruby 3.3.0dev (2023-01-26T07:31:08Z master 6422fef90c) [x86_64-linux] * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- I've used code similar to the below for a long time. When max is set to 50, it runs. When max is set to 51, it SEGV faults. Rubies tested: ruby 3.3.0dev (2023-01-26T07:31:08Z master 6422fef90c) [x86_64-linux] ruby 3.3.0dev (2023-01-26T07:31:08Z master 6422fef90c) [x64-mingw-ucrt] ruby 3.3.0dev (2023-01-26T07:31:08Z master 6422fef90c) [x64-mswin64_140] I suspect it involves the changes in https://github.com/ruby/ruby/pull/7183 'Limit maximum number of IVs on a shape' ```ruby module Test class << self def run max = 51 (1..max).each do |v| instance_variable_set("@iv#{v}".to_sym, nil) end end end end Test.run puts Test.instance_variables ``` -- https://bugs.ruby-lang.org/
participants (4)
-
jeremyevans0 (Jeremy Evans)
-
luke-gru (Luke Gruber)
-
MSP-Greg (Greg L)
-
tenderlovemaking (Aaron Patterson)