From: nagachika00@... Date: 2019-08-09T13:41:11+00:00 Subject: [ruby-core:94219] [Ruby master Bug#15937] Segmentation fault when String#initialize given same string with capacity field Issue #15937 has been updated by nagachika (Tomoyuki Chikanaga). Backport changed from 2.4: REQUIRED, 2.5: REQUIRED, 2.6: REQUIRED to 2.4: REQUIRED, 2.5: REQUIRED, 2.6: DONE ruby_2_6 r67738 merged revision(s) 28678997e40869f5591eae60edd9757334426ffb,8797f48373dcfa3ff8e748667732dea8aea4347e. ---------------------------------------- Bug #15937: Segmentation fault when String#initialize given same string with capacity field https://bugs.ruby-lang.org/issues/15937#change-80519 * Author: luke-gru (Luke Gruber) * Status: Closed * Priority: Normal * Assignee: * Target version: * ruby -v: * Backport: 2.4: REQUIRED, 2.5: REQUIRED, 2.6: DONE ---------------------------------------- Reproduction steps: string buffer corruption: ```ruby s = "mystring" s.__send__(:initialize, s, capacity: 1000) puts s ``` segfault: ```ruby s = "mystring that can't be embedded because it's too long and therefore must be allocated" s.__send__(:initialize, s, capacity: 1000) ``` Thanks for your time :) -- https://bugs.ruby-lang.org/ Unsubscribe: