From b7195c1939c230aa536a65d2f907e1b7f8c54567 Mon Sep 17 00:00:00 2001 From: Xuefer Date: Sat, 9 Apr 2011 10:18:29 +0000 Subject: [PATCH] fix assertion failure for PHP4 git-svn-id: svn://svn.lighttpd.net/xcache/trunk@718 c26eb9a1-5813-0410-bd6c-c2e55f420ca7 --- opcode_spec.c | 5 +++++ opcode_spec_def.h | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/opcode_spec.c b/opcode_spec.c index 1f1bd55..1cb8bf0 100644 --- a/opcode_spec.c +++ b/opcode_spec.c @@ -19,6 +19,11 @@ zend_uchar xc_get_opcode_spec_count() const xc_opcode_spec_t *xc_get_opcode_spec(zend_uchar opcode) { +#ifndef NDEBUG + if (xc_get_opcode_count() != xc_get_opcode_spec_count()) { + fprintf(stderr, "count mismatch: xc_get_opcode_count=%d, xc_get_opcode_spec_count=%d\n", xc_get_opcode_count(), xc_get_opcode_spec_count()); + } +#endif assert(xc_get_opcode_count() == xc_get_opcode_spec_count()); assert(opcode < xc_get_opcode_spec_count()); return &xc_opcode_spec[opcode]; diff --git a/opcode_spec_def.h b/opcode_spec_def.h index bd7b7c8..cd8d134 100644 --- a/opcode_spec_def.h +++ b/opcode_spec_def.h @@ -232,5 +232,12 @@ static const xc_opcode_spec_t xc_opcode_spec[] = { OPSPEC( UNUSED, UNUSED, UNUSED, UNUSED) /* 152 UNDEF */ OPSPEC( UNUSED, UNUSED, UNUSED, UNUSED) /* 153 UNDEF */ # endif +#else + OPSPEC( UNUSED, UNUSED, UNUSED, UNUSED) /* 107 UNDEF */ + OPSPEC( UNUSED, UNUSED, UNUSED, UNUSED) /* 108 UNDEF */ + OPSPEC( UNUSED, UNUSED, UNUSED, UNUSED) /* 109 UNDEF */ + OPSPEC( FCALL, STD, OPLINE, VAR) /* 61 DO_FCALL_BY_FUNC */ + OPSPEC(INIT_FCALL, STD, STD, UNUSED) /* 111 INIT_FCALL_BY_FUNC */ + OPSPEC( UNUSED, UNUSED, UNUSED, UNUSED) /* 112 UNDEF */ #endif };