From 13f14fed062b3ac3011a400d993c14f6327c5c11 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli <5175948+kinkie@users.noreply.github.com> Date: Thu, 1 Feb 2024 06:05:40 +0000 Subject: [PATCH] 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. --- src/main.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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(); -- 2.47.2