Skip to content

Commit afba201

Browse files
authored
Don't set IS_STR_PERMANENT flag for strings stored in the file cache (#15643)
1 parent fd42cdb commit afba201

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ext/opcache/zend_persist.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737

3838
#define zend_set_str_gc_flags(str) do { \
3939
GC_SET_REFCOUNT(str, 2); \
40-
if (file_cache_only) { \
40+
if (file_cache_only \
41+
|| (ZCG(current_persistent_script) && ZCG(current_persistent_script)->corrupted)) { \
4142
GC_TYPE_INFO(str) = GC_STRING | (IS_STR_INTERNED << GC_FLAGS_SHIFT); \
4243
} else { \
4344
GC_TYPE_INFO(str) = GC_STRING | ((IS_STR_INTERNED | IS_STR_PERMANENT) << GC_FLAGS_SHIFT); \

0 commit comments

Comments
 (0)