From 88771fa0138c75a2d29601cc33025d81822b082a Mon Sep 17 00:00:00 2001 From: David Goldblatt Date: Wed, 12 Sep 2018 15:32:16 -0700 Subject: [PATCH] Bootstrapping: don't overwrite opt_prof_prefix. --- src/jemalloc.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/jemalloc.c b/src/jemalloc.c index 2828c175..15c0609f 100644 --- a/src/jemalloc.c +++ b/src/jemalloc.c @@ -1387,13 +1387,18 @@ malloc_init_hard_a0_locked() { * out of sc_data_global are final. */ sc_boot(&sc_data); + /* + * prof_boot0 only initializes opt_prof_prefix. We need to do it before + * we parse malloc_conf options, in case malloc_conf parsing overwrites + * it. + */ + if (config_prof) { + prof_boot0(); + } malloc_conf_init(&sc_data); sz_boot(&sc_data); bin_boot(&sc_data); - if (config_prof) { - prof_boot0(); - } if (opt_stats_print) { /* Print statistics at exit. */ if (atexit(stats_print_atexit) != 0) {