Bug #80350 [Opn]: zend_set_user_opcode_handler not work
| From: | dreamsxin at qq dot com | Date: | Thu, 12 Nov 2020 03:48:23 +0000 |
| Subject: | Bug #80350 [Opn]: zend_set_user_opcode_handler not work | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-230284@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=80350&edit=1
ID: 80350
User updated by: dreamsxin at qq dot com
Reported by: dreamsxin at qq dot com
Summary: zend_set_user_opcode_handler not work
Status: Open
Type: Bug
Package: JIT
Operating System: Linux
PHP Version: 8.0.0RC3
Block user comment: N
Private report: N
New Comment:
Like this extension, https://github.com/nikic/scalar_objects
When disable opcache work fine.
But enable can't work.
Previous Comments:
------------------------------------------------------------------------
[2020-11-12 03:46:49] dreamsxin at qq dot com
run php test.php
Normally, should be output : hello
Hook ZEND_INIT_METHOD_CALL, call zend_printf("hello\n");
But, it not work.
------------------------------------------------------------------------
[2020-11-12 03:40:23] danack@php.net
Hi Dreamsxin,
I find it hard to understand this bug report.
I can see you are using an extension with the name Phalcon - but my understanding is that Phalcon
itself is not compatible with PHP 8 yet: https://github.com/phalcon/cphalcon/issues/15186
It may be better to talk to the Phalcon people and explain what problem you're having with
them, or just wait for Phalcon to support PHP 8.
Otherwise, we would probably need more details of what you are attemting, why you think it should
work, and why you think it's a problem to be fixed in PHP.
------------------------------------------------------------------------
[2020-11-12 03:25:58] dreamsxin at qq dot com
```c
static int my_method_call_handler(zend_execute_data *execute_data)
{
zend_printf("hello\n"); // <-- No call
return ZEND_USER_OPCODE_DISPATCH;
}
static PHP_MINIT_FUNCTION(phalcon)
{
zend_set_user_opcode_handler(ZEND_INIT_METHOD_CALL, my_method_call_handler);
}
```
```php
$class = "string";
$class->test();
```
php.ini:
```ini
opcache.enable=1
; å¯ç¨ Zend OPCacheï¼å¨ CLI 模å¼ä¸
opcache.enable_cli=1
```
no output.
------------------------------------------------------------------------
[2020-11-12 03:20:30] requinix@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PHP.
------------------------------------------------------------------------
[2020-11-12 03:15:29] dreamsxin at qq dot com
Description:
------------
When enable opcache,
zend_set_user_opcode_handler(ZEND_INIT_METHOD_CALL, my_method_call_handler);
will not work.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80350&edit=1