|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-02-19 15:34 UTC] rasmus@php.net
[2010-02-19 16:09 UTC] achristianson at yakabod dot com
[2010-02-19 16:47 UTC] johannes@php.net
[2010-04-20 18:11 UTC] dmitry@php.net
-Status: Assigned
+Status: Feedback
[2010-04-20 18:11 UTC] dmitry@php.net
[2010-06-28 05:15 UTC] dxm007 at gmail dot com
[2010-08-09 01:28 UTC] felipe@php.net
-Status: Feedback
+Status: Assigned
[2010-09-09 23:54 UTC] matth+php at mlalonde dot net
[2010-09-10 00:01 UTC] matth+php at mlalonde dot net
[2010-10-12 00:50 UTC] felipe@php.net
-Status: Assigned
+Status: Closed
[2010-10-12 00:50 UTC] felipe@php.net
[2010-12-27 23:03 UTC] lsmith@php.net
[2010-12-27 23:05 UTC] lsmith@php.net
[2011-08-03 11:25 UTC] henri dot bergius at iki dot fi
[2011-08-25 16:27 UTC] ryan dot pendergast at gmail dot com
[2011-08-25 19:19 UTC] ryan dot pendergast at gmail dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 15 07:00:01 2025 UTC |
Description: ------------ * create persistent connection to database; store it to a variable * create an additional persistent connection to database: store it in the same variable * allocate a bunch of memory * PHP segfaults Reproduce code: --------------- <?php $db = connect(); $db = connect(); for($i = 0; $i < 10000; $i++) { $exampleArray[] = new ExampleObject(); } class ExampleObject { } function connect() { return new PDO( 'mysql:host=<db host>;dbname=<db name>', '<db user>', '<db password>', array( PDO::ATTR_PERSISTENT => true )); } Expected result: ---------------- no segmentation fault Actual result: -------------- [New Thread 0xb7f396c0 (LWP 3416)] Program received signal SIGSEGV, Segmentation fault. 0x0853a746 in zobj_mark_grey (obj=0xb7b8e07c, pz=0xbfd1f0c8) at /root/php-5.3.1/Zend/zend_gc.c:383 383 p = Z_OBJPROP_P(pz)->pListHead; (gdb) bt #0 0x0853a746 in zobj_mark_grey (obj=0xb7b8e07c, pz=0xbfd1f0c8) at /root/php-5.3.1/Zend/zend_gc.c:383 #1 0x0853a81e in gc_mark_roots () at /root/php- 5.3.1/Zend/zend_gc.c:410 #2 0x0853af64 in gc_collect_cycles () at /root/php- 5.3.1/Zend/zend_gc.c:628 #3 0x0853a1a9 in gc_zobj_possible_root (zv=0xa06bac8) at /root/php- 5.3.1/Zend/zend_gc.c:221 #4 0x08539f78 in gc_zval_possible_root (zv=0xa06bac8) at /root/php- 5.3.1/Zend/zend_gc.c:143 #5 0x08508570 in _zval_ptr_dtor (zval_ptr=0xbfd1f1ec, __zend_filename=0x88fb070 "/root/php-5.3.1/Zend/zend_vm_execute.h", __zend_lineno=28199) at /root/php-5.3.1/Zend/zend_gc.h:183 #6 0x085d7d24 in ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_HANDLER (execute_data=0x9cccd20) at /root/php- 5.3.1/Zend/zend_vm_execute.h:28199 #7 0x08543e68 in execute (op_array=0x9d12f70) at /root/php- 5.3.1/Zend/zend_vm_execute.h:104 #8 0x08518b68 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /root/php-5.3.1/Zend/zend.c:1194 #9 0x084aecdb in php_execute_script (primary_file=0xbfd216a4) at /root/php-5.3.1/main/main.c:2225 #10 0x085e4fa0 in main (argc=2, argv=0xbfd21804) at /root/php- 5.3.1/sapi/cli/php_cli.c:1190