|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-07-14 22:20 UTC] kirameku at email dot cz
Description: ------------ Problem with php module recode on platform x86_64. recode ( string request, string string ) => Segmentation fault. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 22 16:00:01 2025 UTC |
-- System Information: RedHat ES4 (x86_64) Architecture: x86_64 Kernel: 2.6.9-11.ELsmp I have php4 compiled with "./configure .. --enable-recode --with-recode ...". When I do $ /usr/bin/php ./test.php Segmentation fault and test.php : <? echo recode_string("utf-8..html_4.0","Hello, World !"); ?> I first tought it was a bug on librecode but it works well from the command line : echo "Hello, World"|recode "utf-8..html_4.0" Hello, Worldphp4.4.0 was compiled with some warnings: /home/Develop/php-4.4.0/ext/recode/recode.c: In function `zif_recode_string': /home/Develop/php-4.4.0/ext/recode/recode.c:156: warning: passing arg 5 of `recode_buffer_to_buffer' from incompatible pointer type /home/Develop/php-4.4.0/ext/recode/recode.c:156: warning: passing arg 6 of `recode_buffer_to_buffer' from incompatible pointer type recode version: recode-3.6-17, recode-devel-3.6-17 # gdb ./php core.15829 GNU gdb Red Hat Linux (6.3.0.0-0.31rh) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu"...Using host libthread_db library "/lib64/tls/libthread_db.so.1". Core was generated by `./php test.php'. Program terminated with signal 11, Segmentation fault. Reading symbols from /lib64/libcrypt.so.1...done. Loaded symbols for /lib64/libcrypt.so.1 Reading symbols from /lib64/libnsl.so.1...done. Loaded symbols for /lib64/libnsl.so.1 Reading symbols from /usr/lib64/librecode.so.0...done. Loaded symbols for /usr/lib64/librecode.so.0 Reading symbols from /usr/lib64/libpng12.so.0...done. Loaded symbols for /usr/lib64/libpng12.so.0 Reading symbols from /usr/lib64/libz.so.1...done. Loaded symbols for /usr/lib64/libz.so.1 Reading symbols from /usr/lib64/libjpeg.so.62...done. Loaded symbols for /usr/lib64/libjpeg.so.62 Reading symbols from /lib64/libresolv.so.2...done. Loaded symbols for /lib64/libresolv.so.2 Reading symbols from /lib64/tls/libm.so.6...done. Loaded symbols for /lib64/tls/libm.so.6 Reading symbols from /lib64/libdl.so.2...done. Loaded symbols for /lib64/libdl.so.2 Reading symbols from /lib64/libssl.so.4...done. Loaded symbols for /lib64/libssl.so.4 Reading symbols from /lib64/libcrypto.so.4...done. Loaded symbols for /lib64/libcrypto.so.4 Reading symbols from /usr/lib64/libgssapi_krb5.so.2...done. Loaded symbols for /usr/lib64/libgssapi_krb5.so.2 Reading symbols from /usr/lib64/libkrb5.so.3...done. Loaded symbols for /usr/lib64/libkrb5.so.3 Reading symbols from /lib64/libcom_err.so.2...done. Loaded symbols for /lib64/libcom_err.so.2 Reading symbols from /usr/lib64/libk5crypto.so.3...done. Loaded symbols for /usr/lib64/libk5crypto.so.3 Reading symbols from /lib64/tls/libc.so.6...done. Loaded symbols for /lib64/tls/libc.so.6 Reading symbols from /lib64/ld-linux-x86-64.so.2...done. Loaded symbols for /lib64/ld-linux-x86-64.so.2 Reading symbols from /lib64/libnss_files.so.2...done. Loaded symbols for /lib64/libnss_files.so.2 #0 0x00000038693b7865 in delmodule_flat () from /usr/lib64/librecode.so.0 (gdb) bt #0 0x00000038693b7865 in delmodule_flat () from /usr/lib64/librecode.so.0 #1 0x00000038693aa50d in recode_new_task () from /usr/lib64/librecode.so.0 #2 0x00000038693aa82e in recode_perform_task () from /usr/lib64/librecode.so.0 #3 0x00000038693a924c in recode_buffer_to_buffer () from /usr/lib64/librecode.so.0 #4 0x00000000004b78c7 in zif_recode_string (ht=72, return_value=0x9571f8, this_ptr=0x48, return_value_used=9814288) at /home/Develop/php-4.4.0/ext/recode/recode.c:156 #5 0x000000000057fc80 in execute (op_array=0x957ad8) at /home/Develop/php-4.4.0/Zend/zend_execute.c:1672 #6 0x000000000056aa5e in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/Develop/php-4.4.0/Zend/zend.c:938 #7 0x000000000053c3d3 in php_execute_script (primary_file=0x7fbffff880) at /home/Develop/php-4.4.0/main/main.c:1751 #8 0x000000000058798d in main (argc=2, argv=0x7fbffff998) at /home/Develop/php-4.4.0/sapi/cli/php_cli.c:828Please don't attach the same backtrace more than once. I deleted that comment. You reported that your compiler is: gcc version 3.4.3 20050227 (Red Hat 3.4.3-22.1) Try this: # rm config.cache && ./configure --disable-all --disable-cgi --with-recode # make clean && make # run -r 'echo recode_string("utf-8..html_4.0","Hello, World !");'