[MacRuby-devel] [MacRuby] #544: NSBigMutableString#tr crashes

MacRuby ruby-noreply at macosforge.org
Wed Feb 10 06:32:11 PST 2010


#544: NSBigMutableString#tr crashes
----------------------------------------+-----------------------------------
 Reporter:  vincent.isambart@…          |       Owner:  lsansonetti@…        
     Type:  defect                      |      Status:  new                  
 Priority:  blocker                     |   Milestone:  MacRuby 0.5          
Component:  MacRuby                     |    Keywords:                       
----------------------------------------+-----------------------------------

Comment(by martinlagardette@…):

 In `string.c:str_charset_find:2901`, the following debug:
 {{{
     printf("CFStringRef len: %ld\n", CFStringGetLength(str));
     CFShowStr(str);
 }}}
 Shows this for an `NSMutableString`:
 {{{
 $ ./miniruby -e "NSMutableString.stringWithString('abcd').tr('a','b')"
 CFStringRef len: 4

 Length 4
 IsEightBit 1
 HasLengthByte 1
 HasNullByte 1
 InlineContents 0
 Allocator SystemDefault
 Mutable 1
 CurrentCapacity 32
 DesiredCapacity 32
 Contents 0x20004d9e0
 }}}
 But it shows this for an `NSBigMutableString`:
 {{{
 $ ./miniruby -e "NSBigMutableString.stringWithString('abcd').tr('a','b')"
 CFStringRef len: 8590253120
 This is an NSString, not CFString
 unknown: [BUG] Segmentation fault
 }}}

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/544#comment:1>
MacRuby <http://macruby.org/>



More information about the MacRuby-devel mailing list