Make sure output start filename is not freed early

As filenames are no longer interned, we need to keep a reference
to the zend_string to make sure it isn't freed.

To avoid a nominal source compatibility break, create a new member
in the globals.
This commit is contained in:
Nikita Popov 2020-10-16 17:23:10 +02:00
parent 28e21d80b0
commit 97202d9d84
3 changed files with 27 additions and 6 deletions

View file

@ -137,9 +137,10 @@ ZEND_BEGIN_MODULE_GLOBALS(output)
zend_stack handlers;
php_output_handler *active;
php_output_handler *running;
const char *output_start_filename;
const char *output_start_filename; /* TODO: Unused, remove */
int output_start_lineno;
int flags;
zend_string *output_start_filename_str;
ZEND_END_MODULE_GLOBALS(output)
PHPAPI ZEND_EXTERN_MODULE_GLOBALS(output)