summaryrefslogtreecommitdiff
path: root/processor
diff options
context:
space:
mode:
authorXuefer <xuefer@gmail.com>2015-04-18 16:07:05 +0000
committerXuefer <xuefer@gmail.com>2015-04-18 16:07:05 +0000
commit95da04c9f2548f5eae0db1b46347361d09c96724 (patch)
tree0aeb9d4dabc0e647243cf1d63f0fffa8f843b2cc /processor
parentc9aea0c76408fc7b0e022fc5af93d2c72522bc93 (diff)
downloadxcache-95da04c9f2548f5eae0db1b46347361d09c96724.tar.gz
xcache-95da04c9f2548f5eae0db1b46347361d09c96724.zip
dasm: fix include opcode spec
git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1592 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
Diffstat (limited to 'processor')
-rw-r--r--processor/processor.m47
1 files changed, 6 insertions, 1 deletions
diff --git a/processor/processor.m4 b/processor/processor.m4
index 955f720..786ddf4 100644
--- a/processor/processor.m4
+++ b/processor/processor.m4
@@ -662,7 +662,12 @@ define(`UNION_znode_op', `dnl {{{
', `
IFDASM(`{
zval *zv;
- zval *srczv = &dasm->active_op_array_src->literals[SRC(`$1.constant')].constant;
+ zval *srczv;
+ if (SRC(`$1.constant') >= dasm->active_op_array_src->last_literal) {
+ fprintf(stderr, "opcode %s $1 want literal %d\n", xc_get_opcode(SRC(`opcode')), SRC(`$1.constant'));
+ break;
+ }
+ srczv = &dasm->active_op_array_src->literals[SRC(`$1.constant')].constant;
ALLOC_ZVAL(zv);
MAKE_COPY_ZVAL(&srczv, zv);
add_assoc_zval_ex(DST(), XCACHE_STRS("$1.constant"), zv);