php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66461 PHP crashes if opcache.interned_strings_buffer=0
Submitted: 2014-01-10 18:45 UTC Modified: 2014-01-15 06:18 UTC
From: Terry at ellisons dot org dot uk Assigned: dmitry (profile)
Status: Closed Package: opcache
PHP Version: master-Git-2014-01-10 (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-10 18:45 UTC] Terry at ellisons dot org dot uk
Description:
------------
On non-ZTS builds, PHP segfaults if opcache.interned_strings_buffer=0.  This is because bult-in initialisation assumes that the PHP interned_string pool can be succcessfully copied to SHM.  

As with the opcache.memory_consumption and opcache.max_accelerated_files INI parameters, opcache.interned_strings_buffer should have a validated minimum.  In this case of 1 (Mb).

Test script:
---------------
php56 -d opcache.enable=1 -d opcache.enable_cli=1 -d opcache.interned_strings_buffer=0 -r ''


Expected result:
----------------
PHP should gracefully handle any valid INI parameter

Actual result:
--------------
You get a Segfault.

Patches

Opcache-isb.patch (last revision 2014-01-10 19:13 UTC by Terry at ellisons dot org dot uk)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-01-13 10:18 UTC] dmitry@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: dmitry
 [2014-01-13 14:07 UTC] dmitry@php.net
Automatic comment on behalf of dmitry@zend.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ce2f024e9ff4283d22b30d0c20f83c976fb7d3ed
Log: Fixed bug #66461 (PHP crashes if opcache.interned_strings_buffer=0)
 [2014-01-13 14:07 UTC] dmitry@php.net
-Status: Assigned +Status: Closed
 [2014-01-13 18:00 UTC] ab@php.net
Automatic comment on behalf of dmitry@zend.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=ce2f024e9ff4283d22b30d0c20f83c976fb7d3ed
Log: Fixed bug #66461 (PHP crashes if opcache.interned_strings_buffer=0)
 [2014-01-15 05:33 UTC] phpdev at ehrhardt dot nl
The fix for this bug leads to segfaults in PHP 5.5 TS x86 on Windows.
 [2014-01-15 06:18 UTC] dmitry@php.net
There was a ZTS fix after this one.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 13:01:31 2024 UTC