Skip to content

Commit 170fcf2

Browse files
committed
Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4: Remove CE cache from non-interned file cache strings
2 parents edcbd4a + 7e077f5 commit 170fcf2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? ????, PHP 8.5.0
44

5+
- Opcache:
6+
. Fixed bug GH-20329 (opcache.file_cache broken with full interned string
7+
buffer). (Arnaud)
58

69
06 Nov 2025, PHP 8.5.0RC4
710

ext/opcache/zend_file_cache.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,17 +135,13 @@ static int zend_file_cache_flock(int fd, int type)
135135
(ptr) = (void*)((char*)buf + (size_t)(ptr)); \
136136
} \
137137
} while (0)
138+
138139
#define SERIALIZE_STR(ptr) do { \
139140
if (ptr) { \
140141
if (IS_ACCEL_INTERNED(ptr)) { \
141142
(ptr) = zend_file_cache_serialize_interned((zend_string*)(ptr), info); \
142143
} else { \
143144
ZEND_ASSERT(IS_UNSERIALIZED(ptr)); \
144-
/* script->corrupted shows if the script in SHM or not */ \
145-
if (EXPECTED(script->corrupted)) { \
146-
GC_ADD_FLAGS(ptr, IS_STR_INTERNED); \
147-
GC_DEL_FLAGS(ptr, IS_STR_PERMANENT); \
148-
} \
149145
(ptr) = (void*)((char*)(ptr) - (char*)script->mem); \
150146
} \
151147
} \
@@ -164,6 +160,7 @@ static int zend_file_cache_flock(int fd, int type)
164160
GC_ADD_FLAGS(ptr, IS_STR_INTERNED); \
165161
GC_DEL_FLAGS(ptr, IS_STR_PERMANENT); \
166162
} \
163+
GC_DEL_FLAGS(ptr, IS_STR_CLASS_NAME_MAP_PTR); \
167164
} \
168165
} \
169166
} while (0)

0 commit comments

Comments
 (0)