From: Alex Rønne Petersen Date: Sat, 22 Jul 2017 12:42:06 +0000 (+0200) Subject: [acceptance-tests] Fix a crash in the profiler stress runner caused by racey modifica... X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=e013096c65e879e6fc5deb3ccfe4d0e1e23c7258;p=mono.git [acceptance-tests] Fix a crash in the profiler stress runner caused by racey modification of a StringBuilder. --- diff --git a/acceptance-tests/profiler-stress/runner.cs b/acceptance-tests/profiler-stress/runner.cs index ace091b4207..69ba9e5ab0a 100644 --- a/acceptance-tests/profiler-stress/runner.cs +++ b/acceptance-tests/profiler-stress/runner.cs @@ -152,12 +152,14 @@ namespace Mono.Profiling.Tests.Stress { proc.OutputDataReceived += (sender, args) => { if (args.Data != null) - stdout.AppendLine (args.Data); + lock (result) + stdout.AppendLine (args.Data); }; proc.ErrorDataReceived += (sender, args) => { if (args.Data != null) - stderr.AppendLine (args.Data); + lock (result) + stderr.AppendLine (args.Data); }; result.Stopwatch.Start ();