From: Francesco Chemolli <5175948+kinkie@users.noreply.github.com> Date: Thu, 1 Feb 2024 06:05:40 +0000 (+0000) Subject: Bug 5337: workaround for crash on startup if -a option is used (#1653) X-Git-Tag: SQUID_7_0_1~222 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=827da5e07f678fe30196728b6b7809d17a67f5eb;p=thirdparty%2Fsquid.git Bug 5337: workaround for crash on startup if -a option is used (#1653) Interpreting command-line arguments requires AnyP::UriScheme to be fully initialized. Initialize AnyP::UriScheme earlier to ensure that happens. --- diff --git a/src/main.cc b/src/main.cc index c5437ff148..040c7f1e7b 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1535,6 +1535,7 @@ SquidMain(int argc, char **argv) WIN32_svcstatusupdate(SERVICE_START_PENDING, 10000); #endif + AnyP::UriScheme::Init(); // needs to be before arg parsing, bug 5337 cmdLine.forEachOption(mainHandleCommandLineOption); @@ -1576,8 +1577,6 @@ SquidMain(int argc, char **argv) Mem::Init(); - AnyP::UriScheme::Init(); - storeFsInit(); /* required for config parsing */ Fs::Init();