Skip to content
Permalink
Browse files

Avoid "Invalid opcode 153/1/8" (fixes eaccelerator#16)

Only the one case is handled in zend_opcode_handlers, so the op1/op2 types
must not be changed.  Although op2 technically is unused.
  • Loading branch information
toddbc committed Dec 5, 2013
1 parent 42067ac commit e7dc802057e9916c0e6751b87511fc43a89c0c3a
Showing with 12 additions and 0 deletions.
  1. +5 −0 ChangeLog
  2. +7 −0 optimize.c
@@ -1,3 +1,8 @@
2013-12-05 Todd Christensen <tchristensen at bykd.com>

* Avoid invalid opcode 153/1/8 by not setting op2 to unused for
ZEND_DECLARE_LAMBDA_FUNCTION.

2012-08-16 Hans Rakers <hans at rakers.org>

* Remove current memory protection implementation. This code has
@@ -2889,7 +2889,14 @@ static int build_cfg(zend_op_array *op_array, BB* bb)
if ((dsc->ops & OP2_MASK) == OP2_CLASS) {
OP2_TYPE(op) = IS_VAR;
} else if ((dsc->ops & OP2_MASK) == OP2_UNUSED) {
#ifdef ZEND_DECLARE_LAMBDA_FUNCTION
/* The opcode handler expects very specific op types here. */
if (op->opcode != ZEND_DECLARE_LAMBDA_FUNCTION) {
OP2_TYPE(op) = IS_UNUSED;
}
#else
OP2_TYPE(op) = IS_UNUSED;
#endif
}
#ifndef ZEND_ENGINE_2_4
else if ((dsc->ops & OP2_MASK) == OP2_FETCH &&

1 comment on commit e7dc802

@acwind

This comment has been minimized.

Copy link

acwind commented on e7dc802 Oct 14, 2014

thanks, finally I can use eaccelerator again :)

Please sign in to comment.
You can’t perform that action at this time.