Skip to content

Commit 49a71c5

Browse files
authored
fix: Incorrect string comparison in the profiler caused constructor instrumentation to fail on Linux (#2912)
1 parent 10bcd22 commit 49a71c5

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

.gitignore

+8-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,14 @@ tests/Agent/IntegrationTests/.vs/config/applicationhost.config
4949
.DS_Store
5050

5151
# Local profiler build artificats
52-
src/Agent/_profilerBuild/*Debug
53-
src/Agent/NewRelic/Profiler/Profiler/VersionInfo.h
52+
/src/Agent/_profilerBuild/*Debug
53+
/src/Agent/NewRelic/Profiler/Profiler/VersionInfo.h
54+
/src/Agent/NewRelic/Profiler/CMakeFiles
55+
/src/Agent/NewRelic/Profiler/CMakeCache.txt
56+
/src/Agent/NewRelic/Profiler/cmake_install.cmake
57+
/src/Agent/NewRelic/Profiler/Makefile
58+
/src/Agent/_profilerBuild/x64-Release
59+
/src/Agent/_profilerBuild/x86-Release
5460

5561
# Ignore any signing keys used in Linux packaging
5662
build/Linux/keys

src/Agent/NewRelic/Home/Home.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</Target>
1414

1515
<ItemGroup>
16-
<PackageReference Include="NewRelic.Agent.Internal.Profiler" Version="10.33.1.6"/>
16+
<PackageReference Include="NewRelic.Agent.Internal.Profiler" Version="10.34.0.14"/>
1717
</ItemGroup>
1818

1919
</Project>

src/Agent/NewRelic/Profiler/MethodRewriter/Instrumentors.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ namespace NewRelic { namespace Profiler { namespace MethodRewriter
5555
// some special name methods seem to give us trouble, but allow constructors to
5656
// be instrumented
5757
if (IsMdSpecialName(function->GetMethodAttributes()) &&
58-
!IsMdInstanceInitializerW(function->GetMethodAttributes(), function->GetFunctionName().c_str())) {
58+
function->GetFunctionName() != _X(".ctor")) {
5959
LogError(L"Skipping SpecialName method: ", function->ToString());
6060
return false;
6161
}

0 commit comments

Comments
 (0)