Actions
Bug #13339
closedAssertion Failed: string.c:2061:rb_str_change_terminator_length:capa >= len
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux]
Description
This makes ruby 2.4.0 crash on my system (log attached):
('a' * 23).encode('utf-16').encode!('utf-8')
If you change the length of the string (from 23 to 22 or 24), everything's fine.
Files
Updated by buehmann (Andreas Bühmann) over 7 years ago
- Description updated (diff)
Updated by nobu (Nobuyoshi Nakada) over 7 years ago
- Status changed from Open to Closed
Applied in changeset r58042.
string.c: use the usable size
- string.c (rb_str_change_terminator_length): when called after
the content has been copied, old terminator length no longer
makes sense. use the whole usable size instead of capacity
without terminator. [ruby-core:80257] [Bug #13339]
Updated by nagachika (Tomoyuki Chikanaga) over 7 years ago
- Backport changed from 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN to 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: REQUIRED
Updated by naruse (Yui NARUSE) over 7 years ago
- Backport changed from 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: REQUIRED to 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: DONE
ruby_2_4 r58046 merged revision(s) 58042.
Actions
Like0
Like0Like0Like0Like0