[MacRuby] #838: Assertion fails when use the String converted into "utf-16le".
#838: Assertion fails when use the String converted into "utf-16le". ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Test Script: {{{ #!ruby $ cat test_encode.rb begin "ff".encode("utf-16le").hex p "ng" rescue => e p e end begin "ff".encode("utf-16be").hex p "ng" rescue => e p e end }}} Result of Ruby 1.9.1: {{{ $ ruby test_encode.rb #<Encoding::CompatibilityError: ASCII incompatible encoding: UTF-16LE> #<Encoding::CompatibilityError: ASCII incompatible encoding: UTF-16BE> }}} Result of MacRuby Trunk: {{{ $ macruby test_encode.rb Assertion failed: (!str_is_stored_in_uchars(self)), function str_ensure_null_terminator, file string.c, line 720. zsh: abort macruby test_encode.rb }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/838> MacRuby <http://macruby.org/>
#838: Assertion fails when use #hex on String converted into "utf-16le". ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@…): The assertion seems to happen inside #hex. {{{ (gdb) bt #0 0x00007fff9cbf1b76 in __pthread_kill () #1 0x00007fff9cbf14ff in pthread_kill () #2 0x00007fff9cc06341 in abort () #3 0x00007fff9cc06272 in __assert_rtn () #4 0x00000001000b0ca6 in rb_str_cstr (str=<value temporarily unavailable, due to optimizations>) at string.c:720 #5 0x000000010000fbf9 in rb_str_to_inum (str=17184872512, base=16, badcheck=0) at bignum.c:600 #6 0x000000010012d566 in rb_vm_dispatch (_vm=0x100b166c0, cache=0x100fb2b40, top=17184163360, self=17184872512, klass=0x40030b1e0, sel=0x100baed00, block=0x0, opt=0 '\0', argc=<value temporarily unavailable, due to optimizations>, argv=0x0) at dispatcher.cpp:159 }}} Renamed the ticket accordingly. -- Ticket URL: <http://www.macruby.org/trac/ticket/838#comment:1> MacRuby <http://macruby.org/>
#838: Assertion fails when use #hex on String converted into "utf-16le". ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.7 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Changes (by lsansonetti@…): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.7 Comment: Should be fixed in r4420 and r4421. -- Ticket URL: <http://www.macruby.org/trac/ticket/838#comment:2> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby