From:             mats at cdmedia dot nu
Operating system: Linux RH 7.2
PHP version:      4.3.4
PHP Bug Type:     Reproducible crash
Bug description:  Values set in _SESSION doesn't stick

Description:
------------
I've a script that reads and writes several hundred MBs of data from a
mysql database. The data is handled in a number of ways. Crash occurs at
the same spot after a lot of data has been handled. First symptoms was
that a method call on a newly created object suddenly gave a "call on
non-object" error after 70000 iterations in loop, and then segfaulted.
Perplexed, I added an if(is_object( ...)) around the offending statement,
with the result that the crash occured a few lines down instead. A sign of
memory corruption?

Configure string: --with-mysql --with-apxs --with-zlib

Reproduce code:
---------------
The script is part of a larger package of code. Perhaps someone can look
at the backtrace and tell me what to look for, and then I can post some
relevant lines.


Expected result:
----------------
Anything but a segfault.


Actual result:
--------------
#0  0x812a16e in zend_hash_add_or_update (ht=0x95443fc, arKey=0x8245a2c
"<",
    nKeyLength=5, pData=0x8245a18, nDataSize=4, pDest=0xbfff8528, flag=1)
    at /tmp/php-4.3.4/Zend/zend_hash.c:287
#1  0x812b17c in zend_hash_copy (target=0x95443fc, source=0x8242a14,
    pCopyConstructor=0x8125578 <zval_add_ref>, tmp=0xbfff8568, size=4)
    at /tmp/php-4.3.4/Zend/zend_hash.c:794
#2  0x81256cc in _zval_copy_ctor (zvalue=0x87b224c)
    at /tmp/php-4.3.4/Zend/zend_variables.c:137
#3  0x813a4ee in execute (op_array=0x820613c) at
/tmp/php-4.3.4/Zend/zend_execute.c:1809
#4  0x8139246 in execute (op_array=0x81b9530) at
/tmp/php-4.3.4/Zend/zend_execute.c:1660
#5  0x8139246 in execute (op_array=0x81b1194) at
/tmp/php-4.3.4/Zend/zend_execute.c:1660
#6  0x8126abc in zend_execute_scripts (type=8, retval=0x0, file_count=3)
    at /tmp/php-4.3.4/Zend/zend.c:884
#7  0x80ffdbc in php_execute_script (primary_file=0xbffff750)
    at /tmp/php-4.3.4/main/main.c:1729
#8  0x8141740 in main (argc=2, argv=0xbffff7f4) at
/tmp/php-4.3.4/sapi/cli/php_cli.c:819
#9  0x400c4306 in __libc_start_main (main=0x8140e08 <main>, argc=2,
ubp_av=0xbffff7f4,
    init=0x806196c <_init>, fini=0x8141dfc <_fini>, rtld_fini=0x4000d2fc
<_dl_fini>,
    stack_end=0xbffff7ec) at ../sysdeps/generic/libc-start.c:129
(gdb) frame 3
#3  0x813a4ee in execute (op_array=0x820613c) at
/tmp/php-4.3.4/Zend/zend_execute.c:1809
1809                                                   
zval_copy_ctor(varptr);


-- 
Edit bug report at http://bugs.php.net/?id=26428&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26428&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26428&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=26428&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=26428&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=26428&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=26428&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=26428&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=26428&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=26428&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=26428&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=26428&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26428&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=26428&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=26428&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=26428&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26428&r=float

Reply via email to