Bug #53005 [Com]: iconv() fails in ext/iconv/iconv.c php_iconv_string

From: Date: Wed, 13 Oct 2010 10:26:21 +0000
Subject: Bug #53005 [Com]: iconv() fails in ext/iconv/iconv.c php_iconv_string
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-155145@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=53005&edit=1

 ID:                 53005
 Comment by:         reggaedancer at ymail dot com
 Reported by:        php at jdrtech dot com
 Summary:            iconv() fails in ext/iconv/iconv.c php_iconv_string
 Status:             Closed
 Type:               Bug
 Package:            Unknown/Other Function
 Operating System:   Solaris 10 Sparc
 PHP Version:        5.3.3
 Block user comment: N

 New Comment:

Hello, 
I have the same issue on Solaris 10 x86,
PHP 5.3.3
after running iconv PHP script, PHP crashed and created a core dump.
What do you mean by "needed to preload".
How can I fix this issue ?


Previous Comments:
------------------------------------------------------------------------
[2010-10-07 01:45:16] php at jdrtech dot com

needed to do preload, runs great

------------------------------------------------------------------------
[2010-10-06 22:58:19] php at jdrtech dot com

Description:
------------
PHP runs great with the exception of iconv. I've created a test program
that uses libiconv.so.2.5.0 with expected results

CLI command:

>./php ./test.php
Original : This is the Euro symbol '?'.
TRANSLIT : Segmentation Fault (core dumped)

CC: Sun C++ 5.8 2005/10/13
cc: Sun C 5.8 2005/10/13

Configure:

export CC=cc CFLAGS="-xarch=v9a" CXXFLAGS="-xarch=v9a"
CPPFLAGS="-I/fcgi/include" LDFLAGS="-L/fcgi/lib"

./configure --prefix=/fcgi --with-mysql=/opt/mysql/mysql
--enable-mbstring --with-apache=../apache_1.3.41 -with-dom
--with-xsl=/fcgi --with-iconv-dir=/fcgi --enable-debug

>ldd php
        libexslt.so.0 =>         /fcgi/lib/libexslt.so.0
        libpthread.so.1 =>       /lib/64/libpthread.so.1
        libsocket.so.1 =>        /lib/64/libsocket.so.1
        libnsl.so.1 =>   /lib/64/libnsl.so.1
        libm.so.2 =>     /lib/64/libm.so.2
        librt.so.1 =>    /lib/64/librt.so.1
        libmysqlclient.so.16 => 
/usr/local/mysql/lib/libmysqlclient.so.16
        libthread.so.1 =>        /lib/64/libthread.so.1
        libxslt.so.1 =>  /fcgi/lib/libxslt.so.1
        libxml2.so.2 =>  /fcgi/lib/libxml2.so.2
        libresolv.so.2 =>        /lib/64/libresolv.so.2
        libgen.so.1 =>   /lib/64/libgen.so.1
        libiconv.so.2 =>         /fcgi/lib/libiconv.so.2
        libc.so.1 =>     /lib/64/libc.so.1
        libz.so.1 =>     /usr/lib/64/libz.so.1
        libmp.so.2 =>    /lib/64/libmp.so.2
        libmd5.so.1 =>   /lib/64/libmd5.so.1
        libscf.so.1 =>   /lib/64/libscf.so.1
        libaio.so.1 =>   /lib/64/libaio.so.1
        libdoor.so.1 =>  /lib/64/libdoor.so.1
        libuutil.so.1 =>         /lib/64/libuutil.so.1
        /platform/SUNW,Sun-Blade-100/lib/sparcv9/libc_psr.so.1
        /platform/SUNW,Sun-Blade-100/lib/sparcv9/libmd5_psr.so.1



Test script:
---------------
<?php
$text = "This is the Euro symbol '?'.";

echo 'Original : ', $text, PHP_EOL;
echo 'TRANSLIT : ', iconv("UTF-8", "ISO-8859-1//TRANSLIT", $text),
PHP_EOL;
echo 'IGNORE   : ', iconv("UTF-8", "ISO-8859-1//IGNORE", $text),
PHP_EOL;
echo 'Plain    : ', iconv("UTF-8", "ISO-8859-1", $text), PHP_EOL;

?>


Expected result:
----------------
unknown

Actual result:
--------------
t@1 (l@1) program terminated by signal SEGV (no mapping at the fault
address)
0xffffffff7d35a544: _iconv+0x002c:      jmp      %l5
Current function is php_iconv_string
  501                   result = iconv(cd, (char **) &in_p, &in_left,
(char **) &out_p, &out_left);



------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=53005&edit=1


Thread (5 messages)

« previous php.bugs (#155145) next »