php-src/ext/dl_test
Arnaud Le Blanc 6f579934f0
Add observer temporary to dl'ed functions
When observer is enabled, we normally add an extra temporary to all
functions, to store the previously observed frame. However, this is done in
zend_observer_post_startup() so it doesn't happen to dl'ed() functions.

One possible fix would be to move that from zend_observer_post_startup()
to zend_register_functions(), but this would be too early: Observer may
not be enabled when zend_register_functions() is called, and may still be
enabled later.

However, when zend_register_functions() is called at run-time (during dl()),
we know definitively whether observer is enabled.

Here I update zend_register_functions() to add a temporary to dl'ed()
functions when observer is enabled.

Fixes: GH-17211
Closes: GH-17220
2024-12-20 18:45:34 +01:00
..
tests [skip ci] Fix borked xleak skip on <PHP-8.3 2023-09-01 12:39:03 +02:00
config.m4
config.w32
dl_test.c Add observer temporary to dl'ed functions 2024-12-20 18:45:34 +01:00
dl_test.stub.php Add observer temporary to dl'ed functions 2024-12-20 18:45:34 +01:00
dl_test_arginfo.h Add observer temporary to dl'ed functions 2024-12-20 18:45:34 +01:00
php_dl_test.h