Bug #65845 [Fbk]: Error when Zend Opcache Optimizer is fully enabled
Edit report at https://bugs.php.net/bug.php?id=65845&edit=1 ID: 65845 Updated by: larue...@php.net Reported by:bruno+php at ahennezel dot info Summary:Error when Zend Opcache Optimizer is fully enabled Status: Feedback Type: Bug Package:opcache Operating System: Linux 3.11.2-1-ARCH PHP Version:5.5.4 Assigned To:dmitry Block user comment: N Private report: N New Comment: more simple reproduce script: extended_value != IS_ARRAY && opline->extended_value != IS_OBJECT && - opline->extended_value != IS_RESOURCE) { - /* cast of constant operand */ + opline->extended_value != IS_RESOURCE && + Z_TYPE(ZEND_OP1_LITERAL(opline)) != opline->extended_value) { zval res; res = ZEND_OP1_LITERAL(opline); zval_copy_ctor(&res); to Dmitry: this is because precalculted hash is lost while doing a nop cast... could you please review it? [2013-10-09 16:05:14] larue...@php.net sorry, I used wrong branch of opcache. and now I can reproduce that. [2013-10-09 12:02:21] guy dot cesaro at gmail dot com Using the right flag to enable opcache with php-cli, the output is also incorrect. I tried with php 5.5.3, 5.5.4 and the latest snapshot. thank you for your help Cedric [2013-10-09 11:42:10] cedric at yterium dot com @laruence what makes sense is to use the right flag for cli runtime : opcache.enable is for non-cli PHP whereas opcache.enable_cli is for cli version. Just try with the good option in order to see the bug : $ php55 -d opcache.enable_cli=1 -d opcache.optimization_level=0x /tmp/1.php [2013-10-09 09:07:28] brunobergot at gmail dot com Hi Laruence, i'm pretty sure that Guy use the same php script cause i've sended it to him ;) 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=65845 -- Edit this bug report at https://bugs.php.net/bug.php?id=65845&edit=1
Bug #65867 [Opn]: Countable interface infinite recursion.
Edit report at https://bugs.php.net/bug.php?id=65867&edit=1 ID: 65867 User updated by:kakserpompoyaitsam at gmail dot com Reported by:kakserpompoyaitsam at gmail dot com -Summary:strace php -r 'class A implements Countable {function count() {return count($th +Summary:Countable interface infinite recursion. Status: Open Type: Bug Package:SPL related Operating System: Irrelevant PHP Version:5.5.4 Block user comment: N Private report: N New Comment: Changed title. Previous Comments: [2013-10-09 04:44:30] kakserpompoyaitsam at gmail dot com Description: Easy reproducible segmentation fault. It seems that count($this) doesn't check recursion. I think that count($this) should check if it is called inside of $this->count(), and if so, should ignore the Countable interface and just count the properties. Use case: if your object got special properties that you do not want to count, you can use something liek that: "function count() {return count($this) - numberOfSpecialProperties;}" Test script: --- class A implements Countable {function count() {return count($this);}} count(new A); Expected result: 0 Actual result: -- Segmentation fault. -- Edit this bug report at https://bugs.php.net/bug.php?id=65867&edit=1
Req #55736 [Opn->Csd]: Added EXPECT_EXTERNAL section to run-tests.php
Edit report at https://bugs.php.net/bug.php?id=55736&edit=1 ID: 55736 Updated by: m...@php.net Reported by:tim at digicol dot de Summary:Added EXPECT_EXTERNAL section to run-tests.php -Status: Open +Status: Closed Type: Feature/Change Request Package:Testing related PHP Version:5.3.8 -Assigned To: +Assigned To:mike Block user comment: N Private report: N New Comment: Merged in master as 5f41cb18beb9437df73c382b5a9689d43c357628 Previous Comments: [2011-09-20 09:31:44] tim at digicol dot de Sorry, typo in summary. It's EXPECT_EXTERNAL, not FILE_EXTERNAL. [2011-09-20 09:21:53] tim at digicol dot de Description: In the .phpt files used with run-tests.php, I'd like an option to read the expected output from external files. For consistency with the FILE / FILE_EXTERNAL section naming, I'd call this feature EXPECT_EXTERNAL. The attached patch (against run-tests.php of PHP 5.3.8) implements this functionality. Would you mind adding it as a standard feature? Reason: We often expect relatively large XML output from our tests. Having to paste it into the EXPECT section makes the .phpt file large, and the XML is easier to handle in a separate file (I can run xmllint on it). Also, I'd like to reuse one test's expected output as the input for another test, which works great with external files. Test script: --- [digicol@dcxcentosvmware php-5.3.8]$ cat tmp.phpt --TEST-- Demo --FILE-- --EXPECT_EXTERNAL-- expected.txt [digicol@dcxcentosvmware php-5.3.8]$ cat expected.txt 3.1415926535898 [digicol@dcxcentosvmware php-5.3.8]$ php run-tests.php.expect_external -p `which php` tmp.phpt = PHP : /usr/local/bin/php PHP_SAPI: cli PHP_VERSION : 5.3.4 ZEND_VERSION: 2.3.0 PHP_OS : Linux - Linux dcxcentosvmware.digicol.local 2.6.18-194.26.1.el5 #1 SMP Tue Nov 9 12:54:20 EST 2010 x86_64 INI actual : /usr/local/lib/php.ini More .INIs : CWD : /usr/local/src/php-5.3.8 Extra dirs : VALGRIND: Not used = Running selected tests. PASS Demo [tmp.phpt] = Number of tests :1 1 Tests skipped :0 ( 0.0%) Tests warned:0 ( 0.0%) ( 0.0%) Tests failed:0 ( 0.0%) ( 0.0%) Expected fail :0 ( 0.0%) ( 0.0%) Tests passed:1 (100.0%) (100.0%) - Time taken :0 seconds = -- Edit this bug report at https://bugs.php.net/bug.php?id=55736&edit=1