@@ -117,23 +117,23 @@ zend_result zend_jit_resolve_tsrm_ls_cache_offsets(
117
117
/* Check if the general dynamic code was relaxed by the linker */
118
118
119
119
// addl any,%ebx
120
- if (code [0 ] != 0x81 || code [ 1 ] != 0xc3 ) {
120
+ if (memcmp ( & code [0 ], "\x81\xc3" , 2 ) != 0 ) {
121
121
uint64_t bytes ;
122
122
memcpy (& bytes , & code [0 ], 8 );
123
123
zend_accel_error (ACCEL_LOG_DEBUG , "addl insn does not match: 0x%16" PRIx64 "\n" , bytes );
124
124
goto code_changed ;
125
125
}
126
126
127
127
// 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 ) {
129
129
uint64_t bytes ;
130
130
memcpy (& bytes , & code [6 ], 8 );
131
131
zend_accel_error (ACCEL_LOG_DEBUG , "leal insn does not match: 0x%16" PRIx64 "\n" , bytes );
132
132
goto code_changed ;
133
133
}
134
134
135
135
// call any
136
- if (code [13 ] != 0xe8 ) {
136
+ if (memcmp ( & code [13 ], "\xe8" , 1 ) != 0 ) {
137
137
uint64_t bytes ;
138
138
memcpy (& bytes , & code [13 ], 8 );
139
139
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(
189
189
}
190
190
191
191
// subl $any,%eax
192
- if (code [12 ] != 0x81 || code [ 13 ] != 0xe8 ) {
192
+ if (memcmp ( & code [12 ], "\x81\xe8" , 2 ) != 0 ) {
193
193
uint64_t bytes ;
194
194
memcpy (& bytes , & code [6 ], 8 );
195
195
zend_accel_error (ACCEL_LOG_DEBUG , "subl insn does not match: 0x%16" PRIx64 "\n" , bytes );
0 commit comments