[acceptance-tests] Another attempt fix a StringBuilder race in the profiler stress...
authorAlex Rønne Petersen <alex@alexrp.com>
Wed, 26 Jul 2017 11:03:52 +0000 (13:03 +0200)
committerGitHub <noreply@github.com>
Wed, 26 Jul 2017 11:03:52 +0000 (13:03 +0200)
acceptance-tests/profiler-stress/runner.cs

index 05a1efb3514561a2f9f7d1bab68ed90695d27198..e5d44e68b4ac391c7ebd8a40d494e2ec202f56a1 100644 (file)
@@ -201,8 +201,10 @@ namespace Mono.Profiling.Tests.Stress {
 
                                        result.Stopwatch.Stop ();
 
-                                       result.StandardOutput = stdout.ToString ();
-                                       result.StandardError = stderr.ToString ();
+                                       lock (result) {
+                                               result.StandardOutput = stdout.ToString ();
+                                               result.StandardError = stderr.ToString ();
+                                       }
                                }
 
                                var resultStr = result.ExitCode == null ? "timed out" : $"exited with code: {result.ExitCode}";