diff options
42 files changed, 69 insertions, 5 deletions
diff --git a/modules/aaa/mod_authnz_fcgi.c b/modules/aaa/mod_authnz_fcgi.c index b32d8a37d4..ae437d8c02 100644 --- a/modules/aaa/mod_authnz_fcgi.c +++ b/modules/aaa/mod_authnz_fcgi.c @@ -713,6 +713,7 @@ static void req_rsp(request_rec *r, const fcgi_provider_conf *conf, } apr_pool_create(&temp_pool, r->pool); + apr_pool_tag(temp_pool, "mod_authnz_fcgi (req_rsp)"); setupenv(r, password, apache_role); diff --git a/modules/aaa/mod_authnz_ldap.c b/modules/aaa/mod_authnz_ldap.c index b9f8671c75..5ba21e04db 100644 --- a/modules/aaa/mod_authnz_ldap.c +++ b/modules/aaa/mod_authnz_ldap.c @@ -481,6 +481,7 @@ static authn_ldap_request_t* build_request_config(request_rec *r) (authn_ldap_request_t *)apr_pcalloc(r->pool, sizeof(authn_ldap_request_t)); ap_set_module_config(r->request_config, &authnz_ldap_module, req); apr_pool_create(&(req->ldc_pool), r->pool); + apr_pool_tag(req->ldc_pool, "authn_ldap_req_ldc"): ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01740) "ldap authorize: Creating LDAP req structure"); return req; diff --git a/modules/aaa/mod_authz_groupfile.c b/modules/aaa/mod_authz_groupfile.c index 88c6cf0f3e..c2431e05b7 100644 --- a/modules/aaa/mod_authz_groupfile.c +++ b/modules/aaa/mod_authz_groupfile.c @@ -98,6 +98,8 @@ static apr_status_t groups_for_user(apr_pool_t *p, char *user, char *grpfile, } apr_pool_create(&sp, p); + apr_pool_tag(sp, "authz_groupfile (groups_for_user)"); + ap_varbuf_init(p, &vb, VARBUF_INIT_LEN); while (!(ap_varbuf_cfg_getline(&vb, f, VARBUF_MAX_LEN))) { diff --git a/modules/arch/win32/mod_isapi.c b/modules/arch/win32/mod_isapi.c index 23e6a68a54..5592a5744e 100644 --- a/modules/arch/win32/mod_isapi.c +++ b/modules/arch/win32/mod_isapi.c @@ -1692,6 +1692,7 @@ static int isapi_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pte "could not create the isapi cache pool"); return APR_EGENERAL; } + apr_pool_tag(loaded.pool, "mod_isapi_load"); loaded.hash = apr_hash_make(loaded.pool); if (!loaded.hash) { diff --git a/modules/cache/mod_cache_socache.c b/modules/cache/mod_cache_socache.c index 2cdc9504ac..cddda5dbbd 100644 --- a/modules/cache/mod_cache_socache.c +++ b/modules/cache/mod_cache_socache.c @@ -471,6 +471,7 @@ static int open_entity(cache_handle_t *h, request_rec *r, const char *key) * about for the lifetime of the response. */ apr_pool_create(&sobj->pool, r->pool); + apr_pool_tag(sobj->pool, "mod_cache_socache (open_entity)"); sobj->buffer = apr_palloc(sobj->pool, dconf->max); sobj->buffer_len = dconf->max; @@ -800,6 +801,7 @@ static apr_status_t store_headers(cache_handle_t *h, request_rec *r, : obj->info.expire + dconf->mintime; apr_pool_create(&sobj->pool, r->pool); + apr_pool_tag(sobj->pool, "mod_cache_socache (store_headers)"); sobj->buffer = apr_palloc(sobj->pool, dconf->max); sobj->buffer_len = dconf->max; diff --git a/modules/cache/mod_socache_dbm.c b/modules/cache/mod_socache_dbm.c index 4460dffd27..7c0ca223fb 100644 --- a/modules/cache/mod_socache_dbm.c +++ b/modules/cache/mod_socache_dbm.c @@ -92,6 +92,7 @@ static const char *socache_dbm_create(ap_socache_instance_t **context, } apr_pool_create(&ctx->pool, p); + apr_pool_tag(ctx->pool, "socache_dbm_instance"); return NULL; } diff --git a/modules/cluster/mod_heartmonitor.c b/modules/cluster/mod_heartmonitor.c index 61a851764d..2e8d12dd2e 100644 --- a/modules/cluster/mod_heartmonitor.c +++ b/modules/cluster/mod_heartmonitor.c @@ -633,6 +633,7 @@ static apr_status_t hm_watchdog_callback(int state, void *data, apr_interval_time_t timeout; apr_pool_create(&p, pool); + apr_pool_tag(p, "hm_running"); pfd.desc_type = APR_POLL_SOCKET; pfd.desc.s = ctx->sock; @@ -807,6 +808,7 @@ static void *hm_create_config(apr_pool_t *p, server_rec *s) ctx->interval = apr_time_from_sec(HM_UPDATE_SEC); ctx->s = s; apr_pool_create(&ctx->p, p); + apr_pool_tag(ctx->p, "hm_ctx"); ctx->servers = apr_hash_make(ctx->p); return ctx; diff --git a/modules/core/mod_watchdog.c b/modules/core/mod_watchdog.c index bc05e85211..d833939cb0 100644 --- a/modules/core/mod_watchdog.c +++ b/modules/core/mod_watchdog.c @@ -112,6 +112,7 @@ static void* APR_THREAD_FUNC wd_worker(apr_thread_t *thread, void *data) int probed = 0; int inited = 0; int mpmq_s = 0; + apr_pool_t *ctx = NULL; w->pool = apr_thread_pool_get(thread); w->is_running = 1; @@ -165,8 +166,8 @@ static void* APR_THREAD_FUNC wd_worker(apr_thread_t *thread, void *data) w->singleton ? "Singleton " : "", w->name); apr_time_clock_hires(w->pool); if (wl) { - apr_pool_t *ctx = NULL; apr_pool_create(&ctx, w->pool); + apr_pool_tag(ctx, "wd_running"); while (wl && w->is_running) { /* Execute watchdog callback */ wl->status = (*wl->callback_fn)(AP_WATCHDOG_STATE_STARTING, @@ -183,7 +184,6 @@ static void* APR_THREAD_FUNC wd_worker(apr_thread_t *thread, void *data) /* Main execution loop */ while (w->is_running) { - apr_pool_t *ctx = NULL; apr_time_t curr; watchdog_list_t *wl = w->callbacks; @@ -202,8 +202,10 @@ static void* APR_THREAD_FUNC wd_worker(apr_thread_t *thread, void *data) if (wl->status == APR_SUCCESS) { wl->step += (apr_time_now() - curr); if (wl->step >= wl->interval) { - if (!ctx) + if (!ctx) { apr_pool_create(&ctx, w->pool); + apr_pool_tag(ctx, "wd_running"); + } wl->step = 0; /* Execute watchdog callback */ wl->status = (*wl->callback_fn)(AP_WATCHDOG_STATE_RUNNING, @@ -224,8 +226,10 @@ static void* APR_THREAD_FUNC wd_worker(apr_thread_t *thread, void *data) */ w->step += (apr_time_now() - curr); if (w->step >= wd_interval) { - if (!ctx) + if (!ctx) { apr_pool_create(&ctx, w->pool); + apr_pool_tag(ctx, "wd_running"); + } w->step = 0; /* Run watchdog step hook */ ap_run_watchdog_step(wd_server_conf->s, w->name, ctx); @@ -441,6 +445,7 @@ static int wd_post_config_hook(apr_pool_t *pconf, apr_pool_t *plog, if (!(wd_server_conf = apr_pcalloc(ppconf, sizeof(wd_server_conf_t)))) return APR_ENOMEM; apr_pool_create(&wd_server_conf->pool, ppconf); + apr_pool_tag(wd_server_conf->pool, "wd_server_conf"); apr_pool_userdata_set(wd_server_conf, pk, apr_pool_cleanup_null, ppconf); } ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(010033) diff --git a/modules/database/mod_dbd.c b/modules/database/mod_dbd.c index 72126652e2..aa6b76489f 100644 --- a/modules/database/mod_dbd.c +++ b/modules/database/mod_dbd.c @@ -525,6 +525,7 @@ static apr_status_t dbd_construct(void **data_ptr, "Failed to create memory pool"); return rv; } + apr_pool_tag(rec_pool, "dbd_rec_pool"); rec = apr_pcalloc(rec_pool, sizeof(ap_dbd_t)); @@ -589,6 +590,7 @@ static apr_status_t dbd_construct(void **data_ptr, apr_pool_destroy(rec->pool); return rv; } + apr_pool_tag(prepared_pool, "dbd_prepared_pool"); rv = dbd_prepared_init(prepared_pool, cfg, rec); if (rv != APR_SUCCESS) { @@ -673,6 +675,7 @@ static apr_status_t dbd_setup_init(apr_pool_t *pool, server_rec *s) "Failed to create reslist cleanup memory pool"); return rv2; } + apr_pool_tag(group->pool, "dbd_group"); #if APR_HAS_THREADS rv2 = dbd_setup(s, group); diff --git a/modules/dav/main/props.c b/modules/dav/main/props.c index 6965edccc0..8b0e1212d8 100644 --- a/modules/dav/main/props.c +++ b/modules/dav/main/props.c @@ -723,6 +723,7 @@ DAV_DECLARE(dav_get_props_result) dav_get_allprops(dav_propdb *propdb, apr_xml_parser *parser; apr_pool_create (&pool, propdb->p); + apr_pool_tag(pool, "mod_dav-xml_parser"); parser = apr_xml_parser_create (pool); apr_xml_parser_feed(parser, "<r xmlns:D=\"DAV:\" ", 18); diff --git a/modules/filters/mod_include.c b/modules/filters/mod_include.c index 9f69d8adf9..584d8fb311 100644 --- a/modules/filters/mod_include.c +++ b/modules/filters/mod_include.c @@ -3855,6 +3855,7 @@ static apr_status_t includes_filter(ap_filter_t *f, apr_bucket_brigade *b) ctx->intern = intern = apr_palloc(r->pool, sizeof(*ctx->intern)); ctx->pool = r->pool; apr_pool_create(&ctx->dpool, ctx->pool); + apr_pool_tag(ctx->dpool, "includes_dpool"); /* runtime data */ intern->tmp_bb = apr_brigade_create(ctx->pool, f->c->bucket_alloc); diff --git a/modules/filters/mod_sed.c b/modules/filters/mod_sed.c index 8d29a03707..0181deefa0 100644 --- a/modules/filters/mod_sed.c +++ b/modules/filters/mod_sed.c @@ -254,6 +254,7 @@ static apr_status_t init_context(ap_filter_t *f, sed_expr_config *sed_cfg, int u ctx->bufsize = MODSED_OUTBUF_SIZE; if (usetpool) { apr_pool_create(&(ctx->tpool), r->pool); + apr_pool_tag(ctx->tpool, "sed_tpool"); } else { ctx->tpool = r->pool; diff --git a/modules/filters/mod_substitute.c b/modules/filters/mod_substitute.c index efbdffc404..58e696debb 100644 --- a/modules/filters/mod_substitute.c +++ b/modules/filters/mod_substitute.c @@ -450,6 +450,7 @@ static apr_status_t substitute_filter(ap_filter_t *f, apr_bucket_brigade *bb) ctx->passbb = apr_brigade_create(f->r->pool, f->c->bucket_alloc); /* Create our temporary pool only once */ apr_pool_create(&(ctx->tpool), f->r->pool); + apr_pool_tag(ctx->tpool, "substitute_tpool"); apr_table_unset(f->r->headers_out, "Content-Length"); } diff --git a/modules/generators/mod_autoindex.c b/modules/generators/mod_autoindex.c index 21fc59a011..f977b88324 100644 --- a/modules/generators/mod_autoindex.c +++ b/modules/generators/mod_autoindex.c @@ -1517,6 +1517,7 @@ static void output_directories(struct ent **ar, int n, char *breakrow = ""; apr_pool_create(&scratch, r->pool); + apr_pool_tag(scratch, "autoindex_scratch"); name_width = d->name_width; desc_width = d->desc_width; diff --git a/modules/generators/mod_cgid.c b/modules/generators/mod_cgid.c index 2778430ee4..0c50e0487c 100644 --- a/modules/generators/mod_cgid.c +++ b/modules/generators/mod_cgid.c @@ -713,6 +713,7 @@ static int cgid_server(void *data) apr_status_t rv; apr_pool_create(&ptrans, pcgi); + apr_pool_tag(ptrans, "cgid_ptrans"); apr_signal(SIGCHLD, SIG_IGN); apr_signal(SIGHUP, daemon_signal_handler); @@ -997,6 +998,7 @@ static int cgid_start(apr_pool_t *p, server_rec *main_server, else if (daemon_pid == 0) { if (pcgi == NULL) { apr_pool_create(&pcgi, p); + apr_pool_tag(pcgi, "cgid_pcgi"); } exit(cgid_server(main_server) > 0 ? DAEMON_STARTUP_ERROR : -1); } diff --git a/modules/ldap/util_ldap.c b/modules/ldap/util_ldap.c index 22db0fe08b..57aa856e5b 100644 --- a/modules/ldap/util_ldap.c +++ b/modules/ldap/util_ldap.c @@ -861,6 +861,7 @@ static util_ldap_connection_t * #endif return NULL; } + apr_pool_tag(newpool, "util_ldap_connection"); /* * Add the new connection entry to the linked list. Note that we @@ -908,6 +909,7 @@ static util_ldap_connection_t * #endif return NULL; } + apr_pool_tag(l->rebind_pool, "util_ldap_rebind"); } if (p) { @@ -2854,6 +2856,7 @@ static void *util_ldap_create_config(apr_pool_t *p, server_rec *s) * no shared memory managed by either. */ apr_pool_create(&st->pool, p); + apr_pool_tag(st->pool, "util_ldap_state"); #if APR_HAS_THREADS apr_thread_mutex_create(&st->mutex, APR_THREAD_MUTEX_DEFAULT, st->pool); #endif diff --git a/modules/loggers/mod_journald.c b/modules/loggers/mod_journald.c index 6b4ced30a8..0175b52736 100644 --- a/modules/loggers/mod_journald.c +++ b/modules/loggers/mod_journald.c @@ -116,6 +116,7 @@ static void journald_log(apr_pool_t *pool, const char *log, NULL); return; } + apr_pool_tag(subpool, "journald_log"); /* Adds new entry to iovec if previous additions were successful. */ #define IOVEC_ADD_LEN(FORMAT, VAR, LEN) \ diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c index 21d33eeb9c..661bc30f48 100644 --- a/modules/mappers/mod_rewrite.c +++ b/modules/mappers/mod_rewrite.c @@ -1063,6 +1063,7 @@ static void set_cache_value(const char *name, apr_time_t t, char *key, #endif return; } + apr_pool_tag(p, "rewrite_cachedmap"); map = apr_palloc(cachep->pool, sizeof(cachedmap)); map->pool = p; @@ -1140,6 +1141,7 @@ static int init_cache(apr_pool_t *p) cachep = NULL; /* turns off cache */ return 0; } + apr_pool_tag(cachep->pool, "rewrite_cachep"); cachep->maps = apr_hash_make(cachep->pool); #if APR_HAS_THREADS @@ -4384,6 +4386,7 @@ static int apply_rewrite_list(request_rec *r, apr_array_header_t *rewriterules, if (dconf->options & OPTION_LONGOPT) { apr_pool_create(&(ctx->temp_pool), r->pool); + apr_pool_tag(ctx->temp_pool, "rewrite_ctx_ptemp"); } else { ctx->temp_pool = NULL; diff --git a/modules/mappers/mod_speling.c b/modules/mappers/mod_speling.c index 35d33ea03d..2ed65eb810 100644 --- a/modules/mappers/mod_speling.c +++ b/modules/mappers/mod_speling.c @@ -419,6 +419,7 @@ static int check_speling(request_rec *r) if (apr_pool_create(&sub_pool, p) != APR_SUCCESS) return DECLINED; + apr_pool_tag(sub_pool, "speling_sub"); t = apr_array_make(sub_pool, candidates->nelts * 8 + 8, sizeof(char *)); diff --git a/modules/md/md_acme.c b/modules/md/md_acme.c index d42ea72230..c085ba3518 100644 --- a/modules/md/md_acme.c +++ b/modules/md/md_acme.c @@ -121,6 +121,7 @@ static md_acme_req_t *md_acme_req_create(md_acme_t *acme, const char *method, co if (rv != APR_SUCCESS) { return NULL; } + apr_pool_tag(pool, "md_acme_req"); req = apr_pcalloc(pool, sizeof(*req)); if (!req) { diff --git a/modules/md/md_http.c b/modules/md/md_http.c index bafa5913fd..9c2790cd66 100644 --- a/modules/md/md_http.c +++ b/modules/md/md_http.c @@ -169,6 +169,7 @@ static apr_status_t req_create(md_http_request_t **preq, md_http_t *http, if (rv != APR_SUCCESS) { return rv; } + apr_pool_tag(pool, "md_http_req"); req = apr_pcalloc(pool, sizeof(*req)); req->pool = pool; diff --git a/modules/md/md_util.c b/modules/md/md_util.c index 6bf65e175d..25830f2b92 100644 --- a/modules/md/md_util.c +++ b/modules/md/md_util.c @@ -37,8 +37,8 @@ apr_status_t md_util_pool_do(md_util_action *cb, void *baton, apr_pool_t *p) apr_pool_t *ptemp; apr_status_t rv = apr_pool_create(&ptemp, p); if (APR_SUCCESS == rv) { + apr_pool_tag(ptemp, "md_pool_do"); rv = cb(baton, p, ptemp); - apr_pool_destroy(ptemp); } return rv; @@ -51,6 +51,7 @@ static apr_status_t pool_vado(md_util_vaction *cb, void *baton, apr_pool_t *p, v rv = apr_pool_create(&ptemp, p); if (APR_SUCCESS == rv) { + apr_pool_tag(ptemp, "md_pool_vado"); rv = cb(baton, p, ptemp, ap); apr_pool_destroy(ptemp); } diff --git a/modules/metadata/mod_mime_magic.c b/modules/metadata/mod_mime_magic.c index c4bc621cd2..e45f209b73 100644 --- a/modules/metadata/mod_mime_magic.c +++ b/modules/metadata/mod_mime_magic.c @@ -2181,6 +2181,7 @@ static int uncompress(request_rec *r, int method, */ if (apr_pool_create(&sub_context, r->pool) != APR_SUCCESS) return -1; + apr_pool_tag(sub_context, "magic_uncompress"); if ((rv = create_uncompress_child(&parm, sub_context, &pipe_out)) != APR_SUCCESS) { ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01553) diff --git a/modules/proxy/balancers/mod_lbmethod_heartbeat.c b/modules/proxy/balancers/mod_lbmethod_heartbeat.c index 7aeaf71248..412bac420e 100644 --- a/modules/proxy/balancers/mod_lbmethod_heartbeat.c +++ b/modules/proxy/balancers/mod_lbmethod_heartbeat.c @@ -281,6 +281,7 @@ static proxy_worker *find_best_hb(proxy_balancer *balancer, } apr_pool_create(&tpool, r->pool); + apr_pool_tag(tpool, "lb_heartbeat_tpool"); servers = apr_hash_make(tpool); diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c index 7294e5a0b3..71fae13edc 100644 --- a/modules/proxy/mod_proxy.c +++ b/modules/proxy/mod_proxy.c @@ -878,6 +878,7 @@ static int proxy_walk(request_rec *r) if (entry_proxy->refs && entry_proxy->refs->nelts) { if (!rxpool) { apr_pool_create(&rxpool, r->pool); + apr_pool_tag(rxpool, "proxy_rxpool"); } nmatch = entry_proxy->refs->nelts; pmatch = apr_palloc(rxpool, nmatch*sizeof(ap_regmatch_t)); diff --git a/modules/proxy/mod_proxy_fcgi.c b/modules/proxy/mod_proxy_fcgi.c index 77ad661c27..a9d908e82e 100644 --- a/modules/proxy/mod_proxy_fcgi.c +++ b/modules/proxy/mod_proxy_fcgi.c @@ -947,6 +947,7 @@ static int fcgi_do_request(apr_pool_t *p, request_rec *r, } apr_pool_create(&temp_pool, r->pool); + apr_pool_tag(temp_pool, "proxy_fcgi_do_request"); /* Step 2: Send Environment via FCGI_PARAMS */ rv = send_environment(conn, r, temp_pool, request_id); diff --git a/modules/proxy/mod_proxy_http.c b/modules/proxy/mod_proxy_http.c index 3f356d40e7..71c05e8998 100644 --- a/modules/proxy/mod_proxy_http.c +++ b/modules/proxy/mod_proxy_http.c @@ -924,6 +924,7 @@ static request_rec *make_fake_req(conn_rec *c, request_rec *r) request_rec *rp; apr_pool_create(&pool, c->pool); + apr_pool_tag(pool, "proxy_http_rp"); rp = apr_pcalloc(pool, sizeof(*r)); diff --git a/modules/proxy/mod_proxy_uwsgi.c b/modules/proxy/mod_proxy_uwsgi.c index 98b8579d0b..32994470be 100644 --- a/modules/proxy/mod_proxy_uwsgi.c +++ b/modules/proxy/mod_proxy_uwsgi.c @@ -238,6 +238,7 @@ static request_rec *make_fake_req(conn_rec *c, request_rec *r) request_rec *rp; apr_pool_create(&pool, c->pool); + apr_pool_tag(pool, "proxy_uwsgi_rp"); rp = apr_pcalloc(pool, sizeof(*r)); diff --git a/modules/proxy/mod_serf.c b/modules/proxy/mod_serf.c index 1819b91ee3..d054a99269 100644 --- a/modules/proxy/mod_serf.c +++ b/modules/proxy/mod_serf.c @@ -418,6 +418,7 @@ static int drive_serf(request_rec *r, serf_config_t *conf) * from the main serf context in the async mpm mode. */ apr_pool_create(&pool, r->pool); + apr_pool_tag(pool, "mod_serf_drive"); if (strcmp(conf->url.scheme, "cluster") == 0) { int rc; ap_serf_cluster_provider_t *cp; @@ -955,6 +956,7 @@ static int hb_list_servers(void *baton, const char *path = apr_table_get(params, "path"); apr_pool_create(&tpool, r->pool); + apr_pool_tag(tpool, "mod_serf_hb"); path = ap_server_root_relative(tpool, path); diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index bb12774a55..23674ae2a8 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -1335,6 +1335,7 @@ static proxy_worker *proxy_balancer_get_best_worker(proxy_balancer *balancer, balancer->lbmethod->name, balancer->s->name); apr_pool_create(&tpool, r->pool); + apr_pool_tag(tpool, "proxy_lb_best"); spares = apr_array_make(tpool, 1, sizeof(proxy_worker*)); standbys = apr_array_make(tpool, 1, sizeof(proxy_worker*)); @@ -1973,6 +1974,7 @@ PROXY_DECLARE(apr_status_t) ap_proxy_share_worker(proxy_worker *worker, proxy_wo if (APLOGdebug(ap_server_conf)) { apr_pool_t *pool; apr_pool_create(&pool, ap_server_conf->process->pool); + apr_pool_tag(pool, "proxy_worker_name"); ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(02338) "%s shm[%d] (0x%pp) for worker: %s", action, i, (void *)shm, ap_proxy_worker_name(pool, worker)); diff --git a/modules/ssl/mod_ssl_ct.c b/modules/ssl/mod_ssl_ct.c index 748fc08bf3..c2de848d38 100644 --- a/modules/ssl/mod_ssl_ct.c +++ b/modules/ssl/mod_ssl_ct.c @@ -1038,6 +1038,7 @@ static int sct_daemon(server_rec *s_main) /* ptemp - temporary pool for refresh cycles */ apr_pool_create(&ptemp, pdaemon); + apr_pool_tag(ptemp, "sct_daemon_refresh"); while (!daemon_should_exit) { sct_daemon_cycle(sconf, s_main, ptemp, DAEMON_NAME); @@ -1062,6 +1063,7 @@ static int daemon_start(apr_pool_t *p, server_rec *main_server, else if (daemon_pid == 0) { if (pdaemon == NULL) { apr_pool_create(&pdaemon, p); + apr_pool_tag(pdaemon, "sct_daemon"); } exit(sct_daemon(main_server) > 0 ? DAEMON_STARTUP_ERROR : -1); } @@ -1091,6 +1093,7 @@ static void *sct_daemon_thread(apr_thread_t *me, void *data) /* ptemp - temporary pool for refresh cycles */ apr_pool_create(&ptemp, pdaemon); + apr_pool_tag(ptemp, "sct_daemon_thread"); while (1) { if ((rv = ap_mpm_query(AP_MPMQ_MPM_STATE, &mpmq_s)) != APR_SUCCESS) { @@ -1117,6 +1120,7 @@ static int daemon_thread_start(apr_pool_t *pconf, server_rec *s_main) apr_status_t rv; apr_pool_create(&pdaemon, pconf); + apr_pool_tag(pdaemon, "sct_daemon"); rv = apr_thread_create(&daemon_thread, NULL, sct_daemon_thread, s_main, pconf); if (rv != APR_SUCCESS) { @@ -1260,6 +1264,7 @@ static int ssl_ct_post_config(apr_pool_t *pconf, apr_pool_t *plog, if (!sconf->db_log_config) { /* log config db in separate pool that can be cleared */ apr_pool_create(&sconf->db_log_config_pool, pconf); + apr_pool_tag(sconf->db_log_config_pool, "sct_db_log_config"); sconf->db_log_config = apr_array_make(sconf->db_log_config_pool, 2, sizeof(ct_log_config *)); diff --git a/modules/ssl/ssl_engine_ocsp.c b/modules/ssl/ssl_engine_ocsp.c index 5c6a205057..5e04512558 100644 --- a/modules/ssl/ssl_engine_ocsp.c +++ b/modules/ssl/ssl_engine_ocsp.c @@ -284,6 +284,7 @@ int modssl_verify_ocsp(X509_STORE_CTX *ctx, SSLSrvConfigRec *sc, /* Create a temporary pool to constrain memory use (the passed-in * pool may be e.g. a connection pool). */ apr_pool_create(&vpool, pool); + apr_pool_tag(vpool, "modssl_verify_ocsp"); rv = verify_ocsp_status(cert, ctx, c, sc, s, vpool); diff --git a/modules/ssl/ssl_util.c b/modules/ssl/ssl_util.c index afb54ac70f..83f590bbf9 100644 --- a/modules/ssl/ssl_util.c +++ b/modules/ssl/ssl_util.c @@ -305,6 +305,7 @@ static struct CRYPTO_dynlock_value *ssl_dyn_create_function(const char *file, * away in the destruction callback. */ apr_pool_create(&p, dynlockpool); + apr_pool_tag(p, "modssl_dynlock_value"); ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_TRACE1, 0, p, "Creating dynamic lock"); diff --git a/modules/ssl/ssl_util_stapling.c b/modules/ssl/ssl_util_stapling.c index 7ee4340371..cb5084e966 100644 --- a/modules/ssl/ssl_util_stapling.c +++ b/modules/ssl/ssl_util_stapling.c @@ -515,6 +515,7 @@ static BOOL stapling_renew_response(server_rec *s, modssl_ctx_t *mctx, SSL *ssl, /* Create a temporary pool to constrain memory use */ apr_pool_create(&vpool, conn->pool); + apr_pool_tag(vpool, "modssl_stapling_renew"); if (apr_uri_parse(vpool, ocspuri, &uri) != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(01939) diff --git a/server/apreq_parser.c b/server/apreq_parser.c index 58a6ef6e30..700cc43fac 100644 --- a/server/apreq_parser.c +++ b/server/apreq_parser.c @@ -107,6 +107,7 @@ APREQ_DECLARE(apr_status_t) apreq_pre_initialize(apr_pool_t *pool) status = apr_pool_create(&default_parser_pool, pool); if (status != APR_SUCCESS) return status; + apr_pool_tag(default_parser_pool, "apreq_default_parser"); apr_pool_cleanup_register(default_parser_pool, NULL, apreq_parsers_cleanup, diff --git a/server/core.c b/server/core.c index 1b6c98251a..adad3e1318 100644 --- a/server/core.c +++ b/server/core.c @@ -759,6 +759,7 @@ void ap_core_reorder_directories(apr_pool_t *p, server_rec *s) /* we have to allocate tmp space to do a stable sort */ apr_pool_create(&tmp, p); + apr_pool_tag(tmp, "core_reorder_directories"); sortbin = apr_palloc(tmp, sec_dir->nelts * sizeof(*sortbin)); for (i = 0; i < nelts; ++i) { sortbin[i].orig_index = i; diff --git a/server/mpm/mpmt_os2/mpmt_os2_child.c b/server/mpm/mpmt_os2/mpmt_os2_child.c index bb7e1369ea..f405cd2ea9 100644 --- a/server/mpm/mpmt_os2/mpmt_os2_child.c +++ b/server/mpm/mpmt_os2/mpmt_os2_child.c @@ -200,6 +200,7 @@ void ap_mpm_child_main(apr_pool_t *pconf) int last_poll_idx = 0; apr_pool_create(&pconn, pchild); + apr_pool_tag(pconn, "transaction"); worker_args = apr_palloc(pconn, sizeof(worker_args_t)); worker_args->pconn = pconn; diff --git a/server/mpm/netware/mpm_netware.c b/server/mpm/netware/mpm_netware.c index a2f2862642..fa26630d4d 100644 --- a/server/mpm/netware/mpm_netware.c +++ b/server/mpm/netware/mpm_netware.c @@ -896,6 +896,7 @@ static int netware_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) set_signals(); apr_pool_create(&pmain, pconf); + apr_pool_tag(pmain, "pmain"); ap_run_child_init(pmain, ap_server_conf); if (ap_threads_max_free < ap_threads_min_free + 1) /* Don't thrash... */ diff --git a/server/mpm/winnt/mpm_winnt.c b/server/mpm/winnt/mpm_winnt.c index 92907890b4..97086589fc 100644 --- a/server/mpm/winnt/mpm_winnt.c +++ b/server/mpm/winnt/mpm_winnt.c @@ -558,6 +558,7 @@ static int create_process(apr_pool_t *p, HANDLE *child_proc, HANDLE *child_exit_ int envc; apr_pool_create_ex(&ptemp, p, NULL, NULL); + apr_pool_tag(ptemp, "create_process"); /* Build the command line. Should look something like this: * C:/apache/bin/httpd.exe -f ap_server_confname diff --git a/server/mpm/winnt/nt_eventlog.c b/server/mpm/winnt/nt_eventlog.c index e7e80d0dcd..cd49ee6527 100644 --- a/server/mpm/winnt/nt_eventlog.c +++ b/server/mpm/winnt/nt_eventlog.c @@ -39,6 +39,7 @@ static DWORD WINAPI service_stderr_thread(LPVOID hPipe) apr_pool_t *p; apr_pool_create_ex(&p, NULL, NULL, NULL); + apr_pool_tag(p, "service_stderr_thread"); errarg[0] = "The Apache service named"; errarg[1] = display_name; diff --git a/server/mpm_unix.c b/server/mpm_unix.c index d21c7e0e51..8c4d233792 100644 --- a/server/mpm_unix.c +++ b/server/mpm_unix.c @@ -632,6 +632,7 @@ static apr_status_t dummy_connection(ap_pod_t *pod) if (rv != APR_SUCCESS) { return rv; } + apr_pool_tag(p, "dummy_connection"); /* If possible, find a listener which is configured for * plain-HTTP, not SSL; using an SSL port would either be diff --git a/server/request.c b/server/request.c index d06bab5d31..1e9a15a28a 100644 --- a/server/request.c +++ b/server/request.c @@ -1268,6 +1268,7 @@ AP_DECLARE(int) ap_directory_walk(request_rec *r) if (entry_core->refs && entry_core->refs->nelts) { if (!rxpool) { apr_pool_create(&rxpool, r->pool); + apr_pool_tag(rxpool, "directory_walk_rxpool"); } nmatch = entry_core->refs->nelts; pmatch = apr_palloc(rxpool, nmatch*sizeof(ap_regmatch_t)); @@ -1485,6 +1486,7 @@ AP_DECLARE(int) ap_location_walk(request_rec *r) if (entry_core->refs && entry_core->refs->nelts) { if (!rxpool) { apr_pool_create(&rxpool, r->pool); + apr_pool_tag(rxpool, "location_walk_rxpool"); } nmatch = entry_core->refs->nelts; pmatch = apr_palloc(rxpool, nmatch*sizeof(ap_regmatch_t)); @@ -1687,6 +1689,7 @@ AP_DECLARE(int) ap_file_walk(request_rec *r) if (entry_core->refs && entry_core->refs->nelts) { if (!rxpool) { apr_pool_create(&rxpool, r->pool); + apr_pool_tag(rxpool, "file_walk_rxpool"); } nmatch = entry_core->refs->nelts; pmatch = apr_palloc(rxpool, nmatch*sizeof(ap_regmatch_t)); |