Edit report at http://bugs.php.net/bug.php?id=53844&edit=1
ID: 53844
Comment by: phil at quizlet dot com
Reported by: r at rcrowley dot org
Summary: PHP built from source on Solaris gets SIGSEGV with
libiconv
Status: Feedback
Type: Bug
Package: ICONV related
Operating System: Solaris
PHP Version: 5.3.5
Block user comment: N
Private report: N
New Comment:
No luck...
With the original configuration, I tried:
# LD_LIBRARY_PATH=/opt/local/lib ; export LD_LIBRARY_PATH ; php -r 'echo
iconv("UTF-8", "UTF-8", "Hello, world.\n");'
as well as:
# LD_LIBRARY_PATH=/opt/local/lib php -r 'echo iconv("UTF-8", "UTF-8",
"Hello,
world.\n");'
as well as reconfiguring with:
# ./configure --disable-iconv --with-iconv
and also tried:
# ./configure LDFLAGS=/opt/local/lib --with-iconv
and:
# ./configure LDFLAGS=/opt/local/lib --disable-iconv --with-iconv
Note: I did get a "Notice: Following unknown configure options were
used: --
disable-iconv" when trying to follow johannes advice, and
--disable-iconv isn't
listed in ./configure --help.
In ALL of the above cases when testing PHP's iconv() I got a segfault
and
checked the backtrace with gdb after each and they were all identical:
(gdb) bt
#0 0xec835356 in ?? ()
#1 0xfe8d68ab in iconv () from /lib/libc.so.1
#2 0x0815a2b1 in php_iconv_string (in_p=0x8653484 "Hello, world.\n",
in_len=14,
out=0x8047580, out_len=0x8047584, out_charset=0x8653458 "UTF-8",
in_charset=0x8654900 "UTF-8")
at /tmp/tmp..Aa4sh/php-5.3.5/ext/iconv/iconv.c:501
#3 0x0815d274 in php_if_iconv (ht=3, return_value=0x865349c,
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1) at
/tmp/tmp..Aa4sh/php-
5.3.5/ext/iconv/iconv.c:2327
#4 0x083147de in zend_do_fcall_common_helper_SPEC
(execute_data=0x8793f70) at
zend_vm_execute.h:316
#5 0x0831385d in execute (op_array=0x8653384) at zend_vm_execute.h:107
#6 0x082e6e29 in zend_eval_stringl (str=0x8047ccb "echo
iconv(\"UTF-8\", \"UTF-
8\", \"Hello, world.\\n\");", str_len=48, retval_ptr=0x0,
string_name=0x85c30ae
"Command line code")
at /tmp/tmp..Aa4sh/php-5.3.5/Zend/zend_execute_API.c:1193
#7 0x082e6fe2 in zend_eval_stringl_ex (str=0x8047ccb "echo
iconv(\"UTF-8\",
\"UTF-8\", \"Hello, world.\\n\");", str_len=48, retval_ptr=0x0,
string_name=0x85c30ae "Command line code",
handle_exceptions=1) at /tmp/tmp..Aa4sh/php-
5.3.5/Zend/zend_execute_API.c:1235
#8 0x082e705a in zend_eval_string_ex (str=0x8047540 "\016",
retval_ptr=0x0,
string_name=0x85c30ae "Command line code", handle_exceptions=1) at
/tmp/tmp..Aa4sh/php-5.3.5/Zend/zend_execute_API.c:1246
#9 0x08376724 in main (argc=3, argv=0x8047bdc) at /tmp/tmp..Aa4sh/php-
5.3.5/sapi/cli/php_cli.c:1282
Any other ideas?
Previous Comments:
------------------------------------------------------------------------
[2011-02-08 03:23:32] [email protected]
what happens when you do some thing like
LD_LIBRARY_PATH=/opt/local/lib ; export LD_LIBRARY_PATH ; php -r 'echo
iconv("UTF-8", "UTF-8", "Hello, world.\n");'
------------------------------------------------------------------------
[2011-02-07 20:55:49] phil at quizlet dot com
(I'm working with Richard on this...)
[root@gnp2b7ak ~]# showrev
Hostname: ...
Hostid: c54426
Release: 5.11
Kernel architecture: i86pc
Application architecture: i386
Hardware provider:
Domain:
Kernel version: SunOS 5.11 snv_121
Joyent (the hosting provider) has kindly offered a free Joyent Solaris
instance
for you to test against, if you'd like. Just email me and I'll get it
set up.
------------------------------------------------------------------------
[2011-02-07 19:46:23] [email protected]
Which version of solaris are you using? My Solaris 11 express works
fine. Could you also try doing a
./configure --disable-iconv --with-iconv
build? Yor stacktrace shows
#1 0xfe8d68ab in iconv () from /lib/libc.so.1
so the libc's iconv is being used. My assumption is that another library
is using iconv from /opt/local and so the linker pulls the libs in the
wrong order so one version is used for compiling PHP the other for
running ...
------------------------------------------------------------------------
[2011-02-07 17:16:45] r at rcrowley dot org
# iconv --version
iconv (GNU libiconv 1.11)
Copyright (C) 2000-2007 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Bruno Haible.
# pkgin list | grep iconv
libiconv-1.12nb1 Character set conversion library
#
------------------------------------------------------------------------
[2011-02-01 21:48:13] [email protected]
Hi Richard,
Can you confirm which versions of iconv you have installed?
pkg_info | grep iconv
Should give you the information.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/bug.php?id=53844
--
Edit this bug report at http://bugs.php.net/bug.php?id=53844&edit=1