Project

General

Profile

Actions

Bug #19319

closed

Crash in rb_str_casemap

Added by peterzhu2118 (Peter Zhu) about 1 year ago. Updated about 1 year ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:111699]

Description

Fix here: https://github.com/ruby/ruby/pull/7080

The following code crashes on my machine:

GC.stress = true

str = "testing testing testing"

puts str.capitalize

I can repro this issue on Ruby 2.7.7, 3.0.5, 3.1.3, 3.2.0.

Actions #1

Updated by peterzhu2118 (Peter Zhu) about 1 year ago

  • Status changed from Open to Closed

Applied in changeset git|d8ef0a98c670449b20436947f5ebbd327ed5ab0d.


[Bug #19319] Fix crash in rb_str_casemap

The following code crashes on my machine:

GC.stress = true

str = "testing testing testing"

puts str.capitalize

We need to ensure that the object buffer_anchor remains on the stack
so it does not get GC'd.

Updated by naruse (Yui NARUSE) about 1 year ago

  • Backport changed from 2.7: REQUIRED, 3.0: REQUIRED, 3.1: REQUIRED, 3.2: REQUIRED to 2.7: REQUIRED, 3.0: REQUIRED, 3.1: REQUIRED, 3.2: DONE

ruby_3_2 686b38f83e70b3e1796092c71dd0b7dc2206b118 merged revision(s) d8ef0a98c670449b20436947f5ebbd327ed5ab0d.

Updated by nagachika (Tomoyuki Chikanaga) about 1 year ago

  • Backport changed from 2.7: REQUIRED, 3.0: REQUIRED, 3.1: REQUIRED, 3.2: DONE to 2.7: REQUIRED, 3.0: REQUIRED, 3.1: DONE, 3.2: DONE

ruby_3_1 159930b7857bd3fe603840f686edffb54693d2a7 merged revision(s) d8ef0a98c670449b20436947f5ebbd327ed5ab0d.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0