Skip to content

Commit

Permalink
fix: Incorrect string comparison in the profiler caused constructor i…
Browse files Browse the repository at this point in the history
…nstrumentation to fail on Linux (#2912)
  • Loading branch information
tippmar-nr authored Dec 5, 2024
1 parent 10bcd22 commit 49a71c5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,14 @@ tests/Agent/IntegrationTests/.vs/config/applicationhost.config
.DS_Store

# Local profiler build artificats
src/Agent/_profilerBuild/*Debug
src/Agent/NewRelic/Profiler/Profiler/VersionInfo.h
/src/Agent/_profilerBuild/*Debug
/src/Agent/NewRelic/Profiler/Profiler/VersionInfo.h
/src/Agent/NewRelic/Profiler/CMakeFiles
/src/Agent/NewRelic/Profiler/CMakeCache.txt
/src/Agent/NewRelic/Profiler/cmake_install.cmake
/src/Agent/NewRelic/Profiler/Makefile
/src/Agent/_profilerBuild/x64-Release
/src/Agent/_profilerBuild/x86-Release

# Ignore any signing keys used in Linux packaging
build/Linux/keys
Expand Down
2 changes: 1 addition & 1 deletion src/Agent/NewRelic/Home/Home.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</Target>

<ItemGroup>
<PackageReference Include="NewRelic.Agent.Internal.Profiler" Version="10.33.1.6"/>
<PackageReference Include="NewRelic.Agent.Internal.Profiler" Version="10.34.0.14"/>
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/Agent/NewRelic/Profiler/MethodRewriter/Instrumentors.h
Original file line number Diff line number Diff line change
Expand Up @@ -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())) {
function->GetFunctionName() != _X(".ctor")) {
LogError(L"Skipping SpecialName method: ", function->ToString());
return false;
}
Expand Down

0 comments on commit 49a71c5

Please sign in to comment.