Req #80350 [Asn->Csd]: zend_set_user_opcode_handler not work

From: Date: Mon, 30 Nov 2020 19:46:02 +0000
Subject: Req #80350 [Asn->Csd]: zend_set_user_opcode_handler not work
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-230744@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
 Updated by:         dmitry@php.net
 Reported by:        dreamsxin at qq dot com
 Summary:            zend_set_user_opcode_handler not work
-Status:             Assigned
+Status:             Closed
 Type:               Feature/Change Request
 Package:            JIT
 Operating System:   Linux
 PHP Version:        8.0.0RC3
 Assigned To:        dmitry
 Block user comment: N
 Private report:     N

 New Comment:

Fixed by d5a82e2c4eebe8337ff7790db46d812af2fbcec9


Previous Comments:
------------------------------------------------------------------------
[2020-11-24 13:50:43] nikic@php.net

That makes sense. Just not JITing when a user opcode handler is involved seems reasonable.

------------------------------------------------------------------------
[2020-11-17 21:41:13] dmitry@php.net

I think we shouldn't support user opcode handlers in JIT.

I don't see a way to handle all possible return values (e.g 
ZEND_USER_OPCODE_DISPATCH) and ability to jump (change EX(opline)).

In general, for each user opcode handler, we may transfer control to interpreter.

------------------------------------------------------------------------
[2020-11-17 09:43:48] nikic@php.net

@dmitry: I'm wondering whether we should respect user opcode handlers in JIT. It seems like it
should be possible, but maybe user opcode handlers break assumptions by type inference etc.

------------------------------------------------------------------------
[2020-11-12 03:48:23] dreamsxin at qq dot com

Like this extension, https://github.com/nikic/scalar_objects
When disable opcache work fine.
But enable can't work.

------------------------------------------------------------------------
[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.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=80350


--
Edit this bug report at https://bugs.php.net/bug.php?id=80350&edit=1


Thread (10 messages)

« previous php.bugs (#230744) next »