ID:               38961
 User updated by:  nikolas dot hagelstein at gmail dot com
 Reported By:      nikolas dot hagelstein at gmail dot com
-Status:           Feedback
+Status:           Open
 Bug Type:         Reproducible crash
 Operating System: Netbsd 3.0.1 AMD64
 PHP Version:      5.1.6
 New Comment:

I can not try that since i am not able to submit real utf8 chars 
through my shell.

test.php
<?php
echo "crash:".metaphone('รถ');
?>
php test.php

results in a segmentation fault test.php needs to be an UTF8 file.

file -i test.php
test.php: text/plain; charset=utf-8


Previous Comments:
------------------------------------------------------------------------

[2006-09-26 15:09:28] [EMAIL PROTECTED]

./sapi/cli/php -r
'var_dump(metaphone("&#1088;&#1091;&#1089;&#1089;&#1082;&#1080;&#1081;
&#1103;&#1079;&#1099;&#1082; UTF8"));'
string(3) "UTF"


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

[2006-09-26 15:06:14] nikolas dot hagelstein at gmail dot com

Starting program: /usr/pkg/bin/php test.php
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x000000000050c86b in zif_metaphone ()
(gdb) bt
#0  0x000000000050c86b in zif_metaphone ()
#1  0x000000000050c761 in zif_metaphone ()
#2  0x000000000059f489 in execute ()
#3  0x000000000059ed20 in execute ()
#4  0x0000000000585a06 in zend_execute_scripts ()
#5  0x000000000054c169 in php_execute_script ()
#6  0x00000000005eac84 in main ()
#7  0x00000000004407a8 in ___start ()
(gdb)

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

[2006-09-26 14:09:57] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.



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

[2006-09-26 14:01:12] nikolas dot hagelstein at gmail dot com

Description:
------------
Passing utf8 data to metaphone results in a segmentation fault.

Reproduce code:
---------------
<?PHP
//replace xxx with native utf8 chars e.g. copy and paste from 
a russian website. The document itself needs to be of ut8 too
echo "crash:".metaphone('xxx');
?>



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


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

Reply via email to