[ruby-core:80266] [Ruby trunk Bug#13339] Assertion Failed: string.c:2061:rb_str_change_terminator_length:capa >= len

From: naruse@...
Date: 2017-03-21 14:12:12 UTC
List: ruby-core #80266
Issue #13339 has been updated by naruse (Yui NARUSE).

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.

----------------------------------------
Bug #13339: Assertion Failed: string.c:2061:rb_str_change_terminator_length:capa >= len
https://bugs.ruby-lang.org/issues/13339#change-63702

* Author: buehmann (Andreas B端hmann)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: DONE
----------------------------------------
This makes ruby 2.4.0 crash on my system (log attached):

```ruby
('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--------------------------------
bug.rb (45 Bytes)
crash.log (13.6 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next