Skip to content

Commit e0996de

Browse files
committed
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4: Changed PowerPC CPU registers used by Zend VM to work around GCC bug.
2 parents 4434781 + 39d8fc1 commit e0996de

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

NEWS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? 2021, PHP 8.0.5
44

5+
- Core:
6+
. Changed PowerPC CPU registers used by Zend VM to work around GCC bug.
7+
Old registers (r28/r29) might be clobbered by _restgpr routine used for
8+
return from C function compiled with -Os. (Dmitry)
9+
510
- DOM:
611
. Fixed bug #66783 (UAF when appending DOMDocument to element). (cmb)
712

Zend/zend_execute.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@
5454
# define ZEND_VM_FP_GLOBAL_REG "%r14"
5555
# define ZEND_VM_IP_GLOBAL_REG "%r15"
5656
# elif defined(__GNUC__) && ZEND_GCC_VERSION >= 4008 && defined(__powerpc64__)
57-
# define ZEND_VM_FP_GLOBAL_REG "r28"
58-
# define ZEND_VM_IP_GLOBAL_REG "r29"
57+
# define ZEND_VM_FP_GLOBAL_REG "r14"
58+
# define ZEND_VM_IP_GLOBAL_REG "r15"
5959
# elif defined(__IBMC__) && ZEND_GCC_VERSION >= 4002 && defined(__powerpc64__)
60-
# define ZEND_VM_FP_GLOBAL_REG "r28"
61-
# define ZEND_VM_IP_GLOBAL_REG "r29"
60+
# define ZEND_VM_FP_GLOBAL_REG "r14"
61+
# define ZEND_VM_IP_GLOBAL_REG "r15"
6262
# elif defined(__GNUC__) && ZEND_GCC_VERSION >= 4008 && defined(__aarch64__)
6363
# define ZEND_VM_FP_GLOBAL_REG "x27"
6464
# define ZEND_VM_IP_GLOBAL_REG "x28"

0 commit comments

Comments
 (0)