From: Eduard Bagdasaryan Date: Wed, 14 Sep 2022 06:47:52 +0000 (+0000) Subject: Bug 5232: Fix GCC v12 build [-Wuse-after-free] (#1136) X-Git-Tag: SQUID_6_0_1~109 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1b1b280534ef54f206d820ed2259df7608d3a06e;p=thirdparty%2Fsquid.git Bug 5232: Fix GCC v12 build [-Wuse-after-free] (#1136) This warning is a false positive. Introduced in GCC v12, use-after-free checks have attracted dozens of bug reports, with several reports still open as of GCC v12.2, including one that looks very similar to our case: https://gcc.gnu.org/bugzilla//show_bug.cgi?id=106776 Removing (excessive) "inline" works around this GCC bug. We do not have a better workaround right now. If we see more false positives like this, we may disable -Wuse-after-free until its support matures. --- diff --git a/src/base/AsyncCall.h b/src/base/AsyncCall.h index ae43662bf0..42e86e4348 100644 --- a/src/base/AsyncCall.h +++ b/src/base/AsyncCall.h @@ -151,7 +151,7 @@ private: }; template -inline RefCount< AsyncCallT > +RefCount< AsyncCallT > asyncCall(int aDebugSection, int aDebugLevel, const char *aName, const Dialer &aDialer) {