Skip to content

Commit 983e577

Browse files
Ruggerize aspects loading synchronization
1 parent 9173731 commit 983e577

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tracer/src/Datadog.Tracer.Native/cor_profiler.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2070,6 +2070,7 @@ long CorProfiler::DisableCallTargetDefinitions(UINT32 disabledCategories)
20702070
int CorProfiler::RegisterIastAspects(WCHAR** aspects, int aspectsLength, UINT32 enabledCategories, UINT32 platform)
20712071
{
20722072
auto _ = trace::Stats::Instance()->InitializeProfilerMeasure();
2073+
auto definitions = definitions_ids.Get(); // Synchronize Aspects loading
20732074

20742075
auto dataflow = _dataflow;
20752076
if (dataflow == nullptr && IsCallSiteManagedActivationEnabled())
@@ -2082,7 +2083,10 @@ int CorProfiler::RegisterIastAspects(WCHAR** aspects, int aspectsLength, UINT32
20822083
{
20832084
Logger::Info("Registering Callsite Aspects.");
20842085
dataflow->LoadAspects(aspects, aspectsLength, enabledCategories, platform);
2085-
_dataflow = dataflow;
2086+
if (_dataflow == nullptr)
2087+
{
2088+
_dataflow = dataflow;
2089+
}
20862090
return aspectsLength;
20872091
}
20882092
else

0 commit comments

Comments
 (0)