Fix high opcache.interned_strings_buffer causing shm corruption#9260
Fix high opcache.interned_strings_buffer causing shm corruption#9260arnaud-lb merged 3 commits intophp:PHP-8.2from
Conversation
| zend_long size = zend_ini_parse_quantity_warn(new_value, entry->name); | ||
|
|
||
| if (size < 0) { | ||
| zend_accel_error(ACCEL_LOG_WARNING, "opcache.interned_strings_buffer must be higher than or equal to 0, " ZEND_LONG_FMT " given.\n", size); |
There was a problem hiding this comment.
| zend_accel_error(ACCEL_LOG_WARNING, "opcache.interned_strings_buffer must be higher than or equal to 0, " ZEND_LONG_FMT " given.\n", size); | |
| zend_accel_error(ACCEL_LOG_WARNING, "opcache.interned_strings_buffer must be greater than or equal to 0, " ZEND_LONG_FMT " given.\n", size); |
| zend_accel_error(ACCEL_LOG_WARNING, "opcache.interned_strings_buffer must be greater than or equal to 0, " ZEND_LONG_FMT " given.\n", size); | ||
| return FAILURE; | ||
| } | ||
| if (size > MAX_INTERNED_STRINGS_BUFFER_SIZE) { |
There was a problem hiding this comment.
I do not know for certain if we should return an error for both cases, as you said in the ticket, it can me a mistake. However that fix the issue alright whatsoever.
There was a problem hiding this comment.
Yeah I wanted to be consistent with OnUpdateMemoryConsumption, but maybe returning a FAILURE in both cases here would be better.
In my opinion, ini handler failures during startup/activate should also result in a fatal error, but that's for an other PR/RFC.
|
It looks like this test triggers memory leaks with ASAN. https://github.com/php/php-src/runs/8281104519?check_suite_focus=true @arnaud-lb Can you have a look? There's no hurry. |
|
I marked the tests as |
Fixes #9259