From c510a5ff4035647f61d24dd723e9f8e02ac9cf9b Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 20 Nov 2018 19:15:47 +0100 Subject: [PATCH] Disable slam defense by default Slam defense was broken for so long that it effectively defaulted to false -- make that the actual default to avoid BC breakage. Fixes #347. --- php_apc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/php_apc.c b/php_apc.c index ac536ed1..c6ff44ba 100644 --- a/php_apc.c +++ b/php_apc.c @@ -88,7 +88,7 @@ apc_sma_t apc_sma; static void php_apc_init_globals(zend_apcu_globals* apcu_globals) { apcu_globals->initialized = 0; - apcu_globals->slam_defense = 1; + apcu_globals->slam_defense = 0; apcu_globals->smart = 0; apcu_globals->preload_path = NULL; apcu_globals->coredump_unmap = 0; @@ -147,7 +147,7 @@ STD_PHP_INI_ENTRY("apc.smart", "0", PHP_INI_SYSTEM, OnUpdateLong, STD_PHP_INI_ENTRY("apc.mmap_file_mask", NULL, PHP_INI_SYSTEM, OnUpdateString, mmap_file_mask, zend_apcu_globals, apcu_globals) #endif STD_PHP_INI_BOOLEAN("apc.enable_cli", "0", PHP_INI_SYSTEM, OnUpdateBool, enable_cli, zend_apcu_globals, apcu_globals) -STD_PHP_INI_BOOLEAN("apc.slam_defense", "1", PHP_INI_SYSTEM, OnUpdateBool, slam_defense, zend_apcu_globals, apcu_globals) +STD_PHP_INI_BOOLEAN("apc.slam_defense", "0", PHP_INI_SYSTEM, OnUpdateBool, slam_defense, zend_apcu_globals, apcu_globals) STD_PHP_INI_ENTRY("apc.preload_path", (char*)NULL, PHP_INI_SYSTEM, OnUpdateString, preload_path, zend_apcu_globals, apcu_globals) STD_PHP_INI_BOOLEAN("apc.coredump_unmap", "0", PHP_INI_SYSTEM, OnUpdateBool, coredump_unmap, zend_apcu_globals, apcu_globals) STD_PHP_INI_BOOLEAN("apc.use_request_time", "1", PHP_INI_ALL, OnUpdateBool, use_request_time, zend_apcu_globals, apcu_globals)