|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-11-21 04:11 UTC] boris at penck dot de
A Script running on a shell with php cli using ext/mailparse segaults. Ok, the script doing his job fine but segfault at the end of processing data.
PHP Configure:
--with-mysql=/usr/local/mysql \
--with-apxs=/usr/local/apache/bin/apxs \
--enable-ftp \
--enable-track-vars \
--enable-trans-sid \
--with-gd \
--with-pdflib \
--with-jpeg-dir=/usr/lib \
--with-tiff-dir=/usr/lib \
--with-png-dir=/usr/lib \
--with-zlib-dir=/usr/lib \
--with-gettext \
--with-imap \
--enable-sockets \
--enable-mailparse
( Mailparse from today's pear/PECL/mailparse CVS )
$gdb php
(gdb) run myscript.php
Program received signal SIGSEGV, Segmentation fault.
0x08169b9e in _efree (ptr=0x82a9764) at /tmp/php4/Zend/zend_alloc.c:229
229 REMOVE_POINTER_FROM_LIST(p);
(gdb) bt
#0 0x08169b9e in _efree (ptr=0x82a9764) at /tmp/php4/Zend/zend_alloc.c:229
#1 0x08177af1 in _zval_dtor (zvalue=0x82a9908) at /tmp/php4/Zend/zend_variables.c:44
#2 0x0816f2e6 in free_zend_constant (c=0x82a9908) at /tmp/php4/Zend/zend_constants.c:31
#3 0x0817d0ee in zend_hash_destroy (ht=0x8254378) at /tmp/php4/Zend/zend_hash.c:543
#4 0x0816f6b8 in zend_shutdown_constants () at /tmp/php4/Zend/zend_constants.c:151
#5 0x08178765 in zend_shutdown () at /tmp/php4/Zend/zend.c:552
#6 0x08150de3 in php_module_shutdown () at /tmp/php4/main/main.c:1315
#7 0x0819267e in main (argc=2, argv=0xbffffdf4) at /tmp/php4/sapi/cli/php_cli.c:809
(gdb) bt full
#0 0x08169b9e in _efree (ptr=0x82a9764) at /tmp/php4/Zend/zend_alloc.c:229
p = (zend_mem_header *) 0x82a9758
cache_index = 136985032
#1 0x08177af1 in _zval_dtor (zvalue=0x82a9908) at /tmp/php4/Zend/zend_variables.c:44
zvalue = (zval *) 0x82a9908
#2 0x0816f2e6 in free_zend_constant (c=0x82a9908) at /tmp/php4/Zend/zend_constants.c:31
c = (zend_constant *) 0x82a9908
#3 0x0817d0ee in zend_hash_destroy (ht=0x8254378) at /tmp/php4/Zend/zend_hash.c:543
p = (Bucket *) 0x82aa500
q = (Bucket *) 0x82a98d8
#4 0x0816f6b8 in zend_shutdown_constants () at /tmp/php4/Zend/zend_constants.c:151
No locals.
#5 0x08178765 in zend_shutdown () at /tmp/php4/Zend/zend.c:552
No locals.
#6 0x08150de3 in php_module_shutdown () at /tmp/php4/main/main.c:1315
No locals.
#7 0x0819267e in main (argc=2, argv=0xbffffdf4) at /tmp/php4/sapi/cli/php_cli.c:809
exit_status = 0
c = 136985032
file_handle = {type = 2 '\002', filename = 0xbffffee2 "exim-ext", opened_path = 0x0, handle = {fd = 136940424, fp = 0x8298b88}, free_filename = 0 '\0'}
behavior = 1
orig_optind = 1
orig_optarg = 0x0
arg_free = 0xbffffee2 "exim-ext"
script_file = 0xbffffee2 "exim-ext"
global_vars = {head = 0x0, tail = 0x0, size = 4, count = 0, dtor = 0, persistent = 0 '\0', traverse_ptr = 0x823a52c}
interactive = 0
module_started = 1
exec_direct = 0x0
param_error = 0x0
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 07:00:01 2025 UTC |
When I said w/o mailparse I meant a fresh compilation of php without mailparse. Only: --with-mysql=/usr/local/mysql \ --with-apxs=/usr/local/apache/bin/apxs \ --enable-ftp \ --enable-track-vars \ --enable-trans-sid \ --with-gd \ --with-pdflib \ --with-jpeg-dir=/usr/lib \ --with-tiff-dir=/usr/lib \ --with-png-dir=/usr/lib \ --with-zlib-dir=/usr/lib \ --with-gettext \ --with-imap \ --enable-socketsJust compiled a fresh CVS version without any ./configure arguments: ./buildconf ./configure make make install running the script: <?php echo "test\n"; ?> producing: test Segmentation fault running gdb: GNU gdb 2002-04-01-cvs Copyright 2002 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 "i386-linux"... (gdb) run php-test.php Starting program: /usr/local/bin/php php-test.php test Program received signal SIGSEGV, Segmentation fault. 0x080fd985 in _efree (ptr=0x819f7f4) at /tmp/php4/Zend/zend_alloc.c:229 229 REMOVE_POINTER_FROM_LIST(p); (gdb) bt #0 0x080fd985 in _efree (ptr=0x819f7f4) at /tmp/php4/Zend/zend_alloc.c:229 #1 0x081096e9 in _zval_dtor (zvalue=0x819f998) at /tmp/php4/Zend/zend_variables.c:44 #2 0x08102409 in free_zend_constant (c=0x819f998) at /tmp/php4/Zend/zend_constants.c:31 #3 0x0810de64 in zend_hash_destroy (ht=0x8167288) at /tmp/php4/Zend/zend_hash.c:543 #4 0x08102728 in zend_shutdown_constants () at /tmp/php4/Zend/zend_constants.c:151 #5 0x0810a11d in zend_shutdown () at /tmp/php4/Zend/zend.c:552 #6 0x080e8042 in php_module_shutdown () at /tmp/php4/main/main.c:1316 #7 0x08120797 in main (argc=2, argv=0xbffffdf4) at /tmp/php4/sapi/cli/php_cli.c:809 (gdb) bt full #0 0x080fd985 in _efree (ptr=0x819f7f4) at /tmp/php4/Zend/zend_alloc.c:229 ptr = (void *) 0x819f7f4 p = (zend_mem_header *) 0x819f7e8 cache_index = 135912072 #1 0x081096e9 in _zval_dtor (zvalue=0x819f998) at /tmp/php4/Zend/zend_variables.c:44 zvalue = (zval *) 0x819f998 #2 0x08102409 in free_zend_constant (c=0x819f998) at /tmp/php4/Zend/zend_constants.c:31 c = (zend_constant *) 0x819f998 #3 0x0810de64 in zend_hash_destroy (ht=0x8167288) at /tmp/php4/Zend/zend_hash.c:543 ht = (HashTable *) 0x8167288 p = (Bucket *) 0x81a0568 q = (Bucket *) 0x819f968 #4 0x08102728 in zend_shutdown_constants () at /tmp/php4/Zend/zend_constants.c:151 No locals. #5 0x0810a11d in zend_shutdown () at /tmp/php4/Zend/zend.c:552 No locals. #6 0x080e8042 in php_module_shutdown () at /tmp/php4/main/main.c:1316 No locals. #7 0x08120797 in main (argc=2, argv=0xbffffdf4) at /tmp/php4/sapi/cli/php_cli.c:809 exit_status = 0 c = 135912072 file_handle = {type = 2 '\002', filename = 0xbffffede "php-test.php", opened_path = 0x0, handle = {fd = 135867464, fp = 0x8192c48}, free_filename = 0 '\0'} behavior = 1 orig_optind = 1 orig_optarg = 0x0 arg_free = 0xbffffd5c "" script_file = 0xbffffede "php-test.php" global_vars = {head = 0x0, tail = 0x0, size = 4, count = 0, dtor = 0, persistent = 0 '\0', traverse_ptr = 0x816195c} interactive = 0 module_started = 1 exec_direct = 0x0 param_error = 0x0 (gdb)