From: "k0kubun (Takashi Kokubun) via ruby-core" Date: 2026-11-16T17:42:39+00:00 Subject: [ruby-core:127521] [Ruby Bug#22548] Segfault after calling String#rindex repeatedly 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/ ______________________________________________ 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/