[PHP-BUG] Bug #65559 [NEW]: Opcache: cache not cleared if changes occur while running
From: zoeslam at gmail dot com Operating system: Ubuntu PHP version: 5.5.3 Package: opcache Bug Type: Bug Bug description:Opcache: cache not cleared if changes occur while running Description: The new Zend OPcache doesn't clear the cache if a file is changed on the fly. Instead the test script works well with opcache turned off (opcache.enable=0). Test script: --- https://bugs.php.net/bug.php?id=65559&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=65559&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=65559&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=65559&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=65559&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=65559&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=65559&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=65559&r=needscript Try newer version: https://bugs.php.net/fix.php?id=65559&r=oldversion Not developer issue:https://bugs.php.net/fix.php?id=65559&r=support Expected behavior: https://bugs.php.net/fix.php?id=65559&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=65559&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=65559&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=65559&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65559&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=65559&r=dst IIS Stability: https://bugs.php.net/fix.php?id=65559&r=isapi Install GNU Sed:https://bugs.php.net/fix.php?id=65559&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=65559&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=65559&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=65559&r=mysqlcfg
Bug #62616 [Com]: ArrayIterator::count() from IteratorIterator instance gives Segmentation fault
Edit report at https://bugs.php.net/bug.php?id=62616&edit=1 ID: 62616 Comment by: zoeslam at gmail dot com Reported by:zoeslam at gmail dot com Summary:ArrayIterator::count() from IteratorIterator instance gives Segmentation fault Status: Verified Type: Bug Package:SPL related Operating System: Ubuntu 12.04 PHP Version:5.4.5 Assigned To:colder Block user comment: N Private report: N New Comment: I've discovered a similar misbehaviour: https://bugs.php.net/bug.php?id=62629 Previous Comments: [2012-07-20 17:27:43] larue...@php.net I've find the reason, but seems not easy to fix. $ii->count, will finally call to arrayObject->count (due to implemention of spl_dual_it_get_method). but arrayObject->count will take the object as a spl_array_object, which is totally different struct with spl_dual_it_object, then in the spl_array_object_count_elements_helper , it will make the object struct mess(via update pos) [2012-07-20 13:57:50] jpa...@php.net I can reproduce on 5.3.14 I can only reproduce calling the method directly. Calling count($ii) instead of $ii->count() wont segfault [2012-07-20 12:54:55] f...@php.net BT #0 0x7fdfaf4221d8 in ?? () #1 0x00594a41 in spl_dual_it_free (intern=0x7fdfaf53fa20) at /opt/src/php-5.4.5/ext/spl/spl_iterators.c:1585 #2 spl_dual_it_dtor (_object=0x7fdfaf53fa20, handle=) at /opt/src/php-5.4.5/ext/spl/spl_iterators.c:2237 #3 0x006a7b20 in zend_objects_store_del_ref_by_handle_ex (handle=2, handlers=) at /opt/src/php-5.4.5/Zend/zend_objects_API.c:206 #4 0x006a7b63 in zend_objects_store_del_ref (zobject=0x7fdfaf53f990) at /opt/src/php-5.4.5/Zend/zend_objects_API.c:172 #5 0x00674082 in _zval_dtor (zvalue=) at /opt/src/php- 5.4.5/Zend/zend_variables.h:35 #6 _zval_ptr_dtor (zval_ptr=0x7fdfaf53fb30) at /opt/src/php- 5.4.5/Zend/zend_execute_API.c:438 #7 _zval_ptr_dtor (zval_ptr=0x7fdfaf53fb30) at /opt/src/php- 5.4.5/Zend/zend_execute_API.c:427 #8 0x0068e28b in zend_hash_apply_deleter (ht=ht@entry=0xd34508, p=p@entry=0x7fdfaf53fb18) at /opt/src/php-5.4.5/Zend/zend_hash.c:650 #9 0x0068fdd1 in zend_hash_reverse_apply (ht=0xd34508, apply_func=apply_func@entry=0x673f10 ) at /opt/src/php- 5.4.5/Zend/zend_hash.c:804 #10 0x0067438b in shutdown_destructors () at /opt/src/php- 5.4.5/Zend/zend_execute_API.c:217 #11 0x006826c0 in zend_call_destructors () at /opt/src/php- 5.4.5/Zend/zend.c:925 #12 0x00624805 in php_request_shutdown (dummy=dummy@entry=0x0) at /opt/src/php-5.4.5/main/main.c:1723 #13 0x00726004 in do_cli (argc=2, argv=0x7fff5ea442f8) at /opt/src/php- 5.4.5/sapi/cli/php_cli.c:1174 #14 0x00428455 in main (argc=2, argv=0x7fff5ea442f8) at /opt/src/php- 5.4.5/sapi/cli/php_cli.c:1364 [2012-07-20 11:54:38] f...@php.net Reproducible on Debian wheezy with 5.4.0 and 5.4.5. [2012-07-20 08:13:34] vanidlesky dot jr at gmail dot com VanZCool 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 https://bugs.php.net/bug.php?id=62616 -- Edit this bug report at https://bugs.php.net/bug.php?id=62616&edit=1
[PHP-BUG] Bug #62629 [NEW]: IteratorIterator doesn't delegate count() method
From: zoeslam at gmail dot com Operating system: Ubuntu 12.04 PHP version: 5.4.5 Package: SPL related Bug Type: Bug Bug description:IteratorIterator doesn't delegate count() method Description: This bug report MAY be similar to: https://bugs.php.net/bug.php?id=62616 But behave differently Test script: --- class MyFile extends SplFileObject { private $x = 10; private $y = 20; public function setX($x) { $this->x = $x; } public function setY($y) { $this->y = $y; } public function getX() { return $this->x; } public function count() { return $this->y; } } $myFile = new MyFile(__FILE__); var_dump($myFile->getX()); var_dump($myFile->count()); $myFile->setX(15); $myFile->setY(25); var_dump($myFile->getX()); var_dump($myFile->count()); $ii = new IteratorIterator($myFile); var_dump($ii->getX()); var_dump($ii->count()); Expected result: int(10) int(20) int(15) int(25) int(15) int(25) Actual result: -- int(10) int(20) int(15) int(25) int(15) Notice: Undefined property: IteratorIterator::$y in /tmp/it.php on line 12 NULL -- Edit bug report at https://bugs.php.net/bug.php?id=62629&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62629&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62629&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62629&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=62629&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62629&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=62629&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=62629&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=62629&r=needscript Try newer version: https://bugs.php.net/fix.php?id=62629&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=62629&r=support Expected behavior: https://bugs.php.net/fix.php?id=62629&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=62629&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=62629&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=62629&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62629&r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=62629&r=dst IIS Stability: https://bugs.php.net/fix.php?id=62629&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=62629&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=62629&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=62629&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=62629&r=mysqlcfg
[PHP-BUG] Bug #62616 [NEW]: ArrayIterator::count() from IteratorIterator instance gives Segmentation fault
From: zoeslam at gmail dot com Operating system: Ubuntu 12.04 PHP version: 5.4.5 Package: SPL related Bug Type: Bug Bug description:ArrayIterator::count() from IteratorIterator instance gives Segmentation fault Description: The code explains all, no idea why it happens. Verified on Ubuntu and Slackware, both on PHP 5.4.3, PHP 5.4.4, PHP 5.4.5. Test script: --- $ai = new ArrayIterator(array(0,1)); var_dump($ai->count()); $ii = new IteratorIterator($ai); var_dump($ii->count()); Expected result: int(2) int(2) Actual result: -- int(2) int(2) Segmentation fault -- Edit bug report at https://bugs.php.net/bug.php?id=62616&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62616&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62616&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62616&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=62616&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62616&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=62616&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=62616&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=62616&r=needscript Try newer version: https://bugs.php.net/fix.php?id=62616&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=62616&r=support Expected behavior: https://bugs.php.net/fix.php?id=62616&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=62616&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=62616&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=62616&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62616&r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=62616&r=dst IIS Stability: https://bugs.php.net/fix.php?id=62616&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=62616&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=62616&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=62616&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=62616&r=mysqlcfg