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:
ah got it i had to run php -e
(gdb) p word[w_idx]
$1 = -61 'Ã'
(gdb) p toupper(word[w_idx])
$2 = 28518
(gdb) p isalpha(toupper(word[w_idx]))
Program received signal SIGSEGV, Segmentation fault.
0x0000000200e4eced in isalpha () from /usr/lib/libc.so.12
Previous Comments:
------------------------------------------------------------------------
[2006-09-26 18:33:44] [EMAIL PROTECTED]
# gdb sapi/cli/php
(gdb) r /path/to/test/script.php
<here will be segfault>
(gdb) f 0
(gdb) p word[w_idx]
(gdb) p toupper(word[w_idx])
(gdb) p isalpha(toupper(word[w_idx]))
------------------------------------------------------------------------
[2006-09-26 18:26:08] nikolas dot hagelstein at gmail dot com
(gdb) p word[w_idx]
No symbol table is loaded. Use the "file" command.
seems as if i have to load a symbol table or something, any hints?
------------------------------------------------------------------------
[2006-09-26 18:18:22] [EMAIL PROTECTED]
Looks like your libc is broken.
Please type this in gdb after "bt":
f 0
p word[w_idx]
p toupper(word[w_idx])
p isalpha(toupper(word[w_idx]))
and paste the output here
------------------------------------------------------------------------
[2006-09-26 18:17:17] nikolas dot hagelstein at gmail dot com
segfault on 5.1.6 and php5.2-200609261630 same backtrace
------------------------------------------------------------------------
[2006-09-26 18:04:20] nikolas dot hagelstein at gmail dot com
sorry folks you have been right it seems as if the pkgsrc process
somehow stripes debug informations :|. Anyway here is what i got using
a native build process and the native sources (without the latest cvs
patch provided by iliaa)
Program received signal SIGSEGV, Segmentation fault.
0x00000000004a00ff in metaphone (word=0x8127c0 "ö", word_len=2,
max_phonemes=0, phoned_word=0x7f7fffffcc70, traditional=1)
at /usr/local/src/php-5.1.6/ext/standard/metaphone.c:195
195 for (; !isalpha(Curr_Letter); w_idx++) {
(gdb) bt
#0 0x00000000004a00ff in metaphone (word=0x8127c0 "ö", word_len=2,
max_phonemes=0, phoned_word=0x7f7fffffcc70, traditional=1)
at /usr/local/src/php-5.1.6/ext/standard/metaphone.c:195
#1 0x000000000049ff40 in zif_metaphone (ht=1, return_value=0x812840,
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1)
at /usr/local/src/php-5.1.6/ext/standard/metaphone.c:46
#2 0x0000000000561366 in zend_do_fcall_common_helper_SPEC (
execute_data=0x7f7fffffce20) at zend_vm_execute.h:200
#3 0x000000000056493d in ZEND_DO_FCALL_SPEC_CONST_HANDLER (
execute_data=0x7f7fffffce20) at zend_vm_execute.h:1640
#4 0x0000000000560e6a in execute (op_array=0x783c40) at
zend_vm_execute.h:92
#5 0x000000000053ddf6 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /usr/local/src/php-5.1.6/Zend/zend.c:1109
#6 0x00000000004eed77 in php_execute_script
(primary_file=0x7f7fffffe7c0)
at /usr/local/src/php-5.1.6/main/main.c:1737
#7 0x00000000005b1cd7 in main (argc=2, argv=0x7f7fffffe8c0)
at /usr/local/src/php-5.1.6/sapi/cgi/cgi_main.c:1612
------------------------------------------------------------------------
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/38961
--
Edit this bug report at http://bugs.php.net/?id=38961&edit=1