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_6_7~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13f14fed062b3ac3011a400d993c14f6327c5c11;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 3706dd848e..1a26602605 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();