php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66471 #if changes to comment out PHP-5.6 functionality for 5.5 and earlier builds
Submitted: 2014-01-12 13:52 UTC Modified: 2014-01-13 14:16 UTC
From: Terry at ellisons dot org dot uk Assigned: dmitry (profile)
Status: Closed Package: opcache
PHP Version: master-Git-2014-01-12 (Git) OS: N/A
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: Terry at ellisons dot org dot uk
New email:
PHP Version: OS:

 

 [2014-01-12 13:52 UTC] Terry at ellisons dot org dot uk
Description:
------------
As discussed in https://github.com/zendtech/ZendOptimizerPlus/issues/157 any enhancements to OPcache which depend on PHP-5.6-specific Zend engine changes should have the appropriate conditional compile guards to allow a common code base to be used with the ZendOpcache PECL extension.  

Since I've done this merge, I am just posting this changes for your convenience.




Patches

ZendOpcache-compatibility.patch (last revision 2014-01-12 13:53 UTC by Terry at ellisons dot org dot uk)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-01-13 10:07 UTC] dmitry@php.net
Terry,

The patch you proposes is not for PHP-5.6. We don't have orig_interned_empty_string there (and never had it).

The #if condition for zend_virtual_cwd.h selection is wrong.

Anyway, I understood you idea and it may have sense.
 [2014-01-13 10:22 UTC] dmitry@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: dmitry
 [2014-01-13 11:36 UTC] dmitry@php.net
Automatic comment on behalf of dmitry@zend.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ca550248f18c842c22f3db880b8ea66c553da343
Log: Fixed bug #66471 (Keep backward compatibility)
 [2014-01-13 11:36 UTC] dmitry@php.net
-Status: Assigned +Status: Closed
 [2014-01-13 11:36 UTC] dmitry@php.net
Automatic comment on behalf of dmitry@zend.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ca550248f18c842c22f3db880b8ea66c553da343
Log: Fixed bug #66471 (Keep backward compatibility)
 [2014-01-13 13:30 UTC] ab@php.net
Automatic comment on behalf of dmitry@zend.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ca550248f18c842c22f3db880b8ea66c553da343
Log: Fixed bug #66471 (Keep backward compatibility)
 [2014-01-13 13:56 UTC] Terry at ellisons dot org dot uk
Sorry the orig_interned_empty_string is a residue of my #66442 (now closed) in which I did basically did the same fix as you for interned_empty_string.  I agree that you don't have orig_interned_empty_string, but this in itself is a bug, IMO.  

The reason for the orig_interned_strings_XXXX variables is that you overwrite the GC(interned_strings) context with OPcache's own SHM interned_strings pool during accel_startup.  This is then DTORed during accel_shutdown, leaving the GC(interned_strings) context invalid.  OPcache should not make implicit assumptions about how the Zend engine uses its own interned_string pool after OPcache shutdown, hence it restores (most) of this context. The exception which is not restored to as-is at accel_startup is GC(interned_empty_string) which is why you need this copy as per my patch at #66442.

I am not sure why the #if condition is wrong.  Perhaps you could explain.  5.5 and earlier uses "TSRM/tsrm_virtual_cwd.h" 5.6 uses "zend_virtual_cwd.h".  It's location is a function of the PHP engine version only, and nothing to do with the OPcache version.
 [2014-01-13 14:16 UTC] dmitry@php.net
you might be right
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 17:01:58 2024 UTC