Merge pull request #5252 from alexrp/profiler-stress-fixes
authorAlex Rønne Petersen <alex@alexrp.com>
Sun, 23 Jul 2017 04:06:28 +0000 (06:06 +0200)
committerGitHub <noreply@github.com>
Sun, 23 Jul 2017 04:06:28 +0000 (06:06 +0200)
[acceptance-tests] A few fixes for the profiler stress test suite.

mcs/class/Mono.Profiler.Log/Mono.Profiler.Log/LogProfiler.cs

index 289b1803613c0a679a7ce7fed5f518e36bbc3f42..688a84b986489a7bb15daec46f1b70d35b82bb8d 100644 (file)
@@ -5,6 +5,7 @@
 using System;
 using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
+using System.Security;
 
 namespace Mono.Profiler.Log {
 
@@ -20,7 +21,7 @@ namespace Mono.Profiler.Log {
                                try {
                                        GetMaxStackTraceFrames ();
                                        return (bool) (_attached = true);
-                               } catch (MissingMethodException) {
+                               } catch (Exception e) when (e is MissingMethodException || e is SecurityException) {
                                        return (bool) (_attached = false);
                                }
                        }