Bug #80002 [Com]: calc free space for new interned string is wrong

From: Date: Thu, 20 Aug 2020 12:29:28 +0000
Subject: Bug #80002 [Com]: calc free space for new interned string is wrong
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-228694@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80002&edit=1

 ID:                 80002
 Comment by:         danack@php.net
 Reported by:        t-matsuno at colopl dot co dot jp
 Summary:            calc free space for new interned string is wrong
 Status:             Assigned
 Type:               Bug
 Package:            opcache
 PHP Version:        PHP 7.3
 Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

"I looked ZendAccelerator and tried some tests.
Through the series of tests, it seems that the calculation for free space to keep interned strings
is wrong"

Thanks for the patch.

Would it be possible for you to write a few words about the tests you did, and how they lead to
finding this issue?

And also an example of a string that would encounter this bug would be lovely.


Previous Comments:
------------------------------------------------------------------------
[2020-08-20 09:25:40] cmb@php.net

The following pull request has been associated:

Patch Name: Fix #80002: calc free space for new interned string is wrong
On GitHub:  https://github.com/php/php-src/pull/6024
Patch:      https://github.com/php/php-src/pull/6024.patch

------------------------------------------------------------------------
[2020-08-20 09:23:56] cmb@php.net

Thanks for reporting, and the patch!

------------------------------------------------------------------------
[2020-08-20 09:09:48] t-matsuno at colopl dot co dot jp

Description:
------------
Hello,

Since I got "Interned string buffer overflow" warning with relatively large
opcache.interned_strings_buffer, I looked ZendAccelerator and tried some tests.
Through the series of tests, it seems that the calculation for free space to keep interned strings
is wrong and it derives the 1/32 smaller value than the actual free space and it causes the overflow
warning for some big strings even if there is enough free space.

I hope you look at it.
This happens in PHP7.3 and newer.

Regards,
Takeki.



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=80002&edit=1


Thread (6 messages)

« previous php.bugs (#228694) next »