diff options
author | Vance Morrison <vancem@microsoft.com> | 2017-10-30 08:49:36 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-30 08:49:36 -0700 |
commit | 0c8b4af17f1206dee394205b6c9b428955e0a944 (patch) | |
tree | 590e5e5facccc917d5f172cfb95f9286594d19dc /src | |
parent | ffcb0127f247372b25e231470517cec272dca659 (diff) | |
download | coreclr-0c8b4af17f1206dee394205b6c9b428955e0a944.tar.gz coreclr-0c8b4af17f1206dee394205b6c9b428955e0a944.tar.bz2 coreclr-0c8b4af17f1206dee394205b6c9b428955e0a944.zip |
Fix for issue EventSource MultiEnable bug (#14729)
Fixes issue #14728
Diffstat (limited to 'src')
-rw-r--r-- | src/mscorlib/shared/System/Diagnostics/Tracing/EventSource.cs | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/mscorlib/shared/System/Diagnostics/Tracing/EventSource.cs b/src/mscorlib/shared/System/Diagnostics/Tracing/EventSource.cs index 89f3f239e2..aadb5e329c 100644 --- a/src/mscorlib/shared/System/Diagnostics/Tracing/EventSource.cs +++ b/src/mscorlib/shared/System/Diagnostics/Tracing/EventSource.cs @@ -2679,8 +2679,16 @@ namespace System.Diagnostics.Tracing else { // We can't do the command, simply remember it and we do it when we are fully constructed. - commandArgs.nextCommand = m_deferredCommands; - m_deferredCommands = commandArgs; + if (m_deferredCommands == null) + m_deferredCommands = commandArgs; // create the first entry + else + { + // We have one or more etries, find the last one and add it to that. + EventCommandEventArgs lastCommand = m_deferredCommands; + while (lastCommand.nextCommand != null) + lastCommand = lastCommand.nextCommand; + lastCommand.nextCommand = commandArgs; + } } } } @@ -3190,7 +3198,7 @@ namespace System.Diagnostics.Tracing Debug.Assert(!SelfDescribingEvents); -#if FEATURE_MANAGED_ETW +#if FEATURE_MANAGED_ETW fixed (byte* dataPtr = rawManifest) { // we don't want the manifest to show up in the event log channels so we specify as keywords |