diff options
author | Qi Wang <interwq@gwu.edu> | 2018-04-17 14:26:26 -0700 |
---|---|---|
committer | Qi Wang <interwq@gmail.com> | 2018-04-17 18:23:53 -0700 |
commit | e40b2f75bdfc830a9a53b2cad4fb7261d39cec93 (patch) | |
tree | 40ead58949a2dc2b42de53a1ad1c670b16c12df6 /src | |
parent | 0fadf4a2e3e629b9fa43888f9754aea5327d038f (diff) | |
download | platform_external_jemalloc_new-e40b2f75bdfc830a9a53b2cad4fb7261d39cec93.tar.gz platform_external_jemalloc_new-e40b2f75bdfc830a9a53b2cad4fb7261d39cec93.tar.bz2 platform_external_jemalloc_new-e40b2f75bdfc830a9a53b2cad4fb7261d39cec93.zip |
Fix abort_conf processing.
When abort_conf is set, make sure we always error out at the end of the options
processing loop.
Diffstat (limited to 'src')
-rw-r--r-- | src/jemalloc.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/jemalloc.c b/src/jemalloc.c index 7e1f57af..f93c16fa 100644 --- a/src/jemalloc.c +++ b/src/jemalloc.c @@ -849,10 +849,8 @@ malloc_conf_error(const char *msg, const char *k, size_t klen, const char *v, size_t vlen) { malloc_printf("<jemalloc>: %s: %.*s:%.*s\n", msg, (int)klen, k, (int)vlen, v); + /* If abort_conf is set, error out after processing all options. */ had_conf_error = true; - if (opt_abort_conf) { - malloc_abort_invalid_conf(); - } } static void @@ -1052,9 +1050,6 @@ malloc_conf_init(void) { CONF_HANDLE_BOOL(opt_abort, "abort") CONF_HANDLE_BOOL(opt_abort_conf, "abort_conf") - if (opt_abort_conf && had_conf_error) { - malloc_abort_invalid_conf(); - } if (strncmp("metadata_thp", k, klen) == 0) { int i; bool match = false; @@ -1243,6 +1238,9 @@ malloc_conf_init(void) { #undef CONF_HANDLE_SSIZE_T #undef CONF_HANDLE_CHAR_P } + if (opt_abort_conf && had_conf_error) { + malloc_abort_invalid_conf(); + } } atomic_store_b(&log_init_done, true, ATOMIC_RELEASE); } |