From: Nikita Popov Date: Thu, 2 Jan 2020 14:01:56 +0000 (+0100) Subject: Merge branch 'PHP-7.4' X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3bc4159a19c8ff23f43ecc6d88200d0a4c3fc081;p=php Merge branch 'PHP-7.4' * PHP-7.4: Fix file cache run_time_cache unserialization Update ZCSG(map_ptr_last) only if for_shm --- 3bc4159a19c8ff23f43ecc6d88200d0a4c3fc081 diff --cc ext/opcache/zend_persist.c index e78e3cbfce,dd4c199ef7..cbf91144f3 --- a/ext/opcache/zend_persist.c +++ b/ext/opcache/zend_persist.c @@@ -1138,17 -1089,10 +1138,19 @@@ zend_persistent_script *zend_accel_scri } ZEND_HASH_FOREACH_END(); zend_persist_op_array_ex(&script->script.main_op_array, script); - ZCSG(map_ptr_last) = CG(map_ptr_last); + if (for_shm) { + ZCSG(map_ptr_last) = CG(map_ptr_last); + } +#ifdef HAVE_JIT + if (ZCG(jit_enabled) && for_shm) { + if (ZEND_JIT_LEVEL(ZCG(accel_directives).jit) >= ZEND_JIT_LEVEL_OPT_SCRIPT) { + zend_jit_script(&script->script); + } + zend_jit_protect(); + } +#endif + script->corrupted = 0; ZCG(current_persistent_script) = NULL;