af_gb_init:
   15|    555|void af_gb_init() {
   16|    555|  pointer_idx = 0;
   17|       |
   18|  56.0k|   for (int i = 0; i < GB_SIZE; i++) {
  ------------------
  |  |    8|  56.0k|#define GB_SIZE 100
  ------------------
  |  Branch (18:20): [True: 55.5k, False: 555]
  ------------------
   19|  55.5k|     pointer_arr[i] = NULL;
   20|  55.5k|   }
   21|    555|}
af_gb_cleanup:
   23|    555|void af_gb_cleanup() {
   24|  56.0k|  for(int i = 0; i < GB_SIZE; i++) {
  ------------------
  |  |    8|  56.0k|#define GB_SIZE 100
  ------------------
  |  Branch (24:18): [True: 55.5k, False: 555]
  ------------------
   25|  55.5k|    if (pointer_arr[i] != NULL) {
  ------------------
  |  Branch (25:9): [True: 2.68k, False: 52.8k]
  ------------------
   26|  2.68k|      free(pointer_arr[i]);
   27|  2.68k|    }
   28|  55.5k|  }
   29|    555|}
af_get_null_terminated:
   31|  2.77k|char *af_get_null_terminated(const uint8_t **data, size_t *size) {
   32|  2.77k|#define STR_SIZE 75
   33|  2.77k|  if (*size < STR_SIZE || (int)*size < 0) {
  ------------------
  |  |   32|  5.55k|#define STR_SIZE 75
  ------------------
  |  Branch (33:7): [True: 91, False: 2.68k]
  |  Branch (33:27): [True: 0, False: 2.68k]
  ------------------
   34|     91|    return NULL;
   35|     91|  }
   36|       |
   37|  2.68k|  char *new_s = malloc(STR_SIZE + 1);
  ------------------
  |  |   32|  2.68k|#define STR_SIZE 75
  ------------------
   38|  2.68k|  memcpy(new_s, *data, STR_SIZE);
  ------------------
  |  |   32|  2.68k|#define STR_SIZE 75
  ------------------
   39|  2.68k|  new_s[STR_SIZE] = '\0';
  ------------------
  |  |   32|  2.68k|#define STR_SIZE 75
  ------------------
   40|       |
   41|  2.68k|  *data = *data+STR_SIZE;
  ------------------
  |  |   32|  2.68k|#define STR_SIZE 75
  ------------------
   42|  2.68k|  *size -= STR_SIZE;
  ------------------
  |  |   32|  2.68k|#define STR_SIZE 75
  ------------------
   43|  2.68k|  return new_s;
   44|  2.77k|}
af_gb_get_null_terminated:
   62|  2.77k|char *af_gb_get_null_terminated(const uint8_t **data, size_t *size) {
   63|       |
   64|  2.77k|  char *nstr = af_get_null_terminated(data, size);
   65|  2.77k|  if (nstr == NULL) {
  ------------------
  |  Branch (65:7): [True: 91, False: 2.68k]
  ------------------
   66|     91|    return NULL;
   67|     91|  }
   68|  2.68k|  pointer_arr[pointer_idx++] = (void*)nstr;
   69|  2.68k|  return nstr;
   70|  2.77k|}
af_get_short:
   88|  1.59k|short af_get_short(const uint8_t **data, size_t *size) {
   89|  1.59k|  if (*size <= 0) return 0;
  ------------------
  |  Branch (89:7): [True: 1.14k, False: 445]
  ------------------
   90|    445|  short c = (short)(*data)[0];
   91|    445|  *data += 1;
   92|    445|  *size-=1;
   93|    445|  return c;
   94|  1.59k|}

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

ap_method_registry_init:
  699|    531|{
  700|    531|    methods_registry = apr_hash_make(p);
  701|    531|    apr_pool_cleanup_register(p, NULL,
  702|    531|                              ap_method_registry_destroy,
  703|    531|                              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|    531|    register_one_method(p, "GET", M_GET);
  ------------------
  |  |  599|    531|#define M_GET                   0       /** RFC 2616: HTTP */
  ------------------
  710|    531|    register_one_method(p, "HEAD", M_GET);
  ------------------
  |  |  599|    531|#define M_GET                   0       /** RFC 2616: HTTP */
  ------------------
  711|    531|    register_one_method(p, "PUT", M_PUT);
  ------------------
  |  |  600|    531|#define M_PUT                   1       /*  :             */
  ------------------
  712|    531|    register_one_method(p, "POST", M_POST);
  ------------------
  |  |  601|    531|#define M_POST                  2
  ------------------
  713|    531|    register_one_method(p, "DELETE", M_DELETE);
  ------------------
  |  |  602|    531|#define M_DELETE                3
  ------------------
  714|    531|    register_one_method(p, "CONNECT", M_CONNECT);
  ------------------
  |  |  603|    531|#define M_CONNECT               4
  ------------------
  715|    531|    register_one_method(p, "OPTIONS", M_OPTIONS);
  ------------------
  |  |  604|    531|#define M_OPTIONS               5
  ------------------
  716|    531|    register_one_method(p, "TRACE", M_TRACE);
  ------------------
  |  |  605|    531|#define M_TRACE                 6       /** RFC 2616: HTTP */
  ------------------
  717|    531|    register_one_method(p, "PATCH", M_PATCH);
  ------------------
  |  |  606|    531|#define M_PATCH                 7       /** RFC 5789: PATCH Method for HTTP */
  ------------------
  718|    531|    register_one_method(p, "PROPFIND", M_PROPFIND);
  ------------------
  |  |  607|    531|#define M_PROPFIND              8       /** RFC 2518: WebDAV */
  ------------------
  719|    531|    register_one_method(p, "PROPPATCH", M_PROPPATCH);
  ------------------
  |  |  608|    531|#define M_PROPPATCH             9       /*  :               */
  ------------------
  720|    531|    register_one_method(p, "MKCOL", M_MKCOL);
  ------------------
  |  |  609|    531|#define M_MKCOL                 10
  ------------------
  721|    531|    register_one_method(p, "COPY", M_COPY);
  ------------------
  |  |  610|    531|#define M_COPY                  11
  ------------------
  722|    531|    register_one_method(p, "MOVE", M_MOVE);
  ------------------
  |  |  611|    531|#define M_MOVE                  12
  ------------------
  723|    531|    register_one_method(p, "LOCK", M_LOCK);
  ------------------
  |  |  612|    531|#define M_LOCK                  13
  ------------------
  724|    531|    register_one_method(p, "UNLOCK", M_UNLOCK);
  ------------------
  |  |  613|    531|#define M_UNLOCK                14      /** RFC 2518: WebDAV */
  ------------------
  725|    531|    register_one_method(p, "VERSION-CONTROL", M_VERSION_CONTROL);
  ------------------
  |  |  614|    531|#define M_VERSION_CONTROL       15      /** RFC 3253: WebDAV Versioning */
  ------------------
  726|    531|    register_one_method(p, "CHECKOUT", M_CHECKOUT);
  ------------------
  |  |  615|    531|#define M_CHECKOUT              16      /*  :                          */
  ------------------
  727|    531|    register_one_method(p, "UNCHECKOUT", M_UNCHECKOUT);
  ------------------
  |  |  616|    531|#define M_UNCHECKOUT            17
  ------------------
  728|    531|    register_one_method(p, "CHECKIN", M_CHECKIN);
  ------------------
  |  |  617|    531|#define M_CHECKIN               18
  ------------------
  729|    531|    register_one_method(p, "UPDATE", M_UPDATE);
  ------------------
  |  |  618|    531|#define M_UPDATE                19
  ------------------
  730|    531|    register_one_method(p, "LABEL", M_LABEL);
  ------------------
  |  |  619|    531|#define M_LABEL                 20
  ------------------
  731|    531|    register_one_method(p, "REPORT", M_REPORT);
  ------------------
  |  |  620|    531|#define M_REPORT                21
  ------------------
  732|    531|    register_one_method(p, "MKWORKSPACE", M_MKWORKSPACE);
  ------------------
  |  |  621|    531|#define M_MKWORKSPACE           22
  ------------------
  733|    531|    register_one_method(p, "MKACTIVITY", M_MKACTIVITY);
  ------------------
  |  |  622|    531|#define M_MKACTIVITY            23
  ------------------
  734|    531|    register_one_method(p, "BASELINE-CONTROL", M_BASELINE_CONTROL);
  ------------------
  |  |  623|    531|#define M_BASELINE_CONTROL      24
  ------------------
  735|    531|    register_one_method(p, "MERGE", M_MERGE);
  ------------------
  |  |  624|    531|#define M_MERGE                 25
  ------------------
  736|    531|}
ap_method_number_of:
  777|    373|{
  778|    373|    int len = strlen(method);
  779|       |
  780|       |    /* check if the method has been dynamically registered */
  781|    373|    int *methnum = apr_hash_get(methods_registry, method, len);
  782|       |
  783|    373|    if (methnum != NULL) {
  ------------------
  |  Branch (783:9): [True: 64, False: 309]
  ------------------
  784|     64|        return *methnum;
  785|     64|    }
  786|       |
  787|    309|    return M_INVALID;
  ------------------
  |  |  631|    309|#define M_INVALID               26      /** invalid method value terminates the
  ------------------
  788|    373|}
ap_make_method_list:
 1376|    531|{
 1377|    531|    ap_method_list_t *ml;
 1378|       |
 1379|    531|    ml = (ap_method_list_t *) apr_palloc(p, sizeof(ap_method_list_t));
  ------------------
  |  |  425|    531|    apr_palloc_debug(p, size, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|    531|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  153|    531|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  155|    531|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1380|    531|    ml->method_mask = 0;
 1381|    531|    ml->method_list = apr_array_make(p, nelts, sizeof(char *));
 1382|    531|    return ml;
 1383|    531|}
ap_h1_tokenize_request_line:
 1823|    531|{
 1824|    531|    core_server_config *conf = ap_get_core_module_config(r->server->module_config);
  ------------------
  |  |  383|    531|    (((void **)(v))[AP_CORE_MODULE_INDEX])
  |  |  ------------------
  |  |  |  |  381|    531|#define AP_CORE_MODULE_INDEX  0
  |  |  ------------------
  ------------------
 1825|    531|    int strict = (conf->http_conformance != AP_HTTP_CONFORMANCE_UNSAFE);
  ------------------
  |  |  745|    531|#define AP_HTTP_CONFORMANCE_UNSAFE    1
  ------------------
 1826|    531|    rrl_error error;
 1827|    531|    const char *error_token;
 1828|       |
 1829|    531|    ap_log_rerror(APLOG_MARK, APLOG_TRACE4, 0, r,
  ------------------
  |  |  448|    531|#define ap_log_rerror(...) ap_log_rerror__(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |  450|    531|    do { if (APLOG_R_MODULE_IS_LEVEL(r, mi, level))                         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|    531|          ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    531|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                         ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   48|    531|#define APLOG_NOTICE    LOG_NOTICE      /* normal but significant condition */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:13): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|    531|            (ap_get_request_module_loglevel(r, module_index)     \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  638|    531|    (ap_get_module_loglevel(ap_get_request_logconf(r),i))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  624|  1.06k|    (((i) < 0 || (l)->module_levels == NULL || (l)->module_levels[i] < 0) ?  \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:7): [True: 531, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:8): [True: 531, 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|  1.06k|     (l)->level :                                                         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 531, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  626|    531|     (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: 531]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|    531|             >= ((level)&APLOG_LEVELMASK) ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    531|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  451|    531|             ap_log_rerror_(file, line, mi, level, status, r, __VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (451:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  452|    531|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (452:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1830|    531|                  "ap_tokenize_request_line: '%s'", line);
 1831|    531|    error = tokenize_request_line(apr_pstrdup(r->pool, line), strict, pmethod,
 1832|    531|                                  puri, pprotocol, &error_token);
 1833|    531|    ap_log_rerror(APLOG_MARK, APLOG_TRACE4, 0, r,
  ------------------
  |  |  448|    531|#define ap_log_rerror(...) ap_log_rerror__(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |  450|    531|    do { if (APLOG_R_MODULE_IS_LEVEL(r, mi, level))                         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|    531|          ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    531|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                         ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   48|    531|#define APLOG_NOTICE    LOG_NOTICE      /* normal but significant condition */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:13): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|    531|            (ap_get_request_module_loglevel(r, module_index)     \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  638|    531|    (ap_get_module_loglevel(ap_get_request_logconf(r),i))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  624|  1.06k|    (((i) < 0 || (l)->module_levels == NULL || (l)->module_levels[i] < 0) ?  \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:7): [True: 531, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:8): [True: 531, 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|  1.06k|     (l)->level :                                                         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 531, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  626|    531|     (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: 531]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|    531|             >= ((level)&APLOG_LEVELMASK) ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    531|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  451|    531|             ap_log_rerror_(file, line, mi, level, status, r, __VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (451:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  452|    531|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (452:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1834|    531|                  "ap_tokenize_request: error=%d, method=%s, uri=%s, protocol=%s",
 1835|    531|                  error, *pmethod, *puri, *pprotocol);
 1836|    531|    if (error != rrl_none) {
  ------------------
  |  Branch (1836:9): [True: 158, False: 373]
  ------------------
 1837|    158|        rrl_log_error(r, error, error_token);
 1838|    158|        return 0;
 1839|    158|    }
 1840|    373|    return 1;
 1841|    531|}
http_protocol.c:ap_method_registry_destroy:
  692|    531|{
  693|    531|    methods_registry = NULL;
  694|    531|    cur_method_number = METHOD_NUMBER_FIRST;
  ------------------
  |  |  193|    531|#define METHOD_NUMBER_FIRST (M_INVALID + 1)
  |  |  ------------------
  |  |  |  |  631|    531|#define M_INVALID               26      /** invalid method value terminates the
  |  |  ------------------
  ------------------
  695|    531|    return APR_SUCCESS;
  ------------------
  |  |  225|    531|#define APR_SUCCESS 0
  ------------------
  696|    531|}
http_protocol.c:register_one_method:
  681|  14.3k|{
  682|  14.3k|    int *pnum = apr_palloc(p, sizeof(*pnum));
  ------------------
  |  |  425|  14.3k|    apr_palloc_debug(p, size, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|  14.3k|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  153|  14.3k|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  155|  14.3k|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  683|       |
  684|  14.3k|    *pnum = methnum;
  685|  14.3k|    apr_hash_set(methods_registry, methname, APR_HASH_KEY_STRING, pnum);
  ------------------
  |  |   47|  14.3k|#define APR_HASH_KEY_STRING     (-1)
  ------------------
  686|  14.3k|}
http_protocol.c:tokenize_request_line:
 1708|    531|{
 1709|    531|    char *method, *protocol, *uri, *ll;
 1710|    531|    rrl_error e = rrl_none;
 1711|    531|    char *etoken = NULL;
 1712|    531|    apr_size_t len = 0;
 1713|       |
 1714|    531|    method = line;
 1715|       |    /* If there is whitespace before a method, skip it and mark in error */
 1716|    531|    if (apr_isspace(*method)) {
  ------------------
  |  |  225|    531|#define apr_isspace(c) (isspace(((unsigned char)(c))))
  |  |  ------------------
  |  |  |  Branch (225:24): [True: 31, False: 500]
  |  |  ------------------
  ------------------
 1717|     31|        RRL_ERROR(e, etoken, rrl_badwhitespace, method);
  ------------------
  |  | 1698|     31|    do { \
  |  | 1699|     31|        if (e == rrl_none) {\
  |  |  ------------------
  |  |  |  Branch (1699:13): [True: 31, False: 0]
  |  |  ------------------
  |  | 1700|     31|            e = y; et = yt;\
  |  | 1701|     31|        }\
  |  | 1702|     31|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1702:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1718|    224|        for ( ; apr_isspace(*method); ++method)
  ------------------
  |  |  225|    224|#define apr_isspace(c) (isspace(((unsigned char)(c))))
  |  |  ------------------
  |  |  |  Branch (225:24): [True: 193, False: 31]
  |  |  ------------------
  ------------------
 1719|    193|            ;
 1720|     31|    }
 1721|       |
 1722|       |    /* Scan the method up to the next whitespace, ensure it contains only
 1723|       |     * valid http-token characters, otherwise mark in error
 1724|       |     */
 1725|    531|    if (strict) {
  ------------------
  |  Branch (1725:9): [True: 488, False: 43]
  ------------------
 1726|    488|        ll = (char*) ap_scan_http_token(method);
 1727|    488|    }
 1728|     43|    else {
 1729|     43|        ll = (char*) ap_scan_vchar_obstext(method);
 1730|     43|    }
 1731|       |
 1732|    531|    if ((ll == method) || (*ll && !apr_isspace(*ll))) {
  ------------------
  |  |  225|    428|#define apr_isspace(c) (isspace(((unsigned char)(c))))
  ------------------
  |  Branch (1732:9): [True: 97, False: 434]
  |  Branch (1732:28): [True: 428, False: 6]
  |  Branch (1732:35): [True: 36, False: 392]
  ------------------
 1733|    133|        RRL_ERROR(e, etoken, rrl_badmethod, ll);
  ------------------
  |  | 1698|    133|    do { \
  |  | 1699|    133|        if (e == rrl_none) {\
  |  |  ------------------
  |  |  |  Branch (1699:13): [True: 107, False: 26]
  |  |  ------------------
  |  | 1700|    107|            e = y; et = yt;\
  |  | 1701|    107|        }\
  |  | 1702|    133|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1702:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1734|    133|        ll = strpbrk(ll, "\t\n\v\f\r ");
 1735|    133|    }
 1736|       |
 1737|       |    /* Verify method terminated with a single SP, or mark as specific error */
 1738|    531|    if (!ll) {
  ------------------
  |  Branch (1738:9): [True: 81, False: 450]
  ------------------
 1739|     81|        RRL_ERROR(e, etoken, rrl_missinguri, NULL);
  ------------------
  |  | 1698|     81|    do { \
  |  | 1699|     81|        if (e == rrl_none) {\
  |  |  ------------------
  |  |  |  Branch (1699:13): [True: 0, False: 81]
  |  |  ------------------
  |  | 1700|      0|            e = y; et = yt;\
  |  | 1701|      0|        }\
  |  | 1702|     81|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1702:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1740|     81|        protocol = uri = "";
 1741|     81|        goto done;
 1742|     81|    }
 1743|    450|    else if (strict && ll[0] && apr_isspace(ll[1])) {
  ------------------
  |  |  225|    404|#define apr_isspace(c) (isspace(((unsigned char)(c))))
  |  |  ------------------
  |  |  |  Branch (225:24): [True: 30, False: 374]
  |  |  ------------------
  ------------------
  |  Branch (1743:14): [True: 409, False: 41]
  |  Branch (1743:24): [True: 404, False: 5]
  ------------------
 1744|     30|        RRL_ERROR(e, etoken, rrl_excesswhitespace, ll);
  ------------------
  |  | 1698|     30|    do { \
  |  | 1699|     30|        if (e == rrl_none) {\
  |  |  ------------------
  |  |  |  Branch (1699:13): [True: 1, False: 29]
  |  |  ------------------
  |  | 1700|      1|            e = y; et = yt;\
  |  | 1701|      1|        }\
  |  | 1702|     30|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1702:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1745|     30|    }
 1746|       |
 1747|       |    /* Advance uri pointer over leading whitespace, NUL terminate the method
 1748|       |     * If non-SP whitespace is encountered, mark as specific error
 1749|       |     */
 1750|  1.25k|    for (uri = ll; apr_isspace(*uri); ++uri)
  ------------------
  |  |  225|  1.25k|#define apr_isspace(c) (isspace(((unsigned char)(c))))
  |  |  ------------------
  |  |  |  Branch (225:24): [True: 808, False: 450]
  |  |  ------------------
  ------------------
 1751|    808|        if (*uri != ' ')
  ------------------
  |  Branch (1751:13): [True: 171, False: 637]
  ------------------
 1752|    171|            RRL_ERROR(e, etoken, rrl_badwhitespace, uri);
  ------------------
  |  | 1698|    621|    do { \
  |  | 1699|    171|        if (e == rrl_none) {\
  |  |  ------------------
  |  |  |  Branch (1699:13): [True: 1, False: 170]
  |  |  ------------------
  |  | 1700|      1|            e = y; et = yt;\
  |  | 1701|      1|        }\
  |  | 1702|    171|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1702:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1753|    450|    *ll = '\0';
 1754|       |
 1755|    450|    if (!*uri)
  ------------------
  |  Branch (1755:9): [True: 23, False: 427]
  ------------------
 1756|     23|        RRL_ERROR(e, etoken, rrl_missinguri, NULL);
  ------------------
  |  | 1698|     23|    do { \
  |  | 1699|     23|        if (e == rrl_none) {\
  |  |  ------------------
  |  |  |  Branch (1699:13): [True: 6, False: 17]
  |  |  ------------------
  |  | 1700|      6|            e = y; et = yt;\
  |  | 1701|      6|        }\
  |  | 1702|     23|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1702:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1757|       |
 1758|       |    /* Scan the URI up to the next whitespace, ensure it contains no raw
 1759|       |     * control characters, otherwise mark in error
 1760|       |     */
 1761|    450|    ll = (char*) ap_scan_vchar_obstext(uri);
 1762|    450|    if (ll == uri || (*ll && !apr_isspace(*ll))) {
  ------------------
  |  |  225|    252|#define apr_isspace(c) (isspace(((unsigned char)(c))))
  ------------------
  |  Branch (1762:9): [True: 25, False: 425]
  |  Branch (1762:23): [True: 252, False: 173]
  |  Branch (1762:30): [True: 8, False: 244]
  ------------------
 1763|     33|        RRL_ERROR(e, etoken, rrl_baduri, ll);
  ------------------
  |  | 1698|     33|    do { \
  |  | 1699|     33|        if (e == rrl_none) {\
  |  |  ------------------
  |  |  |  Branch (1699:13): [True: 3, False: 30]
  |  |  ------------------
  |  | 1700|      3|            e = y; et = yt;\
  |  | 1701|      3|        }\
  |  | 1702|     33|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1702:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1764|     33|        ll = strpbrk(ll, "\t\n\v\f\r ");
 1765|     33|    }
 1766|       |
 1767|       |    /* Verify URI terminated with a single SP, or mark as specific error */
 1768|    450|    if (!ll) {
  ------------------
  |  Branch (1768:9): [True: 28, False: 422]
  ------------------
 1769|     28|        protocol = "";
 1770|     28|        goto done;
 1771|     28|    }
 1772|    422|    else if (strict && ll[0] && apr_isspace(ll[1])) {
  ------------------
  |  |  225|    227|#define apr_isspace(c) (isspace(((unsigned char)(c))))
  |  |  ------------------
  |  |  |  Branch (225:24): [True: 22, False: 205]
  |  |  ------------------
  ------------------
  |  Branch (1772:14): [True: 382, False: 40]
  |  Branch (1772:24): [True: 227, False: 155]
  ------------------
 1773|     22|        RRL_ERROR(e, etoken, rrl_excesswhitespace, ll);
  ------------------
  |  | 1698|     22|    do { \
  |  | 1699|     22|        if (e == rrl_none) {\
  |  |  ------------------
  |  |  |  Branch (1699:13): [True: 2, False: 20]
  |  |  ------------------
  |  | 1700|      2|            e = y; et = yt;\
  |  | 1701|      2|        }\
  |  | 1702|     22|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1702:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1774|     22|    }
 1775|       |
 1776|       |    /* Advance protocol pointer over leading whitespace, NUL terminate the uri
 1777|       |     * If non-SP whitespace is encountered, mark as specific error
 1778|       |     */
 1779|  1.01k|    for (protocol = ll; apr_isspace(*protocol); ++protocol)
  ------------------
  |  |  225|  1.01k|#define apr_isspace(c) (isspace(((unsigned char)(c))))
  |  |  ------------------
  |  |  |  Branch (225:24): [True: 594, False: 422]
  |  |  ------------------
  ------------------
 1780|    594|        if (*protocol != ' ')
  ------------------
  |  Branch (1780:13): [True: 172, False: 422]
  ------------------
 1781|    172|            RRL_ERROR(e, etoken, rrl_badwhitespace, protocol);
  ------------------
  |  | 1698|    594|    do { \
  |  | 1699|    172|        if (e == rrl_none) {\
  |  |  ------------------
  |  |  |  Branch (1699:13): [True: 1, False: 171]
  |  |  ------------------
  |  | 1700|      1|            e = y; et = yt;\
  |  | 1701|      1|        }\
  |  | 1702|    172|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1702:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1782|    422|    *ll = '\0';
 1783|       |
 1784|       |    /* Scan the protocol up to the next whitespace, validation comes later */
 1785|    422|    if (!(ll = (char*) ap_scan_vchar_obstext(protocol))) {
  ------------------
  |  Branch (1785:9): [True: 0, False: 422]
  ------------------
 1786|      0|        len = strlen(protocol);
 1787|      0|        goto done;
 1788|      0|    }
 1789|    422|    len = ll - protocol;
 1790|       |
 1791|       |    /* Advance over trailing whitespace, if found mark in error,
 1792|       |     * determine if trailing text is found, unconditionally mark in error,
 1793|       |     * finally NUL terminate the protocol string
 1794|       |     */
 1795|    422|    if (*ll && !apr_isspace(*ll)) {
  ------------------
  |  |  225|     33|#define apr_isspace(c) (isspace(((unsigned char)(c))))
  ------------------
  |  Branch (1795:9): [True: 33, False: 389]
  |  Branch (1795:16): [True: 11, False: 22]
  ------------------
 1796|     11|        RRL_ERROR(e, etoken, rrl_badprotocol, ll);
  ------------------
  |  | 1698|     11|    do { \
  |  | 1699|     11|        if (e == rrl_none) {\
  |  |  ------------------
  |  |  |  Branch (1699:13): [True: 1, False: 10]
  |  |  ------------------
  |  | 1700|      1|            e = y; et = yt;\
  |  | 1701|      1|        }\
  |  | 1702|     11|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1702:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1797|     11|    }
 1798|    411|    else if (strict && *ll) {
  ------------------
  |  Branch (1798:14): [True: 371, False: 40]
  |  Branch (1798:24): [True: 9, False: 362]
  ------------------
 1799|      9|        RRL_ERROR(e, etoken, rrl_excesswhitespace, ll);
  ------------------
  |  | 1698|      9|    do { \
  |  | 1699|      9|        if (e == rrl_none) {\
  |  |  ------------------
  |  |  |  Branch (1699:13): [True: 2, False: 7]
  |  |  ------------------
  |  | 1700|      2|            e = y; et = yt;\
  |  | 1701|      2|        }\
  |  | 1702|      9|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1702:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1800|      9|    }
 1801|    402|    else {
 1802|    556|        for ( ; apr_isspace(*ll); ++ll)
  ------------------
  |  |  225|    556|#define apr_isspace(c) (isspace(((unsigned char)(c))))
  |  |  ------------------
  |  |  |  Branch (225:24): [True: 157, False: 399]
  |  |  ------------------
  ------------------
 1803|    157|            if (*ll != ' ') {
  ------------------
  |  Branch (1803:17): [True: 3, False: 154]
  ------------------
 1804|      3|                RRL_ERROR(e, etoken, rrl_badwhitespace, ll);
  ------------------
  |  | 1698|      3|    do { \
  |  | 1699|      3|        if (e == rrl_none) {\
  |  |  ------------------
  |  |  |  Branch (1699:13): [True: 1, False: 2]
  |  |  ------------------
  |  | 1700|      1|            e = y; et = yt;\
  |  | 1701|      1|        }\
  |  | 1702|      3|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1702:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1805|      3|                break;
 1806|      3|            }
 1807|    402|        if (*ll)
  ------------------
  |  Branch (1807:13): [True: 11, False: 391]
  ------------------
 1808|     11|            RRL_ERROR(e, etoken, rrl_trailingtext, ll);
  ------------------
  |  | 1698|     11|    do { \
  |  | 1699|     11|        if (e == rrl_none) {\
  |  |  ------------------
  |  |  |  Branch (1699:13): [True: 2, False: 9]
  |  |  ------------------
  |  | 1700|      2|            e = y; et = yt;\
  |  | 1701|      2|        }\
  |  | 1702|     11|    } while (0)
  |  |  ------------------
  |  |  |  Branch (1702:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1809|    402|    }
 1810|    422|    *((char *)protocol + len) = '\0';
 1811|       |
 1812|    531|done:
 1813|    531|    *pmethod = method;
 1814|    531|    *puri = uri;
 1815|    531|    *pprotocol = protocol;
 1816|    531|    *perror_token = etoken;
 1817|    531|    return e;
 1818|    422|}
http_protocol.c:rrl_log_error:
 1654|    158|{
 1655|    158|    switch (error) {
  ------------------
  |  Branch (1655:13): [True: 0, False: 158]
  ------------------
 1656|      0|    case rrl_none:
  ------------------
  |  Branch (1656:5): [True: 0, False: 158]
  ------------------
 1657|      0|        break;
 1658|      1|    case rrl_badprotocol:
  ------------------
  |  Branch (1658:5): [True: 1, False: 157]
  ------------------
 1659|      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]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1660|      1|                      "HTTP Request Line; Unrecognized protocol '%.*s' "
 1661|      1|                      "(perhaps whitespace was injected?)",
 1662|      1|                      log_name_len(etoken), etoken);
 1663|      1|        break;
 1664|    107|    case rrl_badmethod:
  ------------------
  |  Branch (1664:5): [True: 107, False: 51]
  ------------------
 1665|    107|        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03445)
  ------------------
  |  |  448|    107|#define ap_log_rerror(...) ap_log_rerror__(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |  450|    107|    do { if (APLOG_R_MODULE_IS_LEVEL(r, mi, level))                         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|    107|          ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    107|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                         ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   48|    107|#define APLOG_NOTICE    LOG_NOTICE      /* normal but significant condition */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:13): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|    107|            (ap_get_request_module_loglevel(r, module_index)     \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  638|    107|    (ap_get_module_loglevel(ap_get_request_logconf(r),i))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  624|    214|    (((i) < 0 || (l)->module_levels == NULL || (l)->module_levels[i] < 0) ?  \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:7): [True: 107, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:8): [True: 107, 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|    214|     (l)->level :                                                         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 107, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  626|    107|     (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: 107]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|    107|             >= ((level)&APLOG_LEVELMASK) ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    107|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  451|    107|             ap_log_rerror_(file, line, mi, level, status, r, __VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (451:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  452|    107|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (452:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1666|    107|                      "HTTP Request Line; Invalid method token: '%.*s'",
 1667|    107|                      log_name_len(etoken), etoken);
 1668|    107|        break;
 1669|     34|    case rrl_badwhitespace:
  ------------------
  |  Branch (1669:5): [True: 34, False: 124]
  ------------------
 1670|     34|        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03447)
  ------------------
  |  |  448|     34|#define ap_log_rerror(...) ap_log_rerror__(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |  450|     34|    do { if (APLOG_R_MODULE_IS_LEVEL(r, mi, level))                         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|     34|          ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|     34|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                         ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   48|     34|#define APLOG_NOTICE    LOG_NOTICE      /* normal but significant condition */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:13): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|     34|            (ap_get_request_module_loglevel(r, module_index)     \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  638|     34|    (ap_get_module_loglevel(ap_get_request_logconf(r),i))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  624|     68|    (((i) < 0 || (l)->module_levels == NULL || (l)->module_levels[i] < 0) ?  \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:7): [True: 34, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:8): [True: 34, 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|     68|     (l)->level :                                                         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 34, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  626|     34|     (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: 34]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|     34|             >= ((level)&APLOG_LEVELMASK) ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|     34|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  451|     34|             ap_log_rerror_(file, line, mi, level, status, r, __VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (451:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  452|     34|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (452:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1671|     34|                      "HTTP Request Line; Invalid whitespace");
 1672|     34|        break;
 1673|      5|    case rrl_excesswhitespace:
  ------------------
  |  Branch (1673:5): [True: 5, False: 153]
  ------------------
 1674|      5|        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03448)
  ------------------
  |  |  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]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1675|      5|                      "HTTP Request Line; Excess whitespace "
 1676|      5|                      "(disallowed by HttpProtocolOptions Strict)");
 1677|      5|        break;
 1678|      6|    case rrl_missinguri:
  ------------------
  |  Branch (1678:5): [True: 6, False: 152]
  ------------------
 1679|      6|        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03446)
  ------------------
  |  |  448|      6|#define ap_log_rerror(...) ap_log_rerror__(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |  450|      6|    do { if (APLOG_R_MODULE_IS_LEVEL(r, mi, level))                         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|      6|          ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      6|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                         ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   48|      6|#define APLOG_NOTICE    LOG_NOTICE      /* normal but significant condition */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:13): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|      6|            (ap_get_request_module_loglevel(r, module_index)     \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  638|      6|    (ap_get_module_loglevel(ap_get_request_logconf(r),i))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  624|     12|    (((i) < 0 || (l)->module_levels == NULL || (l)->module_levels[i] < 0) ?  \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:7): [True: 6, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:8): [True: 6, 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|     12|     (l)->level :                                                         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 6, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  626|      6|     (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: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|      6|             >= ((level)&APLOG_LEVELMASK) ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      6|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  451|      6|             ap_log_rerror_(file, line, mi, level, status, r, __VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (451:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  452|      6|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (452:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1680|      6|                      "HTTP Request Line; Missing URI");
 1681|      6|        break;
 1682|      3|    case rrl_baduri:
  ------------------
  |  Branch (1682:5): [True: 3, False: 155]
  ------------------
 1683|      3|        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03454)
  ------------------
  |  |  448|      3|#define ap_log_rerror(...) ap_log_rerror__(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |  450|      3|    do { if (APLOG_R_MODULE_IS_LEVEL(r, mi, level))                         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|      3|          ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      3|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                         ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   48|      3|#define APLOG_NOTICE    LOG_NOTICE      /* normal but significant condition */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:13): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|      3|            (ap_get_request_module_loglevel(r, module_index)     \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  638|      3|    (ap_get_module_loglevel(ap_get_request_logconf(r),i))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  624|      6|    (((i) < 0 || (l)->module_levels == NULL || (l)->module_levels[i] < 0) ?  \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:7): [True: 3, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:8): [True: 3, 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|      6|     (l)->level :                                                         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 3, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  626|      3|     (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: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|      3|             >= ((level)&APLOG_LEVELMASK) ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      3|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  451|      3|             ap_log_rerror_(file, line, mi, level, status, r, __VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (451:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  452|      3|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (452:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1684|      3|                      "HTTP Request Line; URI incorrectly encoded: '%.*s'",
 1685|      3|                      log_name_len(etoken), etoken);
 1686|      3|        break;
 1687|      2|    case rrl_trailingtext:
  ------------------
  |  Branch (1687:5): [True: 2, False: 156]
  ------------------
 1688|      2|        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03449)
  ------------------
  |  |  448|      2|#define ap_log_rerror(...) ap_log_rerror__(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |  450|      2|    do { if (APLOG_R_MODULE_IS_LEVEL(r, mi, level))                         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|      2|          ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      2|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                         ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   48|      2|#define APLOG_NOTICE    LOG_NOTICE      /* normal but significant condition */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:13): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|      2|            (ap_get_request_module_loglevel(r, module_index)     \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  638|      2|    (ap_get_module_loglevel(ap_get_request_logconf(r),i))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  624|      4|    (((i) < 0 || (l)->module_levels == NULL || (l)->module_levels[i] < 0) ?  \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:7): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:8): [True: 2, 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|      4|     (l)->level :                                                         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 2, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  626|      2|     (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: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|      2|             >= ((level)&APLOG_LEVELMASK) ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|      2|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  451|      2|             ap_log_rerror_(file, line, mi, level, status, r, __VA_ARGS__); \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (451:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  452|      2|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (452:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1689|      2|                      "HTTP Request Line; Extraneous text found '%.*s' "
 1690|      2|                      "(perhaps whitespace was injected?)",
 1691|      2|                      log_name_len(etoken), etoken);
 1692|      2|        break;
 1693|    158|    }
 1694|    158|}

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

ap_open_stderr_log:
  180|      2|{
  181|      2|    apr_file_open_stderr(&stderr_log, p);
  182|      2|}

ap_parse_uri:
  613|    373|{
  614|    373|    int status = HTTP_OK;
  ------------------
  |  |  495|    373|#define HTTP_OK                              200
  ------------------
  615|       |
  616|    373|    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|    691|    while ((uri[0] == '/') && (uri[1] == '/')) {
  ------------------
  |  Branch (625:12): [True: 343, False: 348]
  |  Branch (625:31): [True: 318, False: 25]
  ------------------
  626|    318|        ++uri ;
  627|    318|    }
  628|    373|    if (r->method_number == M_CONNECT) {
  ------------------
  |  |  603|    373|#define M_CONNECT               4
  ------------------
  |  Branch (628:9): [True: 34, False: 339]
  ------------------
  629|     34|        status = apr_uri_parse_hostinfo(r->pool, uri, &r->parsed_uri);
  630|     34|    }
  631|    339|    else {
  632|    339|        status = apr_uri_parse(r->pool, uri, &r->parsed_uri);
  633|    339|    }
  634|       |
  635|    373|    if (status == APR_SUCCESS) {
  ------------------
  |  |  225|    373|#define APR_SUCCESS 0
  ------------------
  |  Branch (635:9): [True: 291, False: 82]
  ------------------
  636|       |        /* if it has a scheme we may need to do absoluteURI vhost stuff */
  637|    291|        if (r->parsed_uri.scheme
  ------------------
  |  Branch (637:13): [True: 183, False: 108]
  ------------------
  638|    291|            && !ap_cstr_casecmp(r->parsed_uri.scheme, ap_http_scheme(r))) {
  ------------------
  |  |  302|    183|#define ap_http_scheme(r)       ap_run_http_scheme(r)
  ------------------
  |  Branch (638:16): [True: 4, False: 179]
  ------------------
  639|      4|            r->hostname = r->parsed_uri.hostname;
  640|      4|        }
  641|    287|        else if (r->method_number == M_CONNECT) {
  ------------------
  |  |  603|    287|#define M_CONNECT               4
  ------------------
  |  Branch (641:18): [True: 3, False: 284]
  ------------------
  642|      3|            r->hostname = r->parsed_uri.hostname;
  643|      3|        }
  644|       |
  645|    291|        r->args = r->parsed_uri.query;
  646|    291|        if (r->parsed_uri.path) {
  ------------------
  |  Branch (646:13): [True: 194, False: 97]
  ------------------
  647|    194|            r->uri = r->parsed_uri.path;
  648|    194|        }
  649|     97|        else if (r->method_number == M_OPTIONS) {
  ------------------
  |  |  604|     97|#define M_OPTIONS               5
  ------------------
  |  Branch (649:18): [True: 1, False: 96]
  ------------------
  650|      1|            r->uri = apr_pstrdup(r->pool, "*");
  651|      1|        }
  652|     96|        else {
  653|     96|            r->uri = apr_pstrdup(r->pool, "/");
  654|     96|        }
  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|    291|    }
  669|     82|    else {
  670|     82|        r->args = NULL;
  671|     82|        r->hostname = NULL;
  672|     82|        r->status = HTTP_BAD_REQUEST;             /* set error status */
  ------------------
  |  |  513|     82|#define HTTP_BAD_REQUEST                     400
  ------------------
  673|     82|        r->uri = apr_pstrdup(r->pool, uri);
  674|     82|    }
  675|    373|}
ap_parse_request_line:
  688|    531|{
  689|    531|    const char *method, *uri, *protocol;
  690|       |
  691|    531|    return ap_h1_tokenize_request_line(r, r->the_request,
  ------------------
  |  Branch (691:12): [True: 373, False: 158]
  ------------------
  692|    531|                                       &method, &uri, &protocol)
  693|    531|        && ap_assign_request_line(r, method, uri, protocol);
  ------------------
  |  Branch (693:12): [True: 12, False: 361]
  ------------------
  694|    531|}
ap_create_request:
 1059|    531|{
 1060|    531|    request_rec *r;
 1061|    531|    apr_pool_t *p;
 1062|       |
 1063|    531|    apr_pool_create(&p, conn->pool);
  ------------------
  |  |  297|    531|    apr_pool_create_ex_debug(newpool, parent, NULL, NULL, \
  |  |  298|    531|                             APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|    531|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  153|    531|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  155|    531|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1064|    531|    apr_pool_tag(p, "request");
 1065|    531|    r = apr_pcalloc(p, sizeof(request_rec));
  ------------------
  |  |  454|    531|    apr_pcalloc_debug(p, size, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|    531|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  153|    531|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  155|    531|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1066|    531|    AP_READ_REQUEST_ENTRY((intptr_t)r, (uintptr_t)conn);
 1067|    531|    r->pool            = p;
 1068|    531|    r->connection      = conn;
 1069|    531|    r->server          = conn->base_server;
 1070|       |
 1071|    531|    r->user            = NULL;
 1072|    531|    r->ap_auth_type    = NULL;
 1073|       |
 1074|    531|    r->allowed_methods = ap_make_method_list(p, 2);
 1075|       |
 1076|    531|    r->headers_in      = apr_table_make(r->pool, 25);
 1077|    531|    r->trailers_in     = apr_table_make(r->pool, 5);
 1078|    531|    r->subprocess_env  = apr_table_make(r->pool, 25);
 1079|    531|    r->headers_out     = apr_table_make(r->pool, 12);
 1080|    531|    r->err_headers_out = apr_table_make(r->pool, 5);
 1081|    531|    r->trailers_out    = apr_table_make(r->pool, 5);
 1082|    531|    r->notes           = apr_table_make(r->pool, 5);
 1083|       |
 1084|    531|    r->request_config  = ap_create_request_config(r->pool);
 1085|       |    /* Must be set before we run create request hook */
 1086|       |
 1087|    531|    r->proto_output_filters = conn->output_filters;
 1088|    531|    r->output_filters  = r->proto_output_filters;
 1089|    531|    r->proto_input_filters = conn->input_filters;
 1090|    531|    r->input_filters   = r->proto_input_filters;
 1091|    531|    ap_run_create_request(r);
 1092|    531|    r->per_dir_config  = r->server->lookup_defaults;
 1093|       |
 1094|    531|    r->sent_bodyct     = 0;                      /* bytect isn't for body */
 1095|       |
 1096|    531|    r->read_length     = 0;
 1097|    531|    r->read_body       = REQUEST_NO_BODY;
  ------------------
  |  |  757|    531|#define REQUEST_NO_BODY          0
  ------------------
 1098|       |
 1099|    531|    r->status          = HTTP_OK;  /* Until further notice */
  ------------------
  |  |  495|    531|#define HTTP_OK                              200
  ------------------
 1100|    531|    r->header_only     = 0;
 1101|    531|    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|    531|    r->used_path_info = AP_REQ_DEFAULT_PATH_INFO;
  ------------------
  |  |  776|    531|#define AP_REQ_DEFAULT_PATH_INFO   2
  ------------------
 1107|       |
 1108|    531|    r->useragent_addr = conn->client_addr;
 1109|    531|    r->useragent_ip = conn->client_ip;
 1110|       |
 1111|    531|    return r;
 1112|    531|}
ap_assign_request_line:
 1180|    373|{
 1181|    373|    core_server_config *conf = ap_get_core_module_config(r->server->module_config);
  ------------------
  |  |  383|    373|    (((void **)(v))[AP_CORE_MODULE_INDEX])
  |  |  ------------------
  |  |  |  |  381|    373|#define AP_CORE_MODULE_INDEX  0
  |  |  ------------------
  ------------------
 1182|    373|    int strict = (conf->http_conformance != AP_HTTP_CONFORMANCE_UNSAFE);
  ------------------
  |  |  745|    373|#define AP_HTTP_CONFORMANCE_UNSAFE    1
  ------------------
 1183|    373|    http_error error = r_assign_protocol(r, protocol, strict);
 1184|       |
 1185|    373|    ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
  ------------------
  |  |  448|    373|#define ap_log_rerror(...) ap_log_rerror__(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |  450|    373|    do { if (APLOG_R_MODULE_IS_LEVEL(r, mi, level))                         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|    373|          ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    373|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                         ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   48|    373|#define APLOG_NOTICE    LOG_NOTICE      /* normal but significant condition */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:13): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|    373|            (ap_get_request_module_loglevel(r, module_index)     \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  638|    373|    (ap_get_module_loglevel(ap_get_request_logconf(r),i))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  624|    746|    (((i) < 0 || (l)->module_levels == NULL || (l)->module_levels[i] < 0) ?  \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:7): [Folded - Ignored]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:18): [True: 0, False: 373]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 373, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:48): [True: 0, False: 373]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 373, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  625|    373|     (l)->level :                                                         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  626|    746|     (l)->module_levels[i])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 373, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (197:13): [True: 0, False: 373]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|    373|             >= ((level)&APLOG_LEVELMASK) ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    373|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  451|    373|             ap_log_rerror_(file, line, mi, level, status, r, __VA_ARGS__); \
  |  |  |  |  452|    373|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (452:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1186|    373|                  "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|    373|    r->method = method;
 1192|    373|    r->method_number = ap_method_number_of(r->method);
 1193|    373|    if (r->method_number == M_GET && r->method[0] == 'H')
  ------------------
  |  |  599|    746|#define M_GET                   0       /** RFC 2616: HTTP */
  ------------------
  |  Branch (1193:9): [True: 6, False: 367]
  |  Branch (1193:38): [True: 1, False: 5]
  ------------------
 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|    373|    r->the_request = apr_pstrcat(r->pool, r->method, *uri ? " " : NULL, uri,
  ------------------
  |  Branch (1199:54): [True: 373, False: 0]
  ------------------
 1200|    373|                                 *r->protocol ? " " : NULL, r->protocol, NULL);
  ------------------
  |  Branch (1200:34): [True: 373, False: 0]
  ------------------
 1201|    373|    ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
  ------------------
  |  |  448|    373|#define ap_log_rerror(...) ap_log_rerror__(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |  450|    373|    do { if (APLOG_R_MODULE_IS_LEVEL(r, mi, level))                         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|    373|          ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    373|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                         ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   48|    373|#define APLOG_NOTICE    LOG_NOTICE      /* normal but significant condition */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:13): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|    373|            (ap_get_request_module_loglevel(r, module_index)     \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  638|    373|    (ap_get_module_loglevel(ap_get_request_logconf(r),i))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  624|    746|    (((i) < 0 || (l)->module_levels == NULL || (l)->module_levels[i] < 0) ?  \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:7): [Folded - Ignored]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:18): [True: 0, False: 373]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 373, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:48): [True: 0, False: 373]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 373, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  625|    373|     (l)->level :                                                         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  626|    746|     (l)->module_levels[i])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 373, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (197:13): [True: 0, False: 373]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|    373|             >= ((level)&APLOG_LEVELMASK) ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    373|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  451|    373|             ap_log_rerror_(file, line, mi, level, status, r, __VA_ARGS__); \
  |  |  |  |  452|    373|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (452:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1202|    373|                  "assigned request_line: %s, error=%d", r->the_request, error);
 1203|       |
 1204|    373|    ap_parse_uri(r, uri);
 1205|    373|    if (r->status == HTTP_OK
  ------------------
  |  |  495|    746|#define HTTP_OK                              200
  ------------------
  |  Branch (1205:9): [True: 291, False: 82]
  ------------------
 1206|    373|            && (r->parsed_uri.path != NULL)
  ------------------
  |  Branch (1206:16): [True: 194, False: 97]
  ------------------
 1207|    373|            && (r->parsed_uri.path[0] != '/')
  ------------------
  |  Branch (1207:16): [True: 92, False: 102]
  ------------------
 1208|    373|            && (r->method_number != M_OPTIONS
  ------------------
  |  |  604|    184|#define M_OPTIONS               5
  ------------------
  |  Branch (1208:17): [True: 83, False: 9]
  ------------------
 1209|     92|                || strcmp(r->parsed_uri.path, "*") != 0)) {
  ------------------
  |  Branch (1209:20): [True: 7, False: 2]
  ------------------
 1210|       |        /* Invalid request-target per RFC 7230 section 5.3 */
 1211|     90|        r->status = HTTP_BAD_REQUEST;
  ------------------
  |  |  513|     90|#define HTTP_BAD_REQUEST                     400
  ------------------
 1212|     90|    }
 1213|       |
 1214|    373|    ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
  ------------------
  |  |  448|    373|#define ap_log_rerror(...) ap_log_rerror__(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |  450|    373|    do { if (APLOG_R_MODULE_IS_LEVEL(r, mi, level))                         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|    373|          ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    373|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                         ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   48|    373|#define APLOG_NOTICE    LOG_NOTICE      /* normal but significant condition */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:13): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|    373|            (ap_get_request_module_loglevel(r, module_index)     \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  638|    373|    (ap_get_module_loglevel(ap_get_request_logconf(r),i))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  624|    746|    (((i) < 0 || (l)->module_levels == NULL || (l)->module_levels[i] < 0) ?  \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:7): [Folded - Ignored]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:18): [True: 0, False: 373]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 373, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:48): [True: 0, False: 373]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 373, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  625|    373|     (l)->level :                                                         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  626|    746|     (l)->module_levels[i])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 373, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (197:13): [True: 0, False: 373]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|    373|             >= ((level)&APLOG_LEVELMASK) ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    373|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  451|    373|             ap_log_rerror_(file, line, mi, level, status, r, __VA_ARGS__); \
  |  |  |  |  452|    373|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (452:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1215|    373|                  "parsed uri: r->status=%d, error=%d", r->status, error);
 1216|       |    /* With the request understood, we can consider HTTP/0.9 specific errors */
 1217|    373|    if (r->proto_num == HTTP_VERSION(0, 9) && error == http_error_none) {
  ------------------
  |  |  274|    746|#define HTTP_VERSION(major,minor) (1000*(major)+(minor))
  ------------------
  |  Branch (1217:9): [True: 342, False: 31]
  |  Branch (1217:47): [True: 169, False: 173]
  ------------------
 1218|    169|        if (conf->http09_enable == AP_HTTP09_DISABLE)
  ------------------
  |  |  741|    169|#define AP_HTTP09_DISABLE 2
  ------------------
  |  Branch (1218:13): [True: 1, False: 168]
  ------------------
 1219|      1|            error = http_error_reject09;
 1220|    168|        else if (strict && (r->method_number != M_GET || r->header_only))
  ------------------
  |  |  599|    298|#define M_GET                   0       /** RFC 2616: HTTP */
  ------------------
  |  Branch (1220:18): [True: 149, False: 19]
  |  Branch (1220:29): [True: 143, False: 6]
  |  Branch (1220:58): [True: 1, False: 5]
  ------------------
 1221|    144|            error = http_error_badmethod09;
 1222|    169|    }
 1223|       |
 1224|       |    /* Now that the method, uri and protocol are all processed,
 1225|       |     * we can safely resume any deferred error reporting
 1226|       |     */
 1227|    373|    if (error != http_error_none) {
  ------------------
  |  Branch (1227:9): [True: 333, False: 40]
  ------------------
 1228|    333|        switch (error) {
 1229|    188|        case http_error_badprotocol:
  ------------------
  |  Branch (1229:9): [True: 188, False: 145]
  ------------------
 1230|    188|            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(10388)
  ------------------
  |  |  448|    188|#define ap_log_rerror(...) ap_log_rerror__(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |  450|    188|    do { if (APLOG_R_MODULE_IS_LEVEL(r, mi, level))                         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|    188|          ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    188|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                         ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   48|    188|#define APLOG_NOTICE    LOG_NOTICE      /* normal but significant condition */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:13): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|    188|            (ap_get_request_module_loglevel(r, module_index)     \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  638|    188|    (ap_get_module_loglevel(ap_get_request_logconf(r),i))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  624|    376|    (((i) < 0 || (l)->module_levels == NULL || (l)->module_levels[i] < 0) ?  \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:7): [Folded - Ignored]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:18): [True: 0, False: 188]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 188, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:48): [True: 0, False: 188]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 188, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  625|    188|     (l)->level :                                                         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  626|    376|     (l)->module_levels[i])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 188, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (197:13): [True: 0, False: 188]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|    188|             >= ((level)&APLOG_LEVELMASK) ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    188|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  451|    188|             ap_log_rerror_(file, line, mi, level, status, r, __VA_ARGS__); \
  |  |  |  |  452|    188|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (452:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1231|    188|                          "HTTP Request: Unrecognized protocol '%.*s' "
 1232|    188|                          "(perhaps whitespace was injected?)",
 1233|    188|                          field_name_len(r->protocol), r->protocol);
 1234|    188|            break;
 1235|      1|        case http_error_reject09:
  ------------------
  |  Branch (1235:9): [True: 1, False: 332]
  ------------------
 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|    144|        case http_error_badmethod09:
  ------------------
  |  Branch (1239:9): [True: 144, False: 189]
  ------------------
 1240|    144|            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03444)
  ------------------
  |  |  448|    144|#define ap_log_rerror(...) ap_log_rerror__(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |  450|    144|    do { if (APLOG_R_MODULE_IS_LEVEL(r, mi, level))                         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|    144|          ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    144|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                         ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   48|    144|#define APLOG_NOTICE    LOG_NOTICE      /* normal but significant condition */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:13): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|    144|            (ap_get_request_module_loglevel(r, module_index)     \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  638|    144|    (ap_get_module_loglevel(ap_get_request_logconf(r),i))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  624|    288|    (((i) < 0 || (l)->module_levels == NULL || (l)->module_levels[i] < 0) ?  \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:7): [Folded - Ignored]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:18): [True: 0, False: 144]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 144, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:48): [True: 0, False: 144]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 144, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  625|    144|     (l)->level :                                                         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  626|    288|     (l)->module_levels[i])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 144, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (197:13): [True: 0, False: 144]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|    144|             >= ((level)&APLOG_LEVELMASK) ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|    144|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  451|    144|             ap_log_rerror_(file, line, mi, level, status, r, __VA_ARGS__); \
  |  |  |  |  452|    144|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (452:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1241|    144|                          "HTTP Request: Invalid method token: '%.*s'"
 1242|    144|                          " (only GET is allowed for HTTP/0.9 requests)",
 1243|    144|                          field_name_len(r->method), r->method);
 1244|    144|            break;
 1245|      0|        default:
  ------------------
  |  Branch (1245:9): [True: 0, False: 333]
  ------------------
 1246|      0|            break;
 1247|    333|        }
 1248|    333|        r->status = HTTP_BAD_REQUEST;
  ------------------
  |  |  513|    333|#define HTTP_BAD_REQUEST                     400
  ------------------
 1249|    333|        goto failed;
 1250|    333|    }
 1251|       |
 1252|     40|    if (conf->http_methods == AP_HTTP_METHODS_REGISTERED
  ------------------
  |  |  751|     80|#define AP_HTTP_METHODS_REGISTERED    2
  ------------------
  |  Branch (1252:9): [True: 6, False: 34]
  ------------------
 1253|     40|            && 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|     39|    if (r->status != HTTP_OK) {
  ------------------
  |  |  495|     39|#define HTTP_OK                              200
  ------------------
  |  Branch (1263:9): [True: 19, False: 20]
  ------------------
 1264|     19|        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03450)
  ------------------
  |  |  448|     19|#define ap_log_rerror(...) ap_log_rerror__(__VA_ARGS__)
  |  |  ------------------
  |  |  |  |  450|     19|    do { if (APLOG_R_MODULE_IS_LEVEL(r, mi, level))                         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|     19|          ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|     19|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                         ( (((level)&APLOG_LEVELMASK) <= APLOG_NOTICE) ||       \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   48|     19|#define APLOG_NOTICE    LOG_NOTICE      /* normal but significant condition */
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (196:13): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  197|     19|            (ap_get_request_module_loglevel(r, module_index)     \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  638|     19|    (ap_get_module_loglevel(ap_get_request_logconf(r),i))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  624|     38|    (((i) < 0 || (l)->module_levels == NULL || (l)->module_levels[i] < 0) ?  \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:7): [Folded - Ignored]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:18): [True: 0, False: 19]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:19): [True: 19, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:48): [True: 0, False: 19]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (624:49): [True: 19, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  625|     19|     (l)->level :                                                         \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (625:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  626|     38|     (l)->module_levels[i])
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  |  |  Branch (626:7): [True: 19, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (197:13): [True: 0, False: 19]
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|     19|             >= ((level)&APLOG_LEVELMASK) ) )
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   60|     19|#define APLOG_LEVELMASK 15     /* mask off the level value */
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  451|     19|             ap_log_rerror_(file, line, mi, level, status, r, __VA_ARGS__); \
  |  |  |  |  452|     19|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (452:13): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1265|     19|                      "HTTP Request Line; Unable to parse URI: '%.*s'",
 1266|     19|                      field_name_len(r->uri), r->uri);
 1267|     19|        goto failed;
 1268|     19|    }
 1269|       |
 1270|     20|    if (strict) {
  ------------------
  |  Branch (1270:9): [True: 12, False: 8]
  ------------------
 1271|     12|        if (r->parsed_uri.fragment) {
  ------------------
  |  Branch (1271:13): [True: 4, False: 8]
  ------------------
 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|      8|        if (r->parsed_uri.user || r->parsed_uri.password) {
  ------------------
  |  Branch (1278:13): [True: 4, False: 4]
  |  Branch (1278:35): [True: 0, False: 4]
  ------------------
 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|      8|    }
 1286|     12|    return 1;
 1287|       |
 1288|    361|failed:
 1289|    361|    if (error != http_error_none && r->proto_num == HTTP_VERSION(0, 9)) {
  ------------------
  |  |  274|    333|#define HTTP_VERSION(major,minor) (1000*(major)+(minor))
  ------------------
  |  Branch (1289:9): [True: 333, False: 28]
  |  Branch (1289:37): [True: 318, False: 15]
  ------------------
 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|    318|        r->assbackwards = 0;
 1298|    318|        r->connection->keepalive = AP_CONN_CLOSE;
 1299|    318|        r->proto_num = HTTP_VERSION(1, 0);
  ------------------
  |  |  274|    318|#define HTTP_VERSION(major,minor) (1000*(major)+(minor))
  ------------------
 1300|    318|        r->protocol  = "HTTP/1.0";
 1301|    318|    }
 1302|    361|    return 0;
 1303|       |
 1304|     20|}
protocol.c:r_assign_protocol:
 1135|    373|{
 1136|    373|    int proto_num;
 1137|    373|    http_error error = http_error_none;
 1138|       |
 1139|    373|    if (protocol[0] == 'H' && protocol[1] == 'T'
  ------------------
  |  Branch (1139:9): [True: 155, False: 218]
  |  Branch (1139:31): [True: 122, False: 33]
  ------------------
 1140|    373|            && protocol[2] == 'T' && protocol[3] == 'P'
  ------------------
  |  Branch (1140:16): [True: 72, False: 50]
  |  Branch (1140:38): [True: 52, False: 20]
  ------------------
 1141|    373|            && protocol[4] == '/' && apr_isdigit(protocol[5])
  ------------------
  |  |  209|    412|#define apr_isdigit(c) (isdigit(((unsigned char)(c))))
  |  |  ------------------
  |  |  |  Branch (209:24): [True: 37, False: 2]
  |  |  ------------------
  ------------------
  |  Branch (1141:16): [True: 39, False: 13]
  ------------------
 1142|    373|            && protocol[6] == '.' && apr_isdigit(protocol[7])
  ------------------
  |  |  209|    398|#define apr_isdigit(c) (isdigit(((unsigned char)(c))))
  |  |  ------------------
  |  |  |  Branch (209:24): [True: 24, False: 1]
  |  |  ------------------
  ------------------
  |  Branch (1142:16): [True: 25, False: 12]
  ------------------
 1143|    373|            && !protocol[8] && protocol[5] != '0') {
  ------------------
  |  Branch (1143:16): [True: 14, False: 10]
  |  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|    360|    else if ((protocol[0] == 'H' || protocol[0] == 'h')
  ------------------
  |  Branch (1147:15): [True: 142, False: 218]
  |  Branch (1147:37): [True: 10, False: 208]
  ------------------
 1148|    360|                 && (protocol[1] == 'T' || protocol[1] == 't')
  ------------------
  |  Branch (1148:22): [True: 109, False: 43]
  |  Branch (1148:44): [True: 13, False: 30]
  ------------------
 1149|    360|                 && (protocol[2] == 'T' || protocol[2] == 't')
  ------------------
  |  Branch (1149:22): [True: 63, False: 59]
  |  Branch (1149:44): [True: 32, False: 27]
  ------------------
 1150|    360|                 && (protocol[3] == 'P' || protocol[3] == 'p')
  ------------------
  |  Branch (1150:22): [True: 66, False: 29]
  |  Branch (1150:44): [True: 4, False: 25]
  ------------------
 1151|    360|                 && protocol[4] == '/' && apr_isdigit(protocol[5])
  ------------------
  |  |  209|    412|#define apr_isdigit(c) (isdigit(((unsigned char)(c))))
  |  |  ------------------
  |  |  |  Branch (209:24): [True: 48, False: 4]
  |  |  ------------------
  ------------------
  |  Branch (1151:21): [True: 52, False: 18]
  ------------------
 1152|    360|                 && protocol[6] == '.' && apr_isdigit(protocol[7])
  ------------------
  |  |  209|    394|#define apr_isdigit(c) (isdigit(((unsigned char)(c))))
  |  |  ------------------
  |  |  |  Branch (209:24): [True: 33, False: 1]
  |  |  ------------------
  ------------------
  |  Branch (1152:21): [True: 34, False: 14]
  ------------------
 1153|    360|                 && !protocol[8] && protocol[5] != '0') {
  ------------------
  |  Branch (1153:21): [True: 19, False: 14]
  |  Branch (1153:37): [True: 18, False: 1]
  ------------------
 1154|     18|        r->assbackwards = 0;
 1155|     18|        proto_num = HTTP_VERSION(protocol[5] - '0', protocol[7] - '0');
  ------------------
  |  |  274|     18|#define HTTP_VERSION(major,minor) (1000*(major)+(minor))
  ------------------
 1156|     18|        if (strict && error == http_error_none)
  ------------------
  |  Branch (1156:13): [True: 15, False: 3]
  |  Branch (1156:23): [True: 15, False: 0]
  ------------------
 1157|     15|            error = http_error_badprotocol;
 1158|      3|        else
 1159|      3|            protocol = apr_psprintf(r->pool, "HTTP/%d.%d", HTTP_VERSION_MAJOR(proto_num),
  ------------------
  |  |  276|      3|#define HTTP_VERSION_MAJOR(number) ((number)/1000)
  ------------------
 1160|      3|                                    HTTP_VERSION_MINOR(proto_num));
  ------------------
  |  |  278|      3|#define HTTP_VERSION_MINOR(number) ((number)%1000)
  ------------------
 1161|     18|    }
 1162|    342|    else if (protocol[0]) {
  ------------------
  |  Branch (1162:14): [True: 173, False: 169]
  ------------------
 1163|    173|        proto_num = HTTP_VERSION(0, 9);
  ------------------
  |  |  274|    173|#define HTTP_VERSION(major,minor) (1000*(major)+(minor))
  ------------------
 1164|    173|        if (error == http_error_none)
  ------------------
  |  Branch (1164:13): [True: 173, False: 0]
  ------------------
 1165|    173|            error = http_error_badprotocol;
 1166|    173|    }
 1167|    169|    else {
 1168|    169|        r->assbackwards = 1;
 1169|    169|        protocol = "HTTP/0.9";
 1170|    169|        proto_num = HTTP_VERSION(0, 9);
  ------------------
  |  |  274|    169|#define HTTP_VERSION(major,minor) (1000*(major)+(minor))
  ------------------
 1171|    169|    }
 1172|    373|    r->protocol = protocol;
 1173|    373|    r->proto_num = proto_num;
 1174|    373|    return error;
 1175|    373|}

ap_scan_http_token:
 1678|    488|{
 1679|  2.51k|    for ( ; !TEST_CHAR(*ptr, T_HTTP_TOKEN_STOP); ++ptr) ;
  ------------------
  |  |   53|  2.51k|#define TEST_CHAR(c, f) (test_char_table[(unsigned char)(c)] & (f))
  ------------------
  |  Branch (1679:13): [True: 2.03k, False: 488]
  ------------------
 1680|       |
 1681|    488|    return ptr;
 1682|    488|}
ap_scan_vchar_obstext:
 1688|    915|{
 1689|  15.5k|    for ( ; TEST_CHAR(*ptr, T_VCHAR_OBSTEXT); ++ptr) ;
  ------------------
  |  |   53|  15.5k|#define TEST_CHAR(c, f) (test_char_table[(unsigned char)(c)] & (f))
  |  |  ------------------
  |  |  |  Branch (53:25): [True: 14.6k, False: 915]
  |  |  ------------------
  ------------------
 1690|       |
 1691|    915|    return ptr;
 1692|    915|}
ap_cstr_casecmp:
 3707|    183|{
 3708|    183|    const unsigned char *u1 = (const unsigned char *)s1;
 3709|    183|    const unsigned char *u2 = (const unsigned char *)s2;
 3710|    286|    for (;;) {
 3711|    286|        const int c2 = ucharmap[*u2++];
 3712|    286|        const int cmp = (int)ucharmap[*u1++] - c2;
 3713|       |        /* Not necessary to test for !c1, this is caught by cmp */
 3714|    286|        if (cmp || !c2)
  ------------------
  |  Branch (3714:13): [True: 179, False: 107]
  |  Branch (3714:20): [True: 4, False: 103]
  ------------------
 3715|    183|            return cmp;
 3716|    286|    }
 3717|    183|}

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

apr_brigade_cleanup:
   38|    531|{
   39|    531|    apr_bucket_brigade *b = data;
   40|       |
   41|    531|#ifndef APR_BUCKET_DEBUG
   42|    531|    while (!APR_BRIGADE_EMPTY(b)) {
  ------------------
  |  |  346|    531|#define APR_BRIGADE_EMPTY(b)	APR_RING_EMPTY(&(b)->list, apr_bucket, link)
  |  |  ------------------
  |  |  |  |  205|    531|    (APR_RING_FIRST((hp)) == APR_RING_SENTINEL((hp), elem, link))
  |  |  |  |  ------------------
  |  |  |  |  |  |  166|    531|#define APR_RING_FIRST(hp)    (hp)->next
  |  |  |  |  ------------------
  |  |  |  |                   (APR_RING_FIRST((hp)) == APR_RING_SENTINEL((hp), elem, link))
  |  |  |  |  ------------------
  |  |  |  |  |  |  160|    531|    (struct elem *)((char *)(&(hp)->next) - APR_OFFSETOF(struct elem, link))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  110|    531|#define APR_OFFSETOF(s_type,field) offsetof(s_type,field)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (42:12): [True: 0, False: 531]
  ------------------
   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|    531|    return APR_SUCCESS;
  ------------------
  |  |  225|    531|#define APR_SUCCESS 0
  ------------------
   63|    531|}
apr_brigade_create:
   87|    531|{
   88|    531|    apr_bucket_brigade *b;
   89|       |
   90|    531|    b = apr_palloc(p, sizeof(*b));
  ------------------
  |  |  425|    531|    apr_palloc_debug(p, size, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|    531|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  153|    531|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  155|    531|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   91|    531|    b->p = p;
   92|    531|    b->bucket_alloc = list;
   93|       |
   94|    531|    APR_RING_INIT(&b->list, apr_bucket, link);
  ------------------
  |  |  192|    531|#define APR_RING_INIT(hp, elem, link) do {                \
  |  |  193|    531|    APR_RING_FIRST((hp)) = APR_RING_SENTINEL((hp), elem, link);    \
  |  |  ------------------
  |  |  |  |  166|    531|#define APR_RING_FIRST(hp)    (hp)->next
  |  |  ------------------
  |  |                   APR_RING_FIRST((hp)) = APR_RING_SENTINEL((hp), elem, link);    \
  |  |  ------------------
  |  |  |  |  160|    531|    (struct elem *)((char *)(&(hp)->next) - APR_OFFSETOF(struct elem, link))
  |  |  |  |  ------------------
  |  |  |  |  |  |  110|    531|#define APR_OFFSETOF(s_type,field) offsetof(s_type,field)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  194|    531|    APR_RING_LAST((hp))  = APR_RING_SENTINEL((hp), elem, link);    \
  |  |  ------------------
  |  |  |  |  171|    531|#define APR_RING_LAST(hp)    (hp)->prev
  |  |  ------------------
  |  |                   APR_RING_LAST((hp))  = APR_RING_SENTINEL((hp), elem, link);    \
  |  |  ------------------
  |  |  |  |  160|    531|    (struct elem *)((char *)(&(hp)->next) - APR_OFFSETOF(struct elem, link))
  |  |  |  |  ------------------
  |  |  |  |  |  |  110|    531|#define APR_OFFSETOF(s_type,field) offsetof(s_type,field)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  195|    531|    } while (0)
  |  |  ------------------
  |  |  |  Branch (195:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   95|       |
   96|    531|    apr_pool_cleanup_register(b->p, b, brigade_cleanup, apr_pool_cleanup_null);
   97|    531|    return b;
   98|    531|}
apr_brigade.c:brigade_cleanup:
   33|    531|{
   34|    531|    return apr_brigade_cleanup(data);
   35|    531|}

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

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__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  153|      2|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  155|      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__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  153|      0|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  155|      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|    531|    { \
  183|    531|    ns##_LINK_##name##_t *pHook; \
  184|    531|    int n; \
  185|    531|    APR_HOOK_INT_DCL_UD; \
  186|    531|\
  187|    531|    APR_HOOK_PROBE_ENTRY(ud, ns, name, args_use); \
  188|    531|\
  189|    531|    if(_hooks.link_##name) \
  ------------------
  |  Branch (189:8): [True: 0, False: 531]
  ------------------
  190|    531|        { \
  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|    531|\
  200|    531|    APR_HOOK_PROBE_RETURN(ud, ns, name, 0, args_use); \
  201|    531|\
  202|    531|    }
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|    183|    { \
  271|    183|    ns##_LINK_##name##_t *pHook; \
  272|    183|    int n; \
  273|    183|    ret rv = decline; \
  274|    183|    APR_HOOK_INT_DCL_UD; \
  275|    183|\
  276|    183|    APR_HOOK_PROBE_ENTRY(ud, ns, name, args_use); \
  277|    183|\
  278|    183|    if(_hooks.link_##name) \
  ------------------
  |  Branch (278:8): [True: 183, False: 0]
  ------------------
  279|    183|        { \
  280|    183|        pHook=(ns##_LINK_##name##_t *)_hooks.link_##name->elts; \
  281|    183|        for(n=0 ; n < _hooks.link_##name->nelts ; ++n) \
  ------------------
  |  Branch (281:19): [True: 183, False: 0]
  ------------------
  282|    183|            { \
  283|    183|            APR_HOOK_PROBE_INVOKE(ud, ns, name, (char *)pHook[n].szName, args_use); \
  284|    183|            rv=pHook[n].pFunc args_use; \
  285|    183|            APR_HOOK_PROBE_COMPLETE(ud, ns, name, (char *)pHook[n].szName, rv, args_use); \
  286|    183|\
  287|    183|            if(rv != decline) \
  ------------------
  |  Branch (287:16): [True: 183, False: 0]
  ------------------
  288|    183|                break; \
  289|    183|            } \
  290|    183|        } \
  291|    183|\
  292|    183|    APR_HOOK_PROBE_RETURN(ud, ns, name, rv, args_use); \
  293|    183|\
  294|    183|    return rv; \
  295|    183|    }
ap_run_create_request:
  225|    531|    { \
  226|    531|    ns##_LINK_##name##_t *pHook; \
  227|    531|    int n; \
  228|    531|    ret rv = ok; \
  229|    531|    APR_HOOK_INT_DCL_UD; \
  230|    531|\
  231|    531|    APR_HOOK_PROBE_ENTRY(ud, ns, name, args_use); \
  232|    531|\
  233|    531|    if(_hooks.link_##name) \
  ------------------
  |  Branch (233:8): [True: 0, False: 531]
  ------------------
  234|    531|        { \
  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|    531|\
  247|    531|    APR_HOOK_PROBE_RETURN(ud, ns, name, rv, args_use); \
  248|    531|\
  249|    531|    return rv; \
  250|    531|    }

apr_thread_mutex_create:
   40|    533|{
   41|    533|    apr_thread_mutex_t *new_mutex;
   42|    533|    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|    533|    new_mutex = apr_pcalloc(pool, sizeof(apr_thread_mutex_t));
  ------------------
  |  |  454|    533|    apr_pcalloc_debug(p, size, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|    533|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  153|    533|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  155|    533|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   51|    533|    new_mutex->pool = pool;
   52|       |
   53|    533|#ifdef HAVE_PTHREAD_MUTEX_RECURSIVE
   54|    533|    if (flags & APR_THREAD_MUTEX_NESTED) {
  ------------------
  |  |   44|    533|#define APR_THREAD_MUTEX_NESTED   0x1   /**< enable nested (recursive) locks */
  ------------------
  |  Branch (54:9): [True: 533, False: 0]
  ------------------
   55|    533|        pthread_mutexattr_t mattr;
   56|       |
   57|    533|        rv = pthread_mutexattr_init(&mattr);
   58|    533|        if (rv) return rv;
  ------------------
  |  Branch (58:13): [True: 0, False: 533]
  ------------------
   59|       |
   60|    533|        rv = pthread_mutexattr_settype(&mattr, PTHREAD_MUTEX_RECURSIVE);
   61|    533|        if (rv) {
  ------------------
  |  Branch (61:13): [True: 0, False: 533]
  ------------------
   62|      0|            pthread_mutexattr_destroy(&mattr);
   63|      0|            return rv;
   64|      0|        }
   65|       |
   66|    533|        rv = pthread_mutex_init(&new_mutex->mutex, &mattr);
   67|       |
   68|    533|        pthread_mutexattr_destroy(&mattr);
   69|    533|    } 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|    533|    if (rv) {
  ------------------
  |  Branch (92:9): [True: 0, False: 533]
  ------------------
   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|    533|    apr_pool_cleanup_register(new_mutex->pool,
  113|    533|                              new_mutex, thread_mutex_cleanup,
  114|    533|                              apr_pool_cleanup_null);
  115|       |
  116|    533|    *mutex = new_mutex;
  117|    533|    return APR_SUCCESS;
  ------------------
  |  |  225|    533|#define APR_SUCCESS 0
  ------------------
  118|    533|}
apr_thread_mutex_lock:
  121|  1.06k|{
  122|  1.06k|    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|  1.06k|    rv = pthread_mutex_lock(&mutex->mutex);
  159|       |#ifdef HAVE_ZOS_PTHREADS
  160|       |    if (rv) {
  161|       |        rv = errno;
  162|       |    }
  163|       |#endif
  164|       |
  165|  1.06k|    return rv;
  166|  1.06k|}
apr_thread_mutex_unlock:
  302|  1.06k|{
  303|  1.06k|    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|  1.06k|    status = pthread_mutex_unlock(&mutex->mutex);
  331|       |#ifdef HAVE_ZOS_PTHREADS
  332|       |    if (status) {
  333|       |        status = errno;
  334|       |    }
  335|       |#endif
  336|       |
  337|  1.06k|    return status;
  338|  1.06k|}
thread_mutex.c:thread_mutex_cleanup:
   24|    531|{
   25|    531|    apr_thread_mutex_t *mutex = data;
   26|    531|    apr_status_t rv;
   27|       |
   28|    531|    rv = pthread_mutex_destroy(&mutex->mutex);
   29|       |#ifdef HAVE_ZOS_PTHREADS
   30|       |    if (rv) {
   31|       |        rv = errno;
   32|       |    }
   33|       |#endif
   34|    531|    return rv;
   35|    531|}

apr_allocator_create:
  173|    531|{
  174|    531|    apr_allocator_t *new_allocator;
  175|       |
  176|    531|    *allocator = NULL;
  177|       |
  178|    531|    if ((new_allocator = malloc(SIZEOF_ALLOCATOR_T)) == NULL)
  ------------------
  |  |  147|    531|#define SIZEOF_ALLOCATOR_T  APR_ALIGN_DEFAULT(sizeof(apr_allocator_t))
  |  |  ------------------
  |  |  |  |  143|    531|#define APR_ALIGN_DEFAULT(size) APR_ALIGN(size, 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  140|    531|    (((size) + ((boundary) - 1)) & ~((boundary) - 1))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (178:9): [True: 0, False: 531]
  ------------------
  179|      0|        return APR_ENOMEM;
  ------------------
  |  |  687|      0|#define APR_ENOMEM ENOMEM
  ------------------
  180|       |
  181|    531|    memset(new_allocator, 0, SIZEOF_ALLOCATOR_T);
  ------------------
  |  |  147|    531|#define SIZEOF_ALLOCATOR_T  APR_ALIGN_DEFAULT(sizeof(apr_allocator_t))
  |  |  ------------------
  |  |  |  |  143|    531|#define APR_ALIGN_DEFAULT(size) APR_ALIGN(size, 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  140|    531|    (((size) + ((boundary) - 1)) & ~((boundary) - 1))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  182|    531|    new_allocator->max_free_index = APR_ALLOCATOR_MAX_FREE_UNLIMITED;
  ------------------
  |  |   67|    531|#define APR_ALLOCATOR_MAX_FREE_UNLIMITED 0
  ------------------
  183|       |
  184|    531|    *allocator = new_allocator;
  185|       |
  186|    531|    return APR_SUCCESS;
  ------------------
  |  |  225|    531|#define APR_SUCCESS 0
  ------------------
  187|    531|}
apr_allocator_destroy:
  190|    531|{
  191|    531|    apr_size_t index;
  192|    531|    apr_memnode_t *node, **ref;
  193|       |
  194|  11.6k|    for (index = 0; index <= MAX_INDEX; index++) {
  ------------------
  |  |   70|  11.6k|#define MAX_INDEX   20
  ------------------
  |  Branch (194:21): [True: 11.1k, False: 531]
  ------------------
  195|  11.1k|        ref = &allocator->free[index];
  196|  11.6k|        while ((node = *ref) != NULL) {
  ------------------
  |  Branch (196:16): [True: 531, False: 11.1k]
  ------------------
  197|    531|            *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|    531|            free(node);
  203|    531|#endif
  204|    531|        }
  205|  11.1k|    }
  206|       |
  207|    531|    free(allocator);
  208|    531|}
apr_allocator_alloc:
  496|    531|{
  497|    531|    return allocator_alloc(allocator, size);
  498|    531|}
apr_allocator_free:
  502|    531|{
  503|    531|    allocator_free(allocator, node);
  504|    531|}
apr_pool_initialize:
 1674|    531|{
 1675|    531|    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|    531|    if (apr_pools_initialized++)
  ------------------
  |  Branch (1681:9): [True: 0, False: 531]
  ------------------
 1682|      0|        return APR_SUCCESS;
  ------------------
  |  |  225|      0|#define APR_SUCCESS 0
  ------------------
 1683|       |
 1684|    531|#if defined(_SC_PAGESIZE)
 1685|    531|    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|    531|    boundary_index = 12;
 1694|    531|    while ( (1 << boundary_index) < boundary_size)
  ------------------
  |  Branch (1694:13): [True: 0, False: 531]
  ------------------
 1695|      0|        boundary_index++;
 1696|    531|    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|    531|    if ((rv = apr_pool_create_ex(&global_pool, NULL, NULL,
  ------------------
  |  |  247|    531|    apr_pool_create_ex_debug(newpool, parent, abort_fn, allocator, \
  |  |  248|    531|                             APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|    531|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  153|    531|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  155|    531|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1703:9): [True: 0, False: 531]
  ------------------
 1704|    531|                                 NULL)) != APR_SUCCESS) {
  ------------------
  |  |  225|    531|#define APR_SUCCESS 0
  ------------------
 1705|      0|        return rv;
 1706|      0|    }
 1707|       |
 1708|    531|    apr_pool_tag(global_pool, "APR global pool");
 1709|       |
 1710|    531|    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|    531|    if ((rv = apr_atomic_init(global_pool)) != APR_SUCCESS) {
  ------------------
  |  |  225|    531|#define APR_SUCCESS 0
  ------------------
  |  Branch (1715:9): [True: 0, False: 531]
  ------------------
 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|    531|    return APR_SUCCESS;
  ------------------
  |  |  225|    531|#define APR_SUCCESS 0
  ------------------
 1759|    531|}
apr_pool_terminate:
 1762|    531|{
 1763|    531|    if (!apr_pools_initialized)
  ------------------
  |  Branch (1763:9): [True: 0, False: 531]
  ------------------
 1764|      0|        return;
 1765|       |
 1766|    531|    if (--apr_pools_initialized)
  ------------------
  |  Branch (1766:9): [True: 0, False: 531]
  ------------------
 1767|      0|        return;
 1768|       |
 1769|    531|    apr_pool_destroy(global_pool); /* This will also destroy the mutex */
  ------------------
  |  |  388|    531|    apr_pool_destroy_debug(p, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|    531|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  153|    531|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  155|    531|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1770|    531|    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|    531|}
apr_palloc_debug:
 1823|  42.9k|{
 1824|  42.9k|    void *mem;
 1825|       |
 1826|  42.9k|    apr_pool_check_integrity(pool);
 1827|       |
 1828|  42.9k|    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|  42.9k|    return mem;
 1835|  42.9k|}
apr_pcalloc_debug:
 1839|  3.19k|{
 1840|  3.19k|    void *mem;
 1841|       |
 1842|  3.19k|    apr_pool_check_integrity(pool);
 1843|       |
 1844|  3.19k|    mem = pool_alloc(pool, size);
 1845|  3.19k|    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|  3.19k|    return mem;
 1852|  3.19k|}
apr_pool_destroy_debug:
 1985|    531|{
 1986|    531|#if APR_HAS_THREADS
 1987|    531|    apr_thread_mutex_t *mutex;
 1988|    531|#endif
 1989|       |
 1990|    531|    apr_pool_check_lifetime(pool);
 1991|       |
 1992|    531|    if (pool->joined) {
  ------------------
  |  Branch (1992:9): [True: 0, False: 531]
  ------------------
 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|    531|#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|    531|    mutex = parent_lock(pool);
 2008|    531|#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|    531|    pool_destroy_debug(pool, file_line);
 2015|       |
 2016|    531|#if APR_HAS_THREADS
 2017|       |    /* Unlock the mutex we obtained above */
 2018|    531|    parent_unlock(mutex);
 2019|    531|#endif /* APR_HAS_THREADS */
 2020|    531|}
apr_pool_create_ex_debug:
 2027|  1.59k|{
 2028|  1.59k|    apr_pool_t *pool;
 2029|       |
 2030|  1.59k|    *newpool = NULL;
 2031|       |
 2032|  1.59k|    if (!parent) {
  ------------------
  |  Branch (2032:9): [True: 1.06k, False: 531]
  ------------------
 2033|  1.06k|        parent = global_pool;
 2034|  1.06k|    }
 2035|    531|    else {
 2036|    531|       apr_pool_check_lifetime(parent);
 2037|       |
 2038|    531|       if (!allocator)
  ------------------
  |  Branch (2038:12): [True: 531, False: 0]
  ------------------
 2039|    531|           allocator = parent->allocator;
 2040|    531|    }
 2041|       |
 2042|  1.59k|    if (!abort_fn && parent)
  ------------------
  |  Branch (2042:9): [True: 1.59k, False: 0]
  |  Branch (2042:22): [True: 1.06k, False: 533]
  ------------------
 2043|  1.06k|        abort_fn = parent->abort_fn;
 2044|       |
 2045|  1.59k|    if ((pool = malloc(SIZEOF_POOL_T)) == NULL) {
  ------------------
  |  |  618|  1.59k|#define SIZEOF_POOL_T       APR_ALIGN_DEFAULT(sizeof(apr_pool_t))
  |  |  ------------------
  |  |  |  |  143|  1.59k|#define APR_ALIGN_DEFAULT(size) APR_ALIGN(size, 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  140|  1.59k|    (((size) + ((boundary) - 1)) & ~((boundary) - 1))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (2045:9): [True: 0, False: 1.59k]
  ------------------
 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.59k|    memset(pool, 0, SIZEOF_POOL_T);
  ------------------
  |  |  618|  1.59k|#define SIZEOF_POOL_T       APR_ALIGN_DEFAULT(sizeof(apr_pool_t))
  |  |  ------------------
  |  |  |  |  143|  1.59k|#define APR_ALIGN_DEFAULT(size) APR_ALIGN(size, 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  140|  1.59k|    (((size) + ((boundary) - 1)) & ~((boundary) - 1))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2053|       |
 2054|  1.59k|    pool->allocator = allocator;
 2055|  1.59k|    pool->abort_fn = abort_fn;
 2056|  1.59k|    pool->tag = file_line;
 2057|  1.59k|    pool->file_line = file_line;
 2058|       |
 2059|  1.59k|#if APR_HAS_THREADS
 2060|  1.59k|    if (parent == NULL || parent->allocator != allocator) {
  ------------------
  |  Branch (2060:9): [True: 533, False: 1.06k]
  |  Branch (2060:27): [True: 0, False: 1.06k]
  ------------------
 2061|    533|        apr_status_t rv;
 2062|       |
 2063|       |        /* No matter what the creation flags say, always create
 2064|       |         * a lock.  Without it integrity_check and apr_pool_num_bytes
 2065|       |         * blow up (because they traverse pools child lists that
 2066|       |         * possibly belong to another thread, in combination with
 2067|       |         * the pool having no lock).  However, this might actually
 2068|       |         * hide problems like creating a child pool of a pool
 2069|       |         * belonging to another thread.
 2070|       |         */
 2071|    533|        if ((rv = apr_thread_mutex_create(&pool->mutex,
  ------------------
  |  Branch (2071:13): [True: 0, False: 533]
  ------------------
 2072|    533|                APR_THREAD_MUTEX_NESTED, pool)) != APR_SUCCESS) {
  ------------------
  |  |   44|    533|#define APR_THREAD_MUTEX_NESTED   0x1   /**< enable nested (recursive) locks */
  ------------------
                              APR_THREAD_MUTEX_NESTED, pool)) != APR_SUCCESS) {
  ------------------
  |  |  225|    533|#define APR_SUCCESS 0
  ------------------
 2073|      0|            free(pool);
 2074|      0|            return rv;
 2075|      0|        }
 2076|    533|    }
 2077|  1.06k|    else {
 2078|  1.06k|        pool->mutex = parent->mutex;
 2079|  1.06k|    }
 2080|  1.59k|#endif /* APR_HAS_THREADS */
 2081|       |
 2082|  1.59k|    if ((pool->parent = parent) != NULL) {
  ------------------
  |  Branch (2082:9): [True: 1.06k, False: 533]
  ------------------
 2083|  1.06k|        pool_lock(parent);
 2084|       |
 2085|  1.06k|        if ((pool->sibling = parent->child) != NULL)
  ------------------
  |  Branch (2085:13): [True: 0, False: 1.06k]
  ------------------
 2086|      0|            pool->sibling->ref = &pool->sibling;
 2087|       |
 2088|  1.06k|        parent->child = pool;
 2089|  1.06k|        pool->ref = &parent->child;
 2090|       |
 2091|  1.06k|        pool_unlock(parent);
 2092|  1.06k|    }
 2093|    533|    else {
 2094|    533|        pool->sibling = NULL;
 2095|    533|        pool->ref = NULL;
 2096|    533|    }
 2097|       |
 2098|  1.59k|#if APR_HAS_THREADS
 2099|  1.59k|    pool->owner = apr_os_thread_current();
 2100|  1.59k|#endif /* APR_HAS_THREADS */
 2101|       |#ifdef NETWARE
 2102|       |    pool->owner_proc = (apr_os_proc_t)getnlmhandle();
 2103|       |#endif /* defined(NETWARE) */
 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.59k|    *newpool = pool;
 2110|       |
 2111|  1.59k|    return APR_SUCCESS;
  ------------------
  |  |  225|  1.59k|#define APR_SUCCESS 0
  ------------------
 2112|  1.59k|}
apr_pvsprintf:
 2212|      3|{
 2213|      3|    struct psprintf_data ps;
 2214|      3|    debug_node_t *node;
 2215|       |
 2216|      3|    apr_pool_check_integrity(pool);
 2217|       |
 2218|      3|    ps.size = 64;
 2219|      3|    ps.mem = malloc(ps.size);
 2220|      3|    ps.vbuff.curpos  = ps.mem;
 2221|       |
 2222|       |    /* Save a byte for the NUL terminator */
 2223|      3|    ps.vbuff.endpos = ps.mem + ps.size - 1;
 2224|       |
 2225|      3|    if (apr_vformatter(psprintf_flush, &ps.vbuff, fmt, ap) == -1) {
  ------------------
  |  Branch (2225:9): [True: 0, False: 3]
  ------------------
 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|      3|    *ps.vbuff.curpos++ = '\0';
 2233|       |
 2234|       |    /*
 2235|       |     * Link the node in
 2236|       |     */
 2237|      3|    node = pool->nodes;
 2238|      3|    if (node == NULL || node->index == 64) {
  ------------------
  |  Branch (2238:9): [True: 0, False: 3]
  |  Branch (2238:25): [True: 0, False: 3]
  ------------------
 2239|      0|        if ((node = malloc(SIZEOF_DEBUG_NODE_T)) == NULL) {
  ------------------
  |  |  562|      0|#define SIZEOF_DEBUG_NODE_T APR_ALIGN_DEFAULT(sizeof(debug_node_t))
  |  |  ------------------
  |  |  |  |  143|      0|#define APR_ALIGN_DEFAULT(size) APR_ALIGN(size, 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  140|      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|      3|    node->beginp[node->index] = ps.mem;
 2252|      3|    node->endp[node->index] = ps.mem + ps.size;
 2253|      3|    node->index++;
 2254|       |
 2255|      3|    return ps.mem;
 2256|      3|}
apr_psprintf:
 2371|      3|{
 2372|      3|    va_list ap;
 2373|      3|    char *res;
 2374|       |
 2375|      3|    va_start(ap, fmt);
 2376|      3|    res = apr_pvsprintf(p, fmt, ap);
 2377|      3|    va_end(ap);
 2378|      3|    return res;
 2379|      3|}
apr_pool_allocator_get:
 2409|  1.06k|{
 2410|  1.06k|    return pool->allocator;
 2411|  1.06k|}
apr_pool_tag:
 2440|  1.06k|{
 2441|  1.06k|    pool->tag = tag;
 2442|  1.06k|}
apr_pool_cleanup_register:
 2530|  2.12k|{
 2531|  2.12k|    cleanup_t *c = NULL;
 2532|       |
 2533|  2.12k|#if APR_POOL_DEBUG
 2534|  2.12k|    apr_pool_check_integrity(p);
 2535|  2.12k|#endif /* APR_POOL_DEBUG */
 2536|       |
 2537|  2.12k|    if (p != NULL) {
  ------------------
  |  Branch (2537:9): [True: 2.12k, False: 0]
  ------------------
 2538|  2.12k|        if (p->free_cleanups) {
  ------------------
  |  Branch (2538:13): [True: 0, False: 2.12k]
  ------------------
 2539|       |            /* reuse a cleanup structure */
 2540|      0|            c = p->free_cleanups;
 2541|      0|            p->free_cleanups = c->next;
 2542|  2.12k|        } else {
 2543|  2.12k|            c = apr_palloc(p, sizeof(cleanup_t));
  ------------------
  |  |  425|  2.12k|    apr_palloc_debug(p, size, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|  2.12k|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  153|  2.12k|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  155|  2.12k|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 2544|  2.12k|        }
 2545|  2.12k|        c->data = data;
 2546|  2.12k|        c->plain_cleanup_fn = plain_cleanup_fn;
 2547|  2.12k|        c->child_cleanup_fn = child_cleanup_fn;
 2548|  2.12k|        c->next = p->cleanups;
 2549|  2.12k|        p->cleanups = c;
 2550|  2.12k|    }
 2551|       |
 2552|  2.12k|#if APR_POOL_DEBUG
 2553|  2.12k|    if (!c || !c->plain_cleanup_fn || !c->child_cleanup_fn) {
  ------------------
  |  Branch (2553:9): [True: 0, False: 2.12k]
  |  Branch (2553:15): [True: 0, False: 2.12k]
  |  Branch (2553:39): [True: 0, False: 2.12k]
  ------------------
 2554|      0|        abort();
 2555|      0|    }
 2556|  2.12k|#endif /* APR_POOL_DEBUG */
 2557|  2.12k|}
apr_pool_create_ex:
 2979|    533|{
 2980|    533|    return apr_pool_create_ex_debug(newpool, parent,
 2981|    533|                                    abort_fn, allocator,
 2982|    533|                                    "undefined");
 2983|    533|}
apr_pools.c:allocator_lock:
  156|    531|{
  157|    531|#if APR_HAS_THREADS
  158|    531|    if (allocator->mutex)
  ------------------
  |  Branch (158:9): [True: 0, False: 531]
  ------------------
  159|      0|        apr_thread_mutex_lock(allocator->mutex);
  160|    531|#endif /* APR_HAS_THREADS */
  161|    531|}
apr_pools.c:allocator_unlock:
  165|    531|{
  166|    531|#if APR_HAS_THREADS
  167|    531|    if (allocator->mutex)
  ------------------
  |  Branch (167:9): [True: 0, False: 531]
  ------------------
  168|      0|        apr_thread_mutex_unlock(allocator->mutex);
  169|    531|#endif /* APR_HAS_THREADS */
  170|    531|}
apr_pools.c:allocator_align:
  255|    531|{
  256|    531|    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|    531|    size = APR_ALIGN(size + APR_MEMNODE_T_SIZE, BOUNDARY_SIZE);
  ------------------
  |  |  140|    531|    (((size) + ((boundary) - 1)) & ~((boundary) - 1))
  ------------------
  262|    531|    if (size < in_size) {
  ------------------
  |  Branch (262:9): [True: 0, False: 531]
  ------------------
  263|      0|        return 0;
  264|      0|    }
  265|    531|    if (size < MIN_ALLOC) {
  ------------------
  |  |   73|    531|#define MIN_ALLOC   (BOUNDARY_SIZE << min_order)
  |  |  ------------------
  |  |  |  |   82|    531|#define BOUNDARY_SIZE   boundary_size
  |  |  ------------------
  ------------------
  |  Branch (265:9): [True: 0, False: 531]
  ------------------
  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|    531|    return size;
  270|    531|}
apr_pools.c:allocator_alloc:
  281|    531|{
  282|    531|    apr_memnode_t *node, **ref;
  283|    531|    apr_size_t max_index, upper_index;
  284|    531|    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|    531|    size = allocator_align(in_size);
  290|    531|    if (!size) {
  ------------------
  |  Branch (290:9): [True: 0, False: 531]
  ------------------
  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|    531|    index = (size >> BOUNDARY_INDEX) - 1;
  ------------------
  |  |   81|    531|#define BOUNDARY_INDEX  boundary_index
  ------------------
  298|       |
  299|    531|    if (index > APR_UINT32_MAX) {
  ------------------
  |  |  442|    531|#define APR_UINT32_MAX  UINT32_MAX
  ------------------
  |  Branch (299:9): [True: 0, False: 531]
  ------------------
  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|    531|    if (index <= allocator->max_index) {
  ------------------
  |  Branch (306:9): [True: 0, False: 531]
  ------------------
  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|    531|    else if (allocator->free[MAX_INDEX]) {
  ------------------
  |  |   70|    531|#define MAX_INDEX   20
  ------------------
  |  Branch (364:14): [True: 0, False: 531]
  ------------------
  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|    531|    if ((node = malloc(size)) == NULL)
  ------------------
  |  Branch (399:9): [True: 0, False: 531]
  ------------------
  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|    531|    node->index = (apr_uint32_t)index;
  411|    531|    node->endp = (char *)node + size;
  412|       |
  413|    531|have_node:
  414|    531|    node->next = NULL;
  415|    531|    node->first_avail = (char *)node + APR_MEMNODE_T_SIZE;
  ------------------
  |  |   64|    531|#define APR_MEMNODE_T_SIZE APR_ALIGN_DEFAULT(sizeof(apr_memnode_t))
  |  |  ------------------
  |  |  |  |  143|    531|#define APR_ALIGN_DEFAULT(size) APR_ALIGN(size, 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  140|    531|    (((size) + ((boundary) - 1)) & ~((boundary) - 1))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  416|       |
  417|    531|    APR_VALGRIND_UNDEFINED(node->first_avail, size - APR_MEMNODE_T_SIZE);
  418|       |
  419|    531|    return node;
  420|    531|}
apr_pools.c:allocator_free:
  424|    531|{
  425|    531|    apr_memnode_t *next, *freelist = NULL;
  426|    531|    apr_size_t index, max_index;
  427|    531|    apr_size_t max_free_index, current_free_index;
  428|       |
  429|    531|    allocator_lock(allocator);
  430|       |
  431|    531|    max_index = allocator->max_index;
  432|    531|    max_free_index = allocator->max_free_index;
  433|    531|    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|    531|    do {
  439|    531|        next = node->next;
  440|    531|        index = node->index;
  441|       |
  442|    531|        APR_VALGRIND_NOACCESS((char *)node + APR_MEMNODE_T_SIZE,
  443|    531|                              (node->index+1) << BOUNDARY_INDEX);
  444|       |
  445|    531|        if (max_free_index != APR_ALLOCATOR_MAX_FREE_UNLIMITED
  ------------------
  |  |   67|  1.06k|#define APR_ALLOCATOR_MAX_FREE_UNLIMITED 0
  ------------------
  |  Branch (445:13): [True: 0, False: 531]
  ------------------
  446|    531|            && index + 1 > current_free_index) {
  ------------------
  |  Branch (446:16): [True: 0, False: 0]
  ------------------
  447|      0|            node->next = freelist;
  448|      0|            freelist = node;
  449|      0|        }
  450|    531|        else if (index < MAX_INDEX) {
  ------------------
  |  |   70|    531|#define MAX_INDEX   20
  ------------------
  |  Branch (450:18): [True: 531, False: 0]
  ------------------
  451|       |            /* Add the node to the appropriate 'size' bucket.  Adjust
  452|       |             * the max_index when appropriate.
  453|       |             */
  454|    531|            if ((node->next = allocator->free[index]) == NULL
  ------------------
  |  Branch (454:17): [True: 531, False: 0]
  ------------------
  455|    531|                && index > max_index) {
  ------------------
  |  Branch (455:20): [True: 531, False: 0]
  ------------------
  456|    531|                max_index = index;
  457|    531|            }
  458|    531|            allocator->free[index] = node;
  459|    531|            if (current_free_index >= index + 1)
  ------------------
  |  Branch (459:17): [True: 0, False: 531]
  ------------------
  460|      0|                current_free_index -= index + 1;
  461|    531|            else
  462|    531|                current_free_index = 0;
  463|    531|        }
  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|    531|    } while ((node = next) != NULL);
  ------------------
  |  Branch (475:14): [True: 0, False: 531]
  ------------------
  476|       |
  477|    531|    allocator->max_index = max_index;
  478|    531|    allocator->current_free_index = current_free_index;
  479|       |
  480|    531|    allocator_unlock(allocator);
  481|       |
  482|    531|    while (freelist != NULL) {
  ------------------
  |  Branch (482:12): [True: 0, False: 531]
  ------------------
  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|    531|}
apr_pools.c:apr_pool_check_integrity:
 1657|  48.2k|{
 1658|  48.2k|    apr_pool_check_lifetime(pool);
 1659|  48.2k|    apr_pool_check_owner(pool);
 1660|  48.2k|}
apr_pools.c:apr_pool_check_owner:
 1642|  49.8k|{
 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|  49.8k|}
apr_pools.c:pool_alloc:
 1783|  46.1k|{
 1784|  46.1k|    debug_node_t *node;
 1785|  46.1k|    void *mem;
 1786|       |
 1787|  46.1k|    if ((mem = malloc(size)) == NULL) {
  ------------------
  |  Branch (1787:9): [True: 0, False: 46.1k]
  ------------------
 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|  46.1k|    node = pool->nodes;
 1795|  46.1k|    if (node == NULL || node->index == 64) {
  ------------------
  |  Branch (1795:9): [True: 1.59k, False: 44.5k]
  |  Branch (1795:25): [True: 0, False: 44.5k]
  ------------------
 1796|  1.59k|        if ((node = malloc(SIZEOF_DEBUG_NODE_T)) == NULL) {
  ------------------
  |  |  562|  1.59k|#define SIZEOF_DEBUG_NODE_T APR_ALIGN_DEFAULT(sizeof(debug_node_t))
  |  |  ------------------
  |  |  |  |  143|  1.59k|#define APR_ALIGN_DEFAULT(size) APR_ALIGN(size, 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  140|  1.59k|    (((size) + ((boundary) - 1)) & ~((boundary) - 1))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1796:13): [True: 0, False: 1.59k]
  ------------------
 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.59k|        memset(node, 0, SIZEOF_DEBUG_NODE_T);
  ------------------
  |  |  562|  1.59k|#define SIZEOF_DEBUG_NODE_T APR_ALIGN_DEFAULT(sizeof(debug_node_t))
  |  |  ------------------
  |  |  |  |  143|  1.59k|#define APR_ALIGN_DEFAULT(size) APR_ALIGN(size, 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  140|  1.59k|    (((size) + ((boundary) - 1)) & ~((boundary) - 1))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1805|       |
 1806|  1.59k|        node->next = pool->nodes;
 1807|  1.59k|        pool->nodes = node;
 1808|  1.59k|        node->index = 0;
 1809|  1.59k|    }
 1810|       |
 1811|  46.1k|    node->beginp[node->index] = mem;
 1812|  46.1k|    node->endp[node->index] = (char *)mem + size;
 1813|  46.1k|    node->index++;
 1814|       |
 1815|  46.1k|    pool->stat_alloc++;
 1816|  46.1k|    pool->stat_total_alloc++;
 1817|       |
 1818|  46.1k|    return mem;
 1819|  46.1k|}
apr_pools.c:apr_pool_check_lifetime:
 1616|  49.2k|{
 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|  49.2k|    if (pool == global_pool || global_pool == NULL)
  ------------------
  |  Branch (1622:9): [True: 531, False: 48.7k]
  |  Branch (1622:32): [True: 1.60k, False: 47.1k]
  ------------------
 1623|  2.14k|        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|  49.2k|}
apr_pools.c:parent_lock:
 1491|    531|{
 1492|    531|    if (pool->parent) {
  ------------------
  |  Branch (1492:9): [True: 0, False: 531]
  ------------------
 1493|      0|        apr_thread_mutex_lock(pool->parent->mutex);
 1494|      0|        return pool->parent->mutex;
 1495|      0|    }
 1496|    531|    return NULL;
 1497|    531|}
apr_pools.c:pool_clear_debug:
 1862|  1.59k|{
 1863|  1.59k|    debug_node_t *node;
 1864|  1.59k|    apr_size_t index;
 1865|       |
 1866|       |    /* Run pre destroy cleanups */
 1867|  1.59k|    run_cleanups(&pool->pre_cleanups);
 1868|  1.59k|    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.59k|    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.65k|    while (pool->child)
  ------------------
  |  Branch (1879:12): [True: 1.06k, False: 1.59k]
  ------------------
 1880|  1.06k|        pool_destroy_debug(pool->child, file_line);
 1881|       |
 1882|       |    /* Run cleanups */
 1883|  1.59k|    run_cleanups(&pool->cleanups);
 1884|  1.59k|    pool->free_cleanups = NULL;
 1885|  1.59k|    pool->cleanups = NULL;
 1886|       |
 1887|       |    /* If new child pools showed up, this is a reason to raise a flag */
 1888|  1.59k|    if (pool->child)
  ------------------
  |  Branch (1888:9): [True: 0, False: 1.59k]
  ------------------
 1889|      0|        abort();
 1890|       |
 1891|       |    /* Free subprocesses */
 1892|  1.59k|    free_proc_chain(pool->subprocesses);
 1893|  1.59k|    pool->subprocesses = NULL;
 1894|       |
 1895|       |    /* Clear the user data. */
 1896|  1.59k|    pool->user_data = NULL;
 1897|       |
 1898|       |    /* Free the blocks, scribbling over them first to help highlight
 1899|       |     * use-after-free issues. */
 1900|  3.18k|    while ((node = pool->nodes) != NULL) {
  ------------------
  |  Branch (1900:12): [True: 1.59k, False: 1.59k]
  ------------------
 1901|  1.59k|        pool->nodes = node->next;
 1902|       |
 1903|  47.6k|        for (index = 0; index < node->index; index++) {
  ------------------
  |  Branch (1903:25): [True: 46.0k, False: 1.59k]
  ------------------
 1904|  46.0k|            memset(node->beginp[index], POOL_POISON_BYTE,
  ------------------
  |  | 1859|  46.0k|#define POOL_POISON_BYTE 'A'
  ------------------
 1905|  46.0k|                   (char *)node->endp[index] - (char *)node->beginp[index]);
 1906|  46.0k|            free(node->beginp[index]);
 1907|  46.0k|        }
 1908|       |
 1909|  1.59k|        memset(node, POOL_POISON_BYTE, SIZEOF_DEBUG_NODE_T);
  ------------------
  |  | 1859|  1.59k|#define POOL_POISON_BYTE 'A'
  ------------------
                      memset(node, POOL_POISON_BYTE, SIZEOF_DEBUG_NODE_T);
  ------------------
  |  |  562|  1.59k|#define SIZEOF_DEBUG_NODE_T APR_ALIGN_DEFAULT(sizeof(debug_node_t))
  |  |  ------------------
  |  |  |  |  143|  1.59k|#define APR_ALIGN_DEFAULT(size) APR_ALIGN(size, 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  140|  1.59k|    (((size) + ((boundary) - 1)) & ~((boundary) - 1))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1910|  1.59k|        free(node);
 1911|  1.59k|    }
 1912|       |
 1913|  1.59k|    pool->stat_alloc = 0;
 1914|  1.59k|    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.59k|}
apr_pools.c:run_cleanups:
 2684|  3.18k|{
 2685|  3.18k|    cleanup_t *c = *cref;
 2686|       |
 2687|  5.31k|    while (c) {
  ------------------
  |  Branch (2687:12): [True: 2.12k, False: 3.18k]
  ------------------
 2688|  2.12k|        *cref = c->next;
 2689|  2.12k|        (*c->plain_cleanup_fn)((void *)c->data);
 2690|  2.12k|        c = *cref;
 2691|  2.12k|    }
 2692|  3.18k|}
apr_pools.c:free_proc_chain:
 2764|  1.59k|{
 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.59k|    struct process_chain *pc;
 2770|  1.59k|    int need_timeout = 0;
 2771|  1.59k|    apr_time_t timeout_interval;
 2772|       |
 2773|  1.59k|    if (!procs)
  ------------------
  |  Branch (2773:9): [True: 1.59k, False: 0]
  ------------------
 2774|  1.59k|        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|    531|{
 1502|    531|    if (mutex) {
  ------------------
  |  Branch (1502:9): [True: 0, False: 531]
  ------------------
 1503|      0|        apr_thread_mutex_unlock(mutex);
 1504|      0|    }
 1505|    531|}
apr_pools.c:pool_destroy_debug:
 1964|  1.59k|{
 1965|  1.59k|    pool_clear_debug(pool, file_line);
 1966|       |
 1967|       |    /* Remove the pool from the parent's child list */
 1968|  1.59k|    if (pool->parent != NULL
  ------------------
  |  Branch (1968:9): [True: 1.06k, False: 531]
  ------------------
 1969|  1.59k|        && (*pool->ref = pool->sibling) != NULL) {
  ------------------
  |  Branch (1969:12): [True: 0, False: 1.06k]
  ------------------
 1970|      0|        pool->sibling->ref = pool->ref;
 1971|      0|    }
 1972|       |
 1973|       |    /* Destroy the allocator if the pool owns it */
 1974|  1.59k|    if (pool->allocator != NULL
  ------------------
  |  Branch (1974:9): [True: 0, False: 1.59k]
  ------------------
 1975|  1.59k|        && 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.59k|    free(pool);
 1981|  1.59k|}
apr_pools.c:pool_lock:
 1474|  1.06k|{
 1475|  1.06k|#if APR_HAS_THREADS
 1476|  1.06k|    apr_thread_mutex_lock(pool->mutex);
 1477|  1.06k|#endif /* APR_HAS_THREADS */
 1478|  1.06k|}
apr_pools.c:pool_unlock:
 1482|  1.06k|{
 1483|  1.06k|#if APR_HAS_THREADS
 1484|  1.06k|    apr_thread_mutex_unlock(pool->mutex);
 1485|  1.06k|#endif /* APR_HAS_THREADS */
 1486|  1.06k|}

apr_vformatter:
  684|      3|{
  685|      3|    register char *sp;
  686|      3|    register char *bep;
  687|      3|    register int cc = 0;
  688|      3|    register apr_size_t i;
  689|       |
  690|      3|    register char *s = NULL;
  691|      3|    char *q;
  692|      3|    apr_size_t s_len = 0;
  693|       |
  694|      3|    register apr_size_t min_width = 0;
  695|      3|    apr_size_t precision = 0;
  696|      3|    enum {
  697|      3|        LEFT, RIGHT
  698|      3|    } adjust;
  699|      3|    char pad_char;
  700|      3|    char prefix_char;
  701|       |
  702|      3|    double fp_num;
  703|      3|    apr_int64_t i_quad = 0;
  704|      3|    apr_uint64_t ui_quad;
  705|      3|    apr_int32_t i_num = 0;
  706|      3|    apr_uint32_t ui_num = 0;
  707|       |
  708|      3|    char num_buf[NUM_BUF_SIZE];
  709|      3|    char char_buf[2];                /* for printing %% and %<unknown> */
  710|       |
  711|      3|    enum var_type_enum {
  712|      3|            IS_QUAD, IS_LONG, IS_SHORT, IS_INT
  713|      3|    };
  714|      3|    enum var_type_enum var_type = IS_INT;
  715|       |
  716|       |    /*
  717|       |     * Flag variables
  718|       |     */
  719|      3|    boolean_e alternate_form;
  720|      3|    boolean_e print_sign;
  721|      3|    boolean_e print_blank;
  722|      3|    boolean_e adjust_precision;
  723|      3|    boolean_e adjust_width;
  724|      3|    int is_negative;
  725|       |
  726|      3|    sp = vbuff->curpos;
  727|      3|    bep = vbuff->endpos;
  728|       |
  729|     27|    while (*fmt) {
  ------------------
  |  Branch (729:12): [True: 24, False: 3]
  ------------------
  730|     24|        if (*fmt != '%') {
  ------------------
  |  Branch (730:13): [True: 18, False: 6]
  ------------------
  731|     18|            INS_CHAR(*fmt, sp, bep, cc);
  ------------------
  |  |  244|     18|#define INS_CHAR(c, sp, bep, cc)                    \
  |  |  245|     18|{                                                   \
  |  |  246|     18|    if (sp) {                                       \
  |  |  ------------------
  |  |  |  Branch (246:9): [True: 18, False: 0]
  |  |  ------------------
  |  |  247|     18|        if (sp >= bep) {                            \
  |  |  ------------------
  |  |  |  Branch (247:13): [True: 0, False: 18]
  |  |  ------------------
  |  |  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|     18|        *sp++ = (c);                                \
  |  |  255|     18|    }                                               \
  |  |  256|     18|    cc++;                                           \
  |  |  257|     18|}
  ------------------
  732|     18|        }
  733|      6|        else {
  734|       |            /*
  735|       |             * Default variable settings
  736|       |             */
  737|      6|            boolean_e print_something = YES;
  738|      6|            adjust = RIGHT;
  739|      6|            alternate_form = print_sign = print_blank = NO;
  740|      6|            pad_char = ' ';
  741|      6|            prefix_char = NUL;
  ------------------
  |  |   55|      6|#define NUL '\0'
  ------------------
  742|       |
  743|      6|            fmt++;
  744|       |
  745|       |            /*
  746|       |             * Try to avoid checking for flags, width or precision
  747|       |             */
  748|      6|            if (!apr_islower(*fmt)) {
  ------------------
  |  |  213|      6|#define apr_islower(c) (islower(((unsigned char)(c))))
  ------------------
  |  Branch (748:17): [True: 0, False: 6]
  ------------------
  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)) {
  ------------------
  |  |  209|      0|#define apr_isdigit(c) (isdigit(((unsigned char)(c))))
  |  |  ------------------
  |  |  |  Branch (209: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))                       \
  |  |  ------------------
  |  |  |  |  209|      0|#define apr_isdigit(c) (isdigit(((unsigned char)(c))))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (209: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)) {
  ------------------
  |  |  209|      0|#define apr_isdigit(c) (isdigit(((unsigned char)(c))))
  |  |  ------------------
  |  |  |  Branch (209: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))                       \
  |  |  ------------------
  |  |  |  |  209|      0|#define apr_isdigit(c) (isdigit(((unsigned char)(c))))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (209: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|      6|            else
  809|      6|                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|      6|            if ((sizeof(APR_OFF_T_FMT) > sizeof(APR_INT64_T_FMT)) &&
  ------------------
  |  |  596|      6|#define APR_OFF_T_FMT "ld"
  ------------------
                          if ((sizeof(APR_OFF_T_FMT) > sizeof(APR_INT64_T_FMT)) &&
  ------------------
  |  |  602|      6|#define APR_INT64_T_FMT PRId64
  ------------------
  |  Branch (819:17): [Folded - Ignored]
  ------------------
  820|      6|                ((sizeof(APR_OFF_T_FMT) == 4 &&
  ------------------
  |  |  596|      0|#define APR_OFF_T_FMT "ld"
  ------------------
  |  Branch (820:19): [Folded - Ignored]
  ------------------
  821|      0|                 fmt[0] == APR_OFF_T_FMT[0] &&
  ------------------
  |  |  596|      0|#define APR_OFF_T_FMT "ld"
  ------------------
  |  Branch (821:18): [True: 0, False: 0]
  ------------------
  822|      0|                 fmt[1] == APR_OFF_T_FMT[1]) ||
  ------------------
  |  |  596|      0|#define APR_OFF_T_FMT "ld"
  ------------------
  |  Branch (822:18): [True: 0, False: 0]
  ------------------
  823|      0|                (sizeof(APR_OFF_T_FMT) == 3 &&
  ------------------
  |  |  596|      0|#define APR_OFF_T_FMT "ld"
  ------------------
  |  Branch (823:18): [Folded - Ignored]
  ------------------
  824|      0|                 fmt[0] == APR_OFF_T_FMT[0]) ||
  ------------------
  |  |  596|      0|#define APR_OFF_T_FMT "ld"
  ------------------
  |  Branch (824:18): [True: 0, False: 0]
  ------------------
  825|      0|                (sizeof(APR_OFF_T_FMT) > 4 &&
  ------------------
  |  |  596|      0|#define APR_OFF_T_FMT "ld"
  ------------------
  |  Branch (825:18): [Folded - Ignored]
  ------------------
  826|      0|                 strncmp(fmt, APR_OFF_T_FMT,
  ------------------
  |  |  596|      0|#define APR_OFF_T_FMT "ld"
  ------------------
  |  Branch (826:18): [True: 0, False: 0]
  ------------------
  827|      0|                         sizeof(APR_OFF_T_FMT) - 2) == 0))) {
  ------------------
  |  |  596|      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);
  ------------------
  |  |  596|      0|#define APR_OFF_T_FMT "ld"
  ------------------
  831|      0|            }
  832|      6|            else if ((sizeof(APR_INT64_T_FMT) == 4 &&
  ------------------
  |  |  602|      6|#define APR_INT64_T_FMT PRId64
  ------------------
  |  Branch (832:23): [Folded - Ignored]
  ------------------
  833|      6|                 fmt[0] == APR_INT64_T_FMT[0] &&
  ------------------
  |  |  602|      0|#define APR_INT64_T_FMT PRId64
  ------------------
  |  Branch (833:18): [True: 0, False: 0]
  ------------------
  834|      6|                 fmt[1] == APR_INT64_T_FMT[1]) ||
  ------------------
  |  |  602|      0|#define APR_INT64_T_FMT PRId64
  ------------------
  |  Branch (834:18): [True: 0, False: 0]
  ------------------
  835|      6|                (sizeof(APR_INT64_T_FMT) == 3 &&
  ------------------
  |  |  602|      6|#define APR_INT64_T_FMT PRId64
  ------------------
  |  Branch (835:18): [Folded - Ignored]
  ------------------
  836|      6|                 fmt[0] == APR_INT64_T_FMT[0]) ||
  ------------------
  |  |  602|      6|#define APR_INT64_T_FMT PRId64
  ------------------
  |  Branch (836:18): [True: 0, False: 6]
  ------------------
  837|      6|                (sizeof(APR_INT64_T_FMT) > 4 &&
  ------------------
  |  |  602|      0|#define APR_INT64_T_FMT PRId64
  ------------------
  |  Branch (837:18): [Folded - Ignored]
  ------------------
  838|      0|                 strncmp(fmt, APR_INT64_T_FMT,
  ------------------
  |  |  602|      0|#define APR_INT64_T_FMT PRId64
  ------------------
  |  Branch (838:18): [True: 0, False: 0]
  ------------------
  839|      0|                         sizeof(APR_INT64_T_FMT) - 2) == 0)) {
  ------------------
  |  |  602|      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);
  ------------------
  |  |  602|      0|#define APR_INT64_T_FMT PRId64
  ------------------
  843|      0|            }
  844|      6|            else if (*fmt == 'q') {
  ------------------
  |  Branch (844:22): [True: 0, False: 6]
  ------------------
  845|      0|                var_type = IS_QUAD;
  846|      0|                fmt++;
  847|      0|            }
  848|      6|            else if (*fmt == 'l') {
  ------------------
  |  Branch (848:22): [True: 0, False: 6]
  ------------------
  849|      0|                var_type = IS_LONG;
  850|      0|                fmt++;
  851|      0|            }
  852|      6|            else if (*fmt == 'h') {
  ------------------
  |  Branch (852:22): [True: 0, False: 6]
  ------------------
  853|      0|                var_type = IS_SHORT;
  854|      0|                fmt++;
  855|      0|            }
  856|      6|            else {
  857|      6|                var_type = IS_INT;
  858|      6|            }
  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|      6|            switch (*fmt) {
  872|      0|            case 'u':
  ------------------
  |  Branch (872:13): [True: 0, False: 6]
  ------------------
  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|      6|            case 'd':
  ------------------
  |  Branch (891:13): [True: 6, False: 0]
  ------------------
  892|      6|            case 'i':
  ------------------
  |  Branch (892:13): [True: 0, False: 6]
  ------------------
  893|      6|                if (var_type == IS_QUAD) {
  ------------------
  |  Branch (893:21): [True: 0, False: 6]
  ------------------
  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|      6|                else {
  899|      6|                    if (var_type == IS_LONG)
  ------------------
  |  Branch (899:25): [True: 0, False: 6]
  ------------------
  900|      0|                        i_num = va_arg(ap, apr_int32_t);
  901|      6|                    else if (var_type == IS_SHORT)
  ------------------
  |  Branch (901:30): [True: 0, False: 6]
  ------------------
  902|      0|                        i_num = (short) va_arg(ap, int);
  903|      6|                    else
  904|      6|                        i_num = va_arg(ap, int);
  905|      6|                    s = conv_10(i_num, 0, &is_negative,
  906|      6|                            &num_buf[NUM_BUF_SIZE], &s_len);
  ------------------
  |  |   69|      6|#define NUM_BUF_SIZE 512
  ------------------
  907|      6|                }
  908|      6|                FIX_PRECISION(adjust_precision, precision, s, s_len);
  ------------------
  |  |  280|      6|    if (adjust) {                                   \
  |  |  ------------------
  |  |  |  Branch (280:9): [True: 0, False: 6]
  |  |  ------------------
  |  |  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|      6|                if (is_negative)
  ------------------
  |  Branch (910:21): [True: 0, False: 6]
  ------------------
  911|      0|                    prefix_char = '-';
  912|      6|                else if (print_sign)
  ------------------
  |  Branch (912:26): [True: 0, False: 6]
  ------------------
  913|      0|                    prefix_char = '+';
  914|      6|                else if (print_blank)
  ------------------
  |  Branch (914:26): [True: 0, False: 6]
  ------------------
  915|      0|                    prefix_char = ' ';
  916|      6|                break;
  917|       |
  918|       |
  919|      0|            case 'o':
  ------------------
  |  Branch (919:13): [True: 0, False: 6]
  ------------------
  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: 6]
  ------------------
  944|      0|            case 'X':
  ------------------
  |  Branch (944:13): [True: 0, False: 6]
  ------------------
  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: 6]
  ------------------
  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: 6]
  ------------------
 1014|      0|            case 'e':
  ------------------
  |  Branch (1014:13): [True: 0, False: 6]
  ------------------
 1015|      0|            case 'E':
  ------------------
  |  Branch (1015:13): [True: 0, False: 6]
  ------------------
 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: 6]
  ------------------
 1048|      0|            case 'G':
  ------------------
  |  Branch (1048:13): [True: 0, False: 6]
  ------------------
 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: 6]
  ------------------
 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: 6]
  ------------------
 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: 6]
  ------------------
 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: 6]
  ------------------
 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|      0|                case 'T':
  ------------------
  |  Branch (1194:17): [True: 0, False: 0]
  ------------------
 1195|      0|#if APR_HAS_THREADS
 1196|      0|                {
 1197|      0|                    apr_os_thread_t *tid;
 1198|       |
 1199|      0|                    tid = va_arg(ap, apr_os_thread_t *);
 1200|      0|                    if (tid != NULL) {
  ------------------
  |  Branch (1200:25): [True: 0, False: 0]
  ------------------
 1201|      0|                        s = conv_os_thread_t(tid, &num_buf[NUM_BUF_SIZE], &s_len);
  ------------------
  |  |   69|      0|#define NUM_BUF_SIZE 512
  ------------------
 1202|      0|                        if (adjust_precision && precision < s_len)
  ------------------
  |  Branch (1202:29): [True: 0, False: 0]
  |  Branch (1202:49): [True: 0, False: 0]
  ------------------
 1203|      0|                            s_len = precision;
 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|       |#else
 1212|       |                    char_buf[0] = '0';
 1213|       |                    s = &char_buf[0];
 1214|       |                    s_len = 1;
 1215|       |                    pad_char = ' ';
 1216|       |#endif
 1217|      0|                    break;
 1218|       |
 1219|      0|                case 't':
  ------------------
  |  Branch (1219:17): [True: 0, False: 0]
  ------------------
 1220|      0|#if APR_HAS_THREADS
 1221|      0|                {
 1222|      0|                    apr_os_thread_t *tid;
 1223|       |
 1224|      0|                    tid = va_arg(ap, apr_os_thread_t *);
 1225|      0|                    if (tid != NULL) {
  ------------------
  |  Branch (1225:25): [True: 0, False: 0]
  ------------------
 1226|      0|                        s = conv_os_thread_t_hex(tid, &num_buf[NUM_BUF_SIZE], &s_len);
  ------------------
  |  |   69|      0|#define NUM_BUF_SIZE 512
  ------------------
 1227|      0|                        if (adjust_precision && precision < s_len)
  ------------------
  |  Branch (1227:29): [True: 0, False: 0]
  |  Branch (1227:49): [True: 0, False: 0]
  ------------------
 1228|      0|                            s_len = precision;
 1229|      0|                    }
 1230|      0|                    else {
 1231|      0|                        s = S_NULL;
  ------------------
  |  |   58|      0|#define S_NULL ((char *)null_string)
  ------------------
 1232|      0|                        s_len = S_NULL_LEN;
  ------------------
  |  |   59|      0|#define S_NULL_LEN 6
  ------------------
 1233|      0|                    }
 1234|      0|                    pad_char = ' ';
 1235|      0|                }
 1236|       |#else
 1237|       |                    char_buf[0] = '0';
 1238|       |                    s = &char_buf[0];
 1239|       |                    s_len = 1;
 1240|       |                    pad_char = ' ';
 1241|       |#endif
 1242|      0|                    break;
 1243|       |
 1244|      0|                case 'B':
  ------------------
  |  Branch (1244:17): [True: 0, False: 0]
  ------------------
 1245|      0|                case 'F':
  ------------------
  |  Branch (1245:17): [True: 0, False: 0]
  ------------------
 1246|      0|                case 'S':
  ------------------
  |  Branch (1246:17): [True: 0, False: 0]
  ------------------
 1247|      0|                {
 1248|      0|                    char buf[5];
 1249|      0|                    apr_off_t size = 0;
 1250|       |
 1251|      0|                    if (*fmt == 'B') {
  ------------------
  |  Branch (1251:25): [True: 0, False: 0]
  ------------------
 1252|      0|                        apr_uint32_t *arg = va_arg(ap, apr_uint32_t *);
 1253|      0|                        size = (arg) ? *arg : 0;
  ------------------
  |  Branch (1253:32): [True: 0, False: 0]
  ------------------
 1254|      0|                    }
 1255|      0|                    else if (*fmt == 'F') {
  ------------------
  |  Branch (1255:30): [True: 0, False: 0]
  ------------------
 1256|      0|                        apr_off_t *arg = va_arg(ap, apr_off_t *);
 1257|      0|                        size = (arg) ? *arg : 0;
  ------------------
  |  Branch (1257:32): [True: 0, False: 0]
  ------------------
 1258|      0|                    }
 1259|      0|                    else {
 1260|      0|                        apr_size_t *arg = va_arg(ap, apr_size_t *);
 1261|      0|                        size = (arg) ? *arg : 0;
  ------------------
  |  Branch (1261:32): [True: 0, False: 0]
  ------------------
 1262|      0|                    }
 1263|       |
 1264|      0|                    s = apr_strfsize(size, buf);
 1265|      0|                    s_len = strlen(s);
 1266|      0|                    pad_char = ' ';
 1267|      0|                }
 1268|      0|                break;
 1269|       |
 1270|      0|                case NUL:
  ------------------
  |  |   55|      0|#define NUL '\0'
  ------------------
  |  Branch (1270:17): [True: 0, False: 0]
  ------------------
 1271|       |                    /* if %p ends the string, oh well ignore it */
 1272|      0|                    continue;
 1273|       |
 1274|      0|                default:
  ------------------
  |  Branch (1274:17): [True: 0, False: 0]
  ------------------
 1275|      0|                    s = "bogus %p";
 1276|      0|                    s_len = 8;
 1277|      0|                    prefix_char = NUL;
  ------------------
  |  |   55|      0|#define NUL '\0'
  ------------------
 1278|      0|                    (void)va_arg(ap, void *); /* skip the bogus argument on the stack */
 1279|      0|                    break;
 1280|      0|                }
 1281|      0|                break;
 1282|       |
 1283|      0|            case NUL:
  ------------------
  |  |   55|      0|#define NUL '\0'
  ------------------
  |  Branch (1283:13): [True: 0, False: 6]
  ------------------
 1284|       |                /*
 1285|       |                 * The last character of the format string was %.
 1286|       |                 * We ignore it.
 1287|       |                 */
 1288|      0|                continue;
 1289|       |
 1290|       |
 1291|       |                /*
 1292|       |                 * The default case is for unrecognized %'s.
 1293|       |                 * We print %<char> to help the user identify what
 1294|       |                 * option is not understood.
 1295|       |                 * This is also useful in case the user wants to pass
 1296|       |                 * the output of format_converter to another function
 1297|       |                 * that understands some other %<char> (like syslog).
 1298|       |                 * Note that we can't point s inside fmt because the
 1299|       |                 * unknown <char> could be preceded by width etc.
 1300|       |                 */
 1301|      0|            default:
  ------------------
  |  Branch (1301:13): [True: 0, False: 6]
  ------------------
 1302|      0|                char_buf[0] = '%';
 1303|      0|                char_buf[1] = *fmt;
 1304|      0|                s = char_buf;
 1305|      0|                s_len = 2;
 1306|      0|                pad_char = ' ';
 1307|      0|                break;
 1308|      6|            }
 1309|       |
 1310|      6|            if (prefix_char != NUL && s != S_NULL && s != char_buf) {
  ------------------
  |  |   55|     12|#define NUL '\0'
  ------------------
                          if (prefix_char != NUL && s != S_NULL && s != char_buf) {
  ------------------
  |  |   58|      6|#define S_NULL ((char *)null_string)
  ------------------
  |  Branch (1310:17): [True: 0, False: 6]
  |  Branch (1310:39): [True: 0, False: 0]
  |  Branch (1310:54): [True: 0, False: 0]
  ------------------
 1311|      0|                *--s = prefix_char;
 1312|      0|                s_len++;
 1313|      0|            }
 1314|       |
 1315|      6|            if (adjust_width && adjust == RIGHT && min_width > s_len) {
  ------------------
  |  Branch (1315:17): [True: 0, False: 6]
  |  Branch (1315:33): [True: 0, False: 0]
  |  Branch (1315:52): [True: 0, False: 0]
  ------------------
 1316|      0|                if (pad_char == '0' && prefix_char != NUL) {
  ------------------
  |  |   55|      0|#define NUL '\0'
  ------------------
  |  Branch (1316:21): [True: 0, False: 0]
  |  Branch (1316:40): [True: 0, False: 0]
  ------------------
 1317|      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|}
  ------------------
 1318|      0|                    s++;
 1319|      0|                    s_len--;
 1320|      0|                    min_width--;
 1321|      0|                }
 1322|      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]
  |  |  ------------------
  ------------------
 1323|      0|            }
 1324|       |
 1325|       |            /*
 1326|       |             * Print the string s.
 1327|       |             */
 1328|      6|            if (print_something == YES) {
  ------------------
  |  Branch (1328:17): [True: 6, False: 0]
  ------------------
 1329|     12|                for (i = s_len; i != 0; i--) {
  ------------------
  |  Branch (1329:33): [True: 6, False: 6]
  ------------------
 1330|      6|                    INS_CHAR(*s, sp, bep, cc);
  ------------------
  |  |  244|      6|#define INS_CHAR(c, sp, bep, cc)                    \
  |  |  245|      6|{                                                   \
  |  |  246|      6|    if (sp) {                                       \
  |  |  ------------------
  |  |  |  Branch (246:9): [True: 6, False: 0]
  |  |  ------------------
  |  |  247|      6|        if (sp >= bep) {                            \
  |  |  ------------------
  |  |  |  Branch (247:13): [True: 0, False: 6]
  |  |  ------------------
  |  |  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|      6|        *sp++ = (c);                                \
  |  |  255|      6|    }                                               \
  |  |  256|      6|    cc++;                                           \
  |  |  257|      6|}
  ------------------
 1331|      6|                    s++;
 1332|      6|                }
 1333|      6|            }
 1334|       |
 1335|      6|            if (adjust_width && adjust == LEFT && min_width > s_len)
  ------------------
  |  Branch (1335:17): [True: 0, False: 6]
  |  Branch (1335:33): [True: 0, False: 0]
  |  Branch (1335:51): [True: 0, False: 0]
  ------------------
 1336|      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]
  |  |  ------------------
  ------------------
 1337|      6|        }
 1338|     24|        fmt++;
 1339|     24|    }
 1340|      3|    vbuff->curpos = sp;
 1341|       |
 1342|      3|    return cc;
 1343|      3|}
apr_snprintf.c:conv_10:
  332|      6|{
  333|      6|    register char *p = buf_end;
  334|      6|    register apr_uint32_t magnitude = num;
  335|       |
  336|      6|    if (is_unsigned) {
  ------------------
  |  Branch (336:9): [True: 0, False: 6]
  ------------------
  337|      0|        *is_negative = FALSE;
  ------------------
  |  |   51|      0|#define FALSE 0
  ------------------
  338|      0|    }
  339|      6|    else {
  340|      6|        *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|      6|        if (*is_negative) {
  ------------------
  |  Branch (351:13): [True: 0, False: 6]
  ------------------
  352|      0|            apr_int32_t t = num + 1;
  353|      0|            magnitude = ((apr_uint32_t) -t) + 1;
  354|      0|        }
  355|      6|    }
  356|       |
  357|       |    /*
  358|       |     * We use a do-while loop so that we write at least 1 digit
  359|       |     */
  360|      6|    do {
  361|      6|        register apr_uint32_t new_magnitude = magnitude / 10;
  362|       |
  363|      6|        *--p = (char) (magnitude - new_magnitude * 10 + '0');
  364|      6|        magnitude = new_magnitude;
  365|      6|    }
  366|      6|    while (magnitude);
  ------------------
  |  Branch (366:12): [True: 0, False: 6]
  ------------------
  367|       |
  368|      6|    *len = buf_end - p;
  369|      6|    return (p);
  370|      6|}

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

apr_hash_make:
   97|    531|{
   98|    531|    apr_hash_t *ht;
   99|    531|    apr_time_t now = apr_time_now();
  100|       |
  101|    531|    ht = apr_palloc(pool, sizeof(apr_hash_t));
  ------------------
  |  |  425|    531|    apr_palloc_debug(p, size, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|    531|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  153|    531|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  155|    531|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  102|    531|    ht->pool = pool;
  103|    531|    ht->free = NULL;
  104|    531|    ht->count = 0;
  105|    531|    ht->max = INITIAL_MAX;
  ------------------
  |  |   84|    531|#define INITIAL_MAX 15 /* tunable == 2^n - 1 */
  ------------------
  106|    531|    ht->seed = (unsigned int)((now >> 32) ^ now ^ (apr_uintptr_t)pool ^
  107|    531|                              (apr_uintptr_t)ht ^ (apr_uintptr_t)&now) - 1;
  108|    531|    ht->array = alloc_array(ht, ht->max);
  109|    531|    ht->hash_func = NULL;
  110|       |
  111|    531|    return ht;
  112|    531|}
apr_hash_next:
  128|  9.02k|{
  129|  9.02k|    hi->this = hi->next;
  130|  17.5k|    while (!hi->this) {
  ------------------
  |  Branch (130:12): [True: 9.02k, False: 8.49k]
  ------------------
  131|  9.02k|        if (hi->index > hi->ht->max)
  ------------------
  |  Branch (131:13): [True: 531, False: 8.49k]
  ------------------
  132|    531|            return NULL;
  133|       |
  134|  8.49k|        hi->this = hi->ht->array[hi->index++];
  135|  8.49k|    }
  136|  8.49k|    hi->next = hi->this->next;
  137|  8.49k|    return hi;
  138|  9.02k|}
apr_hash_first:
  141|    531|{
  142|    531|    apr_hash_index_t *hi;
  143|    531|    if (p)
  ------------------
  |  Branch (143:9): [True: 0, False: 531]
  ------------------
  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__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  153|      0|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  155|      0|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  145|    531|    else
  146|    531|        hi = &ht->iterator;
  147|       |
  148|    531|    hi->ht = ht;
  149|    531|    hi->index = 0;
  150|    531|    hi->this = NULL;
  151|    531|    hi->next = NULL;
  152|    531|    return apr_hash_next(hi);
  153|    531|}
apr_hash_get:
  365|    373|{
  366|    373|    apr_hash_entry_t *he;
  367|    373|    he = *find_entry(ht, key, klen, NULL);
  368|    373|    if (he)
  ------------------
  |  Branch (368:9): [True: 64, False: 309]
  ------------------
  369|     64|        return (void *)he->val;
  370|    309|    else
  371|    309|        return NULL;
  372|    373|}
apr_hash_set:
  378|  14.3k|{
  379|  14.3k|    apr_hash_entry_t **hep;
  380|  14.3k|    hep = find_entry(ht, key, klen, val);
  381|  14.3k|    if (*hep) {
  ------------------
  |  Branch (381:9): [True: 14.3k, False: 0]
  ------------------
  382|  14.3k|        if (!val) {
  ------------------
  |  Branch (382:13): [True: 0, False: 14.3k]
  ------------------
  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|  14.3k|        else {
  391|       |            /* replace entry */
  392|  14.3k|            (*hep)->val = val;
  393|       |            /* check that the collision rate isn't too high */
  394|  14.3k|            if (ht->count > ht->max) {
  ------------------
  |  Branch (394:17): [True: 531, False: 13.8k]
  ------------------
  395|    531|                expand_array(ht);
  396|    531|            }
  397|  14.3k|        }
  398|  14.3k|    }
  399|       |    /* else key not present and val==NULL */
  400|  14.3k|}
apr_hash.c:alloc_array:
   92|  1.06k|{
   93|  1.06k|   return apr_pcalloc(ht->pool, sizeof(*ht->array) * (max + 1));
  ------------------
  |  |  454|  1.06k|    apr_pcalloc_debug(p, size, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|  1.06k|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  153|  1.06k|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  155|  1.06k|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   94|  1.06k|}
apr_hash.c:hashfunc_default:
  212|  14.7k|{
  213|  14.7k|    const unsigned char *key = (const unsigned char *)char_key;
  214|  14.7k|    const unsigned char *p;
  215|  14.7k|    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|  14.7k|    if (*klen == APR_HASH_KEY_STRING) {
  ------------------
  |  |   47|  14.7k|#define APR_HASH_KEY_STRING     (-1)
  ------------------
  |  Branch (255:9): [True: 14.3k, False: 373]
  ------------------
  256|   111k|        for (p = key; *p; p++) {
  ------------------
  |  Branch (256:23): [True: 97.1k, False: 14.3k]
  ------------------
  257|  97.1k|            hash = hash * 33 + *p;
  258|  97.1k|        }
  259|  14.3k|        *klen = p - key;
  260|  14.3k|    }
  261|    373|    else {
  262|  2.28k|        for (p = key, i = *klen; i; i--, p++) {
  ------------------
  |  Branch (262:34): [True: 1.91k, False: 373]
  ------------------
  263|  1.91k|            hash = hash * 33 + *p;
  264|  1.91k|        }
  265|    373|    }
  266|       |
  267|  14.7k|    return hash;
  268|  14.7k|}
apr_hash.c:find_entry:
  289|  14.7k|{
  290|  14.7k|    apr_hash_entry_t **hep, *he;
  291|  14.7k|    unsigned int hash;
  292|       |
  293|  14.7k|    if (ht->hash_func)
  ------------------
  |  Branch (293:9): [True: 0, False: 14.7k]
  ------------------
  294|      0|        hash = ht->hash_func(key, &klen);
  295|  14.7k|    else
  296|  14.7k|        hash = hashfunc_default(key, &klen, ht->seed);
  297|       |
  298|       |    /* scan linked list */
  299|  14.7k|    for (hep = &ht->array[hash & ht->max], he = *hep;
  300|  20.3k|         he; hep = &he->next, he = *hep) {
  ------------------
  |  Branch (300:10): [True: 5.73k, False: 14.6k]
  ------------------
  301|  5.73k|        if (he->hash == hash
  ------------------
  |  Branch (301:13): [True: 101, False: 5.63k]
  ------------------
  302|  5.73k|            && he->klen == klen
  ------------------
  |  Branch (302:16): [True: 101, False: 0]
  ------------------
  303|  5.73k|            && memcmp(he->key, key, klen) == 0)
  ------------------
  |  Branch (303:16): [True: 64, False: 37]
  ------------------
  304|     64|            break;
  305|  5.73k|    }
  306|  14.7k|    if (he || !val)
  ------------------
  |  Branch (306:9): [True: 64, False: 14.6k]
  |  Branch (306:15): [True: 309, False: 14.3k]
  ------------------
  307|    373|        return hep;
  308|       |
  309|       |    /* add a new entry for non-NULL values */
  310|  14.3k|    if ((he = ht->free) != NULL)
  ------------------
  |  Branch (310:9): [True: 0, False: 14.3k]
  ------------------
  311|      0|        ht->free = he->next;
  312|  14.3k|    else
  313|  14.3k|        he = apr_palloc(ht->pool, sizeof(*he));
  ------------------
  |  |  425|  14.3k|    apr_palloc_debug(p, size, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|  14.3k|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  153|  14.3k|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  155|  14.3k|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  314|  14.3k|    he->next = NULL;
  315|  14.3k|    he->hash = hash;
  316|  14.3k|    he->key  = key;
  317|  14.3k|    he->klen = klen;
  318|  14.3k|    he->val  = val;
  319|  14.3k|    *hep = he;
  320|  14.3k|    ht->count++;
  321|  14.3k|    return hep;
  322|  14.7k|}
apr_hash.c:expand_array:
  194|    531|{
  195|    531|    apr_hash_index_t *hi;
  196|    531|    apr_hash_entry_t **new_array;
  197|    531|    unsigned int new_max;
  198|       |
  199|    531|    new_max = ht->max * 2 + 1;
  200|    531|    new_array = alloc_array(ht, new_max);
  201|  9.02k|    for (hi = apr_hash_first(NULL, ht); hi; hi = apr_hash_next(hi)) {
  ------------------
  |  Branch (201:41): [True: 8.49k, False: 531]
  ------------------
  202|  8.49k|        unsigned int i = hi->this->hash & new_max;
  203|  8.49k|        hi->this->next = new_array[i];
  204|  8.49k|        new_array[i] = hi->this;
  205|  8.49k|    }
  206|    531|    ht->array = new_array;
  207|    531|    ht->max = new_max;
  208|    531|}

apr_array_make:
   85|    535|{
   86|    535|    apr_array_header_t *res;
   87|       |
   88|    535|    res = (apr_array_header_t *) apr_palloc(p, sizeof(apr_array_header_t));
  ------------------
  |  |  425|    535|    apr_palloc_debug(p, size, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|    535|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  153|    535|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  155|    535|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   89|    535|    make_array_core(res, p, nelts, elt_size, 1);
   90|    535|    return res;
   91|    535|}
apr_array_push:
  108|      4|{
  109|      4|    if (arr->nelts == arr->nalloc) {
  ------------------
  |  Branch (109:9): [True: 0, False: 4]
  ------------------
  110|      0|        int new_size = (arr->nalloc <= 0) ? 1 : arr->nalloc * 2;
  ------------------
  |  Branch (110:24): [True: 0, False: 0]
  ------------------
  111|      0|        char *new_data;
  112|       |
  113|      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__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  153|      0|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  155|      0|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  114|       |
  115|      0|        memcpy(new_data, arr->elts, arr->nalloc * arr->elt_size);
  116|      0|        memset(new_data + arr->nalloc * arr->elt_size, 0,
  117|      0|               arr->elt_size * (new_size - arr->nalloc));
  118|      0|        arr->elts = new_data;
  119|      0|        arr->nalloc = new_size;
  120|      0|    }
  121|       |
  122|      4|    ++arr->nelts;
  123|      4|    return arr->elts + (arr->elt_size * (arr->nelts - 1));
  124|      4|}
apr_table_make:
  401|  3.71k|{
  402|  3.71k|    apr_table_t *t = apr_palloc(p, sizeof(apr_table_t));
  ------------------
  |  |  425|  3.71k|    apr_palloc_debug(p, size, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|  3.71k|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  153|  3.71k|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  155|  3.71k|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  403|       |
  404|  3.71k|    make_array_core(&t->a, p, nelts, sizeof(apr_table_entry_t), 0);
  405|       |#ifdef MAKE_TABLE_PROFILE
  406|       |    t->creator = __builtin_return_address(0);
  407|       |#endif
  408|  3.71k|    t->index_initialized = 0;
  409|  3.71k|    return t;
  410|  3.71k|}
apr_tables.c:make_array_core:
   56|  4.25k|{
   57|       |    /*
   58|       |     * Assure sanity if someone asks for
   59|       |     * array of zero elts.
   60|       |     */
   61|  4.25k|    if (nelts < 1) {
  ------------------
  |  Branch (61:9): [True: 0, False: 4.25k]
  ------------------
   62|      0|        nelts = 1;
   63|      0|    }
   64|       |
   65|  4.25k|    if (clear) {
  ------------------
  |  Branch (65:9): [True: 535, False: 3.71k]
  ------------------
   66|    535|        res->elts = apr_pcalloc(p, nelts * elt_size);
  ------------------
  |  |  454|    535|    apr_pcalloc_debug(p, size, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|    535|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  153|    535|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  155|    535|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   67|    535|    }
   68|  3.71k|    else {
   69|  3.71k|        res->elts = apr_palloc(p, nelts * elt_size);
  ------------------
  |  |  425|  3.71k|    apr_palloc_debug(p, size, APR_POOL__FILE_LINE__)
  |  |  ------------------
  |  |  |  |  143|  3.71k|#define APR_POOL__FILE_LINE__ __FILE__ ":" APR_STRINGIFY(__LINE__)
  |  |  |  |  ------------------
  |  |  |  |  |  |  153|  3.71k|#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  155|  3.71k|#define APR_STRINGIFY_HELPER(n) #n
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   70|  3.71k|    }
   71|       |
   72|  4.25k|    res->pool = p;
   73|  4.25k|    res->elt_size = elt_size;
   74|  4.25k|    res->nelts = 0;		/* No active elements yet... */
   75|  4.25k|    res->nalloc = nelts;	/* ...but this many allocated */
   76|  4.25k|}

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

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

apr_uri_port_of_scheme:
   74|     95|{
   75|     95|    schemes_t *scheme;
   76|       |
   77|     95|    if (scheme_str) {
  ------------------
  |  Branch (77:9): [True: 95, False: 0]
  ------------------
   78|  1.79k|        for (scheme = schemes; scheme->name != NULL; ++scheme) {
  ------------------
  |  Branch (78:32): [True: 1.71k, False: 82]
  ------------------
   79|  1.71k|            if (strcasecmp(scheme_str, scheme->name) == 0) {
  ------------------
  |  Branch (79:17): [True: 13, False: 1.70k]
  ------------------
   80|     13|                return scheme->default_port;
   81|     13|            }
   82|  1.71k|        }
   83|     95|    }
   84|     82|    return 0;
   85|     95|}
apr_uri_parse:
  724|    339|{
  725|    339|    const char *s;
  726|    339|    const char *s1;
  727|    339|    const char *hostinfo;
  728|    339|    char *endstr;
  729|    339|    int port;
  730|    339|    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|    339|    memset (uptr, '\0', sizeof(*uptr));
  736|    339|    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|    339|    if (uri[0] == '/') {
  ------------------
  |  Branch (742:9): [True: 25, False: 314]
  ------------------
  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|     25|        if (uri[1] == '/' && uri[2] != '/') {
  ------------------
  |  Branch (752:13): [True: 0, False: 25]
  |  Branch (752:30): [True: 0, False: 0]
  ------------------
  753|      0|            s = uri + 2 ;
  754|      0|            goto deal_with_authority ;
  755|      0|        }
  756|       |
  757|    288|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|    288|        s = uri;
  762|  3.44k|        while ((uri_delims[*(unsigned char *)s] & NOTEND_PATH) == 0) {
  ------------------
  |  |  712|  3.44k|#define NOTEND_PATH       (T_QUESTION | T_HASH | T_NUL)
  |  |  ------------------
  |  |  |  |  174|  3.44k|#define T_QUESTION        0x02        /* '?' */
  |  |  ------------------
  |  |               #define NOTEND_PATH       (T_QUESTION | T_HASH | T_NUL)
  |  |  ------------------
  |  |  |  |  175|  3.44k|#define T_HASH            0x04        /* '#' */
  |  |  ------------------
  |  |               #define NOTEND_PATH       (T_QUESTION | T_HASH | T_NUL)
  |  |  ------------------
  |  |  |  |  180|  3.44k|#define T_NUL             0x80        /* '\0' */
  |  |  ------------------
  ------------------
  |  Branch (762:16): [True: 3.15k, False: 288]
  ------------------
  763|  3.15k|            ++s;
  764|  3.15k|        }
  765|    288|        if (s != uri) {
  ------------------
  |  Branch (765:13): [True: 194, False: 94]
  ------------------
  766|    194|            uptr->path = apr_pstrmemdup(p, uri, s - uri);
  767|    194|        }
  768|    288|        if (*s == 0) {
  ------------------
  |  Branch (768:13): [True: 179, False: 109]
  ------------------
  769|    179|            return APR_SUCCESS;
  ------------------
  |  |  225|    179|#define APR_SUCCESS 0
  ------------------
  770|    179|        }
  771|    109|        if (*s == '?') {
  ------------------
  |  Branch (771:13): [True: 46, False: 63]
  ------------------
  772|     46|            ++s;
  773|     46|            s1 = strchr(s, '#');
  774|     46|            if (s1) {
  ------------------
  |  Branch (774:17): [True: 21, False: 25]
  ------------------
  775|     21|                uptr->fragment = apr_pstrdup(p, s1 + 1);
  776|     21|                uptr->query = apr_pstrmemdup(p, s, s1 - s);
  777|     21|            }
  778|     25|            else {
  779|     25|                uptr->query = apr_pstrdup(p, s);
  780|     25|            }
  781|     46|            return APR_SUCCESS;
  ------------------
  |  |  225|     46|#define APR_SUCCESS 0
  ------------------
  782|     46|        }
  783|       |        /* otherwise it's a fragment */
  784|     63|        uptr->fragment = apr_pstrdup(p, s + 1);
  785|     63|        return APR_SUCCESS;
  ------------------
  |  |  225|     63|#define APR_SUCCESS 0
  ------------------
  786|    109|    }
  787|       |
  788|       |    /* find the scheme: */
  789|    314|    s = uri;
  790|       |    /* first char must be letter */
  791|    314|    if (uri_delims[*(unsigned char *)s] & T_ALPHA) {
  ------------------
  |  |  176|    314|#define T_ALPHA           0x08        /* 'A' ... 'Z', 'a' ... 'z' */
  ------------------
  |  Branch (791:9): [True: 258, False: 56]
  ------------------
  792|    258|        ++s;
  793|  2.42k|        while ((uri_delims[*(unsigned char *)s] & (T_ALPHA|T_SCHEME)))
  ------------------
  |  |  176|  2.42k|#define T_ALPHA           0x08        /* 'A' ... 'Z', 'a' ... 'z' */
  ------------------
                      while ((uri_delims[*(unsigned char *)s] & (T_ALPHA|T_SCHEME)))
  ------------------
  |  |  177|  2.42k|#define T_SCHEME          0x10        /* '0' ... '9', '-', '+', '.'
  ------------------
  |  Branch (793:16): [True: 2.17k, False: 258]
  ------------------
  794|  2.17k|            ++s;
  795|    258|    }
  796|       |    /* scheme must be non-empty and followed by : */
  797|    314|    if (s != uri && s[0] == ':') {
  ------------------
  |  Branch (797:9): [True: 258, False: 56]
  |  Branch (797:21): [True: 197, False: 61]
  ------------------
  798|    197|        uptr->scheme = apr_pstrmemdup(p, uri, s - uri);
  799|    197|        s++;
  800|    197|    }
  801|    117|    else {
  802|       |        /* No valid scheme, restart from the beginning */
  803|    117|        s = uri;
  804|    117|    }
  805|       |
  806|    314|    if (s[0] != '/' || s[1] != '/') {
  ------------------
  |  Branch (806:9): [True: 138, False: 176]
  |  Branch (806:24): [True: 25, False: 151]
  ------------------
  807|    163|        if (uri == s) {
  ------------------
  |  Branch (807:13): [True: 117, False: 46]
  ------------------
  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|    117|            char *first_slash = strchr(uri, '/');
  813|    117|            if (first_slash) {
  ------------------
  |  Branch (813:17): [True: 41, False: 76]
  ------------------
  814|    521|                while (s < first_slash) {
  ------------------
  |  Branch (814:24): [True: 505, False: 16]
  ------------------
  815|    505|                    if (s[0] == ':')
  ------------------
  |  Branch (815:25): [True: 25, False: 480]
  ------------------
  816|     25|                        return APR_EGENERAL;
  ------------------
  |  |  313|     25|#define APR_EGENERAL       (APR_OS_START_ERROR + 14)
  |  |  ------------------
  |  |  |  |  117|     25|#define APR_OS_START_ERROR     20000
  |  |  ------------------
  ------------------
  817|    480|                    ++s;
  818|    480|                }
  819|       |                /* no scheme but relative path, e.g. '../image.jpg' */
  820|     41|            }
  821|     76|            else {
  822|     76|                if (strchr(uri, ':') != NULL)
  ------------------
  |  Branch (822:21): [True: 12, False: 64]
  ------------------
  823|     12|                    return APR_EGENERAL;
  ------------------
  |  |  313|     12|#define APR_EGENERAL       (APR_OS_START_ERROR + 14)
  |  |  ------------------
  |  |  |  |  117|     12|#define APR_OS_START_ERROR     20000
  |  |  ------------------
  ------------------
  824|       |                /* no scheme, no slash, but relative path, e.g. 'image.jpg' */
  825|     76|            }
  826|     80|            goto deal_with_path;
  827|    117|        }
  828|       |        /* scheme and relative path */
  829|     46|        uri = s;
  830|     46|        goto deal_with_path;
  831|    163|    }
  832|       |
  833|    151|    s += 2;
  834|       |
  835|    151|deal_with_authority:
  836|    151|    hostinfo = s;
  837|  2.08k|    while ((uri_delims[*(unsigned char *)s] & NOTEND_HOSTINFO) == 0) {
  ------------------
  |  |  711|  2.08k|#define NOTEND_HOSTINFO   (T_SLASH | T_QUESTION | T_HASH | T_NUL)
  |  |  ------------------
  |  |  |  |  173|  2.08k|#define T_SLASH           0x01        /* '/' */
  |  |  ------------------
  |  |               #define NOTEND_HOSTINFO   (T_SLASH | T_QUESTION | T_HASH | T_NUL)
  |  |  ------------------
  |  |  |  |  174|  2.08k|#define T_QUESTION        0x02        /* '?' */
  |  |  ------------------
  |  |               #define NOTEND_HOSTINFO   (T_SLASH | T_QUESTION | T_HASH | T_NUL)
  |  |  ------------------
  |  |  |  |  175|  2.08k|#define T_HASH            0x04        /* '#' */
  |  |  ------------------
  |  |               #define NOTEND_HOSTINFO   (T_SLASH | T_QUESTION | T_HASH | T_NUL)
  |  |  ------------------
  |  |  |  |  180|  2.08k|#define T_NUL             0x80        /* '\0' */
  |  |  ------------------
  ------------------
  |  Branch (837:12): [True: 1.93k, False: 151]
  ------------------
  838|  1.93k|        ++s;
  839|  1.93k|    }
  840|    151|    uri = s;        /* whatever follows hostinfo is start of uri */
  841|    151|    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.54k|    do {
  849|  1.54k|        --s;
  850|  1.54k|    } while (s >= hostinfo && *s != '@');
  ------------------
  |  Branch (850:14): [True: 1.45k, False: 89]
  |  Branch (850:31): [True: 1.39k, False: 62]
  ------------------
  851|    151|    if (s < hostinfo) {
  ------------------
  |  Branch (851:9): [True: 89, False: 62]
  ------------------
  852|       |        /* again we want the common case to be fall through */
  853|    151|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|    151|        if (*hostinfo == '[') {
  ------------------
  |  Branch (858:13): [True: 19, False: 132]
  ------------------
  859|     19|            v6_offset1 = 1;
  860|     19|            v6_offset2 = 2;
  861|     19|            s = memchr(hostinfo, ']', uri - hostinfo);
  862|     19|            if (s == NULL) {
  ------------------
  |  Branch (862:17): [True: 1, False: 18]
  ------------------
  863|      1|                return APR_EGENERAL;
  ------------------
  |  |  313|      1|#define APR_EGENERAL       (APR_OS_START_ERROR + 14)
  |  |  ------------------
  |  |  |  |  117|      1|#define APR_OS_START_ERROR     20000
  |  |  ------------------
  ------------------
  864|      1|            }
  865|     18|            if (*++s != ':') {
  ------------------
  |  Branch (865:17): [True: 14, False: 4]
  ------------------
  866|     14|                s = NULL; /* no port */
  867|     14|            }
  868|     18|        }
  869|    132|        else {
  870|    132|            s = memchr(hostinfo, ':', uri - hostinfo);
  871|    132|        }
  872|    150|        if (s == NULL) {
  ------------------
  |  Branch (872:13): [True: 40, False: 110]
  ------------------
  873|       |            /* we expect the common case to have no port */
  874|     40|            uptr->hostname = apr_pstrmemdup(p,
  875|     40|                                            hostinfo + v6_offset1,
  876|     40|                                            uri - hostinfo - v6_offset2);
  877|     40|            goto deal_with_path;
  878|     40|        }
  879|    110|        uptr->hostname = apr_pstrmemdup(p,
  880|    110|                                        hostinfo + v6_offset1,
  881|    110|                                        s - hostinfo - v6_offset2);
  882|    110|        ++s;
  883|    110|        uptr->port_str = apr_pstrmemdup(p, s, uri - s);
  884|    110|        if (uri != s) {
  ------------------
  |  Branch (884:13): [True: 15, False: 95]
  ------------------
  885|     15|            port = strtol(uptr->port_str, &endstr, 10);
  886|     15|            uptr->port = port;
  887|     15|            if (*endstr == '\0') {
  ------------------
  |  Branch (887:17): [True: 2, False: 13]
  ------------------
  888|      2|                goto deal_with_path;
  889|      2|            }
  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|     15|        }
  893|     95|        uptr->port = apr_uri_port_of_scheme(uptr->scheme);
  894|     95|        goto deal_with_path;
  895|    110|    }
  896|       |
  897|       |    /* first colon delimits username:password */
  898|     62|    s1 = memchr(hostinfo, ':', s - hostinfo);
  899|     62|    if (s1) {
  ------------------
  |  Branch (899:9): [True: 34, False: 28]
  ------------------
  900|     34|        uptr->user = apr_pstrmemdup(p, hostinfo, s1 - hostinfo);
  901|     34|        ++s1;
  902|     34|        uptr->password = apr_pstrmemdup(p, s1, s - s1);
  903|     34|    }
  904|     28|    else {
  905|     28|        uptr->user = apr_pstrmemdup(p, hostinfo, s - hostinfo);
  906|     28|    }
  907|     62|    hostinfo = s + 1;
  908|     62|    goto deal_with_host;
  909|    151|}
apr_uri_parse_hostinfo:
  919|     34|{
  920|     34|    const char *s;
  921|     34|    char *endstr;
  922|     34|    const char *rsb;
  923|     34|    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|     34|    memset(uptr, '\0', sizeof(*uptr));
  929|     34|    uptr->is_initialized = 1;
  930|     34|    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|     34|    if (*hostinfo == '[') {
  ------------------
  |  Branch (935:9): [True: 17, False: 17]
  ------------------
  936|     17|        if ((rsb = strchr(hostinfo, ']')) == NULL ||
  ------------------
  |  Branch (936:13): [True: 1, False: 16]
  ------------------
  937|     17|            *(rsb + 1) != ':') {
  ------------------
  |  Branch (937:13): [True: 13, False: 3]
  ------------------
  938|     14|            return APR_EGENERAL;
  ------------------
  |  |  313|     14|#define APR_EGENERAL       (APR_OS_START_ERROR + 14)
  |  |  ------------------
  |  |  |  |  117|     14|#define APR_OS_START_ERROR     20000
  |  |  ------------------
  ------------------
  939|     14|        }
  940|       |        /* literal IPv6 address */
  941|      3|        s = rsb + 1;
  942|      3|        ++hostinfo;
  943|      3|        v6_offset1 = 1;
  944|      3|    }
  945|     17|    else {
  946|     17|        s = strchr(hostinfo, ':');
  947|     17|    }
  948|     20|    if (s == NULL) {
  ------------------
  |  Branch (948:9): [True: 5, False: 15]
  ------------------
  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|     15|    uptr->hostname = apr_pstrndup(p, hostinfo, s - hostinfo - v6_offset1);
  952|     15|    ++s;
  953|     15|    uptr->port_str = apr_pstrdup(p, s);
  954|     15|    if (*s != '\0') {
  ------------------
  |  Branch (954:9): [True: 14, False: 1]
  ------------------
  955|     14|        uptr->port = (unsigned short) strtol(uptr->port_str, &endstr, 10);
  956|     14|        if (*endstr == '\0') {
  ------------------
  |  Branch (956:13): [True: 3, False: 11]
  ------------------
  957|      3|            return APR_SUCCESS;
  ------------------
  |  |  225|      3|#define APR_SUCCESS 0
  ------------------
  958|      3|        }
  959|       |        /* Invalid characters after ':' found */
  960|     14|    }
  961|     12|    return APR_EGENERAL;
  ------------------
  |  |  313|     12|#define APR_EGENERAL       (APR_OS_START_ERROR + 14)
  |  |  ------------------
  |  |  |  |  117|     12|#define APR_OS_START_ERROR     20000
  |  |  ------------------
  ------------------
  962|     15|}

