af_gb_init:
   17|    515|void af_gb_init() {
   18|    515|  pointer_idx = 0;
   19|       |
   20|  52.0k|   for (int i = 0; i < GB_SIZE; i++) {
  ------------------
  |  |   10|  52.0k|#define GB_SIZE 100
  ------------------
  |  Branch (20:20): [True: 51.5k, False: 515]
  ------------------
   21|  51.5k|     pointer_arr[i] = NULL;
   22|  51.5k|   }
   23|    515|}
af_gb_cleanup:
   25|    515|void af_gb_cleanup() {
   26|  52.0k|  for(int i = 0; i < GB_SIZE; i++) {
  ------------------
  |  |   10|  52.0k|#define GB_SIZE 100
  ------------------
  |  Branch (26:18): [True: 51.5k, False: 515]
  ------------------
   27|  51.5k|    if (pointer_arr[i] != NULL) {
  ------------------
  |  Branch (27:9): [True: 2.48k, False: 49.0k]
  ------------------
   28|  2.48k|      free(pointer_arr[i]);
   29|  2.48k|    }
   30|  51.5k|  }
   31|    515|}
af_get_null_terminated:
   33|  2.57k|char *af_get_null_terminated(const uint8_t **data, size_t *size) {
   34|  2.57k|#define STR_SIZE 75
   35|  2.57k|  if (*size < STR_SIZE || (int)*size < 0) {
  ------------------
  |  |   34|  5.15k|#define STR_SIZE 75
  ------------------
  |  Branch (35:7): [True: 91, False: 2.48k]
  |  Branch (35:27): [True: 0, False: 2.48k]
  ------------------
   36|     91|    return NULL;
   37|     91|  }
   38|       |
   39|  2.48k|  char *new_s = malloc(STR_SIZE + 1);
  ------------------
  |  |   34|  2.48k|#define STR_SIZE 75
  ------------------
   40|  2.48k|  memcpy(new_s, *data, STR_SIZE);
  ------------------
  |  |   34|  2.48k|#define STR_SIZE 75
  ------------------
   41|  2.48k|  new_s[STR_SIZE] = '\0';
  ------------------
  |  |   34|  2.48k|#define STR_SIZE 75
  ------------------
   42|       |
   43|  2.48k|  *data = *data+STR_SIZE;
  ------------------
  |  |   34|  2.48k|#define STR_SIZE 75
  ------------------
   44|  2.48k|  *size -= STR_SIZE;
  ------------------
  |  |   34|  2.48k|#define STR_SIZE 75
  ------------------
   45|  2.48k|  return new_s;
   46|  2.57k|}
af_gb_get_null_terminated:
   64|  2.57k|char *af_gb_get_null_terminated(const uint8_t **data, size_t *size) {
   65|       |
   66|  2.57k|  char *nstr = af_get_null_terminated(data, size);
   67|  2.57k|  if (nstr == NULL) {
  ------------------
  |  Branch (67:7): [True: 91, False: 2.48k]
  ------------------
   68|     91|    return NULL;
   69|     91|  }
   70|  2.48k|  pointer_arr[pointer_idx++] = (void*)nstr;
   71|  2.48k|  return nstr;
   72|  2.57k|}
af_get_short:
   90|  1.47k|short af_get_short(const uint8_t **data, size_t *size) {
   91|  1.47k|  if (*size <= 0) return 0;
  ------------------
  |  Branch (91:7): [True: 1.07k, False: 400]
  ------------------
   92|    400|  short c = (short)(*data)[0];
   93|    400|  *data += 1;
   94|    400|  *size-=1;
   95|    400|  return c;
   96|  1.47k|}

LLVMFuzzerInitialize:
   57|      2|int LLVMFuzzerInitialize(int *argc, char ***argv) {
   58|      2|  apr_pool_create(&apr_hook_global_pool, NULL);
  ------------------
  |  |  301|      2|    apr_pool_create_ex(newpool, parent, NULL, NULL)
  ------------------
   59|      2|  ap_open_stderr_log(apr_hook_global_pool);
   60|      2|  ap_hook_http_scheme(http_scheme2, NULL, NULL, APR_HOOK_REALLY_LAST);
  ------------------
  |  |  307|      2|#define APR_HOOK_REALLY_LAST     30
  ------------------
   61|      2|  return 0;
   62|      2|}
LLVMFuzzerTestOneInput:
   64|    515|int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
   65|    515|  af_gb_init();
   66|       |
   67|    515|  const uint8_t *data2 = data;
   68|    515|  size_t size2 = size;
   69|       |
   70|       |  /* get random data for the fuzzer */
   71|    515|  char *new_str = af_gb_get_null_terminated(&data2, &size2);
   72|    515|  char *new_str2 = af_gb_get_null_terminated(&data2, &size2);
   73|    515|  char *new_str3 = af_gb_get_null_terminated(&data2, &size2);
   74|    515|  char *new_str4 = af_gb_get_null_terminated(&data2, &size2);
   75|    515|  char *new_str5 = af_gb_get_null_terminated(&data2, &size2);
   76|    515|  if (new_str != NULL && 
  ------------------
  |  Branch (76:7): [True: 502, False: 13]
  ------------------
   77|    515|      new_str2 != NULL && 
  ------------------
  |  Branch (77:7): [True: 500, False: 2]
  ------------------
   78|    515|      new_str3 != NULL &&
  ------------------
  |  Branch (78:7): [True: 497, False: 3]
  ------------------
   79|    515|      new_str4 != NULL && 
  ------------------
  |  Branch (79:7): [True: 494, False: 3]
  ------------------
   80|    515|      new_str5 != NULL) {
  ------------------
  |  Branch (80:7): [True: 491, False: 3]
  ------------------
   81|       |
   82|       |    /* this is the main fuzzing logic */
   83|       |
   84|    491|    apr_pool_initialize();
   85|    491|    apr_pool_t *v = NULL;
   86|    491|    apr_pool_create(&v, NULL);
  ------------------
  |  |  301|    491|    apr_pool_create_ex(newpool, parent, NULL, NULL)
  ------------------
   87|       |
   88|    491|    conn_rec conn;
   89|    491|    conn.pool = v;
   90|    491|    server_rec base_server;
   91|    491|    conn.base_server = &base_server;
   92|    491|    conn.bucket_alloc = apr_bucket_alloc_create(conn.pool);
   93|    491|    ap_method_registry_init(conn.pool);
   94|       |
   95|       |    //server_rec server;
   96|       |
   97|       |    /* Simulate ap_read_request */
   98|    491|    request_rec *r = NULL;
   99|    491|    r = ap_create_request(&conn);
  100|       |
  101|       |    /* create a logs array for the request */
  102|    491|    struct ap_logconf logs = {};
  103|    491|    char *log_levels = calloc(1000, 1);
  104|    491|    memset(log_levels, 0, 1000);
  105|    491|    logs.module_levels = log_levels;
  106|    491|    r->log = &logs;
  107|    491|    if (r != NULL) {
  ------------------
  |  Branch (107:9): [True: 491, False: 0]
  ------------------
  108|    491|      apr_bucket_brigade *tmp_bb = apr_brigade_create(r->pool, r->connection->bucket_alloc);
  109|    491|      conn.keepalive = AP_CONN_UNKNOWN;
  110|       |
  111|    491|      ap_run_pre_read_request(r, &conn);
  112|       |
  113|    491|      core_server_config conf_mod;
  114|    491|      conf_mod.http_conformance   = (char)af_get_short(&data2, &size2);
  115|    491|      conf_mod.http09_enable      = (char)af_get_short(&data2, &size2);
  116|    491|      conf_mod.http_methods       = (char)af_get_short(&data2, &size2);
  117|    491|      void **module_config_arr = malloc(1000);
  118|    491|      module_config_arr[0] = &conf_mod;
  119|       |
  120|    491|      r->server->module_config = module_config_arr;
  121|    491|      ap_set_core_module_config(r->server->module_config, &conf_mod);
  ------------------
  |  |  386|    491|    ((((void **)(v))[AP_CORE_MODULE_INDEX]) = (val))
  |  |  ------------------
  |  |  |  |  382|    491|#define AP_CORE_MODULE_INDEX  0
  |  |  ------------------
  ------------------
  122|       |
  123|       |      /* randomise content of request */
  124|    491|      r->unparsed_uri           = new_str;
  125|    491|      r->uri                    = new_str2;
  126|    491|      r->server->server_scheme  = new_str3;
  127|    491|      r->method                 = new_str4;
  128|    491|      r->the_request            = new_str5;
  129|       |
  130|       |      /* main target */
  131|    491|      ap_parse_request_line(r);
  132|       |
  133|    491|      free(module_config_arr);
  134|    491|    }
  135|    491|    free(log_levels);
  136|    491|    apr_pool_terminate();
  137|    491|  }
  138|       |
  139|    515|  af_gb_cleanup();
  140|    515|  return 0;
  141|    515|}
fuzz_request.c:http_scheme2:
   42|    187|static const char *http_scheme2(const request_rec *r) {
   43|       |  /*
   44|       |   * The http module shouldn't return anything other than
   45|       |   * "http" (the default) or "https".
   46|       |   */
   47|    187|  if (r->server->server_scheme &&
  ------------------
  |  Branch (47:7): [True: 187, False: 0]
  ------------------
   48|    187|      (strcmp(r->server->server_scheme, "https") == 0))
  ------------------
  |  Branch (48:7): [True: 5, False: 182]
  ------------------
   49|      5|    return "https";
   50|       |
   51|    182|  return "http";
   52|    187|}

ap_method_registry_init:
  699|    491|{
  700|    491|    methods_registry = apr_hash_make(p);
  701|    491|    apr_pool_cleanup_register(p, NULL,
  702|    491|                              ap_method_registry_destroy,
  703|    491|                              apr_pool_cleanup_null);
  704|       |
  705|       |    /* put all the standard methods into the registry hash to ease the
  706|       |     * mapping operations between name and number
  707|       |     * HEAD is a special-instance of the GET method and shares the same ID
  708|       |     */
  709|    491|    register_one_method(p, "GET", M_GET);
  ------------------
  |  |  599|    491|#define M_GET                   0       /** RFC 2616: HTTP */
  ------------------
  710|    491|    register_one_method(p, "HEAD", M_GET);
  ------------------
  |  |  599|    491|#define M_GET                   0       /** RFC 2616: HTTP */
  ------------------
  711|    491|    register_one_method(p, "PUT", M_PUT);
  ------------------
  |  |  600|    491|#define M_PUT                   1       /*  :             */
  ------------------
  712|    491|    register_one_method(p, "POST", M_POST);
  ------------------
  |  |  601|    491|#define M_POST                  2
  ------------------
  713|    491|    register_one_method(p, "DELETE", M_DELETE);
  ------------------
  |  |  602|    491|#define M_DELETE                3
  ------------------
  714|    491|    register_one_method(p, "CONNECT", M_CONNECT);
  ------------------
  |  |  603|    491|#define M_CONNECT               4
  ------------------
  715|    491|    register_one_method(p, "OPTIONS", M_OPTIONS);
  ------------------
  |  |  604|    491|#define M_OPTIONS               5
  ------------------
  716|    491|    register_one_method(p, "TRACE", M_TRACE);
  ------------------
  |  |  605|    491|#define M_TRACE                 6       /** RFC 2616: HTTP */
  ------------------
  717|    491|    register_one_method(p, "PATCH", M_PATCH);
  ------------------
  |  |  606|    491|#define M_PATCH                 7       /** RFC 5789: PATCH Method for HTTP */
  ------------------
  718|    491|    register_one_method(p, "PROPFIND", M_PROPFIND);
  ------------------
  |  |  607|    491|#define M_PROPFIND              8       /** RFC 2518: WebDAV */
  ------------------
  719|    491|    register_one_method(p, "PROPPATCH", M_PROPPATCH);
  ------------------
  |  |  608|    491|#define M_PROPPATCH             9       /*  :               */
  ------------------
  720|    491|    register_one_method(p, "MKCOL", M_MKCOL);
  ------------------
  |  |  609|    491|#define M_MKCOL                 10
  ------------------
  721|    491|    register_one_method(p, "COPY", M_COPY);
  ------------------
  |  |  610|    491|#define M_COPY                  11
  ------------------
  722|    491|    register_one_method(p, "MOVE", M_MOVE);
  ------------------
  |  |  611|    491|#define M_MOVE                  12
  ------------------
  723|    491|    register_one_method(p, "LOCK", M_LOCK);
  ------------------
  |  |  612|    491|#define M_LOCK                  13
  ------------------
  724|    491|    register_one_method(p, "UNLOCK", M_UNLOCK);
  ------------------
  |  |  613|    491|#define M_UNLOCK                14      /** RFC 2518: WebDAV */
  ------------------
  725|    491|    register_one_method(p, "VERSION-CONTROL", M_VERSION_CONTROL);
  ------------------
  |  |  614|    491|#define M_VERSION_CONTROL       15      /** RFC 3253: WebDAV Versioning */
  ------------------
  726|    491|    register_one_method(p, "CHECKOUT", M_CHECKOUT);
  ------------------
  |  |  615|    491|#define M_CHECKOUT              16      /*  :                          */
  ------------------
  727|    491|    register_one_method(p, "UNCHECKOUT", M_UNCHECKOUT);
  ------------------
  |  |  616|    491|#define M_UNCHECKOUT            17
  ------------------
  728|    491|    register_one_method(p, "CHECKIN", M_CHECKIN);
  ------------------
  |  |  617|    491|#define M_CHECKIN               18
  ------------------
  729|    491|    register_one_method(p, "UPDATE", M_UPDATE);
  ------------------
  |  |  618|    491|#define M_UPDATE                19
  ------------------
  730|    491|    register_one_method(p, "LABEL", M_LABEL);
  ------------------
  |  |  619|    491|#define M_LABEL                 20
  ------------------
  731|    491|    register_one_method(p, "REPORT", M_REPORT);
  ------------------
  |  |  620|    491|#define M_REPORT                21
  ------------------
  732|    491|    register_one_method(p, "MKWORKSPACE", M_MKWORKSPACE);
  ------------------
  |  |  621|    491|#define M_MKWORKSPACE           22
  ------------------
  733|    491|    register_one_method(p, "MKACTIVITY", M_MKACTIVITY);
  ------------------
  |  |  622|    491|#define M_MKACTIVITY            23
  ------------------
  734|    491|    register_one_method(p, "BASELINE-CONTROL", M_BASELINE_CONTROL);
  ------------------
  |  |  623|    491|#define M_BASELINE_CONTROL      24
  ------------------
  735|    491|    register_one_method(p, "MERGE", M_MERGE);
  ------------------
  |  |  624|    491|#define M_MERGE                 25
  ------------------
  736|    491|}
ap_method_number_of:
  777|    348|{
  778|    348|    int len = strlen(method);
  779|       |
  780|       |    /* check if the method has been dynamically registered */
  781|    348|    int *methnum = apr_hash_get(methods_registry, method, len);
  782|       |
  783|    348|    if (methnum != NULL) {
  ------------------
  |  Branch (783:9): [True: 65, False: 283]
  ------------------
  784|     65|        return *methnum;
  785|     65|    }
  786|       |
  787|    283|    return M_INVALID;
  ------------------
  |  |  631|    283|#define M_INVALID               26      /** invalid method value terminates the
  ------------------
  788|    348|}
ap_make_method_list:
 1385|    491|{
 1386|    491|    ap_method_list_t *ml;
 1387|       |
 1388|    491|    ml = (ap_method_list_t *) apr_palloc(p, sizeof(ap_method_list_t));
  ------------------
  |  |  425|    491|    apr_palloc_debug(p, size, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|    491|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  160|    491|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|    491|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1389|    491|    ml->method_mask = 0;
 1390|    491|    ml->method_list = apr_array_make(p, nelts, sizeof(char *));
 1391|    491|    return ml;
 1392|    491|}
ap_h1_tokenize_request_line:
 1832|    491|{
 1833|    491|    core_server_config *conf = ap_get_core_module_config(r->server->module_config);
  ------------------
  |  |  384|    491|    (((void **)(v))[AP_CORE_MODULE_INDEX])
  |  |  ------------------
  |  |  |  |  382|    491|#define AP_CORE_MODULE_INDEX  0
  |  |  ------------------
  ------------------
 1834|    491|    int strict = (conf->http_conformance != AP_HTTP_CONFORMANCE_UNSAFE);
  ------------------
  |  |  746|    491|#define AP_HTTP_CONFORMANCE_UNSAFE    1
  ------------------
 1835|    491|    rrl_error error;
 1836|    491|    const char *error_token;
 1837|       |
 1838|    491|    ap_log_rerror(APLOG_MARK, APLOG_TRACE4, 0, r,
  ------------------
  |  |  448|    491|#define ap_log_rerror(...) ap_log_rerror__(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |  450|    491|    do { if (APLOG_R_MODULE_IS_LEVEL(r, mi, level))                         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|    491|          ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    491|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                         ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   48|    491|#define APLOG_NOTICE    LOG_NOTICE      /* normal but significant condition */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:13): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|    491|            (ap_get_request_module_loglevel(r, module_index)     \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  638|    491|    (ap_get_module_loglevel(ap_get_request_logconf(r),i))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  624|    982|    (((i) < 0 || (l)->module_levels == NULL || (l)->module_levels[i] < 0) ?  \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:7): [True: 491, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:8): [True: 491, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:18): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:48): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:67): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  625|    982|     (l)->level :                                                         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 491, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  626|    491|     (l)->module_levels[i])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:25): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (197:13): [True: 0, False: 491]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|    491|             >= ((level)&APLOG_LEVELMASK) ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    491|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  451|    491|             ap_log_rerror_(file, line, mi, level, status, r, __VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (451:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  452|    491|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (452:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1839|    491|                  "ap_tokenize_request_line: '%s'", line);
 1840|    491|    error = tokenize_request_line(apr_pstrdup(r->pool, line), strict, pmethod,
 1841|    491|                                  puri, pprotocol, &error_token);
 1842|    491|    ap_log_rerror(APLOG_MARK, APLOG_TRACE4, 0, r,
  ------------------
  |  |  448|    491|#define ap_log_rerror(...) ap_log_rerror__(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |  450|    491|    do { if (APLOG_R_MODULE_IS_LEVEL(r, mi, level))                         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|    491|          ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    491|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                         ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   48|    491|#define APLOG_NOTICE    LOG_NOTICE      /* normal but significant condition */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:13): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|    491|            (ap_get_request_module_loglevel(r, module_index)     \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  638|    491|    (ap_get_module_loglevel(ap_get_request_logconf(r),i))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  624|    982|    (((i) < 0 || (l)->module_levels == NULL || (l)->module_levels[i] < 0) ?  \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:7): [True: 491, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:8): [True: 491, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:18): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:48): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:67): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  625|    982|     (l)->level :                                                         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 491, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  626|    491|     (l)->module_levels[i])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:25): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (197:13): [True: 0, False: 491]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|    491|             >= ((level)&APLOG_LEVELMASK) ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    491|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  451|    491|             ap_log_rerror_(file, line, mi, level, status, r, __VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (451:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  452|    491|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (452:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1843|    491|                  "ap_tokenize_request: error=%d, method=%s, uri=%s, protocol=%s",
 1844|    491|                  error, *pmethod, *puri, *pprotocol);
 1845|    491|    if (error != rrl_none) {
  ------------------
  |  Branch (1845:9): [True: 143, False: 348]
  ------------------
 1846|    143|        rrl_log_error(r, error, error_token);
 1847|    143|        return 0;
 1848|    143|    }
 1849|    348|    return 1;
 1850|    491|}
http_protocol.c:ap_method_registry_destroy:
  692|    491|{
  693|    491|    methods_registry = NULL;
  694|    491|    cur_method_number = METHOD_NUMBER_FIRST;
  ------------------
  |  |  193|    491|#define METHOD_NUMBER_FIRST (M_INVALID + 1)
  |  |  ------------------
  |  |  |  |  631|    491|#define M_INVALID               26      /** invalid method value terminates the
  |  |  ------------------
  ------------------
  695|    491|    return APR_SUCCESS;
  ------------------
  |  |  225|    491|#define APR_SUCCESS 0
  ------------------
  696|    491|}
http_protocol.c:register_one_method:
  681|  13.2k|{
  682|  13.2k|    int *pnum = apr_palloc(p, sizeof(*pnum));
  ------------------
  |  |  425|  13.2k|    apr_palloc_debug(p, size, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|  13.2k|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  160|  13.2k|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  13.2k|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  683|       |
  684|  13.2k|    *pnum = methnum;
  685|  13.2k|    apr_hash_set(methods_registry, methname, APR_HASH_KEY_STRING, pnum);
  ------------------
  |  |   47|  13.2k|#define APR_HASH_KEY_STRING     (-1)
  ------------------
  686|  13.2k|}
http_protocol.c:tokenize_request_line:
 1717|    491|{
 1718|    491|    char *method, *protocol, *uri, *ll;
 1719|    491|    rrl_error e = rrl_none;
 1720|    491|    char *etoken = NULL;
 1721|    491|    apr_size_t len = 0;
 1722|       |
 1723|    491|    method = line;
 1724|       |    /* If there is whitespace before a method, skip it and mark in error */
 1725|    491|    if (apr_isspace(*method)) {
  ------------------
  |  |  228|    491|#define apr_isspace(c) (isspace(((unsigned char)(c))))
  |  |  ------------------
  |  |  |  Branch (228:24): [True: 15, False: 476]
  |  |  ------------------
  ------------------
 1726|     15|        RRL_ERROR(e, etoken, rrl_badwhitespace, method);
  ------------------
  |  | 1707|     15|    do { \
  |  | 1708|     15|        if (e == rrl_none) {\
  |  |  ------------------
  |  |  |  Branch (1708:13): [True: 15, False: 0]
  |  |  ------------------
  |  | 1709|     15|            e = y; et = yt;\
  |  | 1710|     15|        }\
  |  | 1711|     15|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1711:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1727|    139|        for ( ; apr_isspace(*method); ++method)
  ------------------
  |  |  228|    139|#define apr_isspace(c) (isspace(((unsigned char)(c))))
  |  |  ------------------
  |  |  |  Branch (228:24): [True: 124, False: 15]
  |  |  ------------------
  ------------------
 1728|    124|            ;
 1729|     15|    }
 1730|       |
 1731|       |    /* Scan the method up to the next whitespace, ensure it contains only
 1732|       |     * valid http-token characters, otherwise mark in error
 1733|       |     */
 1734|    491|    if (strict) {
  ------------------
  |  Branch (1734:9): [True: 460, False: 31]
  ------------------
 1735|    460|        ll = (char*) ap_scan_http_token(method);
 1736|    460|    }
 1737|     31|    else {
 1738|     31|        ll = (char*) ap_scan_vchar_obstext(method);
 1739|     31|    }
 1740|       |
 1741|    491|    if ((ll == method) || (*ll && !apr_isspace(*ll))) {
  ------------------
  |  |  228|    420|#define apr_isspace(c) (isspace(((unsigned char)(c))))
  ------------------
  |  Branch (1741:9): [True: 67, False: 424]
  |  Branch (1741:28): [True: 420, False: 4]
  |  Branch (1741:35): [True: 43, False: 377]
  ------------------
 1742|    110|        RRL_ERROR(e, etoken, rrl_badmethod, ll);
  ------------------
  |  | 1707|    110|    do { \
  |  | 1708|    110|        if (e == rrl_none) {\
  |  |  ------------------
  |  |  |  Branch (1708:13): [True: 100, False: 10]
  |  |  ------------------
  |  | 1709|    100|            e = y; et = yt;\
  |  | 1710|    100|        }\
  |  | 1711|    110|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1711:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1743|    110|        ll = strpbrk(ll, "\t\n\v\f\r ");
 1744|    110|    }
 1745|       |
 1746|       |    /* Verify method terminated with a single SP, or mark as specific error */
 1747|    491|    if (!ll) {
  ------------------
  |  Branch (1747:9): [True: 71, False: 420]
  ------------------
 1748|     71|        RRL_ERROR(e, etoken, rrl_missinguri, NULL);
  ------------------
  |  | 1707|     71|    do { \
  |  | 1708|     71|        if (e == rrl_none) {\
  |  |  ------------------
  |  |  |  Branch (1708:13): [True: 0, False: 71]
  |  |  ------------------
  |  | 1709|      0|            e = y; et = yt;\
  |  | 1710|      0|        }\
  |  | 1711|     71|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1711:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1749|     71|        protocol = uri = "";
 1750|     71|        goto done;
 1751|     71|    }
 1752|    420|    else if (strict && ll[0] && apr_isspace(ll[1])) {
  ------------------
  |  |  228|    385|#define apr_isspace(c) (isspace(((unsigned char)(c))))
  |  |  ------------------
  |  |  |  Branch (228:24): [True: 24, False: 361]
  |  |  ------------------
  ------------------
  |  Branch (1752:14): [True: 389, False: 31]
  |  Branch (1752:24): [True: 385, False: 4]
  ------------------
 1753|     24|        RRL_ERROR(e, etoken, rrl_excesswhitespace, ll);
  ------------------
  |  | 1707|     24|    do { \
  |  | 1708|     24|        if (e == rrl_none) {\
  |  |  ------------------
  |  |  |  Branch (1708:13): [True: 4, False: 20]
  |  |  ------------------
  |  | 1709|      4|            e = y; et = yt;\
  |  | 1710|      4|        }\
  |  | 1711|     24|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1711:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1754|     24|    }
 1755|       |
 1756|       |    /* Advance uri pointer over leading whitespace, NUL terminate the method
 1757|       |     * If non-SP whitespace is encountered, mark as specific error
 1758|       |     */
 1759|  1.10k|    for (uri = ll; apr_isspace(*uri); ++uri)
  ------------------
  |  |  228|  1.10k|#define apr_isspace(c) (isspace(((unsigned char)(c))))
  |  |  ------------------
  |  |  |  Branch (228:24): [True: 680, False: 420]
  |  |  ------------------
  ------------------
 1760|    680|        if (*uri != ' ')
  ------------------
  |  Branch (1760:13): [True: 151, False: 529]
  ------------------
 1761|    151|            RRL_ERROR(e, etoken, rrl_badwhitespace, uri);
  ------------------
  |  | 1707|    571|    do { \
  |  | 1708|    151|        if (e == rrl_none) {\
  |  |  ------------------
  |  |  |  Branch (1708:13): [True: 3, False: 148]
  |  |  ------------------
  |  | 1709|      3|            e = y; et = yt;\
  |  | 1710|      3|        }\
  |  | 1711|    151|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1711:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1762|    420|    *ll = '\0';
 1763|       |
 1764|    420|    if (!*uri)
  ------------------
  |  Branch (1764:9): [True: 10, False: 410]
  ------------------
 1765|     10|        RRL_ERROR(e, etoken, rrl_missinguri, NULL);
  ------------------
  |  | 1707|     10|    do { \
  |  | 1708|     10|        if (e == rrl_none) {\
  |  |  ------------------
  |  |  |  Branch (1708:13): [True: 4, False: 6]
  |  |  ------------------
  |  | 1709|      4|            e = y; et = yt;\
  |  | 1710|      4|        }\
  |  | 1711|     10|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1711:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1766|       |
 1767|       |    /* Scan the URI up to the next whitespace, ensure it contains no raw
 1768|       |     * control characters, otherwise mark in error
 1769|       |     */
 1770|    420|    ll = (char*) ap_scan_vchar_obstext(uri);
 1771|    420|    if (ll == uri || (*ll && !apr_isspace(*ll))) {
  ------------------
  |  |  228|    256|#define apr_isspace(c) (isspace(((unsigned char)(c))))
  ------------------
  |  Branch (1771:9): [True: 14, False: 406]
  |  Branch (1771:23): [True: 256, False: 150]
  |  Branch (1771:30): [True: 14, False: 242]
  ------------------
 1772|     28|        RRL_ERROR(e, etoken, rrl_baduri, ll);
  ------------------
  |  | 1707|     28|    do { \
  |  | 1708|     28|        if (e == rrl_none) {\
  |  |  ------------------
  |  |  |  Branch (1708:13): [True: 4, False: 24]
  |  |  ------------------
  |  | 1709|      4|            e = y; et = yt;\
  |  | 1710|      4|        }\
  |  | 1711|     28|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1711:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1773|     28|        ll = strpbrk(ll, "\t\n\v\f\r ");
 1774|     28|    }
 1775|       |
 1776|       |    /* Verify URI terminated with a single SP, or mark as specific error */
 1777|    420|    if (!ll) {
  ------------------
  |  Branch (1777:9): [True: 15, False: 405]
  ------------------
 1778|     15|        protocol = "";
 1779|     15|        goto done;
 1780|     15|    }
 1781|    405|    else if (strict && ll[0] && apr_isspace(ll[1])) {
  ------------------
  |  |  228|    239|#define apr_isspace(c) (isspace(((unsigned char)(c))))
  |  |  ------------------
  |  |  |  Branch (228:24): [True: 30, False: 209]
  |  |  ------------------
  ------------------
  |  Branch (1781:14): [True: 374, False: 31]
  |  Branch (1781:24): [True: 239, False: 135]
  ------------------
 1782|     30|        RRL_ERROR(e, etoken, rrl_excesswhitespace, ll);
  ------------------
  |  | 1707|     30|    do { \
  |  | 1708|     30|        if (e == rrl_none) {\
  |  |  ------------------
  |  |  |  Branch (1708:13): [True: 3, False: 27]
  |  |  ------------------
  |  | 1709|      3|            e = y; et = yt;\
  |  | 1710|      3|        }\
  |  | 1711|     30|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1711:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1783|     30|    }
 1784|       |
 1785|       |    /* Advance protocol pointer over leading whitespace, NUL terminate the uri
 1786|       |     * If non-SP whitespace is encountered, mark as specific error
 1787|       |     */
 1788|  1.10k|    for (protocol = ll; apr_isspace(*protocol); ++protocol)
  ------------------
  |  |  228|  1.10k|#define apr_isspace(c) (isspace(((unsigned char)(c))))
  |  |  ------------------
  |  |  |  Branch (228:24): [True: 701, False: 405]
  |  |  ------------------
  ------------------
 1789|    701|        if (*protocol != ' ')
  ------------------
  |  Branch (1789:13): [True: 209, False: 492]
  ------------------
 1790|    209|            RRL_ERROR(e, etoken, rrl_badwhitespace, protocol);
  ------------------
  |  | 1707|    614|    do { \
  |  | 1708|    209|        if (e == rrl_none) {\
  |  |  ------------------
  |  |  |  Branch (1708:13): [True: 2, False: 207]
  |  |  ------------------
  |  | 1709|      2|            e = y; et = yt;\
  |  | 1710|      2|        }\
  |  | 1711|    209|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1711:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1791|    405|    *ll = '\0';
 1792|       |
 1793|       |    /* Scan the protocol up to the next whitespace, validation comes later */
 1794|    405|    if (!(ll = (char*) ap_scan_vchar_obstext(protocol))) {
  ------------------
  |  Branch (1794:9): [True: 0, False: 405]
  ------------------
 1795|      0|        len = strlen(protocol);
 1796|      0|        goto done;
 1797|      0|    }
 1798|    405|    len = ll - protocol;
 1799|       |
 1800|       |    /* Advance over trailing whitespace, if found mark in error,
 1801|       |     * determine if trailing text is found, unconditionally mark in error,
 1802|       |     * finally NUL terminate the protocol string
 1803|       |     */
 1804|    405|    if (*ll && !apr_isspace(*ll)) {
  ------------------
  |  |  228|     45|#define apr_isspace(c) (isspace(((unsigned char)(c))))
  ------------------
  |  Branch (1804:9): [True: 45, False: 360]
  |  Branch (1804:16): [True: 17, False: 28]
  ------------------
 1805|     17|        RRL_ERROR(e, etoken, rrl_badprotocol, ll);
  ------------------
  |  | 1707|     17|    do { \
  |  | 1708|     17|        if (e == rrl_none) {\
  |  |  ------------------
  |  |  |  Branch (1708:13): [True: 1, False: 16]
  |  |  ------------------
  |  | 1709|      1|            e = y; et = yt;\
  |  | 1710|      1|        }\
  |  | 1711|     17|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1711:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1806|     17|    }
 1807|    388|    else if (strict && *ll) {
  ------------------
  |  Branch (1807:14): [True: 357, False: 31]
  |  Branch (1807:24): [True: 16, False: 341]
  ------------------
 1808|     16|        RRL_ERROR(e, etoken, rrl_excesswhitespace, ll);
  ------------------
  |  | 1707|     16|    do { \
  |  | 1708|     16|        if (e == rrl_none) {\
  |  |  ------------------
  |  |  |  Branch (1708:13): [True: 1, False: 15]
  |  |  ------------------
  |  | 1709|      1|            e = y; et = yt;\
  |  | 1710|      1|        }\
  |  | 1711|     16|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1711:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1809|     16|    }
 1810|    372|    else {
 1811|    617|        for ( ; apr_isspace(*ll); ++ll)
  ------------------
  |  |  228|    617|#define apr_isspace(c) (isspace(((unsigned char)(c))))
  |  |  ------------------
  |  |  |  Branch (228:24): [True: 247, False: 370]
  |  |  ------------------
  ------------------
 1812|    247|            if (*ll != ' ') {
  ------------------
  |  Branch (1812:17): [True: 2, False: 245]
  ------------------
 1813|      2|                RRL_ERROR(e, etoken, rrl_badwhitespace, ll);
  ------------------
  |  | 1707|      2|    do { \
  |  | 1708|      2|        if (e == rrl_none) {\
  |  |  ------------------
  |  |  |  Branch (1708:13): [True: 1, False: 1]
  |  |  ------------------
  |  | 1709|      1|            e = y; et = yt;\
  |  | 1710|      1|        }\
  |  | 1711|      2|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1711:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1814|      2|                break;
 1815|      2|            }
 1816|    372|        if (*ll)
  ------------------
  |  Branch (1816:13): [True: 10, False: 362]
  ------------------
 1817|     10|            RRL_ERROR(e, etoken, rrl_trailingtext, ll);
  ------------------
  |  | 1707|     10|    do { \
  |  | 1708|     10|        if (e == rrl_none) {\
  |  |  ------------------
  |  |  |  Branch (1708:13): [True: 5, False: 5]
  |  |  ------------------
  |  | 1709|      5|            e = y; et = yt;\
  |  | 1710|      5|        }\
  |  | 1711|     10|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1711:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1818|    372|    }
 1819|    405|    *((char *)protocol + len) = '\0';
 1820|       |
 1821|    491|done:
 1822|    491|    *pmethod = method;
 1823|    491|    *puri = uri;
 1824|    491|    *pprotocol = protocol;
 1825|    491|    *perror_token = etoken;
 1826|    491|    return e;
 1827|    405|}
http_protocol.c:rrl_log_error:
 1663|    143|{
 1664|    143|    switch (error) {
  ------------------
  |  Branch (1664:13): [True: 0, False: 143]
  ------------------
 1665|      0|    case rrl_none:
  ------------------
  |  Branch (1665:5): [True: 0, False: 143]
  ------------------
 1666|      0|        break;
 1667|      1|    case rrl_badprotocol:
  ------------------
  |  Branch (1667:5): [True: 1, False: 142]
  ------------------
 1668|      1|        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02418)
  ------------------
  |  |  448|      1|#define ap_log_rerror(...) ap_log_rerror__(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |  450|      1|    do { if (APLOG_R_MODULE_IS_LEVEL(r, mi, level))                         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|      1|          ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      1|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                         ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   48|      1|#define APLOG_NOTICE    LOG_NOTICE      /* normal but significant condition */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:13): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|      1|            (ap_get_request_module_loglevel(r, module_index)     \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  638|      1|    (ap_get_module_loglevel(ap_get_request_logconf(r),i))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  624|      2|    (((i) < 0 || (l)->module_levels == NULL || (l)->module_levels[i] < 0) ?  \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:7): [True: 1, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:8): [True: 1, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:18): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:48): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:67): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  625|      2|     (l)->level :                                                         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 1, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  626|      1|     (l)->module_levels[i])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:25): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (197:13): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|      1|             >= ((level)&APLOG_LEVELMASK) ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      1|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  451|      1|             ap_log_rerror_(file, line, mi, level, status, r, __VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (451:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  452|      1|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (452:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1669|      1|                      "HTTP Request Line; Unrecognized protocol '%.*s' "
 1670|      1|                      "(perhaps whitespace was injected?)",
 1671|      1|                      log_name_len(etoken), etoken);
 1672|      1|        break;
 1673|    100|    case rrl_badmethod:
  ------------------
  |  Branch (1673:5): [True: 100, False: 43]
  ------------------
 1674|    100|        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03445)
  ------------------
  |  |  448|    100|#define ap_log_rerror(...) ap_log_rerror__(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |  450|    100|    do { if (APLOG_R_MODULE_IS_LEVEL(r, mi, level))                         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|    100|          ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    100|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                         ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   48|    100|#define APLOG_NOTICE    LOG_NOTICE      /* normal but significant condition */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:13): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|    100|            (ap_get_request_module_loglevel(r, module_index)     \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  638|    100|    (ap_get_module_loglevel(ap_get_request_logconf(r),i))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  624|    200|    (((i) < 0 || (l)->module_levels == NULL || (l)->module_levels[i] < 0) ?  \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:7): [True: 100, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:8): [True: 100, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:18): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:48): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:67): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  625|    200|     (l)->level :                                                         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 100, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  626|    100|     (l)->module_levels[i])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:25): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (197:13): [True: 0, False: 100]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|    100|             >= ((level)&APLOG_LEVELMASK) ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    100|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  451|    100|             ap_log_rerror_(file, line, mi, level, status, r, __VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (451:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  452|    100|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (452:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1675|    100|                      "HTTP Request Line; Invalid method token: '%.*s'",
 1676|    100|                      log_name_len(etoken), etoken);
 1677|    100|        break;
 1678|     21|    case rrl_badwhitespace:
  ------------------
  |  Branch (1678:5): [True: 21, False: 122]
  ------------------
 1679|     21|        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03447)
  ------------------
  |  |  448|     21|#define ap_log_rerror(...) ap_log_rerror__(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |  450|     21|    do { if (APLOG_R_MODULE_IS_LEVEL(r, mi, level))                         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|     21|          ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|     21|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                         ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   48|     21|#define APLOG_NOTICE    LOG_NOTICE      /* normal but significant condition */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:13): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|     21|            (ap_get_request_module_loglevel(r, module_index)     \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  638|     21|    (ap_get_module_loglevel(ap_get_request_logconf(r),i))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  624|     42|    (((i) < 0 || (l)->module_levels == NULL || (l)->module_levels[i] < 0) ?  \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:7): [True: 21, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:8): [True: 21, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:18): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:48): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:67): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  625|     42|     (l)->level :                                                         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 21, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  626|     21|     (l)->module_levels[i])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:25): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (197:13): [True: 0, False: 21]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|     21|             >= ((level)&APLOG_LEVELMASK) ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|     21|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  451|     21|             ap_log_rerror_(file, line, mi, level, status, r, __VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (451:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  452|     21|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (452:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1680|     21|                      "HTTP Request Line; Invalid whitespace");
 1681|     21|        break;
 1682|      8|    case rrl_excesswhitespace:
  ------------------
  |  Branch (1682:5): [True: 8, False: 135]
  ------------------
 1683|      8|        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03448)
  ------------------
  |  |  448|      8|#define ap_log_rerror(...) ap_log_rerror__(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |  450|      8|    do { if (APLOG_R_MODULE_IS_LEVEL(r, mi, level))                         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|      8|          ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      8|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                         ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   48|      8|#define APLOG_NOTICE    LOG_NOTICE      /* normal but significant condition */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:13): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|      8|            (ap_get_request_module_loglevel(r, module_index)     \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  638|      8|    (ap_get_module_loglevel(ap_get_request_logconf(r),i))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  624|     16|    (((i) < 0 || (l)->module_levels == NULL || (l)->module_levels[i] < 0) ?  \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:7): [True: 8, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:8): [True: 8, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:18): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:48): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:67): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  625|     16|     (l)->level :                                                         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 8, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  626|      8|     (l)->module_levels[i])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:25): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (197:13): [True: 0, False: 8]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|      8|             >= ((level)&APLOG_LEVELMASK) ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      8|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  451|      8|             ap_log_rerror_(file, line, mi, level, status, r, __VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (451:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  452|      8|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (452:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1684|      8|                      "HTTP Request Line; Excess whitespace "
 1685|      8|                      "(disallowed by HttpProtocolOptions Strict)");
 1686|      8|        break;
 1687|      4|    case rrl_missinguri:
  ------------------
  |  Branch (1687:5): [True: 4, False: 139]
  ------------------
 1688|      4|        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03446)
  ------------------
  |  |  448|      4|#define ap_log_rerror(...) ap_log_rerror__(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |  450|      4|    do { if (APLOG_R_MODULE_IS_LEVEL(r, mi, level))                         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|      4|          ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      4|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                         ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   48|      4|#define APLOG_NOTICE    LOG_NOTICE      /* normal but significant condition */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:13): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|      4|            (ap_get_request_module_loglevel(r, module_index)     \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  638|      4|    (ap_get_module_loglevel(ap_get_request_logconf(r),i))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  624|      8|    (((i) < 0 || (l)->module_levels == NULL || (l)->module_levels[i] < 0) ?  \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:7): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:8): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:18): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:48): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:67): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  625|      8|     (l)->level :                                                         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  626|      4|     (l)->module_levels[i])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:25): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (197:13): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|      4|             >= ((level)&APLOG_LEVELMASK) ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      4|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  451|      4|             ap_log_rerror_(file, line, mi, level, status, r, __VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (451:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  452|      4|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (452:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1689|      4|                      "HTTP Request Line; Missing URI");
 1690|      4|        break;
 1691|      4|    case rrl_baduri:
  ------------------
  |  Branch (1691:5): [True: 4, False: 139]
  ------------------
 1692|      4|        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03454)
  ------------------
  |  |  448|      4|#define ap_log_rerror(...) ap_log_rerror__(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |  450|      4|    do { if (APLOG_R_MODULE_IS_LEVEL(r, mi, level))                         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|      4|          ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      4|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                         ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   48|      4|#define APLOG_NOTICE    LOG_NOTICE      /* normal but significant condition */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:13): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|      4|            (ap_get_request_module_loglevel(r, module_index)     \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  638|      4|    (ap_get_module_loglevel(ap_get_request_logconf(r),i))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  624|      8|    (((i) < 0 || (l)->module_levels == NULL || (l)->module_levels[i] < 0) ?  \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:7): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:8): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:18): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:48): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:67): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  625|      8|     (l)->level :                                                         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  626|      4|     (l)->module_levels[i])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:25): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (197:13): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|      4|             >= ((level)&APLOG_LEVELMASK) ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      4|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  451|      4|             ap_log_rerror_(file, line, mi, level, status, r, __VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (451:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  452|      4|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (452:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1693|      4|                      "HTTP Request Line; URI incorrectly encoded: '%.*s'",
 1694|      4|                      log_name_len(etoken), etoken);
 1695|      4|        break;
 1696|      5|    case rrl_trailingtext:
  ------------------
  |  Branch (1696:5): [True: 5, False: 138]
  ------------------
 1697|      5|        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03449)
  ------------------
  |  |  448|      5|#define ap_log_rerror(...) ap_log_rerror__(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |  450|      5|    do { if (APLOG_R_MODULE_IS_LEVEL(r, mi, level))                         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|      5|          ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      5|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                         ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   48|      5|#define APLOG_NOTICE    LOG_NOTICE      /* normal but significant condition */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:13): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|      5|            (ap_get_request_module_loglevel(r, module_index)     \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  638|      5|    (ap_get_module_loglevel(ap_get_request_logconf(r),i))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  624|     10|    (((i) < 0 || (l)->module_levels == NULL || (l)->module_levels[i] < 0) ?  \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:7): [True: 5, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:8): [True: 5, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:18): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:48): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:67): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  625|     10|     (l)->level :                                                         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 5, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  626|      5|     (l)->module_levels[i])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:25): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (197:13): [True: 0, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|      5|             >= ((level)&APLOG_LEVELMASK) ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      5|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  451|      5|             ap_log_rerror_(file, line, mi, level, status, r, __VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (451:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  452|      5|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (452:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1698|      5|                      "HTTP Request Line; Extraneous text found '%.*s' "
 1699|      5|                      "(perhaps whitespace was injected?)",
 1700|      5|                      log_name_len(etoken), etoken);
 1701|      5|        break;
 1702|    143|    }
 1703|    143|}

ap_create_request_config:
  357|    491|{
  358|    491|    return create_empty_config(p);
  359|    491|}
config.c:create_empty_config:
  265|    491|{
  266|    491|    void *conf_vector = apr_pcalloc(p, sizeof(void *) * conf_vector_length);
  ------------------
  |  |  454|    491|    apr_pcalloc_debug(p, size, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|    491|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  160|    491|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|    491|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  267|    491|    return conf_vector;
  268|    491|}

ap_open_stderr_log:
  188|      2|{
  189|      2|    apr_file_open_stderr(&stderr_log, p);
  190|      2|}

ap_parse_uri:
  613|    348|{
  614|    348|    int status = HTTP_OK;
  ------------------
  |  |  495|    348|#define HTTP_OK                              200
  ------------------
  615|       |
  616|    348|    r->unparsed_uri = apr_pstrdup(r->pool, uri);
  617|       |
  618|       |    /* http://issues.apache.org/bugzilla/show_bug.cgi?id=31875
  619|       |     * http://issues.apache.org/bugzilla/show_bug.cgi?id=28450
  620|       |     *
  621|       |     * This is not in fact a URI, it's a path.  That matters in the
  622|       |     * case of a leading double-slash.  We need to resolve the issue
  623|       |     * by normalizing that out before treating it as a URI.
  624|       |     */
  625|    519|    while ((uri[0] == '/') && (uri[1] == '/')) {
  ------------------
  |  Branch (625:12): [True: 190, False: 329]
  |  Branch (625:31): [True: 171, False: 19]
  ------------------
  626|    171|        ++uri ;
  627|    171|    }
  628|    348|    if (r->method_number == M_CONNECT) {
  ------------------
  |  |  603|    348|#define M_CONNECT               4
  ------------------
  |  Branch (628:9): [True: 33, False: 315]
  ------------------
  629|     33|        status = apr_uri_parse_hostinfo(r->pool, uri, &r->parsed_uri);
  630|     33|    }
  631|    315|    else {
  632|    315|        status = apr_uri_parse(r->pool, uri, &r->parsed_uri);
  633|    315|    }
  634|       |
  635|    348|    if (status == APR_SUCCESS) {
  ------------------
  |  |  225|    348|#define APR_SUCCESS 0
  ------------------
  |  Branch (635:9): [True: 274, False: 74]
  ------------------
  636|       |        /* if it has a scheme we may need to do absoluteURI vhost stuff */
  637|    274|        if (r->parsed_uri.scheme
  ------------------
  |  Branch (637:13): [True: 187, False: 87]
  ------------------
  638|    274|            && !ap_cstr_casecmp(r->parsed_uri.scheme, ap_http_scheme(r))) {
  ------------------
  |  |  302|    187|#define ap_http_scheme(r)       ap_run_http_scheme(r)
  ------------------
  |  Branch (638:16): [True: 7, False: 180]
  ------------------
  639|      7|            r->hostname = r->parsed_uri.hostname;
  640|      7|        }
  641|    267|        else if (r->method_number == M_CONNECT) {
  ------------------
  |  |  603|    267|#define M_CONNECT               4
  ------------------
  |  Branch (641:18): [True: 2, False: 265]
  ------------------
  642|      2|            r->hostname = r->parsed_uri.hostname;
  643|      2|        }
  644|       |
  645|    274|        r->args = r->parsed_uri.query;
  646|    274|        if (r->parsed_uri.path) {
  ------------------
  |  Branch (646:13): [True: 223, False: 51]
  ------------------
  647|    223|            r->uri = r->parsed_uri.path;
  648|    223|        }
  649|     51|        else if (r->method_number == M_OPTIONS) {
  ------------------
  |  |  604|     51|#define M_OPTIONS               5
  ------------------
  |  Branch (649:18): [True: 3, False: 48]
  ------------------
  650|      3|            r->uri = apr_pstrdup(r->pool, "*");
  651|      3|        }
  652|     48|        else {
  653|     48|            r->uri = apr_pstrdup(r->pool, "/");
  654|     48|        }
  655|       |
  656|       |#if defined(OS2) || defined(WIN32)
  657|       |        /* Handle path translations for OS/2 and plug security hole.
  658|       |         * This will prevent "http://www.wherever.com/..\..\/" from
  659|       |         * returning a directory for the root drive.
  660|       |         */
  661|       |        {
  662|       |            char *x;
  663|       |
  664|       |            for (x = r->uri; (x = strchr(x, '\\')) != NULL; )
  665|       |                *x = '/';
  666|       |        }
  667|       |#endif /* OS2 || WIN32 */
  668|    274|    }
  669|     74|    else {
  670|     74|        r->args = NULL;
  671|     74|        r->hostname = NULL;
  672|     74|        r->status = HTTP_BAD_REQUEST;             /* set error status */
  ------------------
  |  |  513|     74|#define HTTP_BAD_REQUEST                     400
  ------------------
  673|     74|        r->uri = apr_pstrdup(r->pool, uri);
  674|     74|    }
  675|    348|}
ap_parse_request_line:
  688|    491|{
  689|    491|    const char *method, *uri, *protocol;
  690|       |
  691|    491|    return ap_h1_tokenize_request_line(r, r->the_request,
  ------------------
  |  Branch (691:12): [True: 348, False: 143]
  ------------------
  692|    491|                                       &method, &uri, &protocol)
  693|    491|        && ap_assign_request_line(r, method, uri, protocol);
  ------------------
  |  Branch (693:12): [True: 15, False: 333]
  ------------------
  694|    491|}
ap_create_request:
 1059|    491|{
 1060|    491|    request_rec *r;
 1061|    491|    apr_pool_t *p;
 1062|       |
 1063|    491|    apr_pool_create(&p, conn->pool);
  ------------------
  |  |  297|    491|    apr_pool_create_ex_debug(newpool, parent, NULL, NULL, \
  |  |  298|    491|                             APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|    491|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  160|    491|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|    491|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1064|    491|    apr_pool_tag(p, "request");
 1065|    491|    r = apr_pcalloc(p, sizeof(request_rec));
  ------------------
  |  |  454|    491|    apr_pcalloc_debug(p, size, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|    491|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  160|    491|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|    491|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1066|    491|    AP_READ_REQUEST_ENTRY((intptr_t)r, (uintptr_t)conn);
 1067|    491|    r->pool            = p;
 1068|    491|    r->connection      = conn;
 1069|    491|    r->server          = conn->base_server;
 1070|       |
 1071|    491|    r->user            = NULL;
 1072|    491|    r->ap_auth_type    = NULL;
 1073|       |
 1074|    491|    r->allowed_methods = ap_make_method_list(p, 2);
 1075|       |
 1076|    491|    r->headers_in      = apr_table_make(r->pool, 25);
 1077|    491|    r->trailers_in     = apr_table_make(r->pool, 5);
 1078|    491|    r->subprocess_env  = apr_table_make(r->pool, 25);
 1079|    491|    r->headers_out     = apr_table_make(r->pool, 12);
 1080|    491|    r->err_headers_out = apr_table_make(r->pool, 5);
 1081|    491|    r->trailers_out    = apr_table_make(r->pool, 5);
 1082|    491|    r->notes           = apr_table_make(r->pool, 5);
 1083|       |
 1084|    491|    r->request_config  = ap_create_request_config(r->pool);
 1085|       |    /* Must be set before we run create request hook */
 1086|       |
 1087|    491|    r->proto_output_filters = conn->output_filters;
 1088|    491|    r->output_filters  = r->proto_output_filters;
 1089|    491|    r->proto_input_filters = conn->input_filters;
 1090|    491|    r->input_filters   = r->proto_input_filters;
 1091|    491|    ap_run_create_request(r);
 1092|    491|    r->per_dir_config  = r->server->lookup_defaults;
 1093|       |
 1094|    491|    r->sent_bodyct     = 0;                      /* bytect isn't for body */
 1095|       |
 1096|    491|    r->read_length     = 0;
 1097|    491|    r->read_body       = REQUEST_NO_BODY;
  ------------------
  |  |  764|    491|#define REQUEST_NO_BODY          0
  ------------------
 1098|       |
 1099|    491|    r->status          = HTTP_OK;  /* Until further notice */
  ------------------
  |  |  495|    491|#define HTTP_OK                              200
  ------------------
 1100|    491|    r->header_only     = 0;
 1101|    491|    r->the_request     = NULL;
 1102|       |
 1103|       |    /* Begin by presuming any module can make its own path_info assumptions,
 1104|       |     * until some module interjects and changes the value.
 1105|       |     */
 1106|    491|    r->used_path_info = AP_REQ_DEFAULT_PATH_INFO;
  ------------------
  |  |  783|    491|#define AP_REQ_DEFAULT_PATH_INFO   2
  ------------------
 1107|       |
 1108|    491|    r->useragent_addr = conn->client_addr;
 1109|    491|    r->useragent_ip = conn->client_ip;
 1110|       |
 1111|    491|    return r;
 1112|    491|}
ap_assign_request_line:
 1180|    348|{
 1181|    348|    core_server_config *conf = ap_get_core_module_config(r->server->module_config);
  ------------------
  |  |  384|    348|    (((void **)(v))[AP_CORE_MODULE_INDEX])
  |  |  ------------------
  |  |  |  |  382|    348|#define AP_CORE_MODULE_INDEX  0
  |  |  ------------------
  ------------------
 1182|    348|    int strict = (conf->http_conformance != AP_HTTP_CONFORMANCE_UNSAFE);
  ------------------
  |  |  746|    348|#define AP_HTTP_CONFORMANCE_UNSAFE    1
  ------------------
 1183|    348|    http_error error = r_assign_protocol(r, protocol, strict);
 1184|       |
 1185|    348|    ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
  ------------------
  |  |  448|    348|#define ap_log_rerror(...) ap_log_rerror__(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |  450|    348|    do { if (APLOG_R_MODULE_IS_LEVEL(r, mi, level))                         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|    348|          ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    348|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                         ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   48|    348|#define APLOG_NOTICE    LOG_NOTICE      /* normal but significant condition */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:13): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|    348|            (ap_get_request_module_loglevel(r, module_index)     \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  638|    348|    (ap_get_module_loglevel(ap_get_request_logconf(r),i))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  624|    696|    (((i) < 0 || (l)->module_levels == NULL || (l)->module_levels[i] < 0) ?  \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:7): [Folded - Ignored]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:18): [True: 0, False: 348]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 348, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:48): [True: 0, False: 348]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 348, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  625|    348|     (l)->level :                                                         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  626|    696|     (l)->module_levels[i])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 348, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (197:13): [True: 0, False: 348]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|    348|             >= ((level)&APLOG_LEVELMASK) ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    348|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  451|    348|             ap_log_rerror_(file, line, mi, level, status, r, __VA_ARGS__); \
  |  |  |  |  452|    348|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (452:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1186|    348|                  "assigned protocol: %s, error=%d", r->protocol, error);
 1187|       |
 1188|       |    /* Determine the method_number and parse the uri prior to invoking error
 1189|       |     * handling, such that these fields are available for substitution
 1190|       |     */
 1191|    348|    r->method = method;
 1192|    348|    r->method_number = ap_method_number_of(r->method);
 1193|    348|    if (r->method_number == M_GET && r->method[0] == 'H')
  ------------------
  |  |  599|    696|#define M_GET                   0       /** RFC 2616: HTTP */
  ------------------
  |  Branch (1193:9): [True: 5, False: 343]
  |  Branch (1193:38): [True: 1, False: 4]
  ------------------
 1194|      1|        r->header_only = 1;
 1195|       |
 1196|       |    /* For internal integrity and palloc efficiency, reconstruct the_request
 1197|       |     * in one palloc, using only single SP characters, per spec.
 1198|       |     */
 1199|    348|    r->the_request = apr_pstrcat(r->pool, r->method, *uri ? " " : NULL, uri,
  ------------------
  |  Branch (1199:54): [True: 348, False: 0]
  ------------------
 1200|    348|                                 *r->protocol ? " " : NULL, r->protocol, NULL);
  ------------------
  |  Branch (1200:34): [True: 348, False: 0]
  ------------------
 1201|    348|    ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
  ------------------
  |  |  448|    348|#define ap_log_rerror(...) ap_log_rerror__(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |  450|    348|    do { if (APLOG_R_MODULE_IS_LEVEL(r, mi, level))                         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|    348|          ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    348|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                         ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   48|    348|#define APLOG_NOTICE    LOG_NOTICE      /* normal but significant condition */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:13): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|    348|            (ap_get_request_module_loglevel(r, module_index)     \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  638|    348|    (ap_get_module_loglevel(ap_get_request_logconf(r),i))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  624|    696|    (((i) < 0 || (l)->module_levels == NULL || (l)->module_levels[i] < 0) ?  \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:7): [Folded - Ignored]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:18): [True: 0, False: 348]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 348, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:48): [True: 0, False: 348]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 348, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  625|    348|     (l)->level :                                                         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  626|    696|     (l)->module_levels[i])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 348, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (197:13): [True: 0, False: 348]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|    348|             >= ((level)&APLOG_LEVELMASK) ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    348|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  451|    348|             ap_log_rerror_(file, line, mi, level, status, r, __VA_ARGS__); \
  |  |  |  |  452|    348|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (452:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1202|    348|                  "assigned request_line: %s, error=%d", r->the_request, error);
 1203|       |
 1204|    348|    ap_parse_uri(r, uri);
 1205|    348|    if (r->status == HTTP_OK
  ------------------
  |  |  495|    696|#define HTTP_OK                              200
  ------------------
  |  Branch (1205:9): [True: 274, False: 74]
  ------------------
 1206|    348|            && (r->parsed_uri.path != NULL)
  ------------------
  |  Branch (1206:16): [True: 223, False: 51]
  ------------------
 1207|    348|            && (r->parsed_uri.path[0] != '/')
  ------------------
  |  Branch (1207:16): [True: 70, False: 153]
  ------------------
 1208|    348|            && (r->method_number != M_OPTIONS
  ------------------
  |  |  604|    140|#define M_OPTIONS               5
  ------------------
  |  Branch (1208:17): [True: 66, False: 4]
  ------------------
 1209|     70|                || strcmp(r->parsed_uri.path, "*") != 0)) {
  ------------------
  |  Branch (1209:20): [True: 3, False: 1]
  ------------------
 1210|       |        /* Invalid request-target per RFC 7230 section 5.3 */
 1211|     69|        r->status = HTTP_BAD_REQUEST;
  ------------------
  |  |  513|     69|#define HTTP_BAD_REQUEST                     400
  ------------------
 1212|     69|    }
 1213|       |
 1214|    348|    ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
  ------------------
  |  |  448|    348|#define ap_log_rerror(...) ap_log_rerror__(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |  450|    348|    do { if (APLOG_R_MODULE_IS_LEVEL(r, mi, level))                         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|    348|          ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    348|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                         ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   48|    348|#define APLOG_NOTICE    LOG_NOTICE      /* normal but significant condition */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:13): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|    348|            (ap_get_request_module_loglevel(r, module_index)     \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  638|    348|    (ap_get_module_loglevel(ap_get_request_logconf(r),i))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  624|    696|    (((i) < 0 || (l)->module_levels == NULL || (l)->module_levels[i] < 0) ?  \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:7): [Folded - Ignored]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:18): [True: 0, False: 348]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 348, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:48): [True: 0, False: 348]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 348, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  625|    348|     (l)->level :                                                         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  626|    696|     (l)->module_levels[i])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 348, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (197:13): [True: 0, False: 348]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|    348|             >= ((level)&APLOG_LEVELMASK) ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    348|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  451|    348|             ap_log_rerror_(file, line, mi, level, status, r, __VA_ARGS__); \
  |  |  |  |  452|    348|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (452:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1215|    348|                  "parsed uri: r->status=%d, error=%d", r->status, error);
 1216|       |    /* With the request understood, we can consider HTTP/0.9 specific errors */
 1217|    348|    if (r->proto_num == HTTP_VERSION(0, 9) && error == http_error_none) {
  ------------------
  |  |  274|    696|#define HTTP_VERSION(major,minor) (1000*(major)+(minor))
  ------------------
  |  Branch (1217:9): [True: 323, False: 25]
  |  Branch (1217:47): [True: 147, False: 176]
  ------------------
 1218|    147|        if (conf->http09_enable == AP_HTTP09_DISABLE)
  ------------------
  |  |  742|    147|#define AP_HTTP09_DISABLE 2
  ------------------
  |  Branch (1218:13): [True: 1, False: 146]
  ------------------
 1219|      1|            error = http_error_reject09;
 1220|    146|        else if (strict && (r->method_number != M_GET || r->header_only))
  ------------------
  |  |  599|    262|#define M_GET                   0       /** RFC 2616: HTTP */
  ------------------
  |  Branch (1220:18): [True: 131, False: 15]
  |  Branch (1220:29): [True: 126, False: 5]
  |  Branch (1220:58): [True: 1, False: 4]
  ------------------
 1221|    127|            error = http_error_badmethod09;
 1222|    147|    }
 1223|       |
 1224|       |    /* Now that the method, uri and protocol are all processed,
 1225|       |     * we can safely resume any deferred error reporting
 1226|       |     */
 1227|    348|    if (error != http_error_none) {
  ------------------
  |  Branch (1227:9): [True: 314, False: 34]
  ------------------
 1228|    314|        switch (error) {
 1229|    186|        case http_error_badprotocol:
  ------------------
  |  Branch (1229:9): [True: 186, False: 128]
  ------------------
 1230|    186|            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(10388)
  ------------------
  |  |  448|    186|#define ap_log_rerror(...) ap_log_rerror__(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |  450|    186|    do { if (APLOG_R_MODULE_IS_LEVEL(r, mi, level))                         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|    186|          ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    186|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                         ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   48|    186|#define APLOG_NOTICE    LOG_NOTICE      /* normal but significant condition */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:13): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|    186|            (ap_get_request_module_loglevel(r, module_index)     \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  638|    186|    (ap_get_module_loglevel(ap_get_request_logconf(r),i))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  624|    372|    (((i) < 0 || (l)->module_levels == NULL || (l)->module_levels[i] < 0) ?  \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:7): [Folded - Ignored]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:18): [True: 0, False: 186]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 186, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:48): [True: 0, False: 186]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 186, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  625|    186|     (l)->level :                                                         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  626|    372|     (l)->module_levels[i])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 186, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (197:13): [True: 0, False: 186]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|    186|             >= ((level)&APLOG_LEVELMASK) ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    186|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  451|    186|             ap_log_rerror_(file, line, mi, level, status, r, __VA_ARGS__); \
  |  |  |  |  452|    186|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (452:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1231|    186|                          "HTTP Request: Unrecognized protocol '%.*s' "
 1232|    186|                          "(perhaps whitespace was injected?)",
 1233|    186|                          field_name_len(r->protocol), r->protocol);
 1234|    186|            break;
 1235|      1|        case http_error_reject09:
  ------------------
  |  Branch (1235:9): [True: 1, False: 313]
  ------------------
 1236|      1|            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02401)
  ------------------
  |  |  448|      1|#define ap_log_rerror(...) ap_log_rerror__(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |  450|      1|    do { if (APLOG_R_MODULE_IS_LEVEL(r, mi, level))                         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|      1|          ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      1|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                         ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   48|      1|#define APLOG_NOTICE    LOG_NOTICE      /* normal but significant condition */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:13): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|      1|            (ap_get_request_module_loglevel(r, module_index)     \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  638|      1|    (ap_get_module_loglevel(ap_get_request_logconf(r),i))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  624|      2|    (((i) < 0 || (l)->module_levels == NULL || (l)->module_levels[i] < 0) ?  \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:7): [Folded - Ignored]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:18): [True: 0, False: 1]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 1, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:48): [True: 0, False: 1]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 1, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  625|      1|     (l)->level :                                                         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  626|      2|     (l)->module_levels[i])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 1, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (197:13): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|      1|             >= ((level)&APLOG_LEVELMASK) ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      1|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  451|      1|             ap_log_rerror_(file, line, mi, level, status, r, __VA_ARGS__); \
  |  |  |  |  452|      1|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (452:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1237|      1|                          "HTTP Request: Rejected HTTP/0.9 request");
 1238|      1|            break;
 1239|    127|        case http_error_badmethod09:
  ------------------
  |  Branch (1239:9): [True: 127, False: 187]
  ------------------
 1240|    127|            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03444)
  ------------------
  |  |  448|    127|#define ap_log_rerror(...) ap_log_rerror__(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |  450|    127|    do { if (APLOG_R_MODULE_IS_LEVEL(r, mi, level))                         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|    127|          ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    127|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                         ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   48|    127|#define APLOG_NOTICE    LOG_NOTICE      /* normal but significant condition */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:13): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|    127|            (ap_get_request_module_loglevel(r, module_index)     \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  638|    127|    (ap_get_module_loglevel(ap_get_request_logconf(r),i))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  624|    254|    (((i) < 0 || (l)->module_levels == NULL || (l)->module_levels[i] < 0) ?  \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:7): [Folded - Ignored]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:18): [True: 0, False: 127]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 127, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:48): [True: 0, False: 127]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 127, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  625|    127|     (l)->level :                                                         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  626|    254|     (l)->module_levels[i])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 127, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (197:13): [True: 0, False: 127]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|    127|             >= ((level)&APLOG_LEVELMASK) ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    127|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  451|    127|             ap_log_rerror_(file, line, mi, level, status, r, __VA_ARGS__); \
  |  |  |  |  452|    127|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (452:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1241|    127|                          "HTTP Request: Invalid method token: '%.*s'"
 1242|    127|                          " (only GET is allowed for HTTP/0.9 requests)",
 1243|    127|                          field_name_len(r->method), r->method);
 1244|    127|            break;
 1245|      0|        default:
  ------------------
  |  Branch (1245:9): [True: 0, False: 314]
  ------------------
 1246|      0|            break;
 1247|    314|        }
 1248|    314|        r->status = HTTP_BAD_REQUEST;
  ------------------
  |  |  513|    314|#define HTTP_BAD_REQUEST                     400
  ------------------
 1249|    314|        goto failed;
 1250|    314|    }
 1251|       |
 1252|     34|    if (conf->http_methods == AP_HTTP_METHODS_REGISTERED
  ------------------
  |  |  752|     68|#define AP_HTTP_METHODS_REGISTERED    2
  ------------------
  |  Branch (1252:9): [True: 6, False: 28]
  ------------------
 1253|     34|            && r->method_number == M_INVALID) {
  ------------------
  |  |  631|      6|#define M_INVALID               26      /** invalid method value terminates the
  ------------------
  |  Branch (1253:16): [True: 1, False: 5]
  ------------------
 1254|      1|        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02423)
  ------------------
  |  |  448|      1|#define ap_log_rerror(...) ap_log_rerror__(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |  450|      1|    do { if (APLOG_R_MODULE_IS_LEVEL(r, mi, level))                         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|      1|          ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      1|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                         ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   48|      1|#define APLOG_NOTICE    LOG_NOTICE      /* normal but significant condition */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:13): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|      1|            (ap_get_request_module_loglevel(r, module_index)     \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  638|      1|    (ap_get_module_loglevel(ap_get_request_logconf(r),i))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  624|      2|    (((i) < 0 || (l)->module_levels == NULL || (l)->module_levels[i] < 0) ?  \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:7): [Folded - Ignored]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:18): [True: 0, False: 1]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 1, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:48): [True: 0, False: 1]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 1, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  625|      1|     (l)->level :                                                         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  626|      2|     (l)->module_levels[i])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 1, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (197:13): [True: 0, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|      1|             >= ((level)&APLOG_LEVELMASK) ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      1|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  451|      1|             ap_log_rerror_(file, line, mi, level, status, r, __VA_ARGS__); \
  |  |  |  |  452|      1|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (452:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1255|      1|                      "HTTP Request Line; Unrecognized HTTP method: '%.*s' "
 1256|      1|                      "(disallowed by RegisteredMethods)",
 1257|      1|                      field_name_len(r->method), r->method);
 1258|      1|        r->status = HTTP_NOT_IMPLEMENTED;
  ------------------
  |  |  543|      1|#define HTTP_NOT_IMPLEMENTED                 501
  ------------------
 1259|       |        /* This can't happen in an HTTP/0.9 request, we verified GET above */
 1260|      1|        goto failed;
 1261|      1|    }
 1262|       |
 1263|     33|    if (r->status != HTTP_OK) {
  ------------------
  |  |  495|     33|#define HTTP_OK                              200
  ------------------
  |  Branch (1263:9): [True: 10, False: 23]
  ------------------
 1264|     10|        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03450)
  ------------------
  |  |  448|     10|#define ap_log_rerror(...) ap_log_rerror__(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |  450|     10|    do { if (APLOG_R_MODULE_IS_LEVEL(r, mi, level))                         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|     10|          ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|     10|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                         ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   48|     10|#define APLOG_NOTICE    LOG_NOTICE      /* normal but significant condition */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:13): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|     10|            (ap_get_request_module_loglevel(r, module_index)     \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  638|     10|    (ap_get_module_loglevel(ap_get_request_logconf(r),i))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  624|     20|    (((i) < 0 || (l)->module_levels == NULL || (l)->module_levels[i] < 0) ?  \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:7): [Folded - Ignored]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:18): [True: 0, False: 10]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 10, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:48): [True: 0, False: 10]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 10, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  625|     10|     (l)->level :                                                         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  626|     20|     (l)->module_levels[i])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 10, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (197:13): [True: 0, False: 10]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|     10|             >= ((level)&APLOG_LEVELMASK) ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|     10|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  451|     10|             ap_log_rerror_(file, line, mi, level, status, r, __VA_ARGS__); \
  |  |  |  |  452|     10|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (452:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1265|     10|                      "HTTP Request Line; Unable to parse URI: '%.*s'",
 1266|     10|                      field_name_len(r->uri), r->uri);
 1267|     10|        goto failed;
 1268|     10|    }
 1269|       |
 1270|     23|    if (strict) {
  ------------------
  |  Branch (1270:9): [True: 13, False: 10]
  ------------------
 1271|     13|        if (r->parsed_uri.fragment) {
  ------------------
  |  Branch (1271:13): [True: 4, False: 9]
  ------------------
 1272|       |            /* RFC3986 3.5: no fragment */
 1273|      4|            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02421)
  ------------------
  |  |  448|      4|#define ap_log_rerror(...) ap_log_rerror__(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |  450|      4|    do { if (APLOG_R_MODULE_IS_LEVEL(r, mi, level))                         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|      4|          ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      4|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                         ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   48|      4|#define APLOG_NOTICE    LOG_NOTICE      /* normal but significant condition */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:13): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|      4|            (ap_get_request_module_loglevel(r, module_index)     \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  638|      4|    (ap_get_module_loglevel(ap_get_request_logconf(r),i))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  624|      8|    (((i) < 0 || (l)->module_levels == NULL || (l)->module_levels[i] < 0) ?  \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:7): [Folded - Ignored]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:18): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:48): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  625|      4|     (l)->level :                                                         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  626|      8|     (l)->module_levels[i])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (197:13): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|      4|             >= ((level)&APLOG_LEVELMASK) ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      4|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  451|      4|             ap_log_rerror_(file, line, mi, level, status, r, __VA_ARGS__); \
  |  |  |  |  452|      4|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (452:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1274|      4|                          "HTTP Request Line; URI must not contain a fragment");
 1275|      4|            r->status = HTTP_BAD_REQUEST;
  ------------------
  |  |  513|      4|#define HTTP_BAD_REQUEST                     400
  ------------------
 1276|      4|            goto failed;
 1277|      4|        }
 1278|      9|        if (r->parsed_uri.user || r->parsed_uri.password) {
  ------------------
  |  Branch (1278:13): [True: 4, False: 5]
  |  Branch (1278:35): [True: 0, False: 5]
  ------------------
 1279|      4|            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02422)
  ------------------
  |  |  448|      4|#define ap_log_rerror(...) ap_log_rerror__(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |  450|      4|    do { if (APLOG_R_MODULE_IS_LEVEL(r, mi, level))                         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|      4|          ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      4|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                         ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   48|      4|#define APLOG_NOTICE    LOG_NOTICE      /* normal but significant condition */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:13): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|      4|            (ap_get_request_module_loglevel(r, module_index)     \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  638|      4|    (ap_get_module_loglevel(ap_get_request_logconf(r),i))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  624|      8|    (((i) < 0 || (l)->module_levels == NULL || (l)->module_levels[i] < 0) ?  \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:7): [Folded - Ignored]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:18): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:48): [True: 0, False: 4]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  625|      4|     (l)->level :                                                         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  626|      8|     (l)->module_levels[i])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 4, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (197:13): [True: 0, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|      4|             >= ((level)&APLOG_LEVELMASK) ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      4|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  451|      4|             ap_log_rerror_(file, line, mi, level, status, r, __VA_ARGS__); \
  |  |  |  |  452|      4|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (452:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1280|      4|                          "HTTP Request Line; URI must not contain a "
 1281|      4|                          "username/password");
 1282|      4|            r->status = HTTP_BAD_REQUEST;
  ------------------
  |  |  513|      4|#define HTTP_BAD_REQUEST                     400
  ------------------
 1283|      4|            goto failed;
 1284|      4|        }
 1285|      9|    }
 1286|     15|    return 1;
 1287|       |
 1288|    333|failed:
 1289|    333|    if (error != http_error_none && r->proto_num == HTTP_VERSION(0, 9)) {
  ------------------
  |  |  274|    314|#define HTTP_VERSION(major,minor) (1000*(major)+(minor))
  ------------------
  |  Branch (1289:9): [True: 314, False: 19]
  |  Branch (1289:37): [True: 304, False: 10]
  ------------------
 1290|       |        /* Send all parsing and protocol error response with 1.x behavior,
 1291|       |         * and reserve 505 errors for actual HTTP protocols presented.
 1292|       |         * As called out in RFC7230 3.5, any errors parsing the protocol
 1293|       |         * from the request line are nearly always misencoded HTTP/1.x
 1294|       |         * requests. Only a valid 0.9 request with no parsing errors
 1295|       |         * at all may be treated as a simple request, if allowed.
 1296|       |         */
 1297|    304|        r->assbackwards = 0;
 1298|    304|        r->connection->keepalive = AP_CONN_CLOSE;
 1299|    304|        r->proto_num = HTTP_VERSION(1, 0);
  ------------------
  |  |  274|    304|#define HTTP_VERSION(major,minor) (1000*(major)+(minor))
  ------------------
 1300|    304|        r->protocol  = "HTTP/1.0";
 1301|    304|    }
 1302|    333|    return 0;
 1303|       |
 1304|     23|}
protocol.c:r_assign_protocol:
 1135|    348|{
 1136|    348|    int proto_num;
 1137|    348|    http_error error = http_error_none;
 1138|       |
 1139|    348|    if (protocol[0] == 'H' && protocol[1] == 'T'
  ------------------
  |  Branch (1139:9): [True: 138, False: 210]
  |  Branch (1139:31): [True: 100, False: 38]
  ------------------
 1140|    348|            && protocol[2] == 'T' && protocol[3] == 'P'
  ------------------
  |  Branch (1140:16): [True: 77, False: 23]
  |  Branch (1140:38): [True: 50, False: 27]
  ------------------
 1141|    348|            && protocol[4] == '/' && apr_isdigit(protocol[5])
  ------------------
  |  |  212|    384|#define apr_isdigit(c) (isdigit(((unsigned char)(c))))
  |  |  ------------------
  |  |  |  Branch (212:24): [True: 33, False: 3]
  |  |  ------------------
  ------------------
  |  Branch (1141:16): [True: 36, False: 14]
  ------------------
 1142|    348|            && protocol[6] == '.' && apr_isdigit(protocol[7])
  ------------------
  |  |  212|    371|#define apr_isdigit(c) (isdigit(((unsigned char)(c))))
  |  |  ------------------
  |  |  |  Branch (212:24): [True: 22, False: 1]
  |  |  ------------------
  ------------------
  |  Branch (1142:16): [True: 23, False: 10]
  ------------------
 1143|    348|            && !protocol[8] && protocol[5] != '0') {
  ------------------
  |  Branch (1143:16): [True: 14, False: 8]
  |  Branch (1143:32): [True: 13, False: 1]
  ------------------
 1144|     13|        r->assbackwards = 0;
 1145|     13|        proto_num = HTTP_VERSION(protocol[5] - '0', protocol[7] - '0');
  ------------------
  |  |  274|     13|#define HTTP_VERSION(major,minor) (1000*(major)+(minor))
  ------------------
 1146|     13|    }
 1147|    335|    else if ((protocol[0] == 'H' || protocol[0] == 'h')
  ------------------
  |  Branch (1147:15): [True: 125, False: 210]
  |  Branch (1147:37): [True: 21, False: 189]
  ------------------
 1148|    335|                 && (protocol[1] == 'T' || protocol[1] == 't')
  ------------------
  |  Branch (1148:22): [True: 90, False: 56]
  |  Branch (1148:44): [True: 25, False: 31]
  ------------------
 1149|    335|                 && (protocol[2] == 'T' || protocol[2] == 't')
  ------------------
  |  Branch (1149:22): [True: 76, False: 39]
  |  Branch (1149:44): [True: 17, False: 22]
  ------------------
 1150|    335|                 && (protocol[3] == 'P' || protocol[3] == 'p')
  ------------------
  |  Branch (1150:22): [True: 49, False: 44]
  |  Branch (1150:44): [True: 16, False: 28]
  ------------------
 1151|    335|                 && protocol[4] == '/' && apr_isdigit(protocol[5])
  ------------------
  |  |  212|    378|#define apr_isdigit(c) (isdigit(((unsigned char)(c))))
  |  |  ------------------
  |  |  |  Branch (212:24): [True: 39, False: 4]
  |  |  ------------------
  ------------------
  |  Branch (1151:21): [True: 43, False: 22]
  ------------------
 1152|    335|                 && protocol[6] == '.' && apr_isdigit(protocol[7])
  ------------------
  |  |  212|    362|#define apr_isdigit(c) (isdigit(((unsigned char)(c))))
  |  |  ------------------
  |  |  |  Branch (212:24): [True: 26, False: 1]
  |  |  ------------------
  ------------------
  |  Branch (1152:21): [True: 27, False: 12]
  ------------------
 1153|    335|                 && !protocol[8] && protocol[5] != '0') {
  ------------------
  |  Branch (1153:21): [True: 13, False: 13]
  |  Branch (1153:37): [True: 12, False: 1]
  ------------------
 1154|     12|        r->assbackwards = 0;
 1155|     12|        proto_num = HTTP_VERSION(protocol[5] - '0', protocol[7] - '0');
  ------------------
  |  |  274|     12|#define HTTP_VERSION(major,minor) (1000*(major)+(minor))
  ------------------
 1156|     12|        if (strict && error == http_error_none)
  ------------------
  |  Branch (1156:13): [True: 10, False: 2]
  |  Branch (1156:23): [True: 10, False: 0]
  ------------------
 1157|     10|            error = http_error_badprotocol;
 1158|      2|        else
 1159|      2|            protocol = apr_psprintf(r->pool, "HTTP/%d.%d", HTTP_VERSION_MAJOR(proto_num),
  ------------------
  |  |  276|      2|#define HTTP_VERSION_MAJOR(number) ((number)/1000)
  ------------------
 1160|      2|                                    HTTP_VERSION_MINOR(proto_num));
  ------------------
  |  |  278|      2|#define HTTP_VERSION_MINOR(number) ((number)%1000)
  ------------------
 1161|     12|    }
 1162|    323|    else if (protocol[0]) {
  ------------------
  |  Branch (1162:14): [True: 176, False: 147]
  ------------------
 1163|    176|        proto_num = HTTP_VERSION(0, 9);
  ------------------
  |  |  274|    176|#define HTTP_VERSION(major,minor) (1000*(major)+(minor))
  ------------------
 1164|    176|        if (error == http_error_none)
  ------------------
  |  Branch (1164:13): [True: 176, False: 0]
  ------------------
 1165|    176|            error = http_error_badprotocol;
 1166|    176|    }
 1167|    147|    else {
 1168|    147|        r->assbackwards = 1;
 1169|    147|        protocol = "HTTP/0.9";
 1170|    147|        proto_num = HTTP_VERSION(0, 9);
  ------------------
  |  |  274|    147|#define HTTP_VERSION(major,minor) (1000*(major)+(minor))
  ------------------
 1171|    147|    }
 1172|    348|    r->protocol = protocol;
 1173|    348|    r->proto_num = proto_num;
 1174|    348|    return error;
 1175|    348|}

ap_scan_http_token:
 1667|    460|{
 1668|  3.05k|    for ( ; !TEST_CHAR(*ptr, T_HTTP_TOKEN_STOP); ++ptr) ;
  ------------------
  |  |   53|  3.05k|#define TEST_CHAR(c, f) (test_char_table[(unsigned char)(c)] & (f))
  ------------------
  |  Branch (1668:13): [True: 2.59k, False: 460]
  ------------------
 1669|       |
 1670|    460|    return ptr;
 1671|    460|}
ap_scan_vchar_obstext:
 1677|    856|{
 1678|  16.7k|    for ( ; TEST_CHAR(*ptr, T_VCHAR_OBSTEXT); ++ptr) ;
  ------------------
  |  |   53|  16.7k|#define TEST_CHAR(c, f) (test_char_table[(unsigned char)(c)] & (f))
  |  |  ------------------
  |  |  |  Branch (53:25): [True: 15.8k, False: 856]
  |  |  ------------------
  ------------------
 1679|       |
 1680|    856|    return ptr;
 1681|    856|}
ap_cstr_casecmp:
 3696|    187|{
 3697|    187|    const unsigned char *u1 = (const unsigned char *)s1;
 3698|    187|    const unsigned char *u2 = (const unsigned char *)s2;
 3699|    303|    for (;;) {
 3700|    303|        const int c2 = ucharmap[*u2++];
 3701|    303|        const int cmp = (int)ucharmap[*u1++] - c2;
 3702|       |        /* Not necessary to test for !c1, this is caught by cmp */
 3703|    303|        if (cmp || !c2)
  ------------------
  |  Branch (3703:13): [True: 180, False: 123]
  |  Branch (3703:20): [True: 7, False: 116]
  ------------------
 3704|    187|            return cmp;
 3705|    303|    }
 3706|    187|}

apr_atomic_init:
   29|    491|{
   30|       |#if defined (USE_ATOMICS_GENERIC64)
   31|       |    return apr__atomic_generic64_init(p);
   32|       |#else
   33|    491|    return APR_SUCCESS;
  ------------------
  |  |  225|    491|#define APR_SUCCESS 0
  ------------------
   34|    491|#endif
   35|    491|}

apr_brigade_cleanup:
   38|    491|{
   39|    491|    apr_bucket_brigade *b = data;
   40|       |
   41|    491|#ifndef APR_BUCKET_DEBUG
   42|    491|    while (!APR_BRIGADE_EMPTY(b)) {
  ------------------
  |  |  346|    491|#define APR_BRIGADE_EMPTY(b)	APR_RING_EMPTY(&(b)->list, apr_bucket, link)
  |  |  ------------------
  |  |  |  |  205|    491|    (APR_RING_FIRST((hp)) == APR_RING_SENTINEL((hp), elem, link))
  |  |  |  |  ------------------
  |  |  |  |  |  |  166|    491|#define APR_RING_FIRST(hp)    (hp)->next
  |  |  |  |  ------------------
  |  |  |  |                   (APR_RING_FIRST((hp)) == APR_RING_SENTINEL((hp), elem, link))
  |  |  |  |  ------------------
  |  |  |  |  |  |  160|    491|    (struct elem *)((char *)(&(hp)->next) - APR_OFFSETOF(struct elem, link))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  111|    491|#define APR_OFFSETOF(s_type,field) __builtin_offsetof(s_type,field)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (42:12): [True: 0, False: 491]
  ------------------
   43|      0|        apr_bucket_delete(APR_BRIGADE_FIRST(b));
  ------------------
  |  | 1086|      0|#define apr_bucket_delete(e) do {					\
  |  | 1087|      0|        apr_bucket *apr__b = (e);					\
  |  | 1088|      0|        APR_BUCKET_REMOVE(apr__b);					\
  |  |  ------------------
  |  |  |  |  442|      0|#define APR_BUCKET_REMOVE(e)	APR_RING_REMOVE((e), link)
  |  |  |  |  ------------------
  |  |  |  |  |  |  382|      0|    APR_RING_UNSPLICE((ep), (ep), link)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  368|      0|#define APR_RING_UNSPLICE(ep1, epN, link) do {                \
  |  |  |  |  |  |  |  |  369|      0|    APR_RING_NEXT(APR_RING_PREV((ep1), link), link) =        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  177|      0|#define APR_RING_NEXT(ep, link)    (ep)->link.next
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  370|      0|             APR_RING_NEXT((epN), link);            \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  177|      0|#define APR_RING_NEXT(ep, link)    (ep)->link.next
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  371|      0|    APR_RING_PREV(APR_RING_NEXT((epN), link), link) =        \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  183|      0|#define APR_RING_PREV(ep, link)    (ep)->link.prev
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  372|      0|             APR_RING_PREV((ep1), link);            \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  183|      0|#define APR_RING_PREV(ep, link)    (ep)->link.prev
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  373|      0|    } while (0)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (373:14): [Folded - Ignored]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1089|      0|        apr_bucket_destroy(apr__b);					\
  |  |  ------------------
  |  |  |  | 1069|      0|#define apr_bucket_destroy(e) do {					\
  |  |  |  | 1070|      0|        apr_bucket *apr__d = (e);					\
  |  |  |  | 1071|      0|        apr__d->type->destroy(apr__d->data);			       	\
  |  |  |  | 1072|      0|        apr__d->free(apr__d);						\
  |  |  |  | 1073|      0|    } while (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1073:14): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1090|      0|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1090:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   44|      0|    }
   45|       |#else
   46|       |    /* Debugging version with checks which will only trigger if the
   47|       |     * bucket list becomes corrupt. */
   48|       |    apr_bucket *e;
   49|       |    apr_bucket *prev = NULL;
   50|       |
   51|       |    APR_BRIGADE_CHECK_CONSISTENCY(b);
   52|       |
   53|       |    while (!APR_BRIGADE_EMPTY(b)) {
   54|       |        e = APR_BRIGADE_FIRST(b);
   55|       |        assert(e != prev);
   56|       |        prev = e;
   57|       |        apr_bucket_delete(e);
   58|       |    }
   59|       |#endif
   60|       |
   61|       |    /* We don't need to free(bb) because it's allocated from a pool. */
   62|    491|    return APR_SUCCESS;
  ------------------
  |  |  225|    491|#define APR_SUCCESS 0
  ------------------
   63|    491|}
apr_brigade_create:
   87|    491|{
   88|    491|    apr_bucket_brigade *b;
   89|       |
   90|    491|    b = apr_palloc(p, sizeof(*b));
  ------------------
  |  |  425|    491|    apr_palloc_debug(p, size, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|    491|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  160|    491|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|    491|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   91|    491|    b->p = p;
   92|    491|    b->bucket_alloc = list;
   93|       |
   94|    491|    APR_RING_INIT(&b->list, apr_bucket, link);
  ------------------
  |  |  192|    491|#define APR_RING_INIT(hp, elem, link) do {                \
  |  |  193|    491|    APR_RING_FIRST((hp)) = APR_RING_SENTINEL((hp), elem, link);    \
  |  |  ------------------
  |  |  |  |  166|    491|#define APR_RING_FIRST(hp)    (hp)->next
  |  |  ------------------
  |  |                   APR_RING_FIRST((hp)) = APR_RING_SENTINEL((hp), elem, link);    \
  |  |  ------------------
  |  |  |  |  160|    491|    (struct elem *)((char *)(&(hp)->next) - APR_OFFSETOF(struct elem, link))
  |  |  |  |  ------------------
  |  |  |  |  |  |  111|    491|#define APR_OFFSETOF(s_type,field) __builtin_offsetof(s_type,field)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  194|    491|    APR_RING_LAST((hp))  = APR_RING_SENTINEL((hp), elem, link);    \
  |  |  ------------------
  |  |  |  |  171|    491|#define APR_RING_LAST(hp)    (hp)->prev
  |  |  ------------------
  |  |                   APR_RING_LAST((hp))  = APR_RING_SENTINEL((hp), elem, link);    \
  |  |  ------------------
  |  |  |  |  160|    491|    (struct elem *)((char *)(&(hp)->next) - APR_OFFSETOF(struct elem, link))
  |  |  |  |  ------------------
  |  |  |  |  |  |  111|    491|#define APR_OFFSETOF(s_type,field) __builtin_offsetof(s_type,field)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  195|    491|    } while (0)
  |  |  ------------------
  |  |  |  Branch (195:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   95|       |
   96|    491|    apr_pool_cleanup_register(b->p, b, brigade_cleanup, apr_pool_cleanup_null);
   97|    491|    return b;
   98|    491|}
apr_brigade.c:brigade_cleanup:
   33|    491|{
   34|    491|    return apr_brigade_cleanup(data);
   35|    491|}

apr_bucket_alloc_create:
   70|    491|{
   71|    491|    apr_allocator_t *allocator = apr_pool_allocator_get(p);
   72|    491|    apr_bucket_alloc_t *list;
   73|       |
   74|    491|#if APR_POOL_DEBUG
   75|       |    /* may be NULL for debug mode. */
   76|    491|    if (allocator == NULL) {
  ------------------
  |  Branch (76:9): [True: 491, False: 0]
  ------------------
   77|    491|        if (apr_allocator_create(&allocator) != APR_SUCCESS) {
  ------------------
  |  |  225|    491|#define APR_SUCCESS 0
  ------------------
  |  Branch (77:13): [True: 0, False: 491]
  ------------------
   78|      0|            apr_abortfunc_t fn = apr_pool_abort_get(p);
   79|      0|            if (fn)
  ------------------
  |  Branch (79:17): [True: 0, False: 0]
  ------------------
   80|      0|                (fn)(APR_ENOMEM);
  ------------------
  |  |  687|      0|#define APR_ENOMEM ENOMEM
  ------------------
   81|      0|            abort();
   82|      0|        }
   83|    491|    }
   84|    491|#endif
   85|    491|    list = apr_bucket_alloc_create_ex(allocator);
   86|    491|    if (list == NULL) {
  ------------------
  |  Branch (86:9): [True: 0, False: 491]
  ------------------
   87|      0|            apr_abortfunc_t fn = apr_pool_abort_get(p);
   88|      0|            if (fn)
  ------------------
  |  Branch (88:17): [True: 0, False: 0]
  ------------------
   89|      0|                (fn)(APR_ENOMEM);
  ------------------
  |  |  687|      0|#define APR_ENOMEM ENOMEM
  ------------------
   90|      0|            abort();
   91|      0|    }
   92|    491|    list->pool = p;
   93|    491|    apr_pool_cleanup_register(list->pool, list, alloc_cleanup,
   94|    491|                              apr_pool_cleanup_null);
   95|       |
   96|    491|    return list;
   97|    491|}
apr_bucket_alloc_create_ex:
  101|    491|{
  102|    491|    apr_bucket_alloc_t *list;
  103|    491|    apr_memnode_t *block;
  104|       |
  105|    491|    block = apr_allocator_alloc(allocator, ALLOC_AMT);
  ------------------
  |  |   23|    491|#define ALLOC_AMT (8192 - APR_MEMNODE_T_SIZE)
  |  |  ------------------
  |  |  |  |   64|    491|#define APR_MEMNODE_T_SIZE APR_ALIGN_DEFAULT(sizeof(apr_memnode_t))
  |  |  |  |  ------------------
  |  |  |  |  |  |  150|    491|#define APR_ALIGN_DEFAULT(size) APR_ALIGN(size, 8)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  147|    491|    (((size) + ((boundary) - 1)) & ~((boundary) - 1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  106|    491|    if (!block) {
  ------------------
  |  Branch (106:9): [True: 0, False: 491]
  ------------------
  107|      0|        return NULL;
  108|      0|    }
  109|    491|    list = (apr_bucket_alloc_t *)block->first_avail;
  110|    491|    list->pool = NULL;
  111|    491|    list->allocator = allocator;
  112|    491|    list->freelist = NULL;
  113|    491|    list->blocks = block;
  114|    491|    block->first_avail += APR_ALIGN_DEFAULT(sizeof(*list));
  ------------------
  |  |  150|    491|#define APR_ALIGN_DEFAULT(size) APR_ALIGN(size, 8)
  |  |  ------------------
  |  |  |  |  147|    491|    (((size) + ((boundary) - 1)) & ~((boundary) - 1))
  |  |  ------------------
  ------------------
  115|    491|    APR_VALGRIND_NOACCESS(block->first_avail,
  116|    491|                          block->endp - block->first_avail);
  117|    491|    return list;
  118|    491|}
apr_buckets_alloc.c:alloc_cleanup:
   46|    491|{
   47|    491|    apr_bucket_alloc_t *list = data;
   48|    491|#if APR_POOL_DEBUG
   49|    491|    apr_allocator_t *allocator = NULL;
   50|    491|#endif
   51|       |
   52|    491|#if APR_POOL_DEBUG
   53|    491|    if (list->pool && list->allocator != apr_pool_allocator_get(list->pool)) {
  ------------------
  |  Branch (53:9): [True: 491, False: 0]
  |  Branch (53:23): [True: 491, False: 0]
  ------------------
   54|    491|        allocator = list->allocator;
   55|    491|    }
   56|    491|#endif
   57|       |
   58|    491|    apr_allocator_free(list->allocator, list->blocks);
   59|       |
   60|    491|#if APR_POOL_DEBUG
   61|    491|    if (allocator) {
  ------------------
  |  Branch (61:9): [True: 491, False: 0]
  ------------------
   62|    491|        apr_allocator_destroy(allocator);
   63|    491|    }
   64|    491|#endif
   65|       |
   66|    491|    return APR_SUCCESS;
  ------------------
  |  |  225|    491|#define APR_SUCCESS 0
  ------------------
   67|    491|}

apr_os_file_put:
  314|      2|{
  315|      2|    int *dafile = thefile;
  316|       |
  317|      2|    (*file) = apr_pcalloc(pool, sizeof(apr_file_t));
  ------------------
  |  |  454|      2|    apr_pcalloc_debug(p, size, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|      2|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  160|      2|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|      2|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  318|      2|    (*file)->pool = pool;
  319|      2|    (*file)->eof_hit = 0;
  320|      2|    (*file)->blocking = BLK_UNKNOWN; /* in case it is a pipe */
  321|      2|    (*file)->timeout = -1;
  322|      2|    (*file)->ungetchar = -1; /* no char avail */
  323|      2|    (*file)->filedes = *dafile;
  324|      2|    (*file)->flags = flags | APR_FOPEN_NOCLEANUP;
  ------------------
  |  |   74|      2|#define APR_FOPEN_NOCLEANUP  0x00800  /**< Do not register a cleanup
  ------------------
  325|      2|    (*file)->buffered = (flags & APR_FOPEN_BUFFERED) > 0;
  ------------------
  |  |   65|      2|#define APR_FOPEN_BUFFERED   0x00080  /**< Open the file for buffered I/O */
  ------------------
  326|       |
  327|       |#ifndef WAITIO_USES_POLL
  328|       |    /* Start out with no pollset.  apr_wait_for_io_or_timeout() will
  329|       |     * initialize the pollset if needed.
  330|       |     */
  331|       |    (*file)->pollset = NULL;
  332|       |#endif
  333|       |
  334|      2|    if ((*file)->buffered) {
  ------------------
  |  Branch (334:9): [True: 0, False: 2]
  ------------------
  335|      0|        (*file)->buffer = apr_palloc(pool, APR_FILE_DEFAULT_BUFSIZE);
  ------------------
  |  |  425|      0|    apr_palloc_debug(p, size, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|      0|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  160|      0|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|      0|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  336|      0|        (*file)->bufsize = APR_FILE_DEFAULT_BUFSIZE;
  ------------------
  |  |   91|      0|#define APR_FILE_DEFAULT_BUFSIZE 4096
  ------------------
  337|      0|#if APR_HAS_THREADS
  338|      0|        if ((*file)->flags & APR_FOPEN_XTHREAD) {
  ------------------
  |  |   67|      0|#define APR_FOPEN_XTHREAD    0x00200  /**< Platform dependent tag to open
  ------------------
  |  Branch (338:13): [True: 0, False: 0]
  ------------------
  339|      0|            apr_status_t rv;
  340|      0|            rv = apr_thread_mutex_create(&((*file)->thlock),
  341|      0|                                         APR_THREAD_MUTEX_DEFAULT, pool);
  ------------------
  |  |   43|      0|#define APR_THREAD_MUTEX_DEFAULT  0x0   /**< platform-optimal lock behavior */
  ------------------
  342|      0|            if (rv) {
  ------------------
  |  Branch (342:17): [True: 0, False: 0]
  ------------------
  343|      0|                return rv;
  344|      0|            }
  345|      0|        }
  346|      0|#endif
  347|      0|    }
  348|      2|    return APR_SUCCESS;
  ------------------
  |  |  225|      2|#define APR_SUCCESS 0
  ------------------
  349|      2|}
apr_file_open_flags_stderr:
  362|      2|{
  363|      2|    int fd = STDERR_FILENO;
  364|       |
  365|      2|    return apr_os_file_put(thefile, &fd, flags | APR_FOPEN_WRITE, pool);
  ------------------
  |  |   55|      2|#define APR_FOPEN_WRITE      0x00002  /**< Open the file for writing */
  ------------------
  366|      2|}
apr_file_open_stderr:
  388|      2|{
  389|      2|    return apr_file_open_flags_stderr(thefile, 0, pool);
  390|      2|}

apr_hook_sort_register:
  231|      2|{
  232|       |#ifdef NETWARE
  233|       |    get_apd
  234|       |#endif
  235|      2|    HookSortEntry *pEntry;
  236|       |
  237|      2|    if(!s_aHooksToSort)
  ------------------
  |  Branch (237:8): [True: 2, False: 0]
  ------------------
  238|      2|        s_aHooksToSort=apr_array_make(apr_hook_global_pool,1,sizeof(HookSortEntry));
  239|      2|    pEntry=apr_array_push(s_aHooksToSort);
  240|      2|    pEntry->szHookName=szHookName;
  241|      2|    pEntry->paHooks=paHooks;
  242|      2|}

ap_run_pre_read_request:
  182|    491|    { \
  183|    491|    ns##_LINK_##name##_t *pHook; \
  184|    491|    int n; \
  185|    491|    APR_HOOK_INT_DCL_UD; \
  186|    491|\
  187|    491|    APR_HOOK_PROBE_ENTRY(ud, ns, name, args_use); \
  188|    491|\
  189|    491|    if(_hooks.link_##name) \
  ------------------
  |  Branch (189:8): [True: 0, False: 491]
  ------------------
  190|    491|        { \
  191|      0|        pHook=(ns##_LINK_##name##_t *)_hooks.link_##name->elts; \
  192|      0|        for(n=0 ; n < _hooks.link_##name->nelts ; ++n) \
  ------------------
  |  Branch (192:19): [True: 0, False: 0]
  ------------------
  193|      0|            { \
  194|      0|                APR_HOOK_PROBE_INVOKE(ud, ns, name, (char *)pHook[n].szName, args_use); \
  195|      0|                pHook[n].pFunc args_use; \
  196|      0|                APR_HOOK_PROBE_COMPLETE(ud, ns, name, (char *)pHook[n].szName, 0, args_use); \
  197|      0|            } \
  198|      0|        } \
  199|    491|\
  200|    491|    APR_HOOK_PROBE_RETURN(ud, ns, name, 0, args_use); \
  201|    491|\
  202|    491|    }
ap_hook_http_scheme:
  146|      2|    { \
  147|      2|    ns##_LINK_##name##_t *pHook; \
  148|      2|    if(!_hooks.link_##name) \
  ------------------
  |  Branch (148:8): [True: 2, False: 0]
  ------------------
  149|      2|    { \
  150|      2|        _hooks.link_##name=apr_array_make(apr_hook_global_pool,1,sizeof(ns##_LINK_##name##_t)); \
  151|      2|        apr_hook_sort_register(#name,&_hooks.link_##name); \
  152|      2|    } \
  153|      2|    pHook=apr_array_push(_hooks.link_##name); \
  154|      2|    pHook->pFunc=pf; \
  155|      2|    pHook->aszPredecessors=aszPre; \
  156|      2|    pHook->aszSuccessors=aszSucc; \
  157|      2|    pHook->nOrder=nOrder; \
  158|      2|    pHook->szName=apr_hook_debug_current; \
  159|      2|    if(apr_hook_debug_enabled) \
  ------------------
  |  Branch (159:8): [True: 0, False: 2]
  ------------------
  160|      2|        apr_hook_debug_show(#name,aszPre,aszSucc); \
  161|      2|    } \
ap_run_http_scheme:
  270|    187|    { \
  271|    187|    ns##_LINK_##name##_t *pHook; \
  272|    187|    int n; \
  273|    187|    ret rv = decline; \
  274|    187|    APR_HOOK_INT_DCL_UD; \
  275|    187|\
  276|    187|    APR_HOOK_PROBE_ENTRY(ud, ns, name, args_use); \
  277|    187|\
  278|    187|    if(_hooks.link_##name) \
  ------------------
  |  Branch (278:8): [True: 187, False: 0]
  ------------------
  279|    187|        { \
  280|    187|        pHook=(ns##_LINK_##name##_t *)_hooks.link_##name->elts; \
  281|    187|        for(n=0 ; n < _hooks.link_##name->nelts ; ++n) \
  ------------------
  |  Branch (281:19): [True: 187, False: 0]
  ------------------
  282|    187|            { \
  283|    187|            APR_HOOK_PROBE_INVOKE(ud, ns, name, (char *)pHook[n].szName, args_use); \
  284|    187|            rv=pHook[n].pFunc args_use; \
  285|    187|            APR_HOOK_PROBE_COMPLETE(ud, ns, name, (char *)pHook[n].szName, rv, args_use); \
  286|    187|\
  287|    187|            if(rv != decline) \
  ------------------
  |  Branch (287:16): [True: 187, False: 0]
  ------------------
  288|    187|                break; \
  289|    187|            } \
  290|    187|        } \
  291|    187|\
  292|    187|    APR_HOOK_PROBE_RETURN(ud, ns, name, rv, args_use); \
  293|    187|\
  294|    187|    return rv; \
  295|    187|    }
ap_run_create_request:
  225|    491|    { \
  226|    491|    ns##_LINK_##name##_t *pHook; \
  227|    491|    int n; \
  228|    491|    ret rv = ok; \
  229|    491|    APR_HOOK_INT_DCL_UD; \
  230|    491|\
  231|    491|    APR_HOOK_PROBE_ENTRY(ud, ns, name, args_use); \
  232|    491|\
  233|    491|    if(_hooks.link_##name) \
  ------------------
  |  Branch (233:8): [True: 0, False: 491]
  ------------------
  234|    491|        { \
  235|      0|        pHook=(ns##_LINK_##name##_t *)_hooks.link_##name->elts; \
  236|      0|        for(n=0 ; n < _hooks.link_##name->nelts ; ++n) \
  ------------------
  |  Branch (236:19): [True: 0, False: 0]
  ------------------
  237|      0|            { \
  238|      0|            APR_HOOK_PROBE_INVOKE(ud, ns, name, (char *)pHook[n].szName, args_use); \
  239|      0|            rv=pHook[n].pFunc args_use; \
  240|      0|            APR_HOOK_PROBE_COMPLETE(ud, ns, name, (char *)pHook[n].szName, rv, args_use); \
  241|      0|            if(rv != ok && rv != decline) \
  ------------------
  |  Branch (241:16): [True: 0, False: 0]
  |  Branch (241:28): [True: 0, False: 0]
  ------------------
  242|      0|                break; \
  243|      0|            rv = ok; \
  244|      0|            } \
  245|      0|        } \
  246|    491|\
  247|    491|    APR_HOOK_PROBE_RETURN(ud, ns, name, rv, args_use); \
  248|    491|\
  249|    491|    return rv; \
  250|    491|    }

apr_thread_mutex_create:
   40|    493|{
   41|    493|    apr_thread_mutex_t *new_mutex;
   42|    493|    apr_status_t rv;
   43|       |
   44|       |#ifndef HAVE_PTHREAD_MUTEX_RECURSIVE
   45|       |    if (flags & APR_THREAD_MUTEX_NESTED) {
   46|       |        return APR_ENOTIMPL;
   47|       |    }
   48|       |#endif
   49|       |
   50|    493|    new_mutex = apr_pcalloc(pool, sizeof(apr_thread_mutex_t));
  ------------------
  |  |  454|    493|    apr_pcalloc_debug(p, size, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|    493|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  160|    493|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|    493|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   51|    493|    new_mutex->pool = pool;
   52|       |
   53|    493|#ifdef HAVE_PTHREAD_MUTEX_RECURSIVE
   54|    493|    if (flags & APR_THREAD_MUTEX_NESTED) {
  ------------------
  |  |   44|    493|#define APR_THREAD_MUTEX_NESTED   0x1   /**< enable nested (recursive) locks */
  ------------------
  |  Branch (54:9): [True: 493, False: 0]
  ------------------
   55|    493|        pthread_mutexattr_t mattr;
   56|       |
   57|    493|        rv = pthread_mutexattr_init(&mattr);
   58|    493|        if (rv) return rv;
  ------------------
  |  Branch (58:13): [True: 0, False: 493]
  ------------------
   59|       |
   60|    493|        rv = pthread_mutexattr_settype(&mattr, PTHREAD_MUTEX_RECURSIVE);
   61|    493|        if (rv) {
  ------------------
  |  Branch (61:13): [True: 0, False: 493]
  ------------------
   62|      0|            pthread_mutexattr_destroy(&mattr);
   63|      0|            return rv;
   64|      0|        }
   65|       |
   66|    493|        rv = pthread_mutex_init(&new_mutex->mutex, &mattr);
   67|       |
   68|    493|        pthread_mutexattr_destroy(&mattr);
   69|    493|    } else
   70|      0|#endif
   71|      0|    {
   72|       |#if defined(APR_THREAD_DEBUG)
   73|       |        pthread_mutexattr_t mattr;
   74|       |
   75|       |        rv = pthread_mutexattr_init(&mattr);
   76|       |        if (rv) return rv;
   77|       |
   78|       |        rv = pthread_mutexattr_settype(&mattr, PTHREAD_MUTEX_ERRORCHECK);
   79|       |        if (rv) {
   80|       |            pthread_mutexattr_destroy(&mattr);
   81|       |            return rv;
   82|       |        }
   83|       |
   84|       |        rv = pthread_mutex_init(&new_mutex->mutex, &mattr);
   85|       |
   86|       |        pthread_mutexattr_destroy(&mattr);
   87|       |#else
   88|      0|        rv = pthread_mutex_init(&new_mutex->mutex, NULL);
   89|      0|#endif
   90|      0|    }
   91|       |
   92|    493|    if (rv) {
  ------------------
  |  Branch (92:9): [True: 0, False: 493]
  ------------------
   93|       |#ifdef HAVE_ZOS_PTHREADS
   94|       |        rv = errno;
   95|       |#endif
   96|      0|        return rv;
   97|      0|    }
   98|       |
   99|       |#ifndef HAVE_PTHREAD_MUTEX_TIMEDLOCK
  100|       |    if (flags & APR_THREAD_MUTEX_TIMED) {
  101|       |        rv = apr_thread_cond_create(&new_mutex->cond, pool);
  102|       |        if (rv) {
  103|       |#ifdef HAVE_ZOS_PTHREADS
  104|       |            rv = errno;
  105|       |#endif
  106|       |            pthread_mutex_destroy(&new_mutex->mutex);
  107|       |            return rv;
  108|       |        }
  109|       |    }
  110|       |#endif
  111|       |
  112|    493|    apr_pool_cleanup_register(new_mutex->pool,
  113|    493|                              new_mutex, thread_mutex_cleanup,
  114|    493|                              apr_pool_cleanup_null);
  115|       |
  116|    493|    *mutex = new_mutex;
  117|    493|    return APR_SUCCESS;
  ------------------
  |  |  225|    493|#define APR_SUCCESS 0
  ------------------
  118|    493|}
apr_thread_mutex_lock:
  121|    982|{
  122|    982|    apr_status_t rv;
  123|       |
  124|       |#ifndef HAVE_PTHREAD_MUTEX_TIMEDLOCK
  125|       |    if (mutex->cond) {
  126|       |        apr_status_t rv2;
  127|       |
  128|       |        rv = pthread_mutex_lock(&mutex->mutex);
  129|       |        if (rv) {
  130|       |#ifdef HAVE_ZOS_PTHREADS
  131|       |            rv = errno;
  132|       |#endif
  133|       |            return rv;
  134|       |        }
  135|       |
  136|       |        if (mutex->locked) {
  137|       |            mutex->num_waiters++;
  138|       |            rv = apr_thread_cond_wait(mutex->cond, mutex);
  139|       |            mutex->num_waiters--;
  140|       |        }
  141|       |        else {
  142|       |            mutex->locked = 1;
  143|       |        }
  144|       |
  145|       |        rv2 = pthread_mutex_unlock(&mutex->mutex);
  146|       |        if (rv2 && !rv) {
  147|       |#ifdef HAVE_ZOS_PTHREADS
  148|       |            rv = errno;
  149|       |#else
  150|       |            rv = rv2;
  151|       |#endif
  152|       |        }
  153|       |
  154|       |        return rv;
  155|       |    }
  156|       |#endif
  157|       |
  158|    982|    rv = pthread_mutex_lock(&mutex->mutex);
  159|       |#ifdef HAVE_ZOS_PTHREADS
  160|       |    if (rv) {
  161|       |        rv = errno;
  162|       |    }
  163|       |#endif
  164|       |
  165|    982|    return rv;
  166|    982|}
apr_thread_mutex_unlock:
  302|    982|{
  303|    982|    apr_status_t status;
  304|       |
  305|       |#ifndef HAVE_PTHREAD_MUTEX_TIMEDLOCK
  306|       |    if (mutex->cond) {
  307|       |        status = pthread_mutex_lock(&mutex->mutex);
  308|       |        if (status) {
  309|       |#ifdef HAVE_ZOS_PTHREADS
  310|       |            status = errno;
  311|       |#endif
  312|       |            return status;
  313|       |        }
  314|       |
  315|       |        if (!mutex->locked) {
  316|       |            status = APR_EINVAL;
  317|       |        }
  318|       |        else if (mutex->num_waiters) {
  319|       |            status = apr_thread_cond_signal(mutex->cond);
  320|       |        }
  321|       |        if (status) {
  322|       |            pthread_mutex_unlock(&mutex->mutex);
  323|       |            return status;
  324|       |        }
  325|       |
  326|       |        mutex->locked = 0;
  327|       |    }
  328|       |#endif
  329|       |
  330|    982|    status = pthread_mutex_unlock(&mutex->mutex);
  331|       |#ifdef HAVE_ZOS_PTHREADS
  332|       |    if (status) {
  333|       |        status = errno;
  334|       |    }
  335|       |#endif
  336|       |
  337|    982|    return status;
  338|    982|}
thread_mutex.c:thread_mutex_cleanup:
   24|    491|{
   25|    491|    apr_thread_mutex_t *mutex = data;
   26|    491|    apr_status_t rv;
   27|       |
   28|    491|    rv = pthread_mutex_destroy(&mutex->mutex);
   29|       |#ifdef HAVE_ZOS_PTHREADS
   30|       |    if (rv) {
   31|       |        rv = errno;
   32|       |    }
   33|       |#endif
   34|    491|    return rv;
   35|    491|}

apr_allocator_create:
  173|    491|{
  174|    491|    apr_allocator_t *new_allocator;
  175|       |
  176|    491|    *allocator = NULL;
  177|       |
  178|    491|    if ((new_allocator = malloc(SIZEOF_ALLOCATOR_T)) == NULL)
  ------------------
  |  |  147|    491|#define SIZEOF_ALLOCATOR_T  APR_ALIGN_DEFAULT(sizeof(apr_allocator_t))
  |  |  ------------------
  |  |  |  |  150|    491|#define APR_ALIGN_DEFAULT(size) APR_ALIGN(size, 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|    491|    (((size) + ((boundary) - 1)) & ~((boundary) - 1))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (178:9): [True: 0, False: 491]
  ------------------
  179|      0|        return APR_ENOMEM;
  ------------------
  |  |  687|      0|#define APR_ENOMEM ENOMEM
  ------------------
  180|       |
  181|    491|    memset(new_allocator, 0, SIZEOF_ALLOCATOR_T);
  ------------------
  |  |  147|    491|#define SIZEOF_ALLOCATOR_T  APR_ALIGN_DEFAULT(sizeof(apr_allocator_t))
  |  |  ------------------
  |  |  |  |  150|    491|#define APR_ALIGN_DEFAULT(size) APR_ALIGN(size, 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|    491|    (((size) + ((boundary) - 1)) & ~((boundary) - 1))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  182|    491|    new_allocator->max_free_index = APR_ALLOCATOR_MAX_FREE_UNLIMITED;
  ------------------
  |  |   67|    491|#define APR_ALLOCATOR_MAX_FREE_UNLIMITED 0
  ------------------
  183|       |
  184|    491|    *allocator = new_allocator;
  185|       |
  186|    491|    return APR_SUCCESS;
  ------------------
  |  |  225|    491|#define APR_SUCCESS 0
  ------------------
  187|    491|}
apr_allocator_destroy:
  190|    491|{
  191|    491|    apr_size_t index;
  192|    491|    apr_memnode_t *node, **ref;
  193|       |
  194|  10.8k|    for (index = 0; index <= MAX_INDEX; index++) {
  ------------------
  |  |   70|  10.8k|#define MAX_INDEX   20
  ------------------
  |  Branch (194:21): [True: 10.3k, False: 491]
  ------------------
  195|  10.3k|        ref = &allocator->free[index];
  196|  10.8k|        while ((node = *ref) != NULL) {
  ------------------
  |  Branch (196:16): [True: 491, False: 10.3k]
  ------------------
  197|    491|            *ref = node->next;
  198|       |#if APR_ALLOCATOR_USES_MMAP
  199|       |            munmap((char *)node - GUARDPAGE_SIZE,
  200|       |                   2 * GUARDPAGE_SIZE + ((node->index+1) << BOUNDARY_INDEX));
  201|       |#else
  202|    491|            free(node);
  203|    491|#endif
  204|    491|        }
  205|  10.3k|    }
  206|       |
  207|    491|    free(allocator);
  208|    491|}
apr_allocator_alloc:
  496|    491|{
  497|    491|    return allocator_alloc(allocator, size);
  498|    491|}
apr_allocator_free:
  502|    491|{
  503|    491|    allocator_free(allocator, node);
  504|    491|}
apr_pool_initialize:
 1674|    491|{
 1675|    491|    apr_status_t rv;
 1676|       |#if (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE_ALL)
 1677|       |    char *logpath;
 1678|       |    apr_file_t *debug_log = NULL;
 1679|       |#endif
 1680|       |
 1681|    491|    if (apr_pools_initialized++)
  ------------------
  |  Branch (1681:9): [True: 0, False: 491]
  ------------------
 1682|      0|        return APR_SUCCESS;
  ------------------
  |  |  225|      0|#define APR_SUCCESS 0
  ------------------
 1683|       |
 1684|    491|#if defined(_SC_PAGESIZE)
 1685|    491|    boundary_size = sysconf(_SC_PAGESIZE);
 1686|       |#elif defined(WIN32)
 1687|       |    {
 1688|       |        SYSTEM_INFO si;
 1689|       |        GetSystemInfo(&si);
 1690|       |        boundary_size = si.dwPageSize;
 1691|       |    }
 1692|       |#endif
 1693|    491|    boundary_index = 12;
 1694|    491|    while ( (1 << boundary_index) < boundary_size)
  ------------------
  |  Branch (1694:13): [True: 0, False: 491]
  ------------------
 1695|      0|        boundary_index++;
 1696|    491|    boundary_size = (1 << boundary_index);
 1697|       |
 1698|       |    /* Since the debug code works a bit differently then the
 1699|       |     * regular pools code, we ask for a lock here.  The regular
 1700|       |     * pools code has got this lock embedded in the global
 1701|       |     * allocator, a concept unknown to debug mode.
 1702|       |     */
 1703|    491|    if ((rv = apr_pool_create_ex(&global_pool, NULL, NULL,
  ------------------
  |  |  247|    491|    apr_pool_create_ex_debug(newpool, parent, abort_fn, allocator, \
  |  |  248|    491|                             APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|    491|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  160|    491|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|    491|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1703:9): [True: 0, False: 491]
  ------------------
 1704|    491|                                 NULL)) != APR_SUCCESS) {
  ------------------
  |  |  225|    491|#define APR_SUCCESS 0
  ------------------
 1705|      0|        return rv;
 1706|      0|    }
 1707|       |
 1708|    491|    apr_pool_tag(global_pool, "APR global pool");
 1709|       |
 1710|    491|    apr_pools_initialized = 1;
 1711|       |
 1712|       |    /* This has to happen here because mutexes might be backed by
 1713|       |     * atomics.  It used to be snug and safe in apr_initialize().
 1714|       |     */
 1715|    491|    if ((rv = apr_atomic_init(global_pool)) != APR_SUCCESS) {
  ------------------
  |  |  225|    491|#define APR_SUCCESS 0
  ------------------
  |  Branch (1715:9): [True: 0, False: 491]
  ------------------
 1716|      0|        return rv;
 1717|      0|    }
 1718|       |
 1719|       |#if (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE_ALL)
 1720|       |    rv = apr_env_get(&logpath, "APR_POOL_DEBUG_LOG", global_pool);
 1721|       |
 1722|       |    /* Don't pass file_stderr directly to apr_file_open() here, since
 1723|       |     * apr_file_open() can call back to apr_pool_log_event() and that
 1724|       |     * may attempt to use then then non-NULL but partially set up file
 1725|       |     * object. */
 1726|       |    if (rv == APR_SUCCESS) {
 1727|       |        apr_file_open(&debug_log, logpath,
 1728|       |                      APR_FOPEN_APPEND|APR_FOPEN_WRITE|APR_FOPEN_CREATE,
 1729|       |                      APR_FPROT_OS_DEFAULT, global_pool);
 1730|       |    }
 1731|       |    else {
 1732|       |        apr_file_open_stderr(&debug_log, global_pool);
 1733|       |    }
 1734|       |
 1735|       |    /* debug_log is now a file handle. */
 1736|       |    file_stderr = debug_log;
 1737|       |
 1738|       |    if (file_stderr) {
 1739|       |        apr_file_printf(file_stderr,
 1740|       |            "POOL DEBUG: [PID"
 1741|       |#if APR_HAS_THREADS
 1742|       |            "/TID"
 1743|       |#endif /* APR_HAS_THREADS */
 1744|       |            "] ACTION  (SIZE      /POOL SIZE /TOTAL SIZE) "
 1745|       |            "POOL       \"TAG\" <__FILE__:__LINE__> PARENT     (ALLOCS/TOTAL ALLOCS/CLEARS)\n");
 1746|       |
 1747|       |        apr_pool_log_event(global_pool, "GLOBAL", __FILE__ ":apr_pool_initialize", 0);
 1748|       |
 1749|       |        /* Add a cleanup handler that sets the debug log file handle
 1750|       |         * to NULL, otherwise we'll try to log the global pool
 1751|       |         * destruction event with predictably disastrous results. */
 1752|       |        apr_pool_cleanup_register(global_pool, NULL,
 1753|       |                                  apr_pool_cleanup_file_stderr,
 1754|       |                                  apr_pool_cleanup_null);
 1755|       |    }
 1756|       |#endif /* (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE_ALL) */
 1757|       |
 1758|    491|    return APR_SUCCESS;
  ------------------
  |  |  225|    491|#define APR_SUCCESS 0
  ------------------
 1759|    491|}
apr_pool_terminate:
 1762|    491|{
 1763|    491|    if (!apr_pools_initialized)
  ------------------
  |  Branch (1763:9): [True: 0, False: 491]
  ------------------
 1764|      0|        return;
 1765|       |
 1766|    491|    if (--apr_pools_initialized)
  ------------------
  |  Branch (1766:9): [True: 0, False: 491]
  ------------------
 1767|      0|        return;
 1768|       |
 1769|    491|    apr_pool_destroy(global_pool); /* This will also destroy the mutex */
  ------------------
  |  |  388|    491|    apr_pool_destroy_debug(p, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|    491|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  160|    491|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|    491|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1770|    491|    global_pool = NULL;
 1771|       |
 1772|       |#if (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE_ALL)
 1773|       |    file_stderr = NULL;
 1774|       |#endif /* (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE_ALL) */
 1775|    491|}
apr_palloc_debug:
 1823|  39.7k|{
 1824|  39.7k|    void *mem;
 1825|       |
 1826|  39.7k|    apr_pool_check_integrity(pool);
 1827|       |
 1828|  39.7k|    mem = pool_alloc(pool, size);
 1829|       |
 1830|       |#if (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE_ALLOC)
 1831|       |    apr_pool_log_event(pool, "PALLOC", file_line, 1);
 1832|       |#endif /* (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE_ALLOC) */
 1833|       |
 1834|  39.7k|    return mem;
 1835|  39.7k|}
apr_pcalloc_debug:
 1839|  2.95k|{
 1840|  2.95k|    void *mem;
 1841|       |
 1842|  2.95k|    apr_pool_check_integrity(pool);
 1843|       |
 1844|  2.95k|    mem = pool_alloc(pool, size);
 1845|  2.95k|    memset(mem, 0, size);
 1846|       |
 1847|       |#if (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE_ALLOC)
 1848|       |    apr_pool_log_event(pool, "PCALLOC", file_line, 1);
 1849|       |#endif /* (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE_ALLOC) */
 1850|       |
 1851|  2.95k|    return mem;
 1852|  2.95k|}
apr_pool_destroy_debug:
 1985|    491|{
 1986|    491|#if APR_HAS_THREADS
 1987|    491|    apr_thread_mutex_t *mutex;
 1988|    491|#endif
 1989|       |
 1990|    491|    apr_pool_check_lifetime(pool);
 1991|       |
 1992|    491|    if (pool->joined) {
  ------------------
  |  Branch (1992:9): [True: 0, False: 491]
  ------------------
 1993|       |        /* Joined pools must not be explicitly destroyed; the caller
 1994|       |         * has broken the guarantee. */
 1995|       |#if (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE_ALL)
 1996|       |        apr_pool_log_event(pool, "LIFE",
 1997|       |                           __FILE__ ":apr_pool_destroy abort on joined", 0);
 1998|       |#endif /* (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE_ALL) */
 1999|       |
 2000|      0|        abort();
 2001|      0|    }
 2002|       |
 2003|    491|#if APR_HAS_THREADS
 2004|       |    /* Lock the parent mutex before destroying so that it's not accessed
 2005|       |     * concurrently by apr_pool_walk_tree.
 2006|       |     */
 2007|    491|    mutex = parent_lock(pool);
 2008|    491|#endif
 2009|       |
 2010|       |#if (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE)
 2011|       |    apr_pool_log_event(pool, "DESTROY", file_line, 1);
 2012|       |#endif /* (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE) */
 2013|       |
 2014|    491|    pool_destroy_debug(pool, file_line);
 2015|       |
 2016|    491|#if APR_HAS_THREADS
 2017|       |    /* Unlock the mutex we obtained above */
 2018|    491|    parent_unlock(mutex);
 2019|    491|#endif /* APR_HAS_THREADS */
 2020|    491|}
apr_pool_create_ex_debug:
 2027|  1.47k|{
 2028|  1.47k|    apr_pool_t *pool;
 2029|       |
 2030|  1.47k|    *newpool = NULL;
 2031|       |
 2032|  1.47k|    if (!parent) {
  ------------------
  |  Branch (2032:9): [True: 984, False: 491]
  ------------------
 2033|    984|        parent = global_pool;
 2034|    984|    }
 2035|    491|    else {
 2036|    491|       apr_pool_check_lifetime(parent);
 2037|       |
 2038|    491|       if (!allocator)
  ------------------
  |  Branch (2038:12): [True: 491, False: 0]
  ------------------
 2039|    491|           allocator = parent->allocator;
 2040|    491|    }
 2041|       |
 2042|  1.47k|    if (!abort_fn && parent)
  ------------------
  |  Branch (2042:9): [True: 1.47k, False: 0]
  |  Branch (2042:22): [True: 982, False: 493]
  ------------------
 2043|    982|        abort_fn = parent->abort_fn;
 2044|       |
 2045|  1.47k|    if ((pool = malloc(SIZEOF_POOL_T)) == NULL) {
  ------------------
  |  |  618|  1.47k|#define SIZEOF_POOL_T       APR_ALIGN_DEFAULT(sizeof(apr_pool_t))
  |  |  ------------------
  |  |  |  |  150|  1.47k|#define APR_ALIGN_DEFAULT(size) APR_ALIGN(size, 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  1.47k|    (((size) + ((boundary) - 1)) & ~((boundary) - 1))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (2045:9): [True: 0, False: 1.47k]
  ------------------
 2046|      0|        if (abort_fn)
  ------------------
  |  Branch (2046:13): [True: 0, False: 0]
  ------------------
 2047|      0|            abort_fn(APR_ENOMEM);
  ------------------
  |  |  687|      0|#define APR_ENOMEM ENOMEM
  ------------------
 2048|       |
 2049|      0|         return APR_ENOMEM;
  ------------------
  |  |  687|      0|#define APR_ENOMEM ENOMEM
  ------------------
 2050|      0|    }
 2051|       |
 2052|  1.47k|    memset(pool, 0, SIZEOF_POOL_T);
  ------------------
  |  |  618|  1.47k|#define SIZEOF_POOL_T       APR_ALIGN_DEFAULT(sizeof(apr_pool_t))
  |  |  ------------------
  |  |  |  |  150|  1.47k|#define APR_ALIGN_DEFAULT(size) APR_ALIGN(size, 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  1.47k|    (((size) + ((boundary) - 1)) & ~((boundary) - 1))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2053|       |
 2054|  1.47k|    pool->allocator = allocator;
 2055|  1.47k|    pool->abort_fn = abort_fn;
 2056|  1.47k|    pool->tag = file_line;
 2057|  1.47k|    pool->file_line = file_line;
 2058|       |
 2059|  1.47k|#if APR_HAS_THREADS
 2060|  1.47k|    pool->owner = apr_os_thread_current();
 2061|  1.47k|#endif /* APR_HAS_THREADS */
 2062|       |#ifdef NETWARE
 2063|       |    pool->owner_proc = (apr_os_proc_t)getnlmhandle();
 2064|       |#endif /* defined(NETWARE) */
 2065|       |
 2066|  1.47k|#if APR_HAS_THREADS
 2067|  1.47k|    if (parent == NULL || parent->allocator != allocator) {
  ------------------
  |  Branch (2067:9): [True: 493, False: 982]
  |  Branch (2067:27): [True: 0, False: 982]
  ------------------
 2068|    493|        apr_status_t rv;
 2069|       |
 2070|       |        /* No matter what the creation flags say, always create
 2071|       |         * a lock.  Without it integrity_check and apr_pool_num_bytes
 2072|       |         * blow up (because they traverse pools child lists that
 2073|       |         * possibly belong to another thread, in combination with
 2074|       |         * the pool having no lock).  However, this might actually
 2075|       |         * hide problems like creating a child pool of a pool
 2076|       |         * belonging to another thread.
 2077|       |         */
 2078|    493|        if ((rv = apr_thread_mutex_create(&pool->mutex,
  ------------------
  |  Branch (2078:13): [True: 0, False: 493]
  ------------------
 2079|    493|                APR_THREAD_MUTEX_NESTED, pool)) != APR_SUCCESS) {
  ------------------
  |  |   44|    493|#define APR_THREAD_MUTEX_NESTED   0x1   /**< enable nested (recursive) locks */
  ------------------
                              APR_THREAD_MUTEX_NESTED, pool)) != APR_SUCCESS) {
  ------------------
  |  |  225|    493|#define APR_SUCCESS 0
  ------------------
 2080|      0|            free(pool);
 2081|      0|            return rv;
 2082|      0|        }
 2083|    493|    }
 2084|    982|    else {
 2085|    982|        pool->mutex = parent->mutex;
 2086|    982|    }
 2087|  1.47k|#endif /* APR_HAS_THREADS */
 2088|       |
 2089|  1.47k|    if ((pool->parent = parent) != NULL) {
  ------------------
  |  Branch (2089:9): [True: 982, False: 493]
  ------------------
 2090|    982|        pool_lock(parent);
 2091|       |
 2092|    982|        if ((pool->sibling = parent->child) != NULL)
  ------------------
  |  Branch (2092:13): [True: 0, False: 982]
  ------------------
 2093|      0|            pool->sibling->ref = &pool->sibling;
 2094|       |
 2095|    982|        parent->child = pool;
 2096|    982|        pool->ref = &parent->child;
 2097|       |
 2098|    982|        pool_unlock(parent);
 2099|    982|    }
 2100|    493|    else {
 2101|    493|        pool->sibling = NULL;
 2102|    493|        pool->ref = NULL;
 2103|    493|    }
 2104|       |
 2105|       |#if (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE)
 2106|       |    apr_pool_log_event(pool, "CREATE", file_line, 1);
 2107|       |#endif /* (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE) */
 2108|       |
 2109|  1.47k|    *newpool = pool;
 2110|       |
 2111|  1.47k|    return APR_SUCCESS;
  ------------------
  |  |  225|  1.47k|#define APR_SUCCESS 0
  ------------------
 2112|  1.47k|}
apr_pvsprintf:
 2212|      2|{
 2213|      2|    struct psprintf_data ps;
 2214|      2|    debug_node_t *node;
 2215|       |
 2216|      2|    apr_pool_check_integrity(pool);
 2217|       |
 2218|      2|    ps.size = 64;
 2219|      2|    ps.mem = malloc(ps.size);
 2220|      2|    ps.vbuff.curpos  = ps.mem;
 2221|       |
 2222|       |    /* Save a byte for the NUL terminator */
 2223|      2|    ps.vbuff.endpos = ps.mem + ps.size - 1;
 2224|       |
 2225|      2|    if (apr_vformatter(psprintf_flush, &ps.vbuff, fmt, ap) == -1) {
  ------------------
  |  Branch (2225:9): [True: 0, False: 2]
  ------------------
 2226|      0|        if (pool->abort_fn)
  ------------------
  |  Branch (2226:13): [True: 0, False: 0]
  ------------------
 2227|      0|            pool->abort_fn(APR_ENOMEM);
  ------------------
  |  |  687|      0|#define APR_ENOMEM ENOMEM
  ------------------
 2228|       |
 2229|      0|        return NULL;
 2230|      0|    }
 2231|       |
 2232|      2|    *ps.vbuff.curpos++ = '\0';
 2233|       |
 2234|       |    /*
 2235|       |     * Link the node in
 2236|       |     */
 2237|      2|    node = pool->nodes;
 2238|      2|    if (node == NULL || node->index == 64) {
  ------------------
  |  Branch (2238:9): [True: 0, False: 2]
  |  Branch (2238:25): [True: 0, False: 2]
  ------------------
 2239|      0|        if ((node = malloc(SIZEOF_DEBUG_NODE_T)) == NULL) {
  ------------------
  |  |  562|      0|#define SIZEOF_DEBUG_NODE_T APR_ALIGN_DEFAULT(sizeof(debug_node_t))
  |  |  ------------------
  |  |  |  |  150|      0|#define APR_ALIGN_DEFAULT(size) APR_ALIGN(size, 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|      0|    (((size) + ((boundary) - 1)) & ~((boundary) - 1))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (2239:13): [True: 0, False: 0]
  ------------------
 2240|      0|            if (pool->abort_fn)
  ------------------
  |  Branch (2240:17): [True: 0, False: 0]
  ------------------
 2241|      0|                pool->abort_fn(APR_ENOMEM);
  ------------------
  |  |  687|      0|#define APR_ENOMEM ENOMEM
  ------------------
 2242|       |
 2243|      0|            return NULL;
 2244|      0|        }
 2245|       |
 2246|      0|        node->next = pool->nodes;
 2247|      0|        pool->nodes = node;
 2248|      0|        node->index = 0;
 2249|      0|    }
 2250|       |
 2251|      2|    node->beginp[node->index] = ps.mem;
 2252|      2|    node->endp[node->index] = ps.mem + ps.size;
 2253|      2|    node->index++;
 2254|       |
 2255|      2|    return ps.mem;
 2256|      2|}
apr_psprintf:
 2371|      2|{
 2372|      2|    va_list ap;
 2373|      2|    char *res;
 2374|       |
 2375|      2|    va_start(ap, fmt);
 2376|      2|    res = apr_pvsprintf(p, fmt, ap);
 2377|      2|    va_end(ap);
 2378|      2|    return res;
 2379|      2|}
apr_pool_allocator_get:
 2409|    982|{
 2410|    982|    return pool->allocator;
 2411|    982|}
apr_pool_tag:
 2440|    982|{
 2441|    982|    pool->tag = tag;
 2442|    982|}
apr_pool_cleanup_register:
 2530|  1.96k|{
 2531|  1.96k|    cleanup_t *c = NULL;
 2532|       |
 2533|  1.96k|#if APR_POOL_DEBUG
 2534|  1.96k|    apr_pool_check_integrity(p);
 2535|  1.96k|#endif /* APR_POOL_DEBUG */
 2536|       |
 2537|  1.96k|    if (p != NULL) {
  ------------------
  |  Branch (2537:9): [True: 1.96k, False: 0]
  ------------------
 2538|  1.96k|        if (p->free_cleanups) {
  ------------------
  |  Branch (2538:13): [True: 0, False: 1.96k]
  ------------------
 2539|       |            /* reuse a cleanup structure */
 2540|      0|            c = p->free_cleanups;
 2541|      0|            p->free_cleanups = c->next;
 2542|  1.96k|        } else {
 2543|  1.96k|            c = apr_palloc(p, sizeof(cleanup_t));
  ------------------
  |  |  425|  1.96k|    apr_palloc_debug(p, size, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|  1.96k|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  160|  1.96k|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  1.96k|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2544|  1.96k|        }
 2545|  1.96k|        c->data = data;
 2546|  1.96k|        c->plain_cleanup_fn = plain_cleanup_fn;
 2547|  1.96k|        c->child_cleanup_fn = child_cleanup_fn;
 2548|  1.96k|        c->next = p->cleanups;
 2549|  1.96k|        p->cleanups = c;
 2550|  1.96k|    }
 2551|       |
 2552|  1.96k|#if APR_POOL_DEBUG
 2553|  1.96k|    if (!c || !c->plain_cleanup_fn || !c->child_cleanup_fn) {
  ------------------
  |  Branch (2553:9): [True: 0, False: 1.96k]
  |  Branch (2553:15): [True: 0, False: 1.96k]
  |  Branch (2553:39): [True: 0, False: 1.96k]
  ------------------
 2554|      0|        abort();
 2555|      0|    }
 2556|  1.96k|#endif /* APR_POOL_DEBUG */
 2557|  1.96k|}
apr_pool_create_ex:
 2979|    493|{
 2980|    493|    return apr_pool_create_ex_debug(newpool, parent,
 2981|    493|                                    abort_fn, allocator,
 2982|    493|                                    "undefined");
 2983|    493|}
apr_pools.c:allocator_lock:
  156|    491|{
  157|    491|#if APR_HAS_THREADS
  158|    491|    if (allocator->mutex)
  ------------------
  |  Branch (158:9): [True: 0, False: 491]
  ------------------
  159|      0|        apr_thread_mutex_lock(allocator->mutex);
  160|    491|#endif /* APR_HAS_THREADS */
  161|    491|}
apr_pools.c:allocator_unlock:
  165|    491|{
  166|    491|#if APR_HAS_THREADS
  167|    491|    if (allocator->mutex)
  ------------------
  |  Branch (167:9): [True: 0, False: 491]
  ------------------
  168|      0|        apr_thread_mutex_unlock(allocator->mutex);
  169|    491|#endif /* APR_HAS_THREADS */
  170|    491|}
apr_pools.c:allocator_align:
  255|    491|{
  256|    491|    apr_size_t size = in_size;
  257|       |
  258|       |    /* Round up the block size to the next boundary, but always
  259|       |     * allocate at least a certain size (MIN_ALLOC).
  260|       |     */
  261|    491|    size = APR_ALIGN(size + APR_MEMNODE_T_SIZE, BOUNDARY_SIZE);
  ------------------
  |  |  147|    491|    (((size) + ((boundary) - 1)) & ~((boundary) - 1))
  ------------------
  262|    491|    if (size < in_size) {
  ------------------
  |  Branch (262:9): [True: 0, False: 491]
  ------------------
  263|      0|        return 0;
  264|      0|    }
  265|    491|    if (size < MIN_ALLOC) {
  ------------------
  |  |   73|    491|#define MIN_ALLOC   (BOUNDARY_SIZE << min_order)
  |  |  ------------------
  |  |  |  |   82|    491|#define BOUNDARY_SIZE   boundary_size
  |  |  ------------------
  ------------------
  |  Branch (265:9): [True: 0, False: 491]
  ------------------
  266|      0|        size = MIN_ALLOC;
  ------------------
  |  |   73|      0|#define MIN_ALLOC   (BOUNDARY_SIZE << min_order)
  |  |  ------------------
  |  |  |  |   82|      0|#define BOUNDARY_SIZE   boundary_size
  |  |  ------------------
  ------------------
  267|      0|    }
  268|       |
  269|    491|    return size;
  270|    491|}
apr_pools.c:allocator_alloc:
  281|    491|{
  282|    491|    apr_memnode_t *node, **ref;
  283|    491|    apr_size_t max_index, upper_index;
  284|    491|    apr_size_t size, i, index;
  285|       |
  286|       |    /* Round up the block size to the next boundary, but always
  287|       |     * allocate at least a certain size (MIN_ALLOC).
  288|       |     */
  289|    491|    size = allocator_align(in_size);
  290|    491|    if (!size) {
  ------------------
  |  Branch (290:9): [True: 0, False: 491]
  ------------------
  291|      0|        return NULL;
  292|      0|    }
  293|       |
  294|       |    /* Find the index for this node size by
  295|       |     * dividing its size by the boundary size
  296|       |     */
  297|    491|    index = (size >> BOUNDARY_INDEX) - 1;
  ------------------
  |  |   81|    491|#define BOUNDARY_INDEX  boundary_index
  ------------------
  298|       |
  299|    491|    if (index > APR_UINT32_MAX) {
  ------------------
  |  |  449|    491|#define APR_UINT32_MAX  UINT32_MAX
  ------------------
  |  Branch (299:9): [True: 0, False: 491]
  ------------------
  300|      0|        return NULL;
  301|      0|    }
  302|       |
  303|       |    /* First see if there are any nodes in the area we know
  304|       |     * our node will fit into.
  305|       |     */
  306|    491|    if (index <= allocator->max_index) {
  ------------------
  |  Branch (306:9): [True: 0, False: 491]
  ------------------
  307|      0|        allocator_lock(allocator);
  308|       |
  309|       |        /* Walk the free list to see if there are
  310|       |         * any nodes on it of the requested size
  311|       |         *
  312|       |         * If there is no exact match, look for nodes
  313|       |         * of up to twice the requested size, so we
  314|       |         * won't unnecessarily allocate more memory
  315|       |         * nor waste too much of what we have.
  316|       |         *
  317|       |         * NOTE: an optimization would be to check
  318|       |         * allocator->free[index] first and if no
  319|       |         * node is present, directly use
  320|       |         * allocator->free[max_index].  This seems
  321|       |         * like overkill though and could cause
  322|       |         * memory waste.
  323|       |         */
  324|      0|        max_index = allocator->max_index;
  325|      0|        upper_index = 2 * index < max_index ? 2 * index : max_index;
  ------------------
  |  Branch (325:23): [True: 0, False: 0]
  ------------------
  326|      0|        ref = &allocator->free[index];
  327|      0|        i = index;
  328|      0|        while (*ref == NULL && i < upper_index) {
  ------------------
  |  Branch (328:16): [True: 0, False: 0]
  |  Branch (328:32): [True: 0, False: 0]
  ------------------
  329|      0|           ref++;
  330|      0|           i++;
  331|      0|        }
  332|       |
  333|      0|        if ((node = *ref) != NULL) {
  ------------------
  |  Branch (333:13): [True: 0, False: 0]
  ------------------
  334|       |            /* If we have found a node and it doesn't have any
  335|       |             * nodes waiting in line behind it _and_ we are on
  336|       |             * the highest available index, find the new highest
  337|       |             * available index
  338|       |             */
  339|      0|            if ((*ref = node->next) == NULL && i >= max_index) {
  ------------------
  |  Branch (339:17): [True: 0, False: 0]
  |  Branch (339:48): [True: 0, False: 0]
  ------------------
  340|      0|                do {
  341|      0|                    ref--;
  342|      0|                    max_index--;
  343|      0|                }
  344|      0|                while (*ref == NULL && max_index);
  ------------------
  |  Branch (344:24): [True: 0, False: 0]
  |  Branch (344:40): [True: 0, False: 0]
  ------------------
  345|       |
  346|      0|                allocator->max_index = max_index;
  347|      0|            }
  348|       |
  349|      0|            allocator->current_free_index += node->index + 1;
  350|      0|            if (allocator->current_free_index > allocator->max_free_index)
  ------------------
  |  Branch (350:17): [True: 0, False: 0]
  ------------------
  351|      0|                allocator->current_free_index = allocator->max_free_index;
  352|       |
  353|      0|            allocator_unlock(allocator);
  354|       |
  355|      0|            goto have_node;
  356|      0|        }
  357|       |
  358|      0|        allocator_unlock(allocator);
  359|      0|    }
  360|       |
  361|       |    /* If we found nothing, seek the sink (at index MAX_INDEX), if
  362|       |     * it is not empty.
  363|       |     */
  364|    491|    else if (allocator->free[MAX_INDEX]) {
  ------------------
  |  |   70|    491|#define MAX_INDEX   20
  ------------------
  |  Branch (364:14): [True: 0, False: 491]
  ------------------
  365|      0|        allocator_lock(allocator);
  366|       |
  367|       |        /* Walk the free list to see if there are
  368|       |         * any nodes on it of the requested size
  369|       |         */
  370|      0|        ref = &allocator->free[MAX_INDEX];
  ------------------
  |  |   70|      0|#define MAX_INDEX   20
  ------------------
  371|      0|        while ((node = *ref) != NULL && index > node->index)
  ------------------
  |  Branch (371:16): [True: 0, False: 0]
  |  Branch (371:41): [True: 0, False: 0]
  ------------------
  372|      0|            ref = &node->next;
  373|       |
  374|      0|        if (node) {
  ------------------
  |  Branch (374:13): [True: 0, False: 0]
  ------------------
  375|      0|            *ref = node->next;
  376|       |
  377|      0|            allocator->current_free_index += node->index + 1;
  378|      0|            if (allocator->current_free_index > allocator->max_free_index)
  ------------------
  |  Branch (378:17): [True: 0, False: 0]
  ------------------
  379|      0|                allocator->current_free_index = allocator->max_free_index;
  380|       |
  381|      0|            allocator_unlock(allocator);
  382|       |
  383|      0|            goto have_node;
  384|      0|        }
  385|       |
  386|      0|        allocator_unlock(allocator);
  387|      0|    }
  388|       |
  389|       |    /* If we haven't got a suitable node, malloc a new one
  390|       |     * and initialize it.
  391|       |     */
  392|       |#if APR_ALLOCATOR_GUARD_PAGES
  393|       |    if ((node = mmap(NULL, size + 2 * GUARDPAGE_SIZE, PROT_NONE,
  394|       |                     MAP_PRIVATE|MAP_ANON, -1, 0)) == MAP_FAILED)
  395|       |#elif APR_ALLOCATOR_USES_MMAP
  396|       |    if ((node = mmap(NULL, size, PROT_READ|PROT_WRITE,
  397|       |                     MAP_PRIVATE|MAP_ANON, -1, 0)) == MAP_FAILED)
  398|       |#else
  399|    491|    if ((node = malloc(size)) == NULL)
  ------------------
  |  Branch (399:9): [True: 0, False: 491]
  ------------------
  400|      0|#endif
  401|      0|        return NULL;
  402|       |
  403|       |#if APR_ALLOCATOR_GUARD_PAGES
  404|       |    node = (apr_memnode_t *)((char *)node + GUARDPAGE_SIZE);
  405|       |    if (mprotect(node, size, PROT_READ|PROT_WRITE) != 0) {
  406|       |        munmap((char *)node - GUARDPAGE_SIZE, size + 2 * GUARDPAGE_SIZE);
  407|       |        return NULL;
  408|       |    }
  409|       |#endif
  410|    491|    node->index = (apr_uint32_t)index;
  411|    491|    node->endp = (char *)node + size;
  412|       |
  413|    491|have_node:
  414|    491|    node->next = NULL;
  415|    491|    node->first_avail = (char *)node + APR_MEMNODE_T_SIZE;
  ------------------
  |  |   64|    491|#define APR_MEMNODE_T_SIZE APR_ALIGN_DEFAULT(sizeof(apr_memnode_t))
  |  |  ------------------
  |  |  |  |  150|    491|#define APR_ALIGN_DEFAULT(size) APR_ALIGN(size, 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|    491|    (((size) + ((boundary) - 1)) & ~((boundary) - 1))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  416|       |
  417|    491|    APR_VALGRIND_UNDEFINED(node->first_avail, size - APR_MEMNODE_T_SIZE);
  418|       |
  419|    491|    return node;
  420|    491|}
apr_pools.c:allocator_free:
  424|    491|{
  425|    491|    apr_memnode_t *next, *freelist = NULL;
  426|    491|    apr_size_t index, max_index;
  427|    491|    apr_size_t max_free_index, current_free_index;
  428|       |
  429|    491|    allocator_lock(allocator);
  430|       |
  431|    491|    max_index = allocator->max_index;
  432|    491|    max_free_index = allocator->max_free_index;
  433|    491|    current_free_index = allocator->current_free_index;
  434|       |
  435|       |    /* Walk the list of submitted nodes and free them one by one,
  436|       |     * shoving them in the right 'size' buckets as we go.
  437|       |     */
  438|    491|    do {
  439|    491|        next = node->next;
  440|    491|        index = node->index;
  441|       |
  442|    491|        APR_VALGRIND_NOACCESS((char *)node + APR_MEMNODE_T_SIZE,
  443|    491|                              (node->index+1) << BOUNDARY_INDEX);
  444|       |
  445|    491|        if (max_free_index != APR_ALLOCATOR_MAX_FREE_UNLIMITED
  ------------------
  |  |   67|    982|#define APR_ALLOCATOR_MAX_FREE_UNLIMITED 0
  ------------------
  |  Branch (445:13): [True: 0, False: 491]
  ------------------
  446|    491|            && index + 1 > current_free_index) {
  ------------------
  |  Branch (446:16): [True: 0, False: 0]
  ------------------
  447|      0|            node->next = freelist;
  448|      0|            freelist = node;
  449|      0|        }
  450|    491|        else if (index < MAX_INDEX) {
  ------------------
  |  |   70|    491|#define MAX_INDEX   20
  ------------------
  |  Branch (450:18): [True: 491, False: 0]
  ------------------
  451|       |            /* Add the node to the appropriate 'size' bucket.  Adjust
  452|       |             * the max_index when appropriate.
  453|       |             */
  454|    491|            if ((node->next = allocator->free[index]) == NULL
  ------------------
  |  Branch (454:17): [True: 491, False: 0]
  ------------------
  455|    491|                && index > max_index) {
  ------------------
  |  Branch (455:20): [True: 491, False: 0]
  ------------------
  456|    491|                max_index = index;
  457|    491|            }
  458|    491|            allocator->free[index] = node;
  459|    491|            if (current_free_index >= index + 1)
  ------------------
  |  Branch (459:17): [True: 0, False: 491]
  ------------------
  460|      0|                current_free_index -= index + 1;
  461|    491|            else
  462|    491|                current_free_index = 0;
  463|    491|        }
  464|      0|        else {
  465|       |            /* This node is too large to keep in a specific size bucket,
  466|       |             * just add it to the sink (at index MAX_INDEX).
  467|       |             */
  468|      0|            node->next = allocator->free[MAX_INDEX];
  ------------------
  |  |   70|      0|#define MAX_INDEX   20
  ------------------
  469|      0|            allocator->free[MAX_INDEX] = node;
  ------------------
  |  |   70|      0|#define MAX_INDEX   20
  ------------------
  470|      0|            if (current_free_index >= index + 1)
  ------------------
  |  Branch (470:17): [True: 0, False: 0]
  ------------------
  471|      0|                current_free_index -= index + 1;
  472|      0|            else
  473|      0|                current_free_index = 0;
  474|      0|        }
  475|    491|    } while ((node = next) != NULL);
  ------------------
  |  Branch (475:14): [True: 0, False: 491]
  ------------------
  476|       |
  477|    491|    allocator->max_index = max_index;
  478|    491|    allocator->current_free_index = current_free_index;
  479|       |
  480|    491|    allocator_unlock(allocator);
  481|       |
  482|    491|    while (freelist != NULL) {
  ------------------
  |  Branch (482:12): [True: 0, False: 491]
  ------------------
  483|      0|        node = freelist;
  484|      0|        freelist = node->next;
  485|       |#if APR_ALLOCATOR_USES_MMAP
  486|       |        munmap((char *)node - GUARDPAGE_SIZE,
  487|       |               2 * GUARDPAGE_SIZE + ((node->index+1) << BOUNDARY_INDEX));
  488|       |#else
  489|      0|        free(node);
  490|      0|#endif
  491|      0|    }
  492|    491|}
apr_pools.c:apr_pool_check_integrity:
 1657|  44.6k|{
 1658|  44.6k|    apr_pool_check_lifetime(pool);
 1659|  44.6k|    apr_pool_check_owner(pool);
 1660|  44.6k|}
apr_pools.c:apr_pool_check_owner:
 1642|  46.1k|{
 1643|       |#if (APR_POOL_DEBUG & APR_POOL_DEBUG_OWNER)
 1644|       |#if APR_HAS_THREADS
 1645|       |    if (!apr_os_thread_equal(pool->owner, apr_os_thread_current())) {
 1646|       |#if (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE_ALL)
 1647|       |        apr_pool_log_event(pool, "THREAD",
 1648|       |                           __FILE__ ":apr_pool_integrity check [owner]", 0);
 1649|       |#endif /* (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE_ALL) */
 1650|       |        abort();
 1651|       |    }
 1652|       |#endif /* APR_HAS_THREADS */
 1653|       |#endif /* (APR_POOL_DEBUG & APR_POOL_DEBUG_OWNER) */
 1654|  46.1k|}
apr_pools.c:pool_alloc:
 1783|  42.7k|{
 1784|  42.7k|    debug_node_t *node;
 1785|  42.7k|    void *mem;
 1786|       |
 1787|  42.7k|    if ((mem = malloc(size)) == NULL) {
  ------------------
  |  Branch (1787:9): [True: 0, False: 42.7k]
  ------------------
 1788|      0|        if (pool->abort_fn)
  ------------------
  |  Branch (1788:13): [True: 0, False: 0]
  ------------------
 1789|      0|            pool->abort_fn(APR_ENOMEM);
  ------------------
  |  |  687|      0|#define APR_ENOMEM ENOMEM
  ------------------
 1790|       |
 1791|      0|        return NULL;
 1792|      0|    }
 1793|       |
 1794|  42.7k|    node = pool->nodes;
 1795|  42.7k|    if (node == NULL || node->index == 64) {
  ------------------
  |  Branch (1795:9): [True: 1.47k, False: 41.2k]
  |  Branch (1795:25): [True: 0, False: 41.2k]
  ------------------
 1796|  1.47k|        if ((node = malloc(SIZEOF_DEBUG_NODE_T)) == NULL) {
  ------------------
  |  |  562|  1.47k|#define SIZEOF_DEBUG_NODE_T APR_ALIGN_DEFAULT(sizeof(debug_node_t))
  |  |  ------------------
  |  |  |  |  150|  1.47k|#define APR_ALIGN_DEFAULT(size) APR_ALIGN(size, 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  1.47k|    (((size) + ((boundary) - 1)) & ~((boundary) - 1))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1796:13): [True: 0, False: 1.47k]
  ------------------
 1797|      0|            free(mem);
 1798|      0|            if (pool->abort_fn)
  ------------------
  |  Branch (1798:17): [True: 0, False: 0]
  ------------------
 1799|      0|                pool->abort_fn(APR_ENOMEM);
  ------------------
  |  |  687|      0|#define APR_ENOMEM ENOMEM
  ------------------
 1800|       |
 1801|      0|            return NULL;
 1802|      0|        }
 1803|       |
 1804|  1.47k|        memset(node, 0, SIZEOF_DEBUG_NODE_T);
  ------------------
  |  |  562|  1.47k|#define SIZEOF_DEBUG_NODE_T APR_ALIGN_DEFAULT(sizeof(debug_node_t))
  |  |  ------------------
  |  |  |  |  150|  1.47k|#define APR_ALIGN_DEFAULT(size) APR_ALIGN(size, 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  1.47k|    (((size) + ((boundary) - 1)) & ~((boundary) - 1))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1805|       |
 1806|  1.47k|        node->next = pool->nodes;
 1807|  1.47k|        pool->nodes = node;
 1808|  1.47k|        node->index = 0;
 1809|  1.47k|    }
 1810|       |
 1811|  42.7k|    node->beginp[node->index] = mem;
 1812|  42.7k|    node->endp[node->index] = (char *)mem + size;
 1813|  42.7k|    node->index++;
 1814|       |
 1815|  42.7k|    pool->stat_alloc++;
 1816|  42.7k|    pool->stat_total_alloc++;
 1817|       |
 1818|  42.7k|    return mem;
 1819|  42.7k|}
apr_pools.c:apr_pool_check_lifetime:
 1616|  45.6k|{
 1617|       |    /* Rule of thumb: use of the global pool is always
 1618|       |     * ok, since the only user is apr_pools.c.  Unless
 1619|       |     * people have searched for the top level parent and
 1620|       |     * started to use that...
 1621|       |     */
 1622|  45.6k|    if (pool == global_pool || global_pool == NULL)
  ------------------
  |  Branch (1622:9): [True: 491, False: 45.1k]
  |  Branch (1622:32): [True: 1.48k, False: 43.6k]
  ------------------
 1623|  1.98k|        return;
 1624|       |
 1625|       |    /* Lifetime
 1626|       |     * This basically checks to see if the pool being used is still
 1627|       |     * a relative to the global pool.  If not it was previously
 1628|       |     * destroyed, in which case we abort().
 1629|       |     */
 1630|       |#if (APR_POOL_DEBUG & APR_POOL_DEBUG_LIFETIME)
 1631|       |    if (!apr_pool_is_child_of(pool, global_pool)) {
 1632|       |#if (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE_ALL)
 1633|       |        apr_pool_log_event(pool, "LIFE",
 1634|       |                           __FILE__ ":apr_pool_integrity check [lifetime]", 0);
 1635|       |#endif /* (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE_ALL) */
 1636|       |        abort();
 1637|       |    }
 1638|       |#endif /* (APR_POOL_DEBUG & APR_POOL_DEBUG_LIFETIME) */
 1639|  45.6k|}
apr_pools.c:parent_lock:
 1491|    491|{
 1492|    491|    if (pool->parent) {
  ------------------
  |  Branch (1492:9): [True: 0, False: 491]
  ------------------
 1493|      0|        apr_thread_mutex_lock(pool->parent->mutex);
 1494|      0|        return pool->parent->mutex;
 1495|      0|    }
 1496|    491|    return NULL;
 1497|    491|}
apr_pools.c:pool_clear_debug:
 1862|  1.47k|{
 1863|  1.47k|    debug_node_t *node;
 1864|  1.47k|    apr_size_t index;
 1865|       |
 1866|       |    /* Run pre destroy cleanups */
 1867|  1.47k|    run_cleanups(&pool->pre_cleanups);
 1868|  1.47k|    pool->pre_cleanups = NULL;
 1869|       |
 1870|       |    /*
 1871|       |     * Now that we have given the pre cleanups the chance to kill of any
 1872|       |     * threads using the pool, the owner must be correct.
 1873|       |     */
 1874|  1.47k|    apr_pool_check_owner(pool);
 1875|       |
 1876|       |    /* Destroy the subpools.  The subpools will detach themselves from
 1877|       |     * this pool thus this loop is safe and easy.
 1878|       |     */
 1879|  2.45k|    while (pool->child)
  ------------------
  |  Branch (1879:12): [True: 982, False: 1.47k]
  ------------------
 1880|    982|        pool_destroy_debug(pool->child, file_line);
 1881|       |
 1882|       |    /* Run cleanups */
 1883|  1.47k|    run_cleanups(&pool->cleanups);
 1884|  1.47k|    pool->free_cleanups = NULL;
 1885|  1.47k|    pool->cleanups = NULL;
 1886|       |
 1887|       |    /* If new child pools showed up, this is a reason to raise a flag */
 1888|  1.47k|    if (pool->child)
  ------------------
  |  Branch (1888:9): [True: 0, False: 1.47k]
  ------------------
 1889|      0|        abort();
 1890|       |
 1891|       |    /* Free subprocesses */
 1892|  1.47k|    free_proc_chain(pool->subprocesses);
 1893|  1.47k|    pool->subprocesses = NULL;
 1894|       |
 1895|       |    /* Clear the user data. */
 1896|  1.47k|    pool->user_data = NULL;
 1897|       |
 1898|       |    /* Free the blocks, scribbling over them first to help highlight
 1899|       |     * use-after-free issues. */
 1900|  2.94k|    while ((node = pool->nodes) != NULL) {
  ------------------
  |  Branch (1900:12): [True: 1.47k, False: 1.47k]
  ------------------
 1901|  1.47k|        pool->nodes = node->next;
 1902|       |
 1903|  44.1k|        for (index = 0; index < node->index; index++) {
  ------------------
  |  Branch (1903:25): [True: 42.7k, False: 1.47k]
  ------------------
 1904|  42.7k|            memset(node->beginp[index], POOL_POISON_BYTE,
  ------------------
  |  | 1859|  42.7k|#define POOL_POISON_BYTE 'A'
  ------------------
 1905|  42.7k|                   (char *)node->endp[index] - (char *)node->beginp[index]);
 1906|  42.7k|            free(node->beginp[index]);
 1907|  42.7k|        }
 1908|       |
 1909|  1.47k|        memset(node, POOL_POISON_BYTE, SIZEOF_DEBUG_NODE_T);
  ------------------
  |  | 1859|  1.47k|#define POOL_POISON_BYTE 'A'
  ------------------
                      memset(node, POOL_POISON_BYTE, SIZEOF_DEBUG_NODE_T);
  ------------------
  |  |  562|  1.47k|#define SIZEOF_DEBUG_NODE_T APR_ALIGN_DEFAULT(sizeof(debug_node_t))
  |  |  ------------------
  |  |  |  |  150|  1.47k|#define APR_ALIGN_DEFAULT(size) APR_ALIGN(size, 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  147|  1.47k|    (((size) + ((boundary) - 1)) & ~((boundary) - 1))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1910|  1.47k|        free(node);
 1911|  1.47k|    }
 1912|       |
 1913|  1.47k|    pool->stat_alloc = 0;
 1914|  1.47k|    pool->stat_clear++;
 1915|       |
 1916|       |#if (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE)
 1917|       |    apr_pool_log_event(pool, "CLEARED", file_line, 1);
 1918|       |#endif /* (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE) */
 1919|  1.47k|}
apr_pools.c:run_cleanups:
 2684|  2.94k|{
 2685|  2.94k|    cleanup_t *c = *cref;
 2686|       |
 2687|  4.91k|    while (c) {
  ------------------
  |  Branch (2687:12): [True: 1.96k, False: 2.94k]
  ------------------
 2688|  1.96k|        *cref = c->next;
 2689|  1.96k|        (*c->plain_cleanup_fn)((void *)c->data);
 2690|  1.96k|        c = *cref;
 2691|  1.96k|    }
 2692|  2.94k|}
apr_pools.c:free_proc_chain:
 2764|  1.47k|{
 2765|       |    /* Dispose of the subprocesses we've spawned off in the course of
 2766|       |     * whatever it was we're cleaning up now.  This may involve killing
 2767|       |     * some of them off...
 2768|       |     */
 2769|  1.47k|    struct process_chain *pc;
 2770|  1.47k|    int need_timeout = 0;
 2771|  1.47k|    apr_time_t timeout_interval;
 2772|       |
 2773|  1.47k|    if (!procs)
  ------------------
  |  Branch (2773:9): [True: 1.47k, False: 0]
  ------------------
 2774|  1.47k|        return; /* No work.  Whew! */
 2775|       |
 2776|       |    /* First, check to see if we need to do the SIGTERM, sleep, SIGKILL
 2777|       |     * dance with any of the processes we're cleaning up.  If we've got
 2778|       |     * any kill-on-sight subprocesses, ditch them now as well, so they
 2779|       |     * don't waste any more cycles doing whatever it is that they shouldn't
 2780|       |     * be doing anymore.
 2781|       |     */
 2782|       |
 2783|      0|#ifndef NEED_WAITPID
 2784|       |    /* Pick up all defunct processes */
 2785|      0|    for (pc = procs; pc; pc = pc->next) {
  ------------------
  |  Branch (2785:22): [True: 0, False: 0]
  ------------------
 2786|      0|        if (apr_proc_wait(pc->proc, NULL, NULL, APR_NOWAIT) != APR_CHILD_NOTDONE)
  ------------------
  |  |  454|      0|#define APR_CHILD_NOTDONE  (APR_OS_START_STATUS + 6)
  |  |  ------------------
  |  |  |  |  136|      0|#define APR_OS_START_STATUS    (APR_OS_START_ERROR + APR_OS_ERRSPACE_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  117|      0|#define APR_OS_START_ERROR     20000
  |  |  |  |  ------------------
  |  |  |  |               #define APR_OS_START_STATUS    (APR_OS_START_ERROR + APR_OS_ERRSPACE_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  123|      0|#define APR_OS_ERRSPACE_SIZE 50000
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (2786:13): [True: 0, False: 0]
  ------------------
 2787|      0|            pc->kill_how = APR_KILL_NEVER;
 2788|      0|    }
 2789|      0|#endif /* !defined(NEED_WAITPID) */
 2790|       |
 2791|      0|    for (pc = procs; pc; pc = pc->next) {
  ------------------
  |  Branch (2791:22): [True: 0, False: 0]
  ------------------
 2792|      0|#ifndef WIN32
 2793|      0|        if ((pc->kill_how == APR_KILL_AFTER_TIMEOUT)
  ------------------
  |  Branch (2793:13): [True: 0, False: 0]
  ------------------
 2794|      0|            || (pc->kill_how == APR_KILL_ONLY_ONCE)) {
  ------------------
  |  Branch (2794:16): [True: 0, False: 0]
  ------------------
 2795|       |            /*
 2796|       |             * Subprocess may be dead already.  Only need the timeout if not.
 2797|       |             * Note: apr_proc_kill on Windows is TerminateProcess(), which is
 2798|       |             * similar to a SIGKILL, so always give the process a timeout
 2799|       |             * under Windows before killing it.
 2800|       |             */
 2801|      0|            if (apr_proc_kill(pc->proc, SIGTERM) == APR_SUCCESS)
  ------------------
  |  |  225|      0|#define APR_SUCCESS 0
  ------------------
  |  Branch (2801:17): [True: 0, False: 0]
  ------------------
 2802|      0|                need_timeout = 1;
 2803|      0|        }
 2804|      0|        else if (pc->kill_how == APR_KILL_ALWAYS) {
  ------------------
  |  Branch (2804:18): [True: 0, False: 0]
  ------------------
 2805|       |#else /* WIN32 knows only one fast, clean method of killing processes today */
 2806|       |        if (pc->kill_how != APR_KILL_NEVER) {
 2807|       |            need_timeout = 1;
 2808|       |            pc->kill_how = APR_KILL_ALWAYS;
 2809|       |#endif
 2810|      0|            apr_proc_kill(pc->proc, SIGKILL);
 2811|      0|        }
 2812|      0|    }
 2813|       |
 2814|       |    /* Sleep only if we have to. The sleep algorithm grows
 2815|       |     * by a factor of two on each iteration. TIMEOUT_INTERVAL
 2816|       |     * is equal to TIMEOUT_USECS / 64.
 2817|       |     */
 2818|      0|    if (need_timeout) {
  ------------------
  |  Branch (2818:9): [True: 0, False: 0]
  ------------------
 2819|      0|        timeout_interval = TIMEOUT_INTERVAL;
  ------------------
  |  |  106|      0|#define TIMEOUT_INTERVAL   46875
  ------------------
 2820|      0|        apr_sleep(timeout_interval);
 2821|       |
 2822|      0|        do {
 2823|       |            /* check the status of the subprocesses */
 2824|      0|            need_timeout = 0;
 2825|      0|            for (pc = procs; pc; pc = pc->next) {
  ------------------
  |  Branch (2825:30): [True: 0, False: 0]
  ------------------
 2826|      0|                if (pc->kill_how == APR_KILL_AFTER_TIMEOUT) {
  ------------------
  |  Branch (2826:21): [True: 0, False: 0]
  ------------------
 2827|      0|                    if (apr_proc_wait(pc->proc, NULL, NULL, APR_NOWAIT)
  ------------------
  |  Branch (2827:25): [True: 0, False: 0]
  ------------------
 2828|      0|                            == APR_CHILD_NOTDONE)
  ------------------
  |  |  454|      0|#define APR_CHILD_NOTDONE  (APR_OS_START_STATUS + 6)
  |  |  ------------------
  |  |  |  |  136|      0|#define APR_OS_START_STATUS    (APR_OS_START_ERROR + APR_OS_ERRSPACE_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  117|      0|#define APR_OS_START_ERROR     20000
  |  |  |  |  ------------------
  |  |  |  |               #define APR_OS_START_STATUS    (APR_OS_START_ERROR + APR_OS_ERRSPACE_SIZE)
  |  |  |  |  ------------------
  |  |  |  |  |  |  123|      0|#define APR_OS_ERRSPACE_SIZE 50000
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2829|      0|                        need_timeout = 1;		/* subprocess is still active */
 2830|      0|                    else
 2831|      0|                        pc->kill_how = APR_KILL_NEVER;	/* subprocess has exited */
 2832|      0|                }
 2833|      0|            }
 2834|      0|            if (need_timeout) {
  ------------------
  |  Branch (2834:17): [True: 0, False: 0]
  ------------------
 2835|      0|                if (timeout_interval >= TIMEOUT_USECS) {
  ------------------
  |  |  105|      0|#define TIMEOUT_USECS    3000000
  ------------------
  |  Branch (2835:21): [True: 0, False: 0]
  ------------------
 2836|      0|                    break;
 2837|      0|                }
 2838|      0|                apr_sleep(timeout_interval);
 2839|      0|                timeout_interval *= 2;
 2840|      0|            }
 2841|      0|        } while (need_timeout);
  ------------------
  |  Branch (2841:18): [True: 0, False: 0]
  ------------------
 2842|      0|    }
 2843|       |
 2844|       |    /* OK, the scripts we just timed out for have had a chance to clean up
 2845|       |     * --- now, just get rid of them, and also clean up the system accounting
 2846|       |     * goop...
 2847|       |     */
 2848|      0|    for (pc = procs; pc; pc = pc->next) {
  ------------------
  |  Branch (2848:22): [True: 0, False: 0]
  ------------------
 2849|      0|        if (pc->kill_how == APR_KILL_AFTER_TIMEOUT)
  ------------------
  |  Branch (2849:13): [True: 0, False: 0]
  ------------------
 2850|      0|            apr_proc_kill(pc->proc, SIGKILL);
 2851|      0|    }
 2852|       |
 2853|       |    /* Now wait for all the signaled processes to die */
 2854|      0|    for (pc = procs; pc; pc = pc->next) {
  ------------------
  |  Branch (2854:22): [True: 0, False: 0]
  ------------------
 2855|      0|        if (pc->kill_how != APR_KILL_NEVER)
  ------------------
  |  Branch (2855:13): [True: 0, False: 0]
  ------------------
 2856|      0|            (void)apr_proc_wait(pc->proc, NULL, NULL, APR_WAIT);
 2857|      0|    }
 2858|      0|}
apr_pools.c:parent_unlock:
 1501|    491|{
 1502|    491|    if (mutex) {
  ------------------
  |  Branch (1502:9): [True: 0, False: 491]
  ------------------
 1503|      0|        apr_thread_mutex_unlock(mutex);
 1504|      0|    }
 1505|    491|}
apr_pools.c:pool_destroy_debug:
 1964|  1.47k|{
 1965|  1.47k|    pool_clear_debug(pool, file_line);
 1966|       |
 1967|       |    /* Remove the pool from the parent's child list */
 1968|  1.47k|    if (pool->parent != NULL
  ------------------
  |  Branch (1968:9): [True: 982, False: 491]
  ------------------
 1969|  1.47k|        && (*pool->ref = pool->sibling) != NULL) {
  ------------------
  |  Branch (1969:12): [True: 0, False: 982]
  ------------------
 1970|      0|        pool->sibling->ref = pool->ref;
 1971|      0|    }
 1972|       |
 1973|       |    /* Destroy the allocator if the pool owns it */
 1974|  1.47k|    if (pool->allocator != NULL
  ------------------
  |  Branch (1974:9): [True: 0, False: 1.47k]
  ------------------
 1975|  1.47k|        && apr_allocator_owner_get(pool->allocator) == pool) {
  ------------------
  |  Branch (1975:12): [True: 0, False: 0]
  ------------------
 1976|      0|        apr_allocator_destroy(pool->allocator);
 1977|      0|    }
 1978|       |
 1979|       |    /* Free the pool itself */
 1980|  1.47k|    free(pool);
 1981|  1.47k|}
apr_pools.c:pool_lock:
 1474|    982|{
 1475|    982|#if APR_HAS_THREADS
 1476|    982|    apr_thread_mutex_lock(pool->mutex);
 1477|    982|#endif /* APR_HAS_THREADS */
 1478|    982|}
apr_pools.c:pool_unlock:
 1482|    982|{
 1483|    982|#if APR_HAS_THREADS
 1484|    982|    apr_thread_mutex_unlock(pool->mutex);
 1485|    982|#endif /* APR_HAS_THREADS */
 1486|    982|}

apr_vformatter:
  684|      2|{
  685|      2|    register char *sp;
  686|      2|    register char *bep;
  687|      2|    register int cc = 0;
  688|      2|    register apr_size_t i;
  689|       |
  690|      2|    register char *s = NULL;
  691|      2|    char *q;
  692|      2|    apr_size_t s_len = 0;
  693|       |
  694|      2|    register apr_size_t min_width = 0;
  695|      2|    apr_size_t precision = 0;
  696|      2|    enum {
  697|      2|        LEFT, RIGHT
  698|      2|    } adjust;
  699|      2|    char pad_char;
  700|      2|    char prefix_char;
  701|       |
  702|      2|    double fp_num;
  703|      2|    apr_int64_t i_quad = 0;
  704|      2|    apr_uint64_t ui_quad;
  705|      2|    apr_int32_t i_num = 0;
  706|      2|    apr_uint32_t ui_num = 0;
  707|       |
  708|      2|    char num_buf[NUM_BUF_SIZE];
  709|      2|    char char_buf[2];                /* for printing %% and %<unknown> */
  710|       |
  711|      2|    enum var_type_enum {
  712|      2|            IS_QUAD, IS_LONG, IS_SHORT, IS_INT
  713|      2|    };
  714|      2|    enum var_type_enum var_type = IS_INT;
  715|       |
  716|       |    /*
  717|       |     * Flag variables
  718|       |     */
  719|      2|    boolean_e alternate_form;
  720|      2|    boolean_e print_sign;
  721|      2|    boolean_e print_blank;
  722|      2|    boolean_e adjust_precision;
  723|      2|    boolean_e adjust_width;
  724|      2|    int is_negative;
  725|       |
  726|      2|    sp = vbuff->curpos;
  727|      2|    bep = vbuff->endpos;
  728|       |
  729|     18|    while (*fmt) {
  ------------------
  |  Branch (729:12): [True: 16, False: 2]
  ------------------
  730|     16|        if (*fmt != '%') {
  ------------------
  |  Branch (730:13): [True: 12, False: 4]
  ------------------
  731|     12|            INS_CHAR(*fmt, sp, bep, cc);
  ------------------
  |  |  244|     12|#define INS_CHAR(c, sp, bep, cc)                    \
  |  |  245|     12|{                                                   \
  |  |  246|     12|    if (sp) {                                       \
  |  |  ------------------
  |  |  |  Branch (246:9): [True: 12, False: 0]
  |  |  ------------------
  |  |  247|     12|        if (sp >= bep) {                            \
  |  |  ------------------
  |  |  |  Branch (247:13): [True: 0, False: 12]
  |  |  ------------------
  |  |  248|      0|            vbuff->curpos = sp;                     \
  |  |  249|      0|            if (flush_func(vbuff))                  \
  |  |  ------------------
  |  |  |  Branch (249:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  250|      0|                return -1;                          \
  |  |  251|      0|            sp = vbuff->curpos;                     \
  |  |  252|      0|            bep = vbuff->endpos;                    \
  |  |  253|      0|        }                                           \
  |  |  254|     12|        *sp++ = (c);                                \
  |  |  255|     12|    }                                               \
  |  |  256|     12|    cc++;                                           \
  |  |  257|     12|}
  ------------------
  732|     12|        }
  733|      4|        else {
  734|       |            /*
  735|       |             * Default variable settings
  736|       |             */
  737|      4|            boolean_e print_something = YES;
  738|      4|            adjust = RIGHT;
  739|      4|            alternate_form = print_sign = print_blank = NO;
  740|      4|            pad_char = ' ';
  741|      4|            prefix_char = NUL;
  ------------------
  |  |   55|      4|#define NUL '\0'
  ------------------
  742|       |
  743|      4|            fmt++;
  744|       |
  745|       |            /*
  746|       |             * Try to avoid checking for flags, width or precision
  747|       |             */
  748|      4|            if (!apr_islower(*fmt)) {
  ------------------
  |  |  216|      4|#define apr_islower(c) (islower(((unsigned char)(c))))
  ------------------
  |  Branch (748:17): [True: 0, False: 4]
  ------------------
  749|       |                /*
  750|       |                 * Recognize flags: -, #, BLANK, +
  751|       |                 */
  752|      0|                for (;; fmt++) {
  753|      0|                    if (*fmt == '-')
  ------------------
  |  Branch (753:25): [True: 0, False: 0]
  ------------------
  754|      0|                        adjust = LEFT;
  755|      0|                    else if (*fmt == '+')
  ------------------
  |  Branch (755:30): [True: 0, False: 0]
  ------------------
  756|      0|                        print_sign = YES;
  757|      0|                    else if (*fmt == '#')
  ------------------
  |  Branch (757:30): [True: 0, False: 0]
  ------------------
  758|      0|                        alternate_form = YES;
  759|      0|                    else if (*fmt == ' ')
  ------------------
  |  Branch (759:30): [True: 0, False: 0]
  ------------------
  760|      0|                        print_blank = YES;
  761|      0|                    else if (*fmt == '0')
  ------------------
  |  Branch (761:30): [True: 0, False: 0]
  ------------------
  762|      0|                        pad_char = '0';
  763|      0|                    else
  764|      0|                        break;
  765|      0|                }
  766|       |
  767|       |                /*
  768|       |                 * Check if a width was specified
  769|       |                 */
  770|      0|                if (apr_isdigit(*fmt)) {
  ------------------
  |  |  212|      0|#define apr_isdigit(c) (isdigit(((unsigned char)(c))))
  |  |  ------------------
  |  |  |  Branch (212:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  771|      0|                    STR_TO_DEC(fmt, min_width);
  ------------------
  |  |  262|      0|    num = NUM(*str++);                              \
  |  |  ------------------
  |  |  |  |  259|      0|#define NUM(c) (c - '0')
  |  |  ------------------
  |  |  263|      0|    while (apr_isdigit(*str))                       \
  |  |  ------------------
  |  |  |  |  212|      0|#define apr_isdigit(c) (isdigit(((unsigned char)(c))))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (212:24): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  264|      0|    {                                               \
  |  |  265|      0|        num *= 10 ;                                 \
  |  |  266|      0|        num += NUM(*str++);                         \
  |  |  ------------------
  |  |  |  |  259|      0|#define NUM(c) (c - '0')
  |  |  ------------------
  |  |  267|      0|    }
  ------------------
  772|      0|                    adjust_width = YES;
  773|      0|                }
  774|      0|                else if (*fmt == '*') {
  ------------------
  |  Branch (774:26): [True: 0, False: 0]
  ------------------
  775|      0|                    int v = va_arg(ap, int);
  776|      0|                    fmt++;
  777|      0|                    adjust_width = YES;
  778|      0|                    if (v < 0) {
  ------------------
  |  Branch (778:25): [True: 0, False: 0]
  ------------------
  779|      0|                        adjust = LEFT;
  780|      0|                        min_width = (apr_size_t)(-v);
  781|      0|                    }
  782|      0|                    else
  783|      0|                        min_width = (apr_size_t)v;
  784|      0|                }
  785|      0|                else
  786|      0|                    adjust_width = NO;
  787|       |
  788|       |                /*
  789|       |                 * Check if a precision was specified
  790|       |                 */
  791|      0|                if (*fmt == '.') {
  ------------------
  |  Branch (791:21): [True: 0, False: 0]
  ------------------
  792|      0|                    adjust_precision = YES;
  793|      0|                    fmt++;
  794|      0|                    if (apr_isdigit(*fmt)) {
  ------------------
  |  |  212|      0|#define apr_isdigit(c) (isdigit(((unsigned char)(c))))
  |  |  ------------------
  |  |  |  Branch (212:24): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  795|      0|                        STR_TO_DEC(fmt, precision);
  ------------------
  |  |  262|      0|    num = NUM(*str++);                              \
  |  |  ------------------
  |  |  |  |  259|      0|#define NUM(c) (c - '0')
  |  |  ------------------
  |  |  263|      0|    while (apr_isdigit(*str))                       \
  |  |  ------------------
  |  |  |  |  212|      0|#define apr_isdigit(c) (isdigit(((unsigned char)(c))))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (212:24): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  264|      0|    {                                               \
  |  |  265|      0|        num *= 10 ;                                 \
  |  |  266|      0|        num += NUM(*str++);                         \
  |  |  ------------------
  |  |  |  |  259|      0|#define NUM(c) (c - '0')
  |  |  ------------------
  |  |  267|      0|    }
  ------------------
  796|      0|                    }
  797|      0|                    else if (*fmt == '*') {
  ------------------
  |  Branch (797:30): [True: 0, False: 0]
  ------------------
  798|      0|                        int v = va_arg(ap, int);
  799|      0|                        fmt++;
  800|      0|                        precision = (v < 0) ? 0 : (apr_size_t)v;
  ------------------
  |  Branch (800:37): [True: 0, False: 0]
  ------------------
  801|      0|                    }
  802|      0|                    else
  803|      0|                        precision = 0;
  804|      0|                }
  805|      0|                else
  806|      0|                    adjust_precision = NO;
  807|      0|            }
  808|      4|            else
  809|      4|                adjust_precision = adjust_width = NO;
  810|       |
  811|       |            /*
  812|       |             * Modifier check.  In same cases, APR_OFF_T_FMT can be
  813|       |             * "lld" and APR_INT64_T_FMT can be "ld" (that is, off_t is
  814|       |             * "larger" than int64). Check that case 1st.
  815|       |             * Note that if APR_OFF_T_FMT is "d",
  816|       |             * the first if condition is never true. If APR_INT64_T_FMT
  817|       |             * is "d' then the second if condition is never true.
  818|       |             */
  819|      4|            if ((sizeof(APR_OFF_T_FMT) > sizeof(APR_INT64_T_FMT)) &&
  ------------------
  |  |  604|      4|#define APR_OFF_T_FMT "ld"
  ------------------
                          if ((sizeof(APR_OFF_T_FMT) > sizeof(APR_INT64_T_FMT)) &&
  ------------------
  |  |  610|      4|#define APR_INT64_T_FMT PRId64
  ------------------
  |  Branch (819:17): [Folded - Ignored]
  ------------------
  820|      4|                ((sizeof(APR_OFF_T_FMT) == 4 &&
  ------------------
  |  |  604|      0|#define APR_OFF_T_FMT "ld"
  ------------------
  |  Branch (820:19): [Folded - Ignored]
  ------------------
  821|      0|                 fmt[0] == APR_OFF_T_FMT[0] &&
  ------------------
  |  |  604|      0|#define APR_OFF_T_FMT "ld"
  ------------------
  |  Branch (821:18): [True: 0, False: 0]
  ------------------
  822|      0|                 fmt[1] == APR_OFF_T_FMT[1]) ||
  ------------------
  |  |  604|      0|#define APR_OFF_T_FMT "ld"
  ------------------
  |  Branch (822:18): [True: 0, False: 0]
  ------------------
  823|      0|                (sizeof(APR_OFF_T_FMT) == 3 &&
  ------------------
  |  |  604|      0|#define APR_OFF_T_FMT "ld"
  ------------------
  |  Branch (823:18): [Folded - Ignored]
  ------------------
  824|      0|                 fmt[0] == APR_OFF_T_FMT[0]) ||
  ------------------
  |  |  604|      0|#define APR_OFF_T_FMT "ld"
  ------------------
  |  Branch (824:18): [True: 0, False: 0]
  ------------------
  825|      0|                (sizeof(APR_OFF_T_FMT) > 4 &&
  ------------------
  |  |  604|      0|#define APR_OFF_T_FMT "ld"
  ------------------
  |  Branch (825:18): [Folded - Ignored]
  ------------------
  826|      0|                 strncmp(fmt, APR_OFF_T_FMT,
  ------------------
  |  |  604|      0|#define APR_OFF_T_FMT "ld"
  ------------------
  |  Branch (826:18): [True: 0, False: 0]
  ------------------
  827|      0|                         sizeof(APR_OFF_T_FMT) - 2) == 0))) {
  ------------------
  |  |  604|      0|#define APR_OFF_T_FMT "ld"
  ------------------
  828|       |                /* Need to account for trailing 'd' and null in sizeof() */
  829|      0|                var_type = IS_QUAD;
  830|      0|                fmt += (sizeof(APR_OFF_T_FMT) - 2);
  ------------------
  |  |  604|      0|#define APR_OFF_T_FMT "ld"
  ------------------
  831|      0|            }
  832|      4|            else if ((sizeof(APR_INT64_T_FMT) == 4 &&
  ------------------
  |  |  610|      4|#define APR_INT64_T_FMT PRId64
  ------------------
  |  Branch (832:23): [Folded - Ignored]
  ------------------
  833|      4|                 fmt[0] == APR_INT64_T_FMT[0] &&
  ------------------
  |  |  610|      0|#define APR_INT64_T_FMT PRId64
  ------------------
  |  Branch (833:18): [True: 0, False: 0]
  ------------------
  834|      4|                 fmt[1] == APR_INT64_T_FMT[1]) ||
  ------------------
  |  |  610|      0|#define APR_INT64_T_FMT PRId64
  ------------------
  |  Branch (834:18): [True: 0, False: 0]
  ------------------
  835|      4|                (sizeof(APR_INT64_T_FMT) == 3 &&
  ------------------
  |  |  610|      4|#define APR_INT64_T_FMT PRId64
  ------------------
  |  Branch (835:18): [Folded - Ignored]
  ------------------
  836|      4|                 fmt[0] == APR_INT64_T_FMT[0]) ||
  ------------------
  |  |  610|      4|#define APR_INT64_T_FMT PRId64
  ------------------
  |  Branch (836:18): [True: 0, False: 4]
  ------------------
  837|      4|                (sizeof(APR_INT64_T_FMT) > 4 &&
  ------------------
  |  |  610|      0|#define APR_INT64_T_FMT PRId64
  ------------------
  |  Branch (837:18): [Folded - Ignored]
  ------------------
  838|      0|                 strncmp(fmt, APR_INT64_T_FMT,
  ------------------
  |  |  610|      0|#define APR_INT64_T_FMT PRId64
  ------------------
  |  Branch (838:18): [True: 0, False: 0]
  ------------------
  839|      0|                         sizeof(APR_INT64_T_FMT) - 2) == 0)) {
  ------------------
  |  |  610|      0|#define APR_INT64_T_FMT PRId64
  ------------------
  840|       |                /* Need to account for trailing 'd' and null in sizeof() */
  841|      0|                var_type = IS_QUAD;
  842|      0|                fmt += (sizeof(APR_INT64_T_FMT) - 2);
  ------------------
  |  |  610|      0|#define APR_INT64_T_FMT PRId64
  ------------------
  843|      0|            }
  844|      4|            else if (*fmt == 'q') {
  ------------------
  |  Branch (844:22): [True: 0, False: 4]
  ------------------
  845|      0|                var_type = IS_QUAD;
  846|      0|                fmt++;
  847|      0|            }
  848|      4|            else if (*fmt == 'l') {
  ------------------
  |  Branch (848:22): [True: 0, False: 4]
  ------------------
  849|      0|                var_type = IS_LONG;
  850|      0|                fmt++;
  851|      0|            }
  852|      4|            else if (*fmt == 'h') {
  ------------------
  |  Branch (852:22): [True: 0, False: 4]
  ------------------
  853|      0|                var_type = IS_SHORT;
  854|      0|                fmt++;
  855|      0|            }
  856|      4|            else {
  857|      4|                var_type = IS_INT;
  858|      4|            }
  859|       |
  860|       |            /*
  861|       |             * Argument extraction and printing.
  862|       |             * First we determine the argument type.
  863|       |             * Then, we convert the argument to a string.
  864|       |             * On exit from the switch, s points to the string that
  865|       |             * must be printed, s_len has the length of the string
  866|       |             * The precision requirements, if any, are reflected in s_len.
  867|       |             *
  868|       |             * NOTE: pad_char may be set to '0' because of the 0 flag.
  869|       |             *   It is reset to ' ' by non-numeric formats
  870|       |             */
  871|      4|            switch (*fmt) {
  872|      0|            case 'u':
  ------------------
  |  Branch (872:13): [True: 0, False: 4]
  ------------------
  873|      0|                if (var_type == IS_QUAD) {
  ------------------
  |  Branch (873:21): [True: 0, False: 0]
  ------------------
  874|      0|                    i_quad = va_arg(ap, apr_uint64_t);
  875|      0|                    s = conv_10_quad(i_quad, 1, &is_negative,
  876|      0|                            &num_buf[NUM_BUF_SIZE], &s_len);
  ------------------
  |  |   69|      0|#define NUM_BUF_SIZE 512
  ------------------
  877|      0|                }
  878|      0|                else {
  879|      0|                    if (var_type == IS_LONG)
  ------------------
  |  Branch (879:25): [True: 0, False: 0]
  ------------------
  880|      0|                        i_num = (apr_int32_t) va_arg(ap, apr_uint32_t);
  881|      0|                    else if (var_type == IS_SHORT)
  ------------------
  |  Branch (881:30): [True: 0, False: 0]
  ------------------
  882|      0|                        i_num = (apr_int32_t) (unsigned short) va_arg(ap, unsigned int);
  883|      0|                    else
  884|      0|                        i_num = (apr_int32_t) va_arg(ap, unsigned int);
  885|      0|                    s = conv_10(i_num, 1, &is_negative,
  886|      0|                            &num_buf[NUM_BUF_SIZE], &s_len);
  ------------------
  |  |   69|      0|#define NUM_BUF_SIZE 512
  ------------------
  887|      0|                }
  888|      0|                FIX_PRECISION(adjust_precision, precision, s, s_len);
  ------------------
  |  |  280|      0|    if (adjust) {                                   \
  |  |  ------------------
  |  |  |  Branch (280:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  281|      0|        apr_size_t p = (precision + 1 < NUM_BUF_SIZE) \
  |  |  ------------------
  |  |  |  |   69|      0|#define NUM_BUF_SIZE 512
  |  |  ------------------
  |  |  |  Branch (281:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  282|      0|                     ? precision : NUM_BUF_SIZE - 1;  \
  |  |  ------------------
  |  |  |  |   69|      0|#define NUM_BUF_SIZE 512
  |  |  ------------------
  |  |  283|      0|        while (s_len < p)                           \
  |  |  ------------------
  |  |  |  Branch (283:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  284|      0|        {                                           \
  |  |  285|      0|            *--s = '0';                             \
  |  |  286|      0|            s_len++;                                \
  |  |  287|      0|        }                                           \
  |  |  288|      0|    }
  ------------------
  889|      0|                break;
  890|       |
  891|      4|            case 'd':
  ------------------
  |  Branch (891:13): [True: 4, False: 0]
  ------------------
  892|      4|            case 'i':
  ------------------
  |  Branch (892:13): [True: 0, False: 4]
  ------------------
  893|      4|                if (var_type == IS_QUAD) {
  ------------------
  |  Branch (893:21): [True: 0, False: 4]
  ------------------
  894|      0|                    i_quad = va_arg(ap, apr_int64_t);
  895|      0|                    s = conv_10_quad(i_quad, 0, &is_negative,
  896|      0|                            &num_buf[NUM_BUF_SIZE], &s_len);
  ------------------
  |  |   69|      0|#define NUM_BUF_SIZE 512
  ------------------
  897|      0|                }
  898|      4|                else {
  899|      4|                    if (var_type == IS_LONG)
  ------------------
  |  Branch (899:25): [True: 0, False: 4]
  ------------------
  900|      0|                        i_num = va_arg(ap, apr_int32_t);
  901|      4|                    else if (var_type == IS_SHORT)
  ------------------
  |  Branch (901:30): [True: 0, False: 4]
  ------------------
  902|      0|                        i_num = (short) va_arg(ap, int);
  903|      4|                    else
  904|      4|                        i_num = va_arg(ap, int);
  905|      4|                    s = conv_10(i_num, 0, &is_negative,
  906|      4|                            &num_buf[NUM_BUF_SIZE], &s_len);
  ------------------
  |  |   69|      4|#define NUM_BUF_SIZE 512
  ------------------
  907|      4|                }
  908|      4|                FIX_PRECISION(adjust_precision, precision, s, s_len);
  ------------------
  |  |  280|      4|    if (adjust) {                                   \
  |  |  ------------------
  |  |  |  Branch (280:9): [True: 0, False: 4]
  |  |  ------------------
  |  |  281|      0|        apr_size_t p = (precision + 1 < NUM_BUF_SIZE) \
  |  |  ------------------
  |  |  |  |   69|      0|#define NUM_BUF_SIZE 512
  |  |  ------------------
  |  |  |  Branch (281:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  282|      0|                     ? precision : NUM_BUF_SIZE - 1;  \
  |  |  ------------------
  |  |  |  |   69|      0|#define NUM_BUF_SIZE 512
  |  |  ------------------
  |  |  283|      0|        while (s_len < p)                           \
  |  |  ------------------
  |  |  |  Branch (283:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  284|      0|        {                                           \
  |  |  285|      0|            *--s = '0';                             \
  |  |  286|      0|            s_len++;                                \
  |  |  287|      0|        }                                           \
  |  |  288|      0|    }
  ------------------
  909|       |
  910|      4|                if (is_negative)
  ------------------
  |  Branch (910:21): [True: 0, False: 4]
  ------------------
  911|      0|                    prefix_char = '-';
  912|      4|                else if (print_sign)
  ------------------
  |  Branch (912:26): [True: 0, False: 4]
  ------------------
  913|      0|                    prefix_char = '+';
  914|      4|                else if (print_blank)
  ------------------
  |  Branch (914:26): [True: 0, False: 4]
  ------------------
  915|      0|                    prefix_char = ' ';
  916|      4|                break;
  917|       |
  918|       |
  919|      0|            case 'o':
  ------------------
  |  Branch (919:13): [True: 0, False: 4]
  ------------------
  920|      0|                if (var_type == IS_QUAD) {
  ------------------
  |  Branch (920:21): [True: 0, False: 0]
  ------------------
  921|      0|                    ui_quad = va_arg(ap, apr_uint64_t);
  922|      0|                    s = conv_p2_quad(ui_quad, 3, *fmt,
  923|      0|                            &num_buf[NUM_BUF_SIZE], &s_len);
  ------------------
  |  |   69|      0|#define NUM_BUF_SIZE 512
  ------------------
  924|      0|                }
  925|      0|                else {
  926|      0|                    if (var_type == IS_LONG)
  ------------------
  |  Branch (926:25): [True: 0, False: 0]
  ------------------
  927|      0|                        ui_num = va_arg(ap, apr_uint32_t);
  928|      0|                    else if (var_type == IS_SHORT)
  ------------------
  |  Branch (928:30): [True: 0, False: 0]
  ------------------
  929|      0|                        ui_num = (unsigned short) va_arg(ap, unsigned int);
  930|      0|                    else
  931|      0|                        ui_num = va_arg(ap, unsigned int);
  932|      0|                    s = conv_p2(ui_num, 3, *fmt,
  933|      0|                            &num_buf[NUM_BUF_SIZE], &s_len);
  ------------------
  |  |   69|      0|#define NUM_BUF_SIZE 512
  ------------------
  934|      0|                }
  935|      0|                FIX_PRECISION(adjust_precision, precision, s, s_len);
  ------------------
  |  |  280|      0|    if (adjust) {                                   \
  |  |  ------------------
  |  |  |  Branch (280:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  281|      0|        apr_size_t p = (precision + 1 < NUM_BUF_SIZE) \
  |  |  ------------------
  |  |  |  |   69|      0|#define NUM_BUF_SIZE 512
  |  |  ------------------
  |  |  |  Branch (281:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  282|      0|                     ? precision : NUM_BUF_SIZE - 1;  \
  |  |  ------------------
  |  |  |  |   69|      0|#define NUM_BUF_SIZE 512
  |  |  ------------------
  |  |  283|      0|        while (s_len < p)                           \
  |  |  ------------------
  |  |  |  Branch (283:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  284|      0|        {                                           \
  |  |  285|      0|            *--s = '0';                             \
  |  |  286|      0|            s_len++;                                \
  |  |  287|      0|        }                                           \
  |  |  288|      0|    }
  ------------------
  936|      0|                if (alternate_form && *s != '0') {
  ------------------
  |  Branch (936:21): [True: 0, False: 0]
  |  Branch (936:39): [True: 0, False: 0]
  ------------------
  937|      0|                    *--s = '0';
  938|      0|                    s_len++;
  939|      0|                }
  940|      0|                break;
  941|       |
  942|       |
  943|      0|            case 'x':
  ------------------
  |  Branch (943:13): [True: 0, False: 4]
  ------------------
  944|      0|            case 'X':
  ------------------
  |  Branch (944:13): [True: 0, False: 4]
  ------------------
  945|      0|                if (var_type == IS_QUAD) {
  ------------------
  |  Branch (945:21): [True: 0, False: 0]
  ------------------
  946|      0|                    ui_quad = va_arg(ap, apr_uint64_t);
  947|      0|                    s = conv_p2_quad(ui_quad, 4, *fmt,
  948|      0|                            &num_buf[NUM_BUF_SIZE], &s_len);
  ------------------
  |  |   69|      0|#define NUM_BUF_SIZE 512
  ------------------
  949|      0|                }
  950|      0|                else {
  951|      0|                    if (var_type == IS_LONG)
  ------------------
  |  Branch (951:25): [True: 0, False: 0]
  ------------------
  952|      0|                        ui_num = va_arg(ap, apr_uint32_t);
  953|      0|                    else if (var_type == IS_SHORT)
  ------------------
  |  Branch (953:30): [True: 0, False: 0]
  ------------------
  954|      0|                        ui_num = (unsigned short) va_arg(ap, unsigned int);
  955|      0|                    else
  956|      0|                        ui_num = va_arg(ap, unsigned int);
  957|      0|                    s = conv_p2(ui_num, 4, *fmt,
  958|      0|                            &num_buf[NUM_BUF_SIZE], &s_len);
  ------------------
  |  |   69|      0|#define NUM_BUF_SIZE 512
  ------------------
  959|      0|                }
  960|      0|                FIX_PRECISION(adjust_precision, precision, s, s_len);
  ------------------
  |  |  280|      0|    if (adjust) {                                   \
  |  |  ------------------
  |  |  |  Branch (280:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  281|      0|        apr_size_t p = (precision + 1 < NUM_BUF_SIZE) \
  |  |  ------------------
  |  |  |  |   69|      0|#define NUM_BUF_SIZE 512
  |  |  ------------------
  |  |  |  Branch (281:24): [True: 0, False: 0]
  |  |  ------------------
  |  |  282|      0|                     ? precision : NUM_BUF_SIZE - 1;  \
  |  |  ------------------
  |  |  |  |   69|      0|#define NUM_BUF_SIZE 512
  |  |  ------------------
  |  |  283|      0|        while (s_len < p)                           \
  |  |  ------------------
  |  |  |  Branch (283:16): [True: 0, False: 0]
  |  |  ------------------
  |  |  284|      0|        {                                           \
  |  |  285|      0|            *--s = '0';                             \
  |  |  286|      0|            s_len++;                                \
  |  |  287|      0|        }                                           \
  |  |  288|      0|    }
  ------------------
  961|      0|                if (alternate_form && ui_num != 0) {
  ------------------
  |  Branch (961:21): [True: 0, False: 0]
  |  Branch (961:39): [True: 0, False: 0]
  ------------------
  962|      0|                    *--s = *fmt;        /* 'x' or 'X' */
  963|      0|                    *--s = '0';
  964|      0|                    s_len += 2;
  965|      0|                }
  966|      0|                break;
  967|       |
  968|       |
  969|      0|            case 's':
  ------------------
  |  Branch (969:13): [True: 0, False: 4]
  ------------------
  970|      0|                s = va_arg(ap, char *);
  971|      0|                if (s != NULL) {
  ------------------
  |  Branch (971:21): [True: 0, False: 0]
  ------------------
  972|      0|                    if (!adjust_precision) {
  ------------------
  |  Branch (972:25): [True: 0, False: 0]
  ------------------
  973|      0|                        s_len = strlen(s);
  974|      0|                    }
  975|      0|                    else {
  976|       |                        /* From the C library standard in section 7.9.6.1:
  977|       |                         * ...if the precision is specified, no more then
  978|       |                         * that many characters are written.  If the
  979|       |                         * precision is not specified or is greater
  980|       |                         * than the size of the array, the array shall
  981|       |                         * contain a null character.
  982|       |                         *
  983|       |                         * My reading is is precision is specified and
  984|       |                         * is less then or equal to the size of the
  985|       |                         * array, no null character is required.  So
  986|       |                         * we can't do a strlen.
  987|       |                         *
  988|       |                         * This figures out the length of the string
  989|       |                         * up to the precision.  Once it's long enough
  990|       |                         * for the specified precision, we don't care
  991|       |                         * anymore.
  992|       |                         *
  993|       |                         * NOTE: you must do the length comparison
  994|       |                         * before the check for the null character.
  995|       |                         * Otherwise, you'll check one beyond the
  996|       |                         * last valid character.
  997|       |                         */
  998|      0|                        const char *walk;
  999|       |
 1000|      0|                        for (walk = s, s_len = 0;
 1001|      0|                             (s_len < precision) && (*walk != '\0');
  ------------------
  |  Branch (1001:30): [True: 0, False: 0]
  |  Branch (1001:53): [True: 0, False: 0]
  ------------------
 1002|      0|                             ++walk, ++s_len);
 1003|      0|                    }
 1004|      0|                }
 1005|      0|                else {
 1006|      0|                    s = S_NULL;
  ------------------
  |  |   58|      0|#define S_NULL ((char *)null_string)
  ------------------
 1007|      0|                    s_len = S_NULL_LEN;
  ------------------
  |  |   59|      0|#define S_NULL_LEN 6
  ------------------
 1008|      0|                }
 1009|      0|                pad_char = ' ';
 1010|      0|                break;
 1011|       |
 1012|       |
 1013|      0|            case 'f':
  ------------------
  |  Branch (1013:13): [True: 0, False: 4]
  ------------------
 1014|      0|            case 'e':
  ------------------
  |  Branch (1014:13): [True: 0, False: 4]
  ------------------
 1015|      0|            case 'E':
  ------------------
  |  Branch (1015:13): [True: 0, False: 4]
  ------------------
 1016|      0|                fp_num = va_arg(ap, double);
 1017|       |                /*
 1018|       |                 * We use &num_buf[ 1 ], so that we have room for the sign
 1019|       |                 */
 1020|      0|                s = NULL;
 1021|      0|#ifdef HAVE_ISNAN
 1022|      0|                if (isnan(fp_num)) {
 1023|      0|                    s = "nan";
 1024|      0|                    s_len = 3;
 1025|      0|                }
 1026|      0|#endif
 1027|      0|#ifdef HAVE_ISINF
 1028|      0|                if (!s && isinf(fp_num)) {
  ------------------
  |  Branch (1028:21): [True: 0, False: 0]
  ------------------
 1029|      0|                    s = "inf";
 1030|      0|                    s_len = 3;
 1031|      0|                }
 1032|      0|#endif
 1033|      0|                if (!s) {
  ------------------
  |  Branch (1033:21): [True: 0, False: 0]
  ------------------
 1034|      0|                    s = conv_fp(*fmt, fp_num, alternate_form,
 1035|      0|                                (int)((adjust_precision == NO) ? FLOAT_DIGITS : precision),
  ------------------
  |  |   61|      0|#define FLOAT_DIGITS 6
  ------------------
  |  Branch (1035:39): [True: 0, False: 0]
  ------------------
 1036|      0|                                &is_negative, &num_buf[1], &s_len);
 1037|      0|                    if (is_negative)
  ------------------
  |  Branch (1037:25): [True: 0, False: 0]
  ------------------
 1038|      0|                        prefix_char = '-';
 1039|      0|                    else if (print_sign)
  ------------------
  |  Branch (1039:30): [True: 0, False: 0]
  ------------------
 1040|      0|                        prefix_char = '+';
 1041|      0|                    else if (print_blank)
  ------------------
  |  Branch (1041:30): [True: 0, False: 0]
  ------------------
 1042|      0|                        prefix_char = ' ';
 1043|      0|                }
 1044|      0|                break;
 1045|       |
 1046|       |
 1047|      0|            case 'g':
  ------------------
  |  Branch (1047:13): [True: 0, False: 4]
  ------------------
 1048|      0|            case 'G':
  ------------------
  |  Branch (1048:13): [True: 0, False: 4]
  ------------------
 1049|      0|                if (adjust_precision == NO)
  ------------------
  |  Branch (1049:21): [True: 0, False: 0]
  ------------------
 1050|      0|                    precision = FLOAT_DIGITS;
  ------------------
  |  |   61|      0|#define FLOAT_DIGITS 6
  ------------------
 1051|      0|                else if (precision == 0)
  ------------------
  |  Branch (1051:26): [True: 0, False: 0]
  ------------------
 1052|      0|                    precision = 1;
 1053|       |                /*
 1054|       |                 * * We use &num_buf[ 1 ], so that we have room for the sign
 1055|       |                 */
 1056|      0|                s = apr_gcvt(va_arg(ap, double), (int) precision, &num_buf[1],
 1057|      0|                            alternate_form);
 1058|      0|                if (*s == '-')
  ------------------
  |  Branch (1058:21): [True: 0, False: 0]
  ------------------
 1059|      0|                    prefix_char = *s++;
 1060|      0|                else if (print_sign)
  ------------------
  |  Branch (1060:26): [True: 0, False: 0]
  ------------------
 1061|      0|                    prefix_char = '+';
 1062|      0|                else if (print_blank)
  ------------------
  |  Branch (1062:26): [True: 0, False: 0]
  ------------------
 1063|      0|                    prefix_char = ' ';
 1064|       |
 1065|      0|                s_len = strlen(s);
 1066|       |
 1067|      0|                if (alternate_form && (q = strchr(s, '.')) == NULL) {
  ------------------
  |  Branch (1067:21): [True: 0, False: 0]
  |  Branch (1067:39): [True: 0, False: 0]
  ------------------
 1068|      0|                    s[s_len++] = '.';
 1069|      0|                    s[s_len] = '\0'; /* delimit for following strchr() */
 1070|      0|                }
 1071|      0|                if (*fmt == 'G' && (q = strchr(s, 'e')) != NULL)
  ------------------
  |  Branch (1071:21): [True: 0, False: 0]
  |  Branch (1071:36): [True: 0, False: 0]
  ------------------
 1072|      0|                    *q = 'E';
 1073|      0|                break;
 1074|       |
 1075|       |
 1076|      0|            case 'c':
  ------------------
  |  Branch (1076:13): [True: 0, False: 4]
  ------------------
 1077|      0|                char_buf[0] = (char) (va_arg(ap, int));
 1078|      0|                s = &char_buf[0];
 1079|      0|                s_len = 1;
 1080|      0|                pad_char = ' ';
 1081|      0|                break;
 1082|       |
 1083|       |
 1084|      0|            case '%':
  ------------------
  |  Branch (1084:13): [True: 0, False: 4]
  ------------------
 1085|      0|                char_buf[0] = '%';
 1086|      0|                s = &char_buf[0];
 1087|      0|                s_len = 1;
 1088|      0|                pad_char = ' ';
 1089|      0|                break;
 1090|       |
 1091|       |
 1092|      0|            case 'n':
  ------------------
  |  Branch (1092:13): [True: 0, False: 4]
  ------------------
 1093|      0|                if (var_type == IS_QUAD)
  ------------------
  |  Branch (1093:21): [True: 0, False: 0]
  ------------------
 1094|      0|                    *(va_arg(ap, apr_int64_t *)) = cc;
 1095|      0|                else if (var_type == IS_LONG)
  ------------------
  |  Branch (1095:26): [True: 0, False: 0]
  ------------------
 1096|      0|                    *(va_arg(ap, long *)) = cc;
 1097|      0|                else if (var_type == IS_SHORT)
  ------------------
  |  Branch (1097:26): [True: 0, False: 0]
  ------------------
 1098|      0|                    *(va_arg(ap, short *)) = cc;
 1099|      0|                else
 1100|      0|                    *(va_arg(ap, int *)) = cc;
 1101|      0|                print_something = NO;
 1102|      0|                break;
 1103|       |
 1104|       |                /*
 1105|       |                 * This is where we extend the printf format, with a second
 1106|       |                 * type specifier
 1107|       |                 */
 1108|      0|            case 'p':
  ------------------
  |  Branch (1108:13): [True: 0, False: 4]
  ------------------
 1109|      0|                switch(*++fmt) {
 1110|       |                /*
 1111|       |                 * If the pointer size is equal to or smaller than the size
 1112|       |                 * of the largest unsigned int, we convert the pointer to a
 1113|       |                 * hex number, otherwise we print "%p" to indicate that we
 1114|       |                 * don't handle "%p".
 1115|       |                 */
 1116|      0|                case 'p':
  ------------------
  |  Branch (1116:17): [True: 0, False: 0]
  ------------------
 1117|      0|#if APR_SIZEOF_VOIDP == 8
 1118|      0|                    if (sizeof(void *) <= sizeof(apr_uint64_t)) {
  ------------------
  |  Branch (1118:25): [Folded - Ignored]
  ------------------
 1119|      0|                        ui_quad = (apr_uint64_t) va_arg(ap, void *);
 1120|      0|                        s = conv_p2_quad(ui_quad, 4, 'x',
 1121|      0|                                &num_buf[NUM_BUF_SIZE], &s_len);
  ------------------
  |  |   69|      0|#define NUM_BUF_SIZE 512
  ------------------
 1122|      0|                    }
 1123|       |#else
 1124|       |                    if (sizeof(void *) <= sizeof(apr_uint32_t)) {
 1125|       |                        ui_num = (apr_uint32_t) va_arg(ap, void *);
 1126|       |                        s = conv_p2(ui_num, 4, 'x',
 1127|       |                                &num_buf[NUM_BUF_SIZE], &s_len);
 1128|       |                    }
 1129|       |#endif
 1130|      0|                    else {
 1131|      0|                        s = "%p";
 1132|      0|                        s_len = 2;
 1133|      0|                        prefix_char = NUL;
  ------------------
  |  |   55|      0|#define NUL '\0'
  ------------------
 1134|      0|                    }
 1135|      0|                    pad_char = ' ';
 1136|      0|                    break;
 1137|       |
 1138|       |                /* print an apr_sockaddr_t as a.b.c.d:port */
 1139|      0|                case 'I':
  ------------------
  |  Branch (1139:17): [True: 0, False: 0]
  ------------------
 1140|      0|                {
 1141|      0|                    apr_sockaddr_t *sa;
 1142|       |
 1143|      0|                    sa = va_arg(ap, apr_sockaddr_t *);
 1144|      0|                    if (sa != NULL) {
  ------------------
  |  Branch (1144:25): [True: 0, False: 0]
  ------------------
 1145|      0|                        s = conv_apr_sockaddr(sa, &num_buf[NUM_BUF_SIZE], &s_len);
  ------------------
  |  |   69|      0|#define NUM_BUF_SIZE 512
  ------------------
 1146|      0|                        if (adjust_precision && precision < s_len)
  ------------------
  |  Branch (1146:29): [True: 0, False: 0]
  |  Branch (1146:49): [True: 0, False: 0]
  ------------------
 1147|      0|                            s_len = precision;
 1148|      0|                    }
 1149|      0|                    else {
 1150|      0|                        s = S_NULL;
  ------------------
  |  |   58|      0|#define S_NULL ((char *)null_string)
  ------------------
 1151|      0|                        s_len = S_NULL_LEN;
  ------------------
  |  |   59|      0|#define S_NULL_LEN 6
  ------------------
 1152|      0|                    }
 1153|      0|                    pad_char = ' ';
 1154|      0|                }
 1155|      0|                break;
 1156|       |
 1157|       |                /* print a struct in_addr as a.b.c.d */
 1158|      0|                case 'A':
  ------------------
  |  Branch (1158:17): [True: 0, False: 0]
  ------------------
 1159|      0|                {
 1160|      0|                    struct in_addr *ia;
 1161|       |
 1162|      0|                    ia = va_arg(ap, struct in_addr *);
 1163|      0|                    if (ia != NULL) {
  ------------------
  |  Branch (1163:25): [True: 0, False: 0]
  ------------------
 1164|      0|                        s = conv_in_addr(ia, &num_buf[NUM_BUF_SIZE], &s_len);
  ------------------
  |  |   69|      0|#define NUM_BUF_SIZE 512
  ------------------
 1165|      0|                        if (adjust_precision && precision < s_len)
  ------------------
  |  Branch (1165:29): [True: 0, False: 0]
  |  Branch (1165:49): [True: 0, False: 0]
  ------------------
 1166|      0|                            s_len = precision;
 1167|      0|                    }
 1168|      0|                    else {
 1169|      0|                        s = S_NULL;
  ------------------
  |  |   58|      0|#define S_NULL ((char *)null_string)
  ------------------
 1170|      0|                        s_len = S_NULL_LEN;
  ------------------
  |  |   59|      0|#define S_NULL_LEN 6
  ------------------
 1171|      0|                    }
 1172|      0|                    pad_char = ' ';
 1173|      0|                }
 1174|      0|                break;
 1175|       |
 1176|       |                /* print the error for an apr_status_t */
 1177|      0|                case 'm':
  ------------------
  |  Branch (1177:17): [True: 0, False: 0]
  ------------------
 1178|      0|                {
 1179|      0|                    apr_status_t *mrv;
 1180|       |
 1181|      0|                    mrv = va_arg(ap, apr_status_t *);
 1182|      0|                    if (mrv != NULL) {
  ------------------
  |  Branch (1182:25): [True: 0, False: 0]
  ------------------
 1183|      0|                        s = apr_strerror(*mrv, num_buf, NUM_BUF_SIZE-1);
  ------------------
  |  |   69|      0|#define NUM_BUF_SIZE 512
  ------------------
 1184|      0|                        s_len = strlen(s);
 1185|      0|                    }
 1186|      0|                    else {
 1187|      0|                        s = S_NULL;
  ------------------
  |  |   58|      0|#define S_NULL ((char *)null_string)
  ------------------
 1188|      0|                        s_len = S_NULL_LEN;
  ------------------
  |  |   59|      0|#define S_NULL_LEN 6
  ------------------
 1189|      0|                    }
 1190|      0|                    pad_char = ' ';
 1191|      0|                }
 1192|      0|                break;
 1193|       |
 1194|       |                /* print the tag for an apr_pool_t */
 1195|      0|                case 'g':
  ------------------
  |  Branch (1195:17): [True: 0, False: 0]
  ------------------
 1196|      0|                {
 1197|      0|                    apr_pool_t *prv;
 1198|       |
 1199|      0|                    prv = va_arg(ap, apr_pool_t *);
 1200|      0|                    if (prv != NULL) {
  ------------------
  |  Branch (1200:25): [True: 0, False: 0]
  ------------------
 1201|      0|                        s = (char *)apr_pool_get_tag(prv);
 1202|      0|                        if (!s) s = "(untagged)";
  ------------------
  |  Branch (1202:29): [True: 0, False: 0]
  ------------------
 1203|      0|                        s_len = strlen(s);
 1204|      0|                    }
 1205|      0|                    else {
 1206|      0|                        s = S_NULL;
  ------------------
  |  |   58|      0|#define S_NULL ((char *)null_string)
  ------------------
 1207|      0|                        s_len = S_NULL_LEN;
  ------------------
  |  |   59|      0|#define S_NULL_LEN 6
  ------------------
 1208|      0|                    }
 1209|      0|                    pad_char = ' ';
 1210|      0|                }
 1211|      0|                break;
 1212|       |
 1213|      0|                case 'T':
  ------------------
  |  Branch (1213:17): [True: 0, False: 0]
  ------------------
 1214|      0|#if APR_HAS_THREADS
 1215|      0|                {
 1216|      0|                    apr_os_thread_t *tid;
 1217|       |
 1218|      0|                    tid = va_arg(ap, apr_os_thread_t *);
 1219|      0|                    if (tid != NULL) {
  ------------------
  |  Branch (1219:25): [True: 0, False: 0]
  ------------------
 1220|      0|                        s = conv_os_thread_t(tid, &num_buf[NUM_BUF_SIZE], &s_len);
  ------------------
  |  |   69|      0|#define NUM_BUF_SIZE 512
  ------------------
 1221|      0|                        if (adjust_precision && precision < s_len)
  ------------------
  |  Branch (1221:29): [True: 0, False: 0]
  |  Branch (1221:49): [True: 0, False: 0]
  ------------------
 1222|      0|                            s_len = precision;
 1223|      0|                    }
 1224|      0|                    else {
 1225|      0|                        s = S_NULL;
  ------------------
  |  |   58|      0|#define S_NULL ((char *)null_string)
  ------------------
 1226|      0|                        s_len = S_NULL_LEN;
  ------------------
  |  |   59|      0|#define S_NULL_LEN 6
  ------------------
 1227|      0|                    }
 1228|      0|                    pad_char = ' ';
 1229|      0|                }
 1230|       |#else
 1231|       |                    char_buf[0] = '0';
 1232|       |                    s = &char_buf[0];
 1233|       |                    s_len = 1;
 1234|       |                    pad_char = ' ';
 1235|       |#endif
 1236|      0|                    break;
 1237|       |
 1238|      0|                case 't':
  ------------------
  |  Branch (1238:17): [True: 0, False: 0]
  ------------------
 1239|      0|#if APR_HAS_THREADS
 1240|      0|                {
 1241|      0|                    apr_os_thread_t *tid;
 1242|       |
 1243|      0|                    tid = va_arg(ap, apr_os_thread_t *);
 1244|      0|                    if (tid != NULL) {
  ------------------
  |  Branch (1244:25): [True: 0, False: 0]
  ------------------
 1245|      0|                        s = conv_os_thread_t_hex(tid, &num_buf[NUM_BUF_SIZE], &s_len);
  ------------------
  |  |   69|      0|#define NUM_BUF_SIZE 512
  ------------------
 1246|      0|                        if (adjust_precision && precision < s_len)
  ------------------
  |  Branch (1246:29): [True: 0, False: 0]
  |  Branch (1246:49): [True: 0, False: 0]
  ------------------
 1247|      0|                            s_len = precision;
 1248|      0|                    }
 1249|      0|                    else {
 1250|      0|                        s = S_NULL;
  ------------------
  |  |   58|      0|#define S_NULL ((char *)null_string)
  ------------------
 1251|      0|                        s_len = S_NULL_LEN;
  ------------------
  |  |   59|      0|#define S_NULL_LEN 6
  ------------------
 1252|      0|                    }
 1253|      0|                    pad_char = ' ';
 1254|      0|                }
 1255|       |#else
 1256|       |                    char_buf[0] = '0';
 1257|       |                    s = &char_buf[0];
 1258|       |                    s_len = 1;
 1259|       |                    pad_char = ' ';
 1260|       |#endif
 1261|      0|                    break;
 1262|       |
 1263|      0|                case 'B':
  ------------------
  |  Branch (1263:17): [True: 0, False: 0]
  ------------------
 1264|      0|                case 'F':
  ------------------
  |  Branch (1264:17): [True: 0, False: 0]
  ------------------
 1265|      0|                case 'S':
  ------------------
  |  Branch (1265:17): [True: 0, False: 0]
  ------------------
 1266|      0|                {
 1267|      0|                    char buf[5];
 1268|      0|                    apr_off_t size = 0;
 1269|       |
 1270|      0|                    if (*fmt == 'B') {
  ------------------
  |  Branch (1270:25): [True: 0, False: 0]
  ------------------
 1271|      0|                        apr_uint32_t *arg = va_arg(ap, apr_uint32_t *);
 1272|      0|                        size = (arg) ? *arg : 0;
  ------------------
  |  Branch (1272:32): [True: 0, False: 0]
  ------------------
 1273|      0|                    }
 1274|      0|                    else if (*fmt == 'F') {
  ------------------
  |  Branch (1274:30): [True: 0, False: 0]
  ------------------
 1275|      0|                        apr_off_t *arg = va_arg(ap, apr_off_t *);
 1276|      0|                        size = (arg) ? *arg : 0;
  ------------------
  |  Branch (1276:32): [True: 0, False: 0]
  ------------------
 1277|      0|                    }
 1278|      0|                    else {
 1279|      0|                        apr_size_t *arg = va_arg(ap, apr_size_t *);
 1280|      0|                        size = (arg) ? *arg : 0;
  ------------------
  |  Branch (1280:32): [True: 0, False: 0]
  ------------------
 1281|      0|                    }
 1282|       |
 1283|      0|                    s = apr_strfsize(size, buf);
 1284|      0|                    s_len = strlen(s);
 1285|      0|                    pad_char = ' ';
 1286|      0|                }
 1287|      0|                break;
 1288|       |
 1289|      0|                case NUL:
  ------------------
  |  |   55|      0|#define NUL '\0'
  ------------------
  |  Branch (1289:17): [True: 0, False: 0]
  ------------------
 1290|       |                    /* if %p ends the string, oh well ignore it */
 1291|      0|                    continue;
 1292|       |
 1293|      0|                default:
  ------------------
  |  Branch (1293:17): [True: 0, False: 0]
  ------------------
 1294|      0|                    s = "bogus %p";
 1295|      0|                    s_len = 8;
 1296|      0|                    prefix_char = NUL;
  ------------------
  |  |   55|      0|#define NUL '\0'
  ------------------
 1297|      0|                    (void)va_arg(ap, void *); /* skip the bogus argument on the stack */
 1298|      0|                    break;
 1299|      0|                }
 1300|      0|                break;
 1301|       |
 1302|      0|            case NUL:
  ------------------
  |  |   55|      0|#define NUL '\0'
  ------------------
  |  Branch (1302:13): [True: 0, False: 4]
  ------------------
 1303|       |                /*
 1304|       |                 * The last character of the format string was %.
 1305|       |                 * We ignore it.
 1306|       |                 */
 1307|      0|                continue;
 1308|       |
 1309|       |
 1310|       |                /*
 1311|       |                 * The default case is for unrecognized %'s.
 1312|       |                 * We print %<char> to help the user identify what
 1313|       |                 * option is not understood.
 1314|       |                 * This is also useful in case the user wants to pass
 1315|       |                 * the output of format_converter to another function
 1316|       |                 * that understands some other %<char> (like syslog).
 1317|       |                 * Note that we can't point s inside fmt because the
 1318|       |                 * unknown <char> could be preceded by width etc.
 1319|       |                 */
 1320|      0|            default:
  ------------------
  |  Branch (1320:13): [True: 0, False: 4]
  ------------------
 1321|      0|                char_buf[0] = '%';
 1322|      0|                char_buf[1] = *fmt;
 1323|      0|                s = char_buf;
 1324|      0|                s_len = 2;
 1325|      0|                pad_char = ' ';
 1326|      0|                break;
 1327|      4|            }
 1328|       |
 1329|      4|            if (prefix_char != NUL && s != S_NULL && s != char_buf) {
  ------------------
  |  |   55|      8|#define NUL '\0'
  ------------------
                          if (prefix_char != NUL && s != S_NULL && s != char_buf) {
  ------------------
  |  |   58|      4|#define S_NULL ((char *)null_string)
  ------------------
  |  Branch (1329:17): [True: 0, False: 4]
  |  Branch (1329:39): [True: 0, False: 0]
  |  Branch (1329:54): [True: 0, False: 0]
  ------------------
 1330|      0|                *--s = prefix_char;
 1331|      0|                s_len++;
 1332|      0|            }
 1333|       |
 1334|      4|            if (adjust_width && adjust == RIGHT && min_width > s_len) {
  ------------------
  |  Branch (1334:17): [True: 0, False: 4]
  |  Branch (1334:33): [True: 0, False: 0]
  |  Branch (1334:52): [True: 0, False: 0]
  ------------------
 1335|      0|                if (pad_char == '0' && prefix_char != NUL) {
  ------------------
  |  |   55|      0|#define NUL '\0'
  ------------------
  |  Branch (1335:21): [True: 0, False: 0]
  |  Branch (1335:40): [True: 0, False: 0]
  ------------------
 1336|      0|                    INS_CHAR(*s, sp, bep, cc);
  ------------------
  |  |  244|      0|#define INS_CHAR(c, sp, bep, cc)                    \
  |  |  245|      0|{                                                   \
  |  |  246|      0|    if (sp) {                                       \
  |  |  ------------------
  |  |  |  Branch (246:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  247|      0|        if (sp >= bep) {                            \
  |  |  ------------------
  |  |  |  Branch (247:13): [True: 0, False: 0]
  |  |  ------------------
  |  |  248|      0|            vbuff->curpos = sp;                     \
  |  |  249|      0|            if (flush_func(vbuff))                  \
  |  |  ------------------
  |  |  |  Branch (249:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  250|      0|                return -1;                          \
  |  |  251|      0|            sp = vbuff->curpos;                     \
  |  |  252|      0|            bep = vbuff->endpos;                    \
  |  |  253|      0|        }                                           \
  |  |  254|      0|        *sp++ = (c);                                \
  |  |  255|      0|    }                                               \
  |  |  256|      0|    cc++;                                           \
  |  |  257|      0|}
  ------------------
 1337|      0|                    s++;
 1338|      0|                    s_len--;
 1339|      0|                    min_width--;
 1340|      0|                }
 1341|      0|                PAD(min_width, s_len, pad_char);
  ------------------
  |  |  294|      0|#define PAD(width, len, ch)                         \
  |  |  295|      0|do                                                  \
  |  |  296|      0|{                                                   \
  |  |  297|      0|    INS_CHAR(ch, sp, bep, cc);                      \
  |  |  ------------------
  |  |  |  |  244|      0|#define INS_CHAR(c, sp, bep, cc)                    \
  |  |  |  |  245|      0|{                                                   \
  |  |  |  |  246|      0|    if (sp) {                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  247|      0|        if (sp >= bep) {                            \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (247:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  248|      0|            vbuff->curpos = sp;                     \
  |  |  |  |  249|      0|            if (flush_func(vbuff))                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (249:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  250|      0|                return -1;                          \
  |  |  |  |  251|      0|            sp = vbuff->curpos;                     \
  |  |  |  |  252|      0|            bep = vbuff->endpos;                    \
  |  |  |  |  253|      0|        }                                           \
  |  |  |  |  254|      0|        *sp++ = (c);                                \
  |  |  |  |  255|      0|    }                                               \
  |  |  |  |  256|      0|    cc++;                                           \
  |  |  |  |  257|      0|}
  |  |  ------------------
  |  |  298|      0|    width--;                                        \
  |  |  299|      0|}                                                   \
  |  |  300|      0|while (width > len)
  |  |  ------------------
  |  |  |  Branch (300:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1342|      0|            }
 1343|       |
 1344|       |            /*
 1345|       |             * Print the string s.
 1346|       |             */
 1347|      4|            if (print_something == YES) {
  ------------------
  |  Branch (1347:17): [True: 4, False: 0]
  ------------------
 1348|      8|                for (i = s_len; i != 0; i--) {
  ------------------
  |  Branch (1348:33): [True: 4, False: 4]
  ------------------
 1349|      4|                    INS_CHAR(*s, sp, bep, cc);
  ------------------
  |  |  244|      4|#define INS_CHAR(c, sp, bep, cc)                    \
  |  |  245|      4|{                                                   \
  |  |  246|      4|    if (sp) {                                       \
  |  |  ------------------
  |  |  |  Branch (246:9): [True: 4, False: 0]
  |  |  ------------------
  |  |  247|      4|        if (sp >= bep) {                            \
  |  |  ------------------
  |  |  |  Branch (247:13): [True: 0, False: 4]
  |  |  ------------------
  |  |  248|      0|            vbuff->curpos = sp;                     \
  |  |  249|      0|            if (flush_func(vbuff))                  \
  |  |  ------------------
  |  |  |  Branch (249:17): [True: 0, False: 0]
  |  |  ------------------
  |  |  250|      0|                return -1;                          \
  |  |  251|      0|            sp = vbuff->curpos;                     \
  |  |  252|      0|            bep = vbuff->endpos;                    \
  |  |  253|      0|        }                                           \
  |  |  254|      4|        *sp++ = (c);                                \
  |  |  255|      4|    }                                               \
  |  |  256|      4|    cc++;                                           \
  |  |  257|      4|}
  ------------------
 1350|      4|                    s++;
 1351|      4|                }
 1352|      4|            }
 1353|       |
 1354|      4|            if (adjust_width && adjust == LEFT && min_width > s_len)
  ------------------
  |  Branch (1354:17): [True: 0, False: 4]
  |  Branch (1354:33): [True: 0, False: 0]
  |  Branch (1354:51): [True: 0, False: 0]
  ------------------
 1355|      0|                PAD(min_width, s_len, pad_char);
  ------------------
  |  |  294|      0|#define PAD(width, len, ch)                         \
  |  |  295|      0|do                                                  \
  |  |  296|      0|{                                                   \
  |  |  297|      0|    INS_CHAR(ch, sp, bep, cc);                      \
  |  |  ------------------
  |  |  |  |  244|      0|#define INS_CHAR(c, sp, bep, cc)                    \
  |  |  |  |  245|      0|{                                                   \
  |  |  |  |  246|      0|    if (sp) {                                       \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  247|      0|        if (sp >= bep) {                            \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (247:13): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  248|      0|            vbuff->curpos = sp;                     \
  |  |  |  |  249|      0|            if (flush_func(vbuff))                  \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (249:17): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  250|      0|                return -1;                          \
  |  |  |  |  251|      0|            sp = vbuff->curpos;                     \
  |  |  |  |  252|      0|            bep = vbuff->endpos;                    \
  |  |  |  |  253|      0|        }                                           \
  |  |  |  |  254|      0|        *sp++ = (c);                                \
  |  |  |  |  255|      0|    }                                               \
  |  |  |  |  256|      0|    cc++;                                           \
  |  |  |  |  257|      0|}
  |  |  ------------------
  |  |  298|      0|    width--;                                        \
  |  |  299|      0|}                                                   \
  |  |  300|      0|while (width > len)
  |  |  ------------------
  |  |  |  Branch (300:8): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1356|      4|        }
 1357|     16|        fmt++;
 1358|     16|    }
 1359|      2|    vbuff->curpos = sp;
 1360|       |
 1361|      2|    return cc;
 1362|      2|}
apr_snprintf.c:conv_10:
  332|      4|{
  333|      4|    register char *p = buf_end;
  334|      4|    register apr_uint32_t magnitude = num;
  335|       |
  336|      4|    if (is_unsigned) {
  ------------------
  |  Branch (336:9): [True: 0, False: 4]
  ------------------
  337|      0|        *is_negative = FALSE;
  ------------------
  |  |   51|      0|#define FALSE 0
  ------------------
  338|      0|    }
  339|      4|    else {
  340|      4|        *is_negative = (num < 0);
  341|       |
  342|       |        /*
  343|       |         * On a 2's complement machine, negating the most negative integer
  344|       |         * results in a number that cannot be represented as a signed integer.
  345|       |         * Here is what we do to obtain the number's magnitude:
  346|       |         *      a. add 1 to the number
  347|       |         *      b. negate it (becomes positive)
  348|       |         *      c. convert it to unsigned
  349|       |         *      d. add 1
  350|       |         */
  351|      4|        if (*is_negative) {
  ------------------
  |  Branch (351:13): [True: 0, False: 4]
  ------------------
  352|      0|            apr_int32_t t = num + 1;
  353|      0|            magnitude = ((apr_uint32_t) -t) + 1;
  354|      0|        }
  355|      4|    }
  356|       |
  357|       |    /*
  358|       |     * We use a do-while loop so that we write at least 1 digit
  359|       |     */
  360|      4|    do {
  361|      4|        register apr_uint32_t new_magnitude = magnitude / 10;
  362|       |
  363|      4|        *--p = (char) (magnitude - new_magnitude * 10 + '0');
  364|      4|        magnitude = new_magnitude;
  365|      4|    }
  366|      4|    while (magnitude);
  ------------------
  |  Branch (366:12): [True: 0, False: 4]
  ------------------
  367|       |
  368|      4|    *len = buf_end - p;
  369|      4|    return (p);
  370|      4|}

apr_pstrdup:
   70|  1.04k|{
   71|  1.04k|    char *res;
   72|  1.04k|    apr_size_t len;
   73|       |
   74|  1.04k|    if (s == NULL) {
  ------------------
  |  Branch (74:9): [True: 0, False: 1.04k]
  ------------------
   75|      0|        return NULL;
   76|      0|    }
   77|  1.04k|    len = strlen(s) + 1;
   78|  1.04k|    res = apr_pmemdup(a, s, len);
   79|  1.04k|    return res;
   80|  1.04k|}
apr_pstrndup:
   83|     16|{
   84|     16|    char *res;
   85|     16|    const char *end;
   86|       |
   87|     16|    if (s == NULL) {
  ------------------
  |  Branch (87:9): [True: 0, False: 16]
  ------------------
   88|      0|        return NULL;
   89|      0|    }
   90|     16|    end = memchr(s, '\0', n);
   91|     16|    if (end != NULL)
  ------------------
  |  Branch (91:9): [True: 0, False: 16]
  ------------------
   92|      0|        n = end - s;
   93|     16|    res = apr_palloc(a, n + 1);
  ------------------
  |  |  425|     16|    apr_palloc_debug(p, size, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|     16|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  160|     16|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|     16|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   94|     16|    memcpy(res, s, n);
   95|     16|    res[n] = '\0';
   96|     16|    return res;
   97|     16|}
apr_pstrmemdup:
  100|  1.02k|{
  101|  1.02k|    char *res;
  102|       |
  103|  1.02k|    if (s == NULL) {
  ------------------
  |  Branch (103:9): [True: 0, False: 1.02k]
  ------------------
  104|      0|        return NULL;
  105|      0|    }
  106|  1.02k|    res = apr_palloc(a, n + 1);
  ------------------
  |  |  425|  1.02k|    apr_palloc_debug(p, size, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|  1.02k|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  160|  1.02k|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  1.02k|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  107|  1.02k|    memcpy(res, s, n);
  108|  1.02k|    res[n] = '\0';
  109|  1.02k|    return res;
  110|  1.02k|}
apr_pmemdup:
  113|  1.04k|{
  114|  1.04k|    void *res;
  115|       |
  116|  1.04k|    if (m == NULL)
  ------------------
  |  Branch (116:9): [True: 0, False: 1.04k]
  ------------------
  117|      0|	return NULL;
  118|  1.04k|    res = apr_palloc(a, n);
  ------------------
  |  |  425|  1.04k|    apr_palloc_debug(p, size, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|  1.04k|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  160|  1.04k|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  1.04k|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  119|  1.04k|    memcpy(res, m, n);
  120|  1.04k|    return res;
  121|  1.04k|}
apr_pstrcat:
  124|    348|{
  125|    348|    char *cp, *argp, *res;
  126|    348|    apr_size_t saved_lengths[MAX_SAVED_LENGTHS];
  127|    348|    int nargs = 0;
  128|       |
  129|       |    /* Pass one --- find length of required string */
  130|       |
  131|    348|    apr_size_t len = 0;
  132|    348|    va_list adummy;
  133|       |
  134|    348|    va_start(adummy, a);
  135|       |
  136|  2.08k|    while ((cp = va_arg(adummy, char *)) != NULL) {
  ------------------
  |  Branch (136:12): [True: 1.74k, False: 348]
  ------------------
  137|  1.74k|        apr_size_t cplen = strlen(cp);
  138|  1.74k|        if (nargs < MAX_SAVED_LENGTHS) {
  ------------------
  |  |   67|  1.74k|#define MAX_SAVED_LENGTHS  6
  ------------------
  |  Branch (138:13): [True: 1.74k, False: 0]
  ------------------
  139|  1.74k|            saved_lengths[nargs++] = cplen;
  140|  1.74k|        }
  141|  1.74k|        len += cplen;
  142|  1.74k|    }
  143|       |
  144|    348|    va_end(adummy);
  145|       |
  146|       |    /* Allocate the required string */
  147|       |
  148|    348|    res = (char *) apr_palloc(a, len + 1);
  ------------------
  |  |  425|    348|    apr_palloc_debug(p, size, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|    348|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  160|    348|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|    348|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  149|    348|    cp = res;
  150|       |
  151|       |    /* Pass two --- copy the argument strings into the result space */
  152|       |
  153|    348|    va_start(adummy, a);
  154|       |
  155|    348|    nargs = 0;
  156|  2.08k|    while ((argp = va_arg(adummy, char *)) != NULL) {
  ------------------
  |  Branch (156:12): [True: 1.74k, False: 348]
  ------------------
  157|  1.74k|        if (nargs < MAX_SAVED_LENGTHS) {
  ------------------
  |  |   67|  1.74k|#define MAX_SAVED_LENGTHS  6
  ------------------
  |  Branch (157:13): [True: 1.74k, False: 0]
  ------------------
  158|  1.74k|            len = saved_lengths[nargs++];
  159|  1.74k|        }
  160|      0|        else {
  161|      0|            len = strlen(argp);
  162|      0|        }
  163|       |
  164|  1.74k|        memcpy(cp, argp, len);
  165|  1.74k|        cp += len;
  166|  1.74k|    }
  167|       |
  168|    348|    va_end(adummy);
  169|       |
  170|       |    /* Return the result string */
  171|       |
  172|    348|    *cp = '\0';
  173|       |
  174|    348|    return res;
  175|    348|}

apr_hash_make:
   97|    491|{
   98|    491|    apr_hash_t *ht;
   99|    491|    apr_time_t now = apr_time_now();
  100|       |
  101|    491|    ht = apr_palloc(pool, sizeof(apr_hash_t));
  ------------------
  |  |  425|    491|    apr_palloc_debug(p, size, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|    491|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  160|    491|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|    491|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  102|    491|    ht->pool = pool;
  103|    491|    ht->free = NULL;
  104|    491|    ht->count = 0;
  105|    491|    ht->max = INITIAL_MAX;
  ------------------
  |  |   84|    491|#define INITIAL_MAX 15 /* tunable == 2^n - 1 */
  ------------------
  106|    491|    ht->seed = (unsigned int)((now >> 32) ^ now ^ (apr_uintptr_t)pool ^
  107|    491|                              (apr_uintptr_t)ht ^ (apr_uintptr_t)&now) - 1;
  108|    491|    ht->array = alloc_array(ht, ht->max);
  109|    491|    ht->hash_func = NULL;
  110|       |
  111|    491|    return ht;
  112|    491|}
apr_hash_next:
  128|  8.34k|{
  129|  8.34k|    hi->this = hi->next;
  130|  16.2k|    while (!hi->this) {
  ------------------
  |  Branch (130:12): [True: 8.34k, False: 7.85k]
  ------------------
  131|  8.34k|        if (hi->index > hi->ht->max)
  ------------------
  |  Branch (131:13): [True: 491, False: 7.85k]
  ------------------
  132|    491|            return NULL;
  133|       |
  134|  7.85k|        hi->this = hi->ht->array[hi->index++];
  135|  7.85k|    }
  136|  7.85k|    hi->next = hi->this->next;
  137|  7.85k|    return hi;
  138|  8.34k|}
apr_hash_first:
  141|    491|{
  142|    491|    apr_hash_index_t *hi;
  143|    491|    if (p)
  ------------------
  |  Branch (143:9): [True: 0, False: 491]
  ------------------
  144|      0|        hi = apr_palloc(p, sizeof(*hi));
  ------------------
  |  |  425|      0|    apr_palloc_debug(p, size, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|      0|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  160|      0|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|      0|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  145|    491|    else
  146|    491|        hi = &ht->iterator;
  147|       |
  148|    491|    hi->ht = ht;
  149|    491|    hi->index = 0;
  150|    491|    hi->this = NULL;
  151|    491|    hi->next = NULL;
  152|    491|    return apr_hash_next(hi);
  153|    491|}
apr_hash_get:
  365|    348|{
  366|    348|    apr_hash_entry_t *he;
  367|    348|    he = *find_entry(ht, key, klen, NULL);
  368|    348|    if (he)
  ------------------
  |  Branch (368:9): [True: 65, False: 283]
  ------------------
  369|     65|        return (void *)he->val;
  370|    283|    else
  371|    283|        return NULL;
  372|    348|}
apr_hash_set:
  378|  13.2k|{
  379|  13.2k|    apr_hash_entry_t **hep;
  380|  13.2k|    hep = find_entry(ht, key, klen, val);
  381|  13.2k|    if (*hep) {
  ------------------
  |  Branch (381:9): [True: 13.2k, False: 0]
  ------------------
  382|  13.2k|        if (!val) {
  ------------------
  |  Branch (382:13): [True: 0, False: 13.2k]
  ------------------
  383|       |            /* delete entry */
  384|      0|            apr_hash_entry_t *old = *hep;
  385|      0|            *hep = (*hep)->next;
  386|      0|            old->next = ht->free;
  387|      0|            ht->free = old;
  388|      0|            --ht->count;
  389|      0|        }
  390|  13.2k|        else {
  391|       |            /* replace entry */
  392|  13.2k|            (*hep)->val = val;
  393|       |            /* check that the collision rate isn't too high */
  394|  13.2k|            if (ht->count > ht->max) {
  ------------------
  |  Branch (394:17): [True: 491, False: 12.7k]
  ------------------
  395|    491|                expand_array(ht);
  396|    491|            }
  397|  13.2k|        }
  398|  13.2k|    }
  399|       |    /* else key not present and val==NULL */
  400|  13.2k|}
apr_hash.c:alloc_array:
   92|    982|{
   93|    982|   return apr_pcalloc(ht->pool, sizeof(*ht->array) * (max + 1));
  ------------------
  |  |  454|    982|    apr_pcalloc_debug(p, size, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|    982|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  160|    982|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|    982|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   94|    982|}
apr_hash.c:hashfunc_default:
  212|  13.6k|{
  213|  13.6k|    const unsigned char *key = (const unsigned char *)char_key;
  214|  13.6k|    const unsigned char *p;
  215|  13.6k|    apr_ssize_t i;
  216|       |
  217|       |    /*
  218|       |     * This is the popular `times 33' hash algorithm which is used by
  219|       |     * perl and also appears in Berkeley DB. This is one of the best
  220|       |     * known hash functions for strings because it is both computed
  221|       |     * very fast and distributes very well.
  222|       |     *
  223|       |     * The originator may be Dan Bernstein but the code in Berkeley DB
  224|       |     * cites Chris Torek as the source. The best citation I have found
  225|       |     * is "Chris Torek, Hash function for text in C, Usenet message
  226|       |     * <27038@mimsy.umd.edu> in comp.lang.c , October, 1990." in Rich
  227|       |     * Salz's USENIX 1992 paper about INN which can be found at
  228|       |     * <http://citeseer.nj.nec.com/salz92internetnews.html>.
  229|       |     *
  230|       |     * The magic of number 33, i.e. why it works better than many other
  231|       |     * constants, prime or not, has never been adequately explained by
  232|       |     * anyone. So I try an explanation: if one experimentally tests all
  233|       |     * multipliers between 1 and 256 (as I did while writing a low-level
  234|       |     * data structure library some time ago) one detects that even
  235|       |     * numbers are not useable at all. The remaining 128 odd numbers
  236|       |     * (except for the number 1) work more or less all equally well.
  237|       |     * They all distribute in an acceptable way and this way fill a hash
  238|       |     * table with an average percent of approx. 86%.
  239|       |     *
  240|       |     * If one compares the chi^2 values of the variants (see
  241|       |     * Bob Jenkins ``Hashing Frequently Asked Questions'' at
  242|       |     * http://burtleburtle.net/bob/hash/hashfaq.html for a description
  243|       |     * of chi^2), the number 33 not even has the best value. But the
  244|       |     * number 33 and a few other equally good numbers like 17, 31, 63,
  245|       |     * 127 and 129 have nevertheless a great advantage to the remaining
  246|       |     * numbers in the large set of possible multipliers: their multiply
  247|       |     * operation can be replaced by a faster operation based on just one
  248|       |     * shift plus either a single addition or subtraction operation. And
  249|       |     * because a hash function has to both distribute good _and_ has to
  250|       |     * be very fast to compute, those few numbers should be preferred.
  251|       |     *
  252|       |     *                  -- Ralf S. Engelschall <rse@engelschall.com>
  253|       |     */
  254|       |
  255|  13.6k|    if (*klen == APR_HASH_KEY_STRING) {
  ------------------
  |  |   47|  13.6k|#define APR_HASH_KEY_STRING     (-1)
  ------------------
  |  Branch (255:9): [True: 13.2k, False: 348]
  ------------------
  256|   103k|        for (p = key; *p; p++) {
  ------------------
  |  Branch (256:23): [True: 89.8k, False: 13.2k]
  ------------------
  257|  89.8k|            hash = hash * 33 + *p;
  258|  89.8k|        }
  259|  13.2k|        *klen = p - key;
  260|  13.2k|    }
  261|    348|    else {
  262|  2.79k|        for (p = key, i = *klen; i; i--, p++) {
  ------------------
  |  Branch (262:34): [True: 2.44k, False: 348]
  ------------------
  263|  2.44k|            hash = hash * 33 + *p;
  264|  2.44k|        }
  265|    348|    }
  266|       |
  267|  13.6k|    return hash;
  268|  13.6k|}
apr_hash.c:find_entry:
  289|  13.6k|{
  290|  13.6k|    apr_hash_entry_t **hep, *he;
  291|  13.6k|    unsigned int hash;
  292|       |
  293|  13.6k|    if (ht->hash_func)
  ------------------
  |  Branch (293:9): [True: 0, False: 13.6k]
  ------------------
  294|      0|        hash = ht->hash_func(key, &klen);
  295|  13.6k|    else
  296|  13.6k|        hash = hashfunc_default(key, &klen, ht->seed);
  297|       |
  298|       |    /* scan linked list */
  299|  13.6k|    for (hep = &ht->array[hash & ht->max], he = *hep;
  300|  18.8k|         he; hep = &he->next, he = *hep) {
  ------------------
  |  Branch (300:10): [True: 5.28k, False: 13.5k]
  ------------------
  301|  5.28k|        if (he->hash == hash
  ------------------
  |  Branch (301:13): [True: 100, False: 5.18k]
  ------------------
  302|  5.28k|            && he->klen == klen
  ------------------
  |  Branch (302:16): [True: 100, False: 0]
  ------------------
  303|  5.28k|            && memcmp(he->key, key, klen) == 0)
  ------------------
  |  Branch (303:16): [True: 65, False: 35]
  ------------------
  304|     65|            break;
  305|  5.28k|    }
  306|  13.6k|    if (he || !val)
  ------------------
  |  Branch (306:9): [True: 65, False: 13.5k]
  |  Branch (306:15): [True: 283, False: 13.2k]
  ------------------
  307|    348|        return hep;
  308|       |
  309|       |    /* add a new entry for non-NULL values */
  310|  13.2k|    if ((he = ht->free) != NULL)
  ------------------
  |  Branch (310:9): [True: 0, False: 13.2k]
  ------------------
  311|      0|        ht->free = he->next;
  312|  13.2k|    else
  313|  13.2k|        he = apr_palloc(ht->pool, sizeof(*he));
  ------------------
  |  |  425|  13.2k|    apr_palloc_debug(p, size, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|  13.2k|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  160|  13.2k|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  13.2k|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  314|  13.2k|    he->next = NULL;
  315|  13.2k|    he->hash = hash;
  316|  13.2k|    he->key  = key;
  317|  13.2k|    he->klen = klen;
  318|  13.2k|    he->val  = val;
  319|  13.2k|    *hep = he;
  320|  13.2k|    ht->count++;
  321|  13.2k|    return hep;
  322|  13.6k|}
apr_hash.c:expand_array:
  194|    491|{
  195|    491|    apr_hash_index_t *hi;
  196|    491|    apr_hash_entry_t **new_array;
  197|    491|    unsigned int new_max;
  198|       |
  199|    491|    new_max = ht->max * 2 + 1;
  200|    491|    new_array = alloc_array(ht, new_max);
  201|  8.34k|    for (hi = apr_hash_first(NULL, ht); hi; hi = apr_hash_next(hi)) {
  ------------------
  |  Branch (201:41): [True: 7.85k, False: 491]
  ------------------
  202|  7.85k|        unsigned int i = hi->this->hash & new_max;
  203|  7.85k|        hi->this->next = new_array[i];
  204|  7.85k|        new_array[i] = hi->this;
  205|  7.85k|    }
  206|    491|    ht->array = new_array;
  207|    491|    ht->max = new_max;
  208|    491|}

apr_array_make:
   89|    495|{
   90|    495|    apr_array_header_t *res;
   91|       |
   92|    495|    res = (apr_array_header_t *) apr_palloc(p, sizeof(apr_array_header_t));
  ------------------
  |  |  425|    495|    apr_palloc_debug(p, size, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|    495|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  160|    495|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|    495|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   93|    495|    make_array_core(res, p, nelts, elt_size, 1);
   94|    495|    return res;
   95|    495|}
apr_array_push:
  112|      4|{
  113|      4|    if (arr->nelts == arr->nalloc) {
  ------------------
  |  Branch (113:9): [True: 0, False: 4]
  ------------------
  114|      0|        int new_size = (arr->nalloc <= 0) ? 1 : arr->nalloc * 2;
  ------------------
  |  Branch (114:24): [True: 0, False: 0]
  ------------------
  115|      0|        char *new_data;
  116|       |
  117|      0|        new_data = apr_palloc(arr->pool, arr->elt_size * new_size);
  ------------------
  |  |  425|      0|    apr_palloc_debug(p, size, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|      0|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  160|      0|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|      0|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  118|       |
  119|      0|        memcpy(new_data, arr->elts, arr->nalloc * arr->elt_size);
  120|      0|        memset(new_data + arr->nalloc * arr->elt_size, 0,
  121|      0|               arr->elt_size * (new_size - arr->nalloc));
  122|      0|        arr->elts = new_data;
  123|      0|        arr->nalloc = new_size;
  124|      0|    }
  125|       |
  126|      4|    ++arr->nelts;
  127|      4|    return arr->elts + (arr->elt_size * (arr->nelts - 1));
  128|      4|}
apr_table_make:
  405|  3.43k|{
  406|  3.43k|    apr_table_t *t = apr_palloc(p, sizeof(apr_table_t));
  ------------------
  |  |  425|  3.43k|    apr_palloc_debug(p, size, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|  3.43k|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  160|  3.43k|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  3.43k|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  407|       |
  408|  3.43k|    make_array_core(&t->a, p, nelts, sizeof(apr_table_entry_t), 0);
  409|       |#ifdef MAKE_TABLE_PROFILE
  410|       |    t->creator = __builtin_return_address(0);
  411|       |#endif
  412|  3.43k|    t->index_initialized = 0;
  413|  3.43k|    return t;
  414|  3.43k|}
apr_tables.c:make_array_core:
   60|  3.93k|{
   61|       |    /*
   62|       |     * Assure sanity if someone asks for
   63|       |     * array of zero elts.
   64|       |     */
   65|  3.93k|    if (nelts < 1) {
  ------------------
  |  Branch (65:9): [True: 0, False: 3.93k]
  ------------------
   66|      0|        nelts = 1;
   67|      0|    }
   68|       |
   69|  3.93k|    if (clear) {
  ------------------
  |  Branch (69:9): [True: 495, False: 3.43k]
  ------------------
   70|    495|        res->elts = apr_pcalloc(p, nelts * elt_size);
  ------------------
  |  |  454|    495|    apr_pcalloc_debug(p, size, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|    495|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  160|    495|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|    495|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   71|    495|    }
   72|  3.43k|    else {
   73|  3.43k|        res->elts = apr_palloc(p, nelts * elt_size);
  ------------------
  |  |  425|  3.43k|    apr_palloc_debug(p, size, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|  3.43k|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  160|  3.43k|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  162|  3.43k|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   74|  3.43k|    }
   75|       |
   76|  3.93k|    res->pool = p;
   77|  3.93k|    res->elt_size = elt_size;
   78|  3.93k|    res->nelts = 0;		/* No active elements yet... */
   79|  3.93k|    res->nalloc = nelts;	/* ...but this many allocated */
   80|  3.93k|}

apr_os_thread_current:
  340|  1.47k|{
  341|  1.47k|    return pthread_self();
  342|  1.47k|}

apr_time_now:
   75|    491|{
   76|    491|    struct timeval tv;
   77|    491|    gettimeofday(&tv, NULL);
   78|    491|    return tv.tv_sec * (apr_time_t)APR_USEC_PER_SEC + (apr_time_t)tv.tv_usec;
  ------------------
  |  |   60|    491|#define APR_USEC_PER_SEC APR_TIME_C(1000000)
  |  |  ------------------
  |  |  |  |   49|    491|#define APR_TIME_C(val) APR_INT64_C(val)
  |  |  |  |  ------------------
  |  |  |  |  |  |  397|    491| #define APR_INT64_C(val) INT64_C(val)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   79|    491|}

apr_uri_port_of_scheme:
   74|    102|{
   75|    102|    schemes_t *scheme;
   76|       |
   77|    102|    if (scheme_str) {
  ------------------
  |  Branch (77:9): [True: 102, False: 0]
  ------------------
   78|  1.92k|        for (scheme = schemes; scheme->name != NULL; ++scheme) {
  ------------------
  |  Branch (78:32): [True: 1.83k, False: 88]
  ------------------
   79|  1.83k|            if (strcasecmp(scheme_str, scheme->name) == 0) {
  ------------------
  |  Branch (79:17): [True: 14, False: 1.82k]
  ------------------
   80|     14|                return scheme->default_port;
   81|     14|            }
   82|  1.83k|        }
   83|    102|    }
   84|     88|    return 0;
   85|    102|}
apr_uri_parse:
  724|    315|{
  725|    315|    const char *s;
  726|    315|    const char *s1;
  727|    315|    const char *hostinfo;
  728|    315|    char *endstr;
  729|    315|    int port;
  730|    315|    int v6_offset1 = 0, v6_offset2 = 0;
  731|       |
  732|       |    /* Initialize the structure. parse_uri() and parse_uri_components()
  733|       |     * can be called more than once per request.
  734|       |     */
  735|    315|    memset (uptr, '\0', sizeof(*uptr));
  736|    315|    uptr->is_initialized = 1;
  737|       |
  738|       |    /* We assume the processor has a branch predictor like most --
  739|       |     * it assumes forward branches are untaken and backwards are taken.  That's
  740|       |     * the reason for the gotos.  -djg
  741|       |     */
  742|    315|    if (uri[0] == '/') {
  ------------------
  |  Branch (742:9): [True: 19, False: 296]
  ------------------
  743|       |        /* RFC2396 #4.3 says that two leading slashes mean we have an
  744|       |         * authority component, not a path!  Fixing this looks scary
  745|       |         * with the gotos here.  But if the existing logic is valid,
  746|       |         * then presumably a goto pointing to deal_with_authority works.
  747|       |         *
  748|       |         * RFC2396 describes this as resolving an ambiguity.  In the
  749|       |         * case of three or more slashes there would seem to be no
  750|       |         * ambiguity, so it is a path after all.
  751|       |         */
  752|     19|        if (uri[1] == '/' && uri[2] != '/') {
  ------------------
  |  Branch (752:13): [True: 0, False: 19]
  |  Branch (752:30): [True: 0, False: 0]
  ------------------
  753|      0|            s = uri + 2 ;
  754|      0|            goto deal_with_authority ;
  755|      0|        }
  756|       |
  757|    272|deal_with_path:
  758|       |        /* we expect uri to point to first character of path ... remember
  759|       |         * that the path could be empty -- http://foobar?query for example
  760|       |         */
  761|    272|        s = uri;
  762|  3.91k|        while ((uri_delims[*(unsigned char *)s] & NOTEND_PATH) == 0) {
  ------------------
  |  |  712|  3.91k|#define NOTEND_PATH       (T_QUESTION | T_HASH | T_NUL)
  |  |  ------------------
  |  |  |  |  174|  3.91k|#define T_QUESTION        0x02        /* '?' */
  |  |  ------------------
  |  |               #define NOTEND_PATH       (T_QUESTION | T_HASH | T_NUL)
  |  |  ------------------
  |  |  |  |  175|  3.91k|#define T_HASH            0x04        /* '#' */
  |  |  ------------------
  |  |               #define NOTEND_PATH       (T_QUESTION | T_HASH | T_NUL)
  |  |  ------------------
  |  |  |  |  180|  3.91k|#define T_NUL             0x80        /* '\0' */
  |  |  ------------------
  ------------------
  |  Branch (762:16): [True: 3.63k, False: 272]
  ------------------
  763|  3.63k|            ++s;
  764|  3.63k|        }
  765|    272|        if (s != uri) {
  ------------------
  |  Branch (765:13): [True: 223, False: 49]
  ------------------
  766|    223|            uptr->path = apr_pstrmemdup(p, uri, s - uri);
  767|    223|        }
  768|    272|        if (*s == 0) {
  ------------------
  |  Branch (768:13): [True: 236, False: 36]
  ------------------
  769|    236|            return APR_SUCCESS;
  ------------------
  |  |  225|    236|#define APR_SUCCESS 0
  ------------------
  770|    236|        }
  771|     36|        if (*s == '?') {
  ------------------
  |  Branch (771:13): [True: 26, False: 10]
  ------------------
  772|     26|            ++s;
  773|     26|            s1 = strchr(s, '#');
  774|     26|            if (s1) {
  ------------------
  |  Branch (774:17): [True: 13, False: 13]
  ------------------
  775|     13|                uptr->fragment = apr_pstrdup(p, s1 + 1);
  776|     13|                uptr->query = apr_pstrmemdup(p, s, s1 - s);
  777|     13|            }
  778|     13|            else {
  779|     13|                uptr->query = apr_pstrdup(p, s);
  780|     13|            }
  781|     26|            return APR_SUCCESS;
  ------------------
  |  |  225|     26|#define APR_SUCCESS 0
  ------------------
  782|     26|        }
  783|       |        /* otherwise it's a fragment */
  784|     10|        uptr->fragment = apr_pstrdup(p, s + 1);
  785|     10|        return APR_SUCCESS;
  ------------------
  |  |  225|     10|#define APR_SUCCESS 0
  ------------------
  786|     36|    }
  787|       |
  788|       |    /* find the scheme: */
  789|    296|    s = uri;
  790|       |    /* first char must be letter */
  791|    296|    if (uri_delims[*(unsigned char *)s] & T_ALPHA) {
  ------------------
  |  |  176|    296|#define T_ALPHA           0x08        /* 'A' ... 'Z', 'a' ... 'z' */
  ------------------
  |  Branch (791:9): [True: 255, False: 41]
  ------------------
  792|    255|        ++s;
  793|  2.66k|        while ((uri_delims[*(unsigned char *)s] & (T_ALPHA|T_SCHEME)))
  ------------------
  |  |  176|  2.66k|#define T_ALPHA           0x08        /* 'A' ... 'Z', 'a' ... 'z' */
  ------------------
                      while ((uri_delims[*(unsigned char *)s] & (T_ALPHA|T_SCHEME)))
  ------------------
  |  |  177|  2.66k|#define T_SCHEME          0x10        /* '0' ... '9', '-', '+', '.'
  ------------------
  |  Branch (793:16): [True: 2.40k, False: 255]
  ------------------
  794|  2.40k|            ++s;
  795|    255|    }
  796|       |    /* scheme must be non-empty and followed by : */
  797|    296|    if (s != uri && s[0] == ':') {
  ------------------
  |  Branch (797:9): [True: 255, False: 41]
  |  Branch (797:21): [True: 203, False: 52]
  ------------------
  798|    203|        uptr->scheme = apr_pstrmemdup(p, uri, s - uri);
  799|    203|        s++;
  800|    203|    }
  801|     93|    else {
  802|       |        /* No valid scheme, restart from the beginning */
  803|     93|        s = uri;
  804|     93|    }
  805|       |
  806|    296|    if (s[0] != '/' || s[1] != '/') {
  ------------------
  |  Branch (806:9): [True: 107, False: 189]
  |  Branch (806:24): [True: 20, False: 169]
  ------------------
  807|    127|        if (uri == s) {
  ------------------
  |  Branch (807:13): [True: 93, False: 34]
  ------------------
  808|       |            /*
  809|       |             * RFC 3986 3.3: If we have no scheme and no authority,
  810|       |             * the leading segment of a relative path must not contain a ':'.
  811|       |             */
  812|     93|            char *first_slash = strchr(uri, '/');
  813|     93|            if (first_slash) {
  ------------------
  |  Branch (813:17): [True: 43, False: 50]
  ------------------
  814|    674|                while (s < first_slash) {
  ------------------
  |  Branch (814:24): [True: 654, False: 20]
  ------------------
  815|    654|                    if (s[0] == ':')
  ------------------
  |  Branch (815:25): [True: 23, False: 631]
  ------------------
  816|     23|                        return APR_EGENERAL;
  ------------------
  |  |  313|     23|#define APR_EGENERAL       (APR_OS_START_ERROR + 14)
  |  |  ------------------
  |  |  |  |  117|     23|#define APR_OS_START_ERROR     20000
  |  |  ------------------
  ------------------
  817|    631|                    ++s;
  818|    631|                }
  819|       |                /* no scheme but relative path, e.g. '../image.jpg' */
  820|     43|            }
  821|     50|            else {
  822|     50|                if (strchr(uri, ':') != NULL)
  ------------------
  |  Branch (822:21): [True: 4, False: 46]
  ------------------
  823|      4|                    return APR_EGENERAL;
  ------------------
  |  |  313|      4|#define APR_EGENERAL       (APR_OS_START_ERROR + 14)
  |  |  ------------------
  |  |  |  |  117|      4|#define APR_OS_START_ERROR     20000
  |  |  ------------------
  ------------------
  824|       |                /* no scheme, no slash, but relative path, e.g. 'image.jpg' */
  825|     50|            }
  826|     66|            goto deal_with_path;
  827|     93|        }
  828|       |        /* scheme and relative path */
  829|     34|        uri = s;
  830|     34|        goto deal_with_path;
  831|    127|    }
  832|       |
  833|    169|    s += 2;
  834|       |
  835|    169|deal_with_authority:
  836|    169|    hostinfo = s;
  837|  3.27k|    while ((uri_delims[*(unsigned char *)s] & NOTEND_HOSTINFO) == 0) {
  ------------------
  |  |  711|  3.27k|#define NOTEND_HOSTINFO   (T_SLASH | T_QUESTION | T_HASH | T_NUL)
  |  |  ------------------
  |  |  |  |  173|  3.27k|#define T_SLASH           0x01        /* '/' */
  |  |  ------------------
  |  |               #define NOTEND_HOSTINFO   (T_SLASH | T_QUESTION | T_HASH | T_NUL)
  |  |  ------------------
  |  |  |  |  174|  3.27k|#define T_QUESTION        0x02        /* '?' */
  |  |  ------------------
  |  |               #define NOTEND_HOSTINFO   (T_SLASH | T_QUESTION | T_HASH | T_NUL)
  |  |  ------------------
  |  |  |  |  175|  3.27k|#define T_HASH            0x04        /* '#' */
  |  |  ------------------
  |  |               #define NOTEND_HOSTINFO   (T_SLASH | T_QUESTION | T_HASH | T_NUL)
  |  |  ------------------
  |  |  |  |  180|  3.27k|#define T_NUL             0x80        /* '\0' */
  |  |  ------------------
  ------------------
  |  Branch (837:12): [True: 3.10k, False: 169]
  ------------------
  838|  3.10k|        ++s;
  839|  3.10k|    }
  840|    169|    uri = s;        /* whatever follows hostinfo is start of uri */
  841|    169|    uptr->hostinfo = apr_pstrmemdup(p, hostinfo, uri - hostinfo);
  842|       |
  843|       |    /* If there's a username:password@host:port, the @ we want is the last @...
  844|       |     * too bad there's no memrchr()... For the C purists, note that hostinfo
  845|       |     * is definitely not the first character of the original uri so therefore
  846|       |     * &hostinfo[-1] < &hostinfo[0] ... and this loop is valid C.
  847|       |     */
  848|  1.64k|    do {
  849|  1.64k|        --s;
  850|  1.64k|    } while (s >= hostinfo && *s != '@');
  ------------------
  |  Branch (850:14): [True: 1.56k, False: 77]
  |  Branch (850:31): [True: 1.47k, False: 92]
  ------------------
  851|    169|    if (s < hostinfo) {
  ------------------
  |  Branch (851:9): [True: 77, False: 92]
  ------------------
  852|       |        /* again we want the common case to be fall through */
  853|    169|deal_with_host:
  854|       |        /* We expect hostinfo to point to the first character of
  855|       |         * the hostname.  If there's a port it is the first colon,
  856|       |         * except with IPv6.
  857|       |         */
  858|    169|        if (*hostinfo == '[') {
  ------------------
  |  Branch (858:13): [True: 31, False: 138]
  ------------------
  859|     31|            v6_offset1 = 1;
  860|     31|            v6_offset2 = 2;
  861|     31|            s = memchr(hostinfo, ']', uri - hostinfo);
  862|     31|            if (s == NULL) {
  ------------------
  |  Branch (862:17): [True: 3, False: 28]
  ------------------
  863|      3|                return APR_EGENERAL;
  ------------------
  |  |  313|      3|#define APR_EGENERAL       (APR_OS_START_ERROR + 14)
  |  |  ------------------
  |  |  |  |  117|      3|#define APR_OS_START_ERROR     20000
  |  |  ------------------
  ------------------
  864|      3|            }
  865|     28|            if (*++s != ':') {
  ------------------
  |  Branch (865:17): [True: 19, False: 9]
  ------------------
  866|     19|                s = NULL; /* no port */
  867|     19|            }
  868|     28|        }
  869|    138|        else {
  870|    138|            s = memchr(hostinfo, ':', uri - hostinfo);
  871|    138|        }
  872|    166|        if (s == NULL) {
  ------------------
  |  Branch (872:13): [True: 47, False: 119]
  ------------------
  873|       |            /* we expect the common case to have no port */
  874|     47|            uptr->hostname = apr_pstrmemdup(p,
  875|     47|                                            hostinfo + v6_offset1,
  876|     47|                                            uri - hostinfo - v6_offset2);
  877|     47|            goto deal_with_path;
  878|     47|        }
  879|    119|        uptr->hostname = apr_pstrmemdup(p,
  880|    119|                                        hostinfo + v6_offset1,
  881|    119|                                        s - hostinfo - v6_offset2);
  882|    119|        ++s;
  883|    119|        uptr->port_str = apr_pstrmemdup(p, s, uri - s);
  884|    119|        if (uri != s) {
  ------------------
  |  Branch (884:13): [True: 17, False: 102]
  ------------------
  885|     17|            port = strtol(uptr->port_str, &endstr, 10);
  886|     17|            uptr->port = port;
  887|     17|            if (*endstr == '\0') {
  ------------------
  |  Branch (887:17): [True: 4, False: 13]
  ------------------
  888|      4|                goto deal_with_path;
  889|      4|            }
  890|       |            /* Invalid characters after ':' found */
  891|     13|            return APR_EGENERAL;
  ------------------
  |  |  313|     13|#define APR_EGENERAL       (APR_OS_START_ERROR + 14)
  |  |  ------------------
  |  |  |  |  117|     13|#define APR_OS_START_ERROR     20000
  |  |  ------------------
  ------------------
  892|     17|        }
  893|    102|        uptr->port = apr_uri_port_of_scheme(uptr->scheme);
  894|    102|        goto deal_with_path;
  895|    119|    }
  896|       |
  897|       |    /* first colon delimits username:password */
  898|     92|    s1 = memchr(hostinfo, ':', s - hostinfo);
  899|     92|    if (s1) {
  ------------------
  |  Branch (899:9): [True: 39, False: 53]
  ------------------
  900|     39|        uptr->user = apr_pstrmemdup(p, hostinfo, s1 - hostinfo);
  901|     39|        ++s1;
  902|     39|        uptr->password = apr_pstrmemdup(p, s1, s - s1);
  903|     39|    }
  904|     53|    else {
  905|     53|        uptr->user = apr_pstrmemdup(p, hostinfo, s - hostinfo);
  906|     53|    }
  907|     92|    hostinfo = s + 1;
  908|     92|    goto deal_with_host;
  909|    169|}
apr_uri_parse_hostinfo:
  919|     33|{
  920|     33|    const char *s;
  921|     33|    char *endstr;
  922|     33|    const char *rsb;
  923|     33|    int v6_offset1 = 0;
  924|       |
  925|       |    /* Initialize the structure. parse_uri() and parse_uri_components()
  926|       |     * can be called more than once per request.
  927|       |     */
  928|     33|    memset(uptr, '\0', sizeof(*uptr));
  929|     33|    uptr->is_initialized = 1;
  930|     33|    uptr->hostinfo = apr_pstrdup(p, hostinfo);
  931|       |
  932|       |    /* We expect hostinfo to point to the first character of
  933|       |     * the hostname.  There must be a port, separated by a colon
  934|       |     */
  935|     33|    if (*hostinfo == '[') {
  ------------------
  |  Branch (935:9): [True: 14, False: 19]
  ------------------
  936|     14|        if ((rsb = strchr(hostinfo, ']')) == NULL ||
  ------------------
  |  Branch (936:13): [True: 1, False: 13]
  ------------------
  937|     14|            *(rsb + 1) != ':') {
  ------------------
  |  Branch (937:13): [True: 11, False: 2]
  ------------------
  938|     12|            return APR_EGENERAL;
  ------------------
  |  |  313|     12|#define APR_EGENERAL       (APR_OS_START_ERROR + 14)
  |  |  ------------------
  |  |  |  |  117|     12|#define APR_OS_START_ERROR     20000
  |  |  ------------------
  ------------------
  939|     12|        }
  940|       |        /* literal IPv6 address */
  941|      2|        s = rsb + 1;
  942|      2|        ++hostinfo;
  943|      2|        v6_offset1 = 1;
  944|      2|    }
  945|     19|    else {
  946|     19|        s = strchr(hostinfo, ':');
  947|     19|    }
  948|     21|    if (s == NULL) {
  ------------------
  |  Branch (948:9): [True: 5, False: 16]
  ------------------
  949|      5|        return APR_EGENERAL;
  ------------------
  |  |  313|      5|#define APR_EGENERAL       (APR_OS_START_ERROR + 14)
  |  |  ------------------
  |  |  |  |  117|      5|#define APR_OS_START_ERROR     20000
  |  |  ------------------
  ------------------
  950|      5|    }
  951|     16|    uptr->hostname = apr_pstrndup(p, hostinfo, s - hostinfo - v6_offset1);
  952|     16|    ++s;
  953|     16|    uptr->port_str = apr_pstrdup(p, s);
  954|     16|    if (*s != '\0') {
  ------------------
  |  Branch (954:9): [True: 15, False: 1]
  ------------------
  955|     15|        uptr->port = (unsigned short) strtol(uptr->port_str, &endstr, 10);
  956|     15|        if (*endstr == '\0') {
  ------------------
  |  Branch (956:13): [True: 2, False: 13]
  ------------------
  957|      2|            return APR_SUCCESS;
  ------------------
  |  |  225|      2|#define APR_SUCCESS 0
  ------------------
  958|      2|        }
  959|       |        /* Invalid characters after ':' found */
  960|     15|    }
  961|     14|    return APR_EGENERAL;
  ------------------
  |  |  313|     14|#define APR_EGENERAL       (APR_OS_START_ERROR + 14)
  |  |  ------------------
  |  |  |  |  117|     14|#define APR_OS_START_ERROR     20000
  |  |  ------------------
  ------------------
  962|     16|}

