From:             [EMAIL PROTECTED]
Operating system: Linux
PHP version:      4CVS-2002-11-21 (stable)
PHP Bug Type:     Reproducible crash
Bug description:  PHP CLI Segmentation Fault

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

-- 
Edit bug report at http://bugs.php.net/?id=20539&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=20539&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=20539&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=20539&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=20539&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=20539&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=20539&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=20539&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=20539&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=20539&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=20539&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20539&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=20539&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=20539&r=isapi

Reply via email to