From: "nagachika (Tomoyuki Chikanaga) via ruby-core" Date: 2026-11-15T13:02:46+00:00 Subject: [ruby-core:127497] [Ruby Bug#22548] Segfault after calling String#rindex repeatedly 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/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/