[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #28939] -[NSString getCString:] doesn't work
From: |
Fred Kiefer |
Subject: |
[bug #28939] -[NSString getCString:] doesn't work |
Date: |
Sun, 21 Feb 2010 00:24:38 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.1.7) Gecko/20091222 SUSE/3.5.7-1.1.1 Firefox/3.5.7 |
Follow-up Comment #4, bug #28939 (project gnustep):
Actually I am getting a segmentation fault from this code as well.
I am not able to get a proper back trace for this from gdb.
What I noticed is that in getCString_c we hid this condition
if (externalEncoding != internalEncoding)
(gdb) p externalEncoding
$1 = NSUTF8StringEncoding
(gdb) p internalEncoding
$2 = NSISOLatin1StringEncoding
And when I follow the code further down I get:
1463 tmp = NSZoneMalloc(zone, bytes);
(gdb) bt
#0 GSToUnicode (dst=0x7fffffffca70, size=0x7fffffffca7c, src=0x6fca1e "",
slen=7326238,
enc=<value optimized out>, zone=<value optimized out>, options=<value
optimized out>) at Unicode.m:1463
#1 0x00007ffff70ccdbd in GSStrWiden (s=0x7fffffffcab0) at GSString.m:2403
#2 0x00007ffff70cea79 in getCString_c (self=<value optimized out>,
buffer=0x7ecec0 "",
maxLength=2147483646, aRange=..., leftoverRange=<value optimized out>) at
GSString.m:1672
#3 0x0000000000400bb6 in main (argc=<value optimized out>, argv=<value
optimized out>,
env=<value optimized out>) at getcstring.m:16
(gdb) n
Program received signal SIGSEGV, Segmentation fault.
NSZoneMalloc (zone=0x7ffff70cea79, size=12) at NSZone.m:2013
2013 return (zone->malloc)(zone, size);
>From then on the stack is corrupted. I am on a 64 bit machine, not sure what
the original poster was using.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?28939>
_______________________________________________
Nachricht geschickt von/durch Savannah
http://savannah.gnu.org/