Replay warnings during inheritance (#6928)

Since 3e6b447979 it is again possible to have
warnings (deprecations) during inheritance, and more such functionality is
likely in the future. This is a problem, because such warnings will only be
shown on the first request if the opcache inheritance cache is used. This
currently causes test failures in --repeat builds.

Fix this by uplifting the error recording functionality from opcache to Zend,
and then using it to persist a warning trace in the inheritance cache, which
can then be used to replay the warnings on subsequent executions.
This commit is contained in:
Nikita Popov 2021-04-29 16:37:53 +02:00 committed by GitHub
parent f84936b30c
commit dd86987b2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 103 additions and 72 deletions

View file

@ -188,6 +188,10 @@ void init_executor(void) /* {{{ */
EG(get_gc_buffer).start = EG(get_gc_buffer).end = EG(get_gc_buffer).cur = NULL;
EG(record_errors) = false;
EG(num_errors) = 0;
EG(errors) = NULL;
zend_fiber_init();
zend_weakrefs_init();