From 76682c27b5c0f6b1b8e256e704aae2d15138823e Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 25 Apr 2013 12:33:51 +0200 Subject: php-pecl-apcu: upstream patch to fix a segfault when used from cli --- apcu-git.patch | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 apcu-git.patch (limited to 'apcu-git.patch') diff --git a/apcu-git.patch b/apcu-git.patch new file mode 100644 index 0000000..9f6e922 --- /dev/null +++ b/apcu-git.patch @@ -0,0 +1,38 @@ +From d192f6081164ba5ec5b05dce8e5c0b50b5d7b35d Mon Sep 17 00:00:00 2001 +From: krakjoe +Date: Thu, 28 Mar 2013 20:27:16 +0000 +Subject: [PATCH] forcefully align frequent structs (gcc >= 3.1), in testing + (windows anyone?) stop crash in cli when cache is disabled by configuration + and some userland functions are executed + +--- + apc.h | 5 ++++- + apc_cache.c | 4 ++-- + apc_cache_api.h | 12 +++++++----- + php_apc.c | 3 +-- + 4 files changed, 14 insertions(+), 10 deletions(-) + +diff --git a/php_apc.c b/php_apc.c +index 9849580..6dc0184 100644 +--- a/php_apc.c ++++ b/php_apc.c +@@ -499,7 +499,7 @@ static void apc_store_helper(INTERNAL_FUNCTION_PARAMETERS, const zend_bool exclu + return; + } + +- if (!key) { ++ if (!key || !APCG(enabled)) { + /* cannot work without key */ + RETURN_FALSE; + } +@@ -941,7 +941,6 @@ void *apc_erealloc_wrapper(void *ptr, size_t size) { + HashTable *h_vars; + apc_bd_t *bd; + +- + if (!APCG(enabled)) { + apc_warning("APC is not enabled, apc_bin_dump not available." TSRMLS_CC); + RETURN_FALSE; +-- +1.8.1.6 + -- cgit