mirror of
https://github.com/php/php-src.git
synced 2024-11-28 04:14:26 +08:00
Merge branch 'master' into temporary_cleaning
* master: Avoid dangerous optimization Fixed JMPZNZ instruction printing Attempt at falling back on ldap_find_control for Mac OS
This commit is contained in:
commit
bbfbe470c8
@ -204,7 +204,7 @@ if test "$PHP_LDAP" != "no"; then
|
||||
|
||||
dnl Solaris 2.8 claims to be 2004 API, but doesn't have
|
||||
dnl ldap_parse_reference() nor ldap_start_tls_s()
|
||||
AC_CHECK_FUNCS([ldap_parse_result ldap_parse_reference ldap_start_tls_s])
|
||||
AC_CHECK_FUNCS([ldap_parse_result ldap_parse_reference ldap_start_tls_s ldap_control_find])
|
||||
|
||||
dnl
|
||||
dnl SASL check
|
||||
|
@ -70,6 +70,14 @@
|
||||
#define PHP_LDAP_ESCAPE_FILTER 0x01
|
||||
#define PHP_LDAP_ESCAPE_DN 0x02
|
||||
|
||||
#ifndef HAVE_LDAP_CONTROL_FIND
|
||||
LDAPControl *ldap_control_find( const char *oid, LDAPControl **ctrls, LDAPControl ***nextctrlp)
|
||||
{
|
||||
assert(nextctrlp == NULL);
|
||||
return ldap_find_control(oid, ctrls);
|
||||
}
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
LDAP *link;
|
||||
#if defined(HAVE_3ARG_SETREBINDPROC)
|
||||
|
@ -693,7 +693,8 @@ static void zend_optimize_block(zend_code_block *block, zend_op_array *op_array,
|
||||
*/
|
||||
if (opline->opcode == ZEND_IS_EQUAL ||
|
||||
opline->opcode == ZEND_IS_NOT_EQUAL ||
|
||||
opline->opcode == ZEND_CASE) {
|
||||
/* CASE variable will be deleted later by FREE, so we can't optimize it */
|
||||
(opline->opcode == ZEND_CASE && (ZEND_OP1_TYPE(opline) & (IS_CONST|IS_CV)))) {
|
||||
if (ZEND_OP1_TYPE(opline) == IS_CONST &&
|
||||
(Z_TYPE(ZEND_OP1_LITERAL(opline)) == IS_FALSE ||
|
||||
Z_TYPE(ZEND_OP1_LITERAL(opline)) == IS_TRUE)) {
|
||||
|
@ -88,7 +88,7 @@ char *phpdbg_decode_opline(zend_op_array *ops, zend_op *op, HashTable *vars) /*{
|
||||
switch (op->opcode) {
|
||||
/* TODO: ZEND_FAST_CALL, ZEND_FAST_RET op2 */
|
||||
case ZEND_JMPZNZ:
|
||||
asprintf(&decode[2], "J%u or J%" PRIu32, op->op2.opline_num, op->extended_value);
|
||||
asprintf(&decode[2], "J%u or J%" PRIu32, OP_JMP_ADDR(op, op->op2) - ops->opcodes, ZEND_OFFSET_TO_OPLINE(op, op->extended_value) - ops->opcodes);
|
||||
break;
|
||||
|
||||
case ZEND_JMPZ:
|
||||
|
Loading…
Reference in New Issue
Block a user