Skip to content

Segmentation fault in zend observer #16811

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
YuanchengJiang opened this issue Nov 15, 2024 · 1 comment
Open

Segmentation fault in zend observer #16811

YuanchengJiang opened this issue Nov 15, 2024 · 1 comment

Comments

@YuanchengJiang
Copy link

Description

The following code:

<?php
function bar() {}
var_dump(ini_set("zend_test.observer.observe_function_names", "bar"));

Resulted in this output:

/php-src/Zend/zend_observer.c:184:53: runtime error: applying zero offset to null pointer

But I expected this output instead:

-d "zend_test.observer.enabled=1"

PHP Version

nightly

Operating System

ubuntu 22.04

@YuanchengJiang
Copy link
Author

<?php
function foo()
{
}
function bar()
{
}
foo();
bar();
ini_set("zend_test.observer.observe_function_names", "bar");
Zend/zend_observer.c:195: void zend_observer_add_begin_handler(zend_function *, zend_observer_fcall_begin_handler): Assertion `0' failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants