1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Add missing clobbered registers

Inline assembly in zend_safe_address() clobbers flags register. Add missing
register in clobber list for aarch64 and powerpc64. Other archs were already
correct.

Fixes GH-21029
This commit is contained in:
Arnaud Le Blanc
2026-01-27 15:24:45 +01:00
parent e6beffb6ed
commit 93d32eae27
2 changed files with 6 additions and 2 deletions

2
NEWS
View File

@@ -2,6 +2,8 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? ????, PHP 8.4.19
- Core:
. Fixed bug GH-21029 (zend_mm_heap corrupted on Aarch64, LTO builds). (Arnaud)
12 Feb 2026, PHP 8.4.18

View File

@@ -267,7 +267,8 @@ static zend_always_inline size_t zend_safe_address(size_t nmemb, size_t size, si
: "=&r"(res), "=&r"(m_overflow)
: "r"(nmemb),
"r"(size),
"r"(offset));
"r"(offset)
: "cc");
if (UNEXPECTED(m_overflow)) {
*overflow = 1;
@@ -291,7 +292,8 @@ static zend_always_inline size_t zend_safe_address(size_t nmemb, size_t size, si
: "=&r"(res), "=&r"(m_overflow)
: "r"(nmemb),
"r"(size),
"r"(offset));
"r"(offset)
: "xer");
if (UNEXPECTED(m_overflow)) {
*overflow = 1;