@@ -117,23 +117,23 @@ zend_result zend_jit_resolve_tsrm_ls_cache_offsets(
117117 /* Check if the general dynamic code was relaxed by the linker */
118118
119119 // addl any,%ebx
120- if (code [0 ] != 0x81 || code [ 1 ] != 0xc3 ) {
120+ if (memcmp ( & code [0 ], "\x81\xc3" , 2 ) != 0 ) {
121121 uint64_t bytes ;
122122 memcpy (& bytes , & code [0 ], 8 );
123123 zend_accel_error (ACCEL_LOG_DEBUG , "addl insn does not match: 0x%16" PRIx64 "\n" , bytes );
124124 goto code_changed ;
125125 }
126126
127127 // leal any(,%ebx,1),%eax
128- if (code [6 ] != 0x8d || code [ 7 ] != 0x04 || code [ 8 ] != 0x1d ) {
128+ if (memcmp ( & code [6 ], "\x8d\x04\x1d" , 3 ) != 0 ) {
129129 uint64_t bytes ;
130130 memcpy (& bytes , & code [6 ], 8 );
131131 zend_accel_error (ACCEL_LOG_DEBUG , "leal insn does not match: 0x%16" PRIx64 "\n" , bytes );
132132 goto code_changed ;
133133 }
134134
135135 // call any
136- if (code [13 ] != 0xe8 ) {
136+ if (memcmp ( & code [13 ], "\xe8" , 1 ) != 0 ) {
137137 uint64_t bytes ;
138138 memcpy (& bytes , & code [13 ], 8 );
139139 zend_accel_error (ACCEL_LOG_DEBUG , "call insn does not match: 0x%16" PRIx64 "\n" , bytes );
@@ -189,7 +189,7 @@ zend_result zend_jit_resolve_tsrm_ls_cache_offsets(
189189 }
190190
191191 // subl $any,%eax
192- if (code [12 ] != 0x81 || code [ 13 ] != 0xe8 ) {
192+ if (memcmp ( & code [12 ], "\x81\xe8" , 2 ) != 0 ) {
193193 uint64_t bytes ;
194194 memcpy (& bytes , & code [6 ], 8 );
195195 zend_accel_error (ACCEL_LOG_DEBUG , "subl insn does not match: 0x%16" PRIx64 "\n" , bytes );
0 commit comments