FYI, non-locked cache value being modified
| From: | Brian Shire | Date: | Mon, 23 Oct 2006 19:59:58 +0000 |
| Subject: | FYI, non-locked cache value being modified | ||
| Groups: | php.apc.dev | ||
| Request: | Send a blank email to php-apc-dev+get-17@lists.php.net to get a copy of this message | ||
btw, I noticed that the opline->op2.u.constant value being modified below may be in the shared memory segment even though it's not currently locked in this section of code, as some values are not copied out. Is this code something that's going to be used, should we attempt a fix or add a comment?
apc_zend.c:
195 /* Cheat our way through the file inclusion by temporarily changing the op to a plain require/include
196 * Then calling into the original opcode handler, and finally restoring the opline's original meaning
197 */
198 Z_LVAL(opline->op2.u.constant) = (Z_LVAL(opline-op2.u.constant) == ZEND_INCLUDE_ONCE) ? ZEND_INCLUDE : ZEND_REQUIRE;
199 ret = apc_original_opcode_handlers[APC_OPCODE_HANDLER_DECODE(opline)](ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
200 Z_LVAL(opline->op2.u.constant) = (Z_LVAL(opline--shireop2.u.constant) == ZEND_INCLUDE) ? ZEND_INCLUDE_ONCE : ZEND_REQUIRE_ ONCE;