php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #52144
Patch tracing_modified_functions_classes.patch revision 2012-11-08 14:32 UTC by laruence@php.net
Patch bug52144_new.patch revision 2012-11-07 10:58 UTC by laruence@php.net
revision 2012-11-07 07:03 UTC by laruence@php.net
Patch autofilter_missing_funcs.patch revision 2012-11-03 14:59 UTC by gopalv@php.net
Patch auto_filter_on_missing_lambdas.patch revision 2012-11-02 12:18 UTC by gopalv@php.net
Patch bug52144.patch revision 2012-11-02 04:32 UTC by laruence@php.net
revision 2012-11-01 03:10 UTC by laruence@php.net

Patch bug52144.patch for APC Bug #52144

Patch version 2012-11-02 04:32 UTC

Return to Bug #52144 | Download this patch
This patch renders other patches obsolete

Obsolete patches:

Patch Revisions: 2012-11-02 04:32 UTC | 2012-11-01 03:10 UTC

Developer: laruence@php.net



  Index: apc_main.c
  ===================================================================
  --- apc_main.c	(revision 328200)
  +++ apc_main.c	(working copy)
 @@ -484,7 +484,8 @@
      int bailout=0;
 @@ -485,6 +485,7 @@
       const char* filename = NULL;
   
 -    if (!APCG(enabled) || apc_cache_busy(apc_cache)) {
 +    if (!APCG(enabled) || apc_cache_busy(apc_cache) || APCG(skip_cache)) {
      if (!APCG(enabled) || apc_cache_busy(apc_cache)) {
  +        APCG(skip_cache) = 1;
           return old_compile_file(h, type TSRMLS_CC);
       }
   
 @@ -499,9 +500,11 @@
          int ret = apc_regex_match_array(APCG(compiled_filters), filename);
  
          if(ret == APC_NEGATIVE_MATCH || (ret != APC_POSITIVE_MATCH && !APCG(cache_by_default))) {
 +            APCG(skip_cache) = 1;
              return old_compile_file(h, type TSRMLS_CC);
          }
 @@ -502,17 +503,18 @@
              return old_compile_file(h, type TSRMLS_CC);
          }
       } else if(!APCG(cache_by_default)) {
  +        APCG(skip_cache) = 1;
           return old_compile_file(h, type TSRMLS_CC);
      }
      APCG(current_cache) = apc_cache;
 @@ -532,6 +535,7 @@
      }
      APCG(current_cache) = apc_cache;
  
 -
      t = apc_time();
  
      apc_debug("1. h->opened_path=[%s]  h->filename=[%s]\n" TSRMLS_CC, h->opened_path?h->opened_path:"null",h->filename);
  
      /* try to create a cache key; if we fail, give up on caching */
      if (!apc_cache_make_file_key(&key, h->filename, PG(include_path), t TSRMLS_CC)) {
 +        APCG(skip_cache) = 1;
          return old_compile_file(h, type TSRMLS_CC);
      }
  
 @@ -532,6 +534,7 @@
                                                   apc_sma_protect, apc_sma_unprotect TSRMLS_CC);
           if (!ctxt.pool) {
               apc_warning("Unable to allocate memory for pool." TSRMLS_CC);
 +            APCG(skip_cache) = 1;
              return old_compile_file(h, type TSRMLS_CC);
          }
 +            APCG(skip_cache) = 1;
              return old_compile_file(h, type TSRMLS_CC);
          }
           ctxt.copy = APC_COPY_OUT_OPCODE;
 @@ -581,11 +585,13 @@
 @@ -581,21 +584,28 @@
           } else {
               if (apc_search_paths(h->filename, PG(include_path), &fileinfo TSRMLS_CC) != 0) {
                   apc_debug("Stat failed %s - bailing (%s) (%d)\n" TSRMLS_CC,h->filename,SG(request_info).path_translated);
  +                APCG(skip_cache) = 1;


  +            APCG(skip_cache) = 1;
               return old_compile_file(h, type TSRMLS_CC);
           }
           key.mtime = fileinfo.st_buf.sb.st_mtime;
 @@ -596,6 +602,7 @@
      }
  
 +    if (APCG(skip_cache)) {
 +        return old_compile_file(h, type TSRMLS_CC);
 +    }
 +
      HANDLE_BLOCK_INTERRUPTIONS();
  
   #if NONBLOCKING_LOCK_AVAILABLE
       if(APCG(write_lock)) {
           if(!apc_cache_write_lock(apc_cache TSRMLS_CC)) {
  +            APCG(skip_cache) = 1;
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 09 13:01:26 2024 UTC