From bfd6c1ff4bb87452f4eeb0d27cae5a5f10e5ae95 Mon Sep 17 00:00:00 2001 From: Marty Tippin <120425148+tippmar-nr@users.noreply.github.com> Date: Wed, 4 Dec 2024 11:45:57 -0600 Subject: [PATCH] fix: Correct string comparison in Linux profiler when checking for constructor name --- src/Agent/NewRelic/Profiler/MethodRewriter/Instrumentors.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Agent/NewRelic/Profiler/MethodRewriter/Instrumentors.h b/src/Agent/NewRelic/Profiler/MethodRewriter/Instrumentors.h index f6ef8cac3b..d536dc7c5f 100644 --- a/src/Agent/NewRelic/Profiler/MethodRewriter/Instrumentors.h +++ b/src/Agent/NewRelic/Profiler/MethodRewriter/Instrumentors.h @@ -55,7 +55,7 @@ namespace NewRelic { namespace Profiler { namespace MethodRewriter // some special name methods seem to give us trouble, but allow constructors to // be instrumented if (IsMdSpecialName(function->GetMethodAttributes()) && - !IsMdInstanceInitializerW(function->GetMethodAttributes(), function->GetFunctionName().c_str())) { + !wcscmp(function->GetFunctionName().c_str(), _X(".ctor"))) { LogError(L"Skipping SpecialName method: ", function->ToString()); return false; }