[ruby-core:127478] [Ruby Bug#22548] Segfault after calling String#rindex repeatedly
Issue #22548 has been reported by rdil (Reece Dunham). ---------------------------------------- Bug #22548: Segfault after calling String#rindex repeatedly https://bugs.ruby-lang.org/issues/22548 * Author: rdil (Reece Dunham) * Status: Open * ruby -v: 4.0.5 * Backport: 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN ---------------------------------------- Not sure what's going on, but this seems to be crashing our production application's Ruby instances in certain cases. I've managed to cut it down to just this minimum reproduction: ``` k = []; 3000.times { s = 'a' * 55; k << s; s.rindex('😀' * 4) } ``` I've reproduced on Ruby 3.3.13 and 4.0.5. (On macOS) -- https://bugs.ruby-lang.org/
Issue #22548 has been updated by jhawthorn (John Hawthorn). Looks like in master this is fixed by https://github.com/ruby/ruby/pull/18658 ---------------------------------------- Bug #22548: Segfault after calling String#rindex repeatedly https://bugs.ruby-lang.org/issues/22548#change-119945 * Author: rdil (Reece Dunham) * Status: Open * ruby -v: 4.0.5 * Backport: 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN ---------------------------------------- Not sure what's going on, but this seems to be crashing our production application's Ruby instances in certain cases. I've managed to cut it down to just this minimum reproduction: ``` k = []; 3000.times { s = 'a' * 55; k << s; s.rindex('😀' * 4) } ``` I've reproduced on Ruby 3.3.13 and 4.0.5. (On macOS) -- https://bugs.ruby-lang.org/
Issue #22548 has been updated by rdil (Reece Dunham). jhawthorn (John Hawthorn) wrote in #note-1:
Looks like in master this is fixed by https://github.com/ruby/ruby/pull/18658
Just tested and that seems right! Would it be possible to get a backport for that fix to the supported release lines? ---------------------------------------- Bug #22548: Segfault after calling String#rindex repeatedly https://bugs.ruby-lang.org/issues/22548#change-119950 * Author: rdil (Reece Dunham) * Status: Open * ruby -v: 4.0.5 * Backport: 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN ---------------------------------------- Not sure what's going on, but this seems to be crashing our production application's Ruby instances in certain cases. I've managed to cut it down to just this minimum reproduction: ``` k = []; 3000.times { s = 'a' * 55; k << s; s.rindex('😀' * 4) } ``` I've reproduced on Ruby 3.3.13 and 4.0.5. (On macOS) -- https://bugs.ruby-lang.org/
Issue #22548 has been updated by jhawthorn (John Hawthorn). 3.3: https://github.com/ruby/ruby/pull/19898 3.4: https://github.com/ruby/ruby/pull/19897 4.0: https://github.com/ruby/ruby/pull/19896 ---------------------------------------- Bug #22548: Segfault after calling String#rindex repeatedly https://bugs.ruby-lang.org/issues/22548#change-119962 * Author: rdil (Reece Dunham) * Status: Closed * ruby -v: 4.0.5 * Backport: 3.3: REQUIRED, 3.4: REQUIRED, 4.0: REQUIRED ---------------------------------------- Not sure what's going on, but this seems to be crashing our production application's Ruby instances in certain cases. I've managed to cut it down to just this minimum reproduction: ``` k = []; 3000.times { s = 'a' * 55; k << s; s.rindex('😀' * 4) } ``` I've reproduced on Ruby 3.3.13 and 4.0.5. (On macOS) -- https://bugs.ruby-lang.org/
Issue #22548 has been updated by nagachika (Tomoyuki Chikanaga). Backport changed from 3.3: REQUIRED, 3.4: REQUIRED, 4.0: REQUIRED to 3.3: REQUIRED, 3.4: DONE, 4.0: REQUIRED Thank you for filing PRs. Merged into `ruby_3_4` at https://github.com/ruby/ruby/commit/cbdc0c02bb9e527e5c94d75fd7c48024799f3b26. ---------------------------------------- Bug #22548: Segfault after calling String#rindex repeatedly https://bugs.ruby-lang.org/issues/22548#change-119965 * Author: rdil (Reece Dunham) * Status: Closed * ruby -v: 4.0.5 * Backport: 3.3: REQUIRED, 3.4: DONE, 4.0: REQUIRED ---------------------------------------- Not sure what's going on, but this seems to be crashing our production application's Ruby instances in certain cases. I've managed to cut it down to just this minimum reproduction: ``` k = []; 3000.times { s = 'a' * 55; k << s; s.rindex('😀' * 4) } ``` I've reproduced on Ruby 3.3.13 and 4.0.5. (On macOS) -- https://bugs.ruby-lang.org/
Issue #22548 has been updated by k0kubun (Takashi Kokubun). Backport changed from 3.3: REQUIRED, 3.4: DONE, 4.0: REQUIRED to 3.3: REQUIRED, 3.4: DONE, 4.0: DONE ruby_4_0 commit:a1ece71594c1e0881be1f0f9fa2e72c0ca15742d, commit:3a81f72c540393b4c2e57b79165b23726e0b850c, commit:8651cbd34a0f95be8233b97eaecd93eff0f57d13, commit:9f9f95cc367057436dc6af62ea671b20a5bf8dc2, commit:2d6077e1894629182024b25f168dc96febc7274e merged revision(s) commit:eb9df91618428695e6e8a236f4230c82eb7b8e8a, commit:4cf8d4f96e3561780aef526e639907f826a7558a, commit:ac9cc92a49dbdf821750ff3b8be3a0ed6109c789, commit:2cae75ab921092045db293fd3e761ebc6ecc9be3, commit:be00aa83bac2c09ddfc6ba8c5aaed5654b3ecc40. ---------------------------------------- Bug #22548: Segfault after calling String#rindex repeatedly https://bugs.ruby-lang.org/issues/22548#change-119989 * Author: rdil (Reece Dunham) * Status: Closed * ruby -v: 4.0.5 * Backport: 3.3: REQUIRED, 3.4: DONE, 4.0: DONE ---------------------------------------- Not sure what's going on, but this seems to be crashing our production application's Ruby instances in certain cases. I've managed to cut it down to just this minimum reproduction: ``` k = []; 3000.times { s = 'a' * 55; k << s; s.rindex('😀' * 4) } ``` I've reproduced on Ruby 3.3.13 and 4.0.5. (On macOS) -- https://bugs.ruby-lang.org/
participants (4)
-
jhawthorn (John Hawthorn) -
k0kubun (Takashi Kokubun) -
nagachika (Tomoyuki Chikanaga) -
rdil (Reece Dunham)