Compare commits

...
Author SHA1 Message Date
João Matos 2be601b372 Fixed HttpWebRequestTest to compile with mobile NUnit.
Fixes an error in the mono-master-monodroid lane.

[9:24:52] Errors:
[9:24:52] 
[9:24:52] /Users/builder/data/lanes/1845/aa3aab5f/source/monodroid/tests/bcl-test/BclTests.sln (default targets) ->
[9:24:52] (Build target) ->
[9:24:52] /Users/builder/data/lanes/1845/aa3aab5f/source/monodroid/tests/bcl-test/BclTests.csproj (default targets) ->
[9:24:52] /Library/Frameworks/Mono.framework/Versions/4.2.0/lib/mono/4.5/Microsoft.CSharp.Targets (CoreCompile target) ->
[9:24:52] 
[9:24:52] 	src/System/Test/System.Net/HttpWebRequestTest.cs(2336,13): error CS0117: `NUnit.Framework.Assert' does not contain a definition for `Greater'
[9:24:52] 
[9:24:52] 	 13 Warning(s)
[9:24:52] 	 1 Error(s)
2015-10-29 23:16:18 -04:00
Ludovic Henry fc6d1c2516 [tests] Fix Math.Pow precision bug on Android 2015-10-29 17:32:37 +00:00
Radek Doulik 3628ba1388 [linker] match type pattern with nested types
- this way the following xml will match all the types in the assembly
   MyAssembly

    <linker>
        <assembly fullname="MyAssembly">
            <type fullname="*" />
        </assembly>
    </linker>

   before this change it will only match the types defined in main
   module and none of the nested types
2015-10-27 18:34:51 +01:00
João Matos 170474d513 [runtime] Added --with-cross-offsets configure option for including an explicit AOT cross offsets file.
This option will define MONO_OFFSETS_FILE which will be used by the rest of the code to include the right file when looking for cross offsets.
2015-10-27 14:57:46 +00:00
Ludovic Henry 179c475976 [corlib] Fix dispose race condition in CancellationTokenSource
The race condition would manifest in the following code:

```
for (int i = 0, total = 100000; i < total; ++i) {
    if (i % 50 == 0)
            Console.WriteLine ("{0}/{1}", i, total);

    var c1 = new CancellationTokenSource ();
    var wh = c1.Token.WaitHandle;
    c1.CancelAfter (1);
    Thread.Sleep (1);
    c1.Dispose ();
}
```

And we would observe the following exception:
```
Unhandled Exception: System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Threading.ManualResetEvent'.
 at System.Threading.WaitHandle.CheckDisposed () [0x00016] in /Users/builder/data/lanes/1196/33e00ac6/source/mono/mcs/class/corlib/System.Threading/WaitHandle.cs:426
 at System.Threading.EventWaitHandle.Set () [0x0000c] in /Users/builder/data/lanes/1196/33e00ac6/source/mono/mcs/class/corlib/System.Threading/EventWaitHandle.cs:205
 at (wrapper remoting-invoke-with-check) System.Threading.EventWaitHandle:Set ()
 at System.Threading.CancellationTokenSource.NotifyCancellation (Boolean throwOnFirstException) [0x00051] in /Users/builder/data/lanes/1196/33e00ac6/source/mono/external/referencesource/mscorlib/system/threading/CancellationTokenSource.cs:723
 at System.Threading.CancellationTokenSource.Cancel (Boolean throwOnFirstException) [0x00006] in /Users/builder/data/lanes/1196/33e00ac6/source/mono/external/referencesource/mscorlib/system/threading/CancellationTokenSource.cs:409
 at System.Threading.CancellationTokenSource.Cancel () <0x7d75ada8 + 0x00017> in <filename unknown>:0
 at System.Threading.CancellationTokenSource.TimerCallbackLogic (System.Object obj) [0x00012] in /Users/builder/data/lanes/1196/33e00ac6/source/mono/external/referencesource/mscorlib/system/threading/CancellationTokenSource.cs:538
```

This would be a race condition between the TimerCallbackLogic call to Cancel and the call to Dispose on another thread. You could trigger it more reliably by putting a Thread.Sleep at CancellationTokenSource.cs:599.

Also fixes ConcurrentCancelLinkedTokenSourceWhileDisposing race condition between Cancel and Dispose, by applying the same pattern as CancellationTokenSource.TimerCallbackLogic.
2015-10-23 18:06:25 +01:00
Jonathan Pryor 464a4459b1 [tuner] Properly preserve AesCryptoServiceProvider.
[merged by rodo from monodroid - the mentioned test is not included here]

Fixes: https://xamarin.desk.com/agent/case/35534

Commit 5ca3cb4b wasn't propertly tested (doh!).

The problem with Aes and AesCryptoServiceProvider is that there's a
cross-assembly dependency: Aes is in mscorlib, while
AesCryptoServiceProvider is in System.Core. The
PreserveCrypto.ProcessSystemCore() method didn't properly handle this
setup.

Fix the linker, and add a test to Hello.

WARNING: The test sucks. In particular, to "test" this fix you need to
run the app and then grep the `adb logcat` output for:

	# DownloadDataTaskAsync complete; status=RanToCompletion; exception=

If the status is anything else, or the exception is non-null, it's
busted.

FURTHERMORE, it's only useful in Release apps, not Debug apps.
(No linker in Debug apps.)

The reason for the need to grep is that there's no sane mechanism to
wait until the Task has completed before checking the status of the
Task, and throwing an exception from within the continuation wouldn't
do anything.

FIXME: The real problem is that Task.Wait() blocks forever and never
returns. This needs further investigation.

	https://bugzilla.xamarin.com/show_bug.cgi?id=12681
2015-10-21 10:25:54 +02:00
Radek Doulik 9a4cdf8817 [tuner] handle the case with multiple "preserve" attributes
- when more than one "preserve" attribute is set (see IsPreservedAttribute),
   make sure we handle all of them and not just last one
 - fixes https://bugzilla.xamarin.com/show_bug.cgi?id=19391
 - example code which suffered from this issue:

    [Preserve(AllMembers=true)]
    [DataContract]
    public class TestClass
    {
      ...
    }

  later when a method from this class was queried using the reflection,
  it wasn't available as it was linked out
2015-10-21 10:25:54 +02:00
Marcos Henrich 398083c7b2 Merge pull request #2147 from esdrubal/mono-4.3.0-branch
[System] Added icall SupportsPortReuse.
2015-10-20 15:41:18 +01:00
Marcos Henrich 98a869150c [System] Added icall SupportsPortReuse.
Linux kernels before 3.9 did not support port reuse.
Added private method System.Net.Sockets.Socket.SupportsPortReuse,
which returns true when the runtime is able to bind to the same address
and port multiple times.
2015-10-19 15:29:50 +01:00
Alexis Christoforides 5191d1812e Fix MSVC build after 1657026514 2015-10-15 14:27:49 -04:00
Zoltan Varga db6af8ade2 Merge pull request #2116 from cmp-/fix-sdb-trampoline-windows-x64
Fix sdb trampoline on Windows x64
2015-10-14 17:26:21 -04:00
Mark Probst 4d5e20fdaf Merge pull request #2114 from cmp-/fix-sgen-gchandle-truncation-windows-x64
Fix sgen gchandle truncating pointers on Windows x64
2015-10-14 17:24:16 -04:00
João Matos fa97344114 [runtime] Workaround signal() configure check in Android.
So, I broke this on Android back in https://github.com/mono/mono/commit/d3726dcde9ef373157cd533ce8091cdde89dfa8e.

Turns out signal() is defined inline in Android:

static __inline__ __sighandler_t signal(int s, __sighandler_t f)
{
    return bsd_signal(s,f);
}

So we need to hardcode the define in case we're on an Android platform.

Fixes BclTests on Android:

I/mono-stdout( 1200): UnixSignalTest
F/        ( 1200): signal() is not supported by this platform
F/libc    ( 1200): Fatal signal 6 (SIGABRT) at 0x000004b0 (code=-6), thread 1215 (Instrumentation)
2015-10-14 15:26:56 +01:00
Zoltan Varga 5bf432f366 Revert "[runtime] Don't allocate domain-level static slots for special static fields."
This reverts commit d2efa789ac.

Revert this as it breaks on monodroid.
2015-10-12 14:39:08 -04:00
Zoltan Varga 437e2da5ec Revert "[runtime] Optimize mono_class_field_is_special_static () a bit."
This reverts commit 0686c21358.

Revert this as it breaks on monodroid.
2015-10-12 14:39:02 -04:00
Martin Baulig 3b27340223 Revert all of today's changes.
/Workspace/mono-stable$ git revert -n 76db142479
/Workspace/mono-stable$ git revert -n 0d90e727e5
/Workspace/mono-stable$ git revert -n eb2f282d6f
/Workspace/mono-stable$ git revert -n 6c80418313
/Workspace/mono-stable$ git revert -n 6414856bf2
/Workspace/mono-stable$ git revert -n bec0257c97
/Workspace/mono-stable$ git revert -n 73a79ac235
/Workspace/mono-stable$ git revert -n f5eeb5597a
/Workspace/mono-stable$ git revert -n 0fbda4c3bd
/Workspace/mono-stable$ git revert -n 2905ed96d1
/Workspace/mono-stable$ git revert -n 90a8836c8d
/Workspace/mono-stable$ git revert -n 39cd3ee44f
/Workspace/mono-stable$ git revert -n 8fbc5ba484
/Workspace/mono-stable$ git revert -n 0eb51843e2
/Workspace/mono-stable$ git revert -n 0377d61060
/Workspace/mono-stable$ git revert -n 48b95ec304
/Workspace/mono-stable$ git revert -n 5348243102
/Workspace/mono-stable$ git revert -n c74c64718d
2015-10-09 16:13:35 -04:00
Martin Baulig 76db142479 [Mono.Security.Providers]: Add to the top-level build. 2015-10-09 16:03:27 -04:00
Martin Baulig 0d90e727e5 Add another MARTIN_FIXME to the new file. 2015-10-09 16:02:34 -04:00
Martin Baulig eb2f282d6f [System] Add internal 'ServicePointManager.DisableStrongCrypto'.
It's an internal API that's used by the referencesource.

(cherry picked from commit 7fbd50ab52fc4cdf2fa9282ecd9d286ac48d9ba8)
2015-10-09 16:00:54 -04:00
Rodrigo Kumpera e94e9e4a35 [Apple] Disable environment access on Apple platforms that are not OSX.
The two known ways to access the environment variables are no longer allowed Apple.

Until something blessed by them is found, we'll provide no way to list all the envvars
of the current process.
2015-10-09 15:56:00 -04:00
Martin Baulig 6c80418313 [corlib] Add new .NET 4.5 System.Diagnostics.EventSource and EventAttribute APIs.
(cherry picked from commit 7f098fb7424b78f0e1bbde592a9de71209dcc798)
2015-10-09 15:51:29 -04:00
Martin Baulig 6414856bf2 [System]: Make internals visible to Mono.Security.Providers.NewSystemSource. 2015-10-09 15:49:18 -04:00
Martin Baulig bec0257c97 [System/TLS]: Add the new Mono.Security.Interface and Mono.Net.Security APIs to the build.
These should be considered internal APIs for the moment, even where the
classes are public (to avoid making internals visible).
2015-10-09 15:37:51 -04:00
Martin Baulig 73a79ac235 Add MARTIN_FIXME conditionals to some of the newly added files in preparation to get them build. 2015-10-09 15:37:30 -04:00
Martin Baulig f5eeb5597a [System]: Add the referencesource's ServicePointManager.cs.
This picks up the internal 'ServerCertValidationCallback' class,
not the actual ServicePointManager implementation (we can't switch
to that yet).
2015-10-09 15:21:13 -04:00
Martin Baulig 0fbda4c3bd [System]: Add internal RemoteCertValidationCallback and LocalCertSelectionCallback.
These two internal delegates are defined and used by the referencesource's SslStream
implementation; add them to our SslStream.cs version for compatibility.
2015-10-09 14:54:20 -04:00
Martin Baulig 2905ed96d1 [System]: Add ReferenceSources/Socket.cs to the mobile build.
This fixes commit c74c64718d64ecc05ddec21d12313d840842a9c2; these
new internal APIs are required by the referencesource's version of
NetworkStream.
2015-10-09 14:32:24 -04:00
Martin Baulig 90a8836c8d [Mono.Security.Providers]: New internal libraries for the new TLS code. 2015-10-09 14:10:51 -04:00
Martin Baulig 39cd3ee44f [System/TLS]: Internal additions to some referencesource files.
These won't be build in System.dll until we can switch to the new
TLS implementation.
2015-10-09 14:08:05 -04:00
Martin Baulig 8fbc5ba484 [System/TLS]: Add the new Mono.Security.Interface and Mono.Net.Security code.
This is not enabled in the build yet; doing so still requires a few more tweaks.
2015-10-09 14:07:35 -04:00
Martin Baulig 0eb51843e2 [System/build]: Wrap ReferenceSources/Logging.cs with '!MONO_FEATURE_NEW_TLS'. 2015-10-09 13:58:50 -04:00
Martin Baulig 0377d61060 [System]: Add missing System.Net.SecurityProtocolType enum values. 2015-10-09 13:55:15 -04:00
Martin Baulig 48b95ec304 [System/build]: Add two MONO_SECURITY_ALIAS and MONO_X509_ALIAS conditionals.
These should be used instead of MOBILE / MONOTOUCH / MONODROID to select
extern alias directives to make them work independently from the mobile profile.

* MONO_SECURITY_ALIAS: whether or not to use 'extern alias MonoSecurity'.

* MONO_X509_ALIAS: whether or not to use

    extern alias PrebuiltSystem;
    using X509CertificateCollection = PrebuiltSystem::System.Security.Cryptography.X509Certificates.X509CertificateCollection;

* MONO_FEATURE_NEW_TLS: ignore, this is not enabled in the default build.
2015-10-09 13:37:03 -04:00
Martin Baulig 5348243102 [System/build] Use the MOBILE_PROFILE conditional to define INSIDE_SYSTEM.
(cherry picked from commit a3500da8707f64ef5e49cca87f4d732abb0e07ae)
2015-10-09 12:01:00 -04:00
Martin Baulig c74c64718d [System]: Use the referencesource version of NetworkStream. 2015-10-09 11:57:37 -04:00
Miguel de Icaza 2f91f15645 Move System.IO.Compression and System.IO.Compression.FileSystem from the _parallels directory to the non-parallel ones, hoping that this will fix the issue where Facades that depend on the latter are built only after those are built, currently, we break (see https://wrench.internalx.com/Wrench/WebServices/Download.aspx?workfile_id=9795720)
(cherry picked from commit da86534ee4)
2015-10-09 10:10:13 -04:00
Rodrigo Kumpera eeeb225f5e [Facades] Add reflection Facades back to xammac. XM 2.4.0 shipped them so we can't just drop them now. 2015-10-06 15:42:46 -04:00
Miguel de Icaza 46ae4f7162 [System/build] Xamarin.Mac's bare/System.dll does not compile with SECURITY_DEP, like the desktop assemblies 2015-10-02 16:27:37 -04:00
Jon Purdy 2c0574b136 Fix assertion in mono_gchandle_get_target. 2015-10-02 14:55:26 -04:00
Virgile Bello 78e6538665 Inflate calli generic method signature even if not a wrapper 2015-10-02 16:05:41 +01:00
Radek Doulik 08ad1b6c58 [linker] allow to specify filename for linker dependencies file
- also do not use the timestamp in default filename as it
   can be now done by specifying the filename if needed
2015-09-30 16:54:19 +02:00
Zoltan Varga 96c1285ae5 [amd64] Fix cross compiling to amd64. 2015-09-29 18:14:12 -04:00
Zoltan Varga 2a379285e6 [arm] Fix the build. 2015-09-29 12:27:26 -04:00
João Matos 05255cd094 [runtime] Fixed opcode emulation logic for ARMv7k. 2015-09-29 12:27:15 -04:00
João Matos 89ff1067bf [runtime] Fixed ARMv7k detection logic. 2015-09-29 12:27:11 -04:00
Zoltan Varga 5f6f67ddb1 [arm] Use 16 byte frame alignment on watchos. 2015-09-28 21:57:40 -04:00
Zoltan Varga aa8a94891e [arm] Fix the unaligned stack check. 2015-09-28 21:56:03 -04:00
Zoltan Varga 3e93c004ed [arm] Fix another bunch of frame alignment problems. 2015-09-28 21:55:34 -04:00
Zoltan Varga e8b8690a11 [arm] Fix the stack alignment in the prolog to work with MONO_ARCH_FRAME_ALIGNMENT values other than 8. 2015-09-28 21:55:17 -04:00
Zoltan Varga 5ebbb4b813 [amd64] Fix the sigctx<->monoctx conversion code to work even if MONO_SIGNAL_USE_SIGACTION is not defined. 2015-09-28 19:12:59 -04:00
Zoltan Varga 009fd69def [amd64] Transition to using trampolines to implement single stepping/breakpoints in JIT mode too. 2015-09-28 18:17:14 -04:00
Zoltan Varga f4d67cef80 [jit] Fix opcode emulation registration when DISABLE_JIT is defined. 2015-09-25 13:08:55 -04:00
Zoltan Varga 4df1f05181 [arm] Fix compilation on arm. 2015-09-25 13:08:55 -04:00
Jonathan Pryor 5747973960 [Mono.Posix] Fix signal tests to run on OS X, Android.
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=33558

Several of the Signal-related tests were disabled when running on OS X
because OS X doesn't provide reliable delivery: it will try to deliver
a signal, but if it's already been delivered it won't continue
delivering them. This results in failures such as:

	1) MonoTests.Mono.Unix.UnixSignalTest.TestWaitAny :   Expected: 23061
	  But was:  100000

(Note that "Expected" and "actual" are reversed. Oops.)

Thus, signals are delivered, just "not enough."

As It Happens™, Android is similar: running these tests on
Xamarin.Android results in test failures because not enough signals
are received. (It's not as bad as OS X -- only ~10% off -- but it's
not *all* of the signals either.)

Fix the tests so that they *don't* require that we receive as many
signals as we raise. Instead, assert that all of the UnixSignal
instances actually have a UnixSignal.Count value greater than 0, i.e.
that they've been signaled AT ALL.

Loosening up the tests in this manner allows the tests to pass on
OS X, and should allow things to work as expected on Android.
2015-09-25 10:45:58 -04:00
Zoltan Varga 877cb94420 [arm64] Fix MONO_CONTEXT_GET_CURRENT support on arm64. 2015-09-24 21:41:03 -04:00
Rodrigo Kumpera d6b048717f [mach] Implement mono_mach_arch_thread_state_to_mono_context. 2015-09-24 19:57:41 -04:00
Rodrigo Kumpera 7a36028872 [utils] Split the arm64 code from the arm code for the mach support code.
Now those to conform to the convention used for everything else.
2015-09-24 19:57:36 -04:00
Rodrigo Kumpera b4788b47ff [tvos] Implement MONO_CONTEXT_GET_CURRENT in terms of thread_get_state. 2015-09-24 19:20:41 -04:00
Rodrigo Kumpera 29454e3179 [coop] Make coop suspend crashes have names that can be correlated to an Apple crash dump.
Use pthread_setname_np on attach to ensure every thread has a name that Apple's crash dump recognize.

The use pthread_getname_np when doing a thread dump to ensure we get the current thread name.

This cosmetic change will allow us to use Apple crash dumps when troubleshooting suspend issues.
2015-09-24 18:03:06 -04:00
Radek Doulik 9d2abd65f3 [linker] add timestamp to the linker deps filename
- and make sure we create a new stack on each dump
2015-09-24 20:37:03 +02:00
49 changed files with 603 additions and 397 deletions

No files matched your search

+13
View File
@@ -1077,6 +1077,12 @@ AC_CHECK_FUNCS(sigaction)
AC_CHECK_FUNCS(kill)
AC_CHECK_FUNCS(signal)
# signal() is declared inline in Android headers
# so we need to workaround it by overriding the check.
if test x$platform_android = xyes; then
AC_DEFINE(HAVE_SIGNAL,1)
fi
if test x$host_win32 = xno; then
dnl hires monotonic clock support
@@ -2562,6 +2568,13 @@ if test "x$enable_nacl_gc" = "xyes"; then
fi
AC_SUBST(MONO_NACL_ALIGN_MASK_OFF)
dnl **************************
dnl *** AOT cross offsets ***
dnl **************************
AC_ARG_WITH(cross-offsets, [ --with-cross-offsets=<offsets file path> Explicit AOT cross offsets file],
AC_DEFINE_UNQUOTED(MONO_OFFSETS_FILE, "$withval", [AOT cross offsets file]))
dnl **************
dnl *** LLVM ***
dnl **************
+7 -2
View File
@@ -74,13 +74,18 @@
#define NO_INTR(var,cmd) do { (var) = (cmd); } while ((var) == -1 && errno == EINTR)
#define CLOSE_PIPE(p) do { close (p [0]); close (p [1]); } while (0)
#if defined(__APPLE__) && !defined (__arm__) && !defined (__aarch64__)
#if defined(__APPLE__)
#if defined (TARGET_OSX)
/* Apple defines this in crt_externs.h but doesn't provide that header for
* arm-apple-darwin9. We'll manually define the symbol on Apple as it does
* in fact exist on all implementations (so far)
*/
gchar ***_NSGetEnviron();
gchar ***_NSGetEnviron(void);
#define environ (*_NSGetEnviron())
#else
static char *mono_environ[1] = { NULL };
#define environ mono_environ
#endif /* defined (TARGET_OSX) */
#elif defined(_MSC_VER)
/* MS defines this in stdlib.h */
#else
+1 -1
View File
@@ -35,7 +35,7 @@ net_4_x_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS) $(reflection_PARALLEL_S
monodroid_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS) $(reflection_PARALLEL_SUBDIRS)
xammac_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS)
xammac_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS) $(reflection_PARALLEL_SUBDIRS)
xammac_net_4_5_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS) $(reflection_PARALLEL_SUBDIRS)
monotouch_watch_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS)
+2 -2
View File
@@ -137,6 +137,8 @@ net_4_x_dirs := \
System.Security \
System.Configuration \
$(resgen_dir) \
System.IO.Compression \
System.IO.Compression.FileSystem \
System.Drawing \
System.Transactions \
System.EnterpriseServices \
@@ -247,8 +249,6 @@ net_4_x_parallel_dirs := \
System.Json.Microsoft \
System.Threading.Tasks.Dataflow \
System.ComponentModel.Composition.4.5 \
System.IO.Compression \
System.IO.Compression.FileSystem \
System.Windows \
System.Xml.Serialization \
System.DirectoryServices.Protocols \
@@ -410,7 +410,6 @@ namespace MonoTests.Mono.Unix {
const int StormCount = 100000;
[Test]
[Category("NotOnMac")] // OSX signal storming will not deliver every one
public void TestRaiseStorm ()
{
UnixSignal[] usignals = CreateSignals (signals);
@@ -424,7 +423,7 @@ namespace MonoTests.Mono.Unix {
t.Start ();
foreach (Thread t in threads)
t.Join ();
AssertCount (usignals);
AssertCountSet (usignals);
CloseSignals (usignals);
}
@@ -436,6 +435,13 @@ namespace MonoTests.Mono.Unix {
Assert.AreEqual (sum, StormCount);
}
static void AssertCountSet (UnixSignal[] usignals)
{
foreach (UnixSignal s in usignals) {
Assert.IsTrue (s.Count > 0);
}
}
static UnixSignal[] CreateSignals (Signum[] signals)
{
UnixSignal[] s = new UnixSignal [signals.Length];
@@ -462,7 +468,6 @@ namespace MonoTests.Mono.Unix {
}
[Test]
[Category("NotOnMac")] // OSX signal storming will not deliver every one
public void TestAddRemove ()
{
UnixSignal[] usignals = CreateSignals (signals);
@@ -477,7 +482,7 @@ namespace MonoTests.Mono.Unix {
foreach (Thread t in threads)
t.Join ();
AssertCount (usignals);
AssertCountSet (usignals);
CloseSignals (usignals);
}
@@ -497,7 +502,6 @@ namespace MonoTests.Mono.Unix {
}
[Test]
[Category("NotOnMac")] // OSX signal storming will not deliver every one
public void TestWaitAny ()
{
UnixSignal[] usignals = CreateSignals (signals);
@@ -515,7 +519,7 @@ namespace MonoTests.Mono.Unix {
foreach (Thread t in threads)
t.Join ();
AssertCount (usignals);
AssertCountSet (usignals);
CloseSignals (usignals);
}
+8
View File
@@ -31,9 +31,17 @@ RESOURCE_STRINGS = ../../../external/referencesource/System/System.txt
ifeq (2.1, $(FRAMEWORK_VERSION))
LIB_MCS_FLAGS += -d:INSIDE_SYSTEM
endif
#
# MOBILE_PROFILE needs SECURITY_DEP, except for XAMMAC
#
ifdef MOBILE_PROFILE
ifneq ($(PROFILE),xammac)
LIB_MCS_FLAGS += -d:SECURITY_DEP
endif
endif
ifndef MOBILE_PROFILE
FINAL_MCS_FLAGS = -r:System.Configuration.dll -d:CONFIGURATION_DEP
endif
@@ -3120,6 +3120,9 @@ namespace System.Net.Sockets
[MethodImplAttribute(MethodImplOptions.InternalCall)]
internal static extern void socket_pool_queue (SocketAsyncCallback d, SocketAsyncResult r);
[MethodImplAttribute(MethodImplOptions.InternalCall)]
internal static extern bool SupportsPortReuse ();
}
}
@@ -12,6 +12,7 @@ using System;
using System.Linq;
using System.Collections;
using System.Threading;
using System.Reflection;
using System.Text.RegularExpressions;
using System.Net;
using System.Net.Sockets;
@@ -3479,35 +3480,16 @@ namespace MonoTests.System.Net.Sockets
s.Close ();
}
static bool supportsTcpReuse = false;
static bool supportsTcpReuseSet = false;
static bool SupportsTcpReuse ()
static bool? supportsPortReuse;
static bool SupportsPortReuse ()
{
if (supportsTcpReuseSet)
return supportsTcpReuse;
if (supportsPortReuse.HasValue)
return supportsPortReuse.Value;
if (Path.DirectorySeparatorChar == '/') {
/*
* On UNIX OS
* Multiple threads listening to the same address and port are not possible
* before linux 3.9 kernel, where the socket option SO_REUSEPORT was introduced.
*/
Regex reg = new Regex(@"^#define\s*SO_REUSEPORT");
foreach (string directory in Directory.GetDirectories ("/usr/include")) {
var f = Directory.GetFiles (directory, "socket.h").SingleOrDefault ();
if (f != null && File.ReadLines (f).Any (l => reg.Match (l).Success)) {
supportsTcpReuse = true;
break;
}
}
} else {
supportsTcpReuse = true;
}
supportsTcpReuseSet = true;
return supportsTcpReuse;
supportsPortReuse = (bool) typeof (Socket).GetMethod ("SupportsPortReuse",
BindingFlags.Static | BindingFlags.NonPublic)
.Invoke (null, new object [] {});
return supportsPortReuse.Value;
}
// Test case for bug #31557
@@ -3533,7 +3515,7 @@ namespace MonoTests.System.Net.Sockets
ex = e;
}
Assert.AreEqual (SupportsTcpReuse (), ex == null);
Assert.AreEqual (SupportsPortReuse (), ex == null);
}
}
@@ -2333,7 +2333,7 @@ namespace MonoTests.System.Net
byte[] readBuffer = new byte[int.MaxValue - near2GBStartPosition];
Assert.AreEqual (webResponseStream.Read (readBuffer, 0, readBuffer.Length), readBuffer.Length, "#3");
readyGetLastPortionEvent.Set ();
Assert.Greater (webResponseStream.Read (readBuffer, 0, readBuffer.Length), 0, "#4");
Assert.IsTrue (webResponseStream.Read (readBuffer, 0, readBuffer.Length) > 0);
readyGetLastPortionEvent.Set ();
webResponse.Close();
@@ -32,7 +32,6 @@ using System;
using System.Threading;
using NUnit.Framework;
using System.Threading.Tasks;
using MonoTests.System.Threading.Tasks;
namespace MonoTests.System.Threading
{
@@ -446,10 +445,11 @@ namespace MonoTests.System.Threading
Assert.IsTrue (canceled, "#3");
}
[Category ("NotWorking")] // why would linked token be imune to ObjectDisposedException on Cancel?
[Test]
public void ConcurrentCancelLinkedTokenSourceWhileDisposing ()
{
ParallelTestHelper.Repeat (delegate {
for (int i = 0, total = 500; i < total; ++i) {
var src = new CancellationTokenSource ();
var linked = CancellationTokenSource.CreateLinkedTokenSource (src.Token);
var cntd = new CountdownEvent (2);
@@ -469,20 +469,19 @@ namespace MonoTests.System.Threading
t2.Start ();
t1.Join (500);
t2.Join (500);
}, 500);
}
}
#if NET_4_5
[Test]
public void DisposeRace ()
{
for (int i = 0; i < 1000; ++i) {
for (int i = 0, total = 1000; i < total; ++i) {
var c1 = new CancellationTokenSource ();
using (c1) {
var wh = c1.Token.WaitHandle;
c1.CancelAfter (1);
Thread.Sleep (1);
}
var wh = c1.Token.WaitHandle;
c1.CancelAfter (1);
Thread.Sleep (1);
c1.Dispose ();
}
}
#endif
+1 -2
View File
@@ -481,7 +481,6 @@ namespace MonoTests.System
public void TestPow ()
{
double precision;
int iTest = 1;
#if MONODROID
// It fails on Nexus 9 with
//
@@ -489,7 +488,7 @@ namespace MonoTests.System
//
// when using double_epsilon. Precision differs between different ARM CPUs, so we
// will just use a more conservative value
precision = double_epsilon * 10;
precision = 1.3636094460602122 - 1.3636094460602119;
#else
precision = double_epsilon;
#endif
@@ -129,15 +129,24 @@ namespace Mono.Linker.Steps {
return new Regex (pattern.Replace(".", @"\.").Replace("*", "(.*)"));
}
void MatchType (TypeDefinition type, Regex regex, XPathNavigator nav)
{
if (regex.Match (type.FullName).Success)
ProcessType (type, nav);
if (!type.HasNestedTypes)
return;
foreach (var nt in type.NestedTypes)
MatchType (nt, regex, nav);
}
void ProcessTypePattern (string fullname, AssemblyDefinition assembly, XPathNavigator nav)
{
Regex regex = CreateRegexFromPattern (fullname);
foreach (TypeDefinition type in assembly.MainModule.Types) {
if (!regex.Match (type.FullName).Success)
continue;
ProcessType (type, nav);
MatchType (type, regex, nav);
}
}
+9 -2
View File
@@ -52,16 +52,22 @@ namespace Mono.Linker {
readonly Dictionary<object, Dictionary<IMetadataTokenProvider, object>> custom_annotations = new Dictionary<object, Dictionary<IMetadataTokenProvider, object>> ();
readonly Stack<object> dependency_stack = new Stack<object> ();
Stack<object> dependency_stack;
System.Xml.XmlWriter writer;
GZipStream zipStream;
public void PrepareDependenciesDump ()
{
PrepareDependenciesDump ("linker-dependencies.xml.gz");
}
public void PrepareDependenciesDump (string filename)
{
dependency_stack = new Stack<object> ();
System.Xml.XmlWriterSettings settings = new System.Xml.XmlWriterSettings();
settings.Indent = true;
settings.IndentChars = "\t";
var depsFile = File.OpenWrite ("linker-dependencies.xml.gz");
var depsFile = File.OpenWrite (filename);
zipStream = new GZipStream (depsFile, CompressionMode.Compress);
writer = System.Xml.XmlWriter.Create (zipStream, settings);
@@ -317,6 +323,7 @@ namespace Mono.Linker {
zipStream.Dispose ();
writer = null;
zipStream = null;
dependency_stack = null;
}
}
}
@@ -37,11 +37,8 @@ namespace Mono.Tuner {
public override void ProcessField (FieldDefinition field)
{
var attribute = GetPreserveAttribute (field);
if (attribute == null)
return;
Mark (field, attribute);
foreach (var attribute in GetPreserveAttributes (field))
Mark (field, attribute);
}
public override void ProcessMethod (MethodDefinition method)
@@ -51,32 +48,25 @@ namespace Mono.Tuner {
public override void ProcessProperty (PropertyDefinition property)
{
var attribute = GetPreserveAttribute (property);
if (attribute == null)
return;
MarkMethod (property.GetMethod, attribute);
MarkMethod (property.SetMethod, attribute);
foreach (var attribute in GetPreserveAttributes (property)) {
MarkMethod (property.GetMethod, attribute);
MarkMethod (property.SetMethod, attribute);
}
}
public override void ProcessEvent (EventDefinition @event)
{
var attribute = GetPreserveAttribute (@event);
if (attribute == null)
return;
MarkMethod (@event.AddMethod, attribute);
MarkMethod (@event.InvokeMethod, attribute);
MarkMethod (@event.RemoveMethod, attribute);
foreach (var attribute in GetPreserveAttributes (@event)) {
MarkMethod (@event.AddMethod, attribute);
MarkMethod (@event.InvokeMethod, attribute);
MarkMethod (@event.RemoveMethod, attribute);
}
}
void MarkMethodIfPreserved (MethodDefinition method)
{
var attribute = GetPreserveAttribute (method);
if (attribute == null)
return;
MarkMethod (method, attribute);
foreach (var attribute in GetPreserveAttributes (method))
MarkMethod (method, attribute);
}
void MarkMethod (MethodDefinition method, CustomAttribute preserve_attribute)
@@ -135,40 +125,40 @@ namespace Mono.Tuner {
void TryApplyPreserveAttribute (TypeDefinition type)
{
var attribute = GetPreserveAttribute (type);
if (attribute == null)
return;
foreach (var attribute in GetPreserveAttributes (type)) {
Annotations.Mark (type);
Annotations.Mark (type);
if (!attribute.HasFields)
return;
foreach (var named_argument in attribute.Fields)
if (named_argument.Name == "AllMembers" && (bool) named_argument.Argument.Value)
Annotations.SetPreserve (type, TypePreserve.All);
if (!attribute.HasFields)
continue;
foreach (var named_argument in attribute.Fields)
if (named_argument.Name == "AllMembers" && (bool)named_argument.Argument.Value)
Annotations.SetPreserve (type, TypePreserve.All);
}
}
CustomAttribute GetPreserveAttribute (ICustomAttributeProvider provider)
List<CustomAttribute> GetPreserveAttributes (ICustomAttributeProvider provider)
{
List<CustomAttribute> attrs = new List<CustomAttribute> ();
if (!provider.HasCustomAttributes)
return null;
return attrs;
var attributes = provider.CustomAttributes;
for (int i = 0; i < attributes.Count; i++) {
for (int i = attributes.Count - 1; i >= 0; i--) {
var attribute = attributes [i];
bool remote_attribute;
if (!IsPreservedAttribute (provider, attribute, out remote_attribute))
continue;
attrs.Add (attribute);
if (remote_attribute)
attributes.RemoveAt (i);
return attribute;
}
return null;
return attrs;
}
}
}
@@ -60,6 +60,13 @@ namespace Mono.Tuner {
AddPreserveInfo (corlib, "HMACSHA512", "SHA512Managed");
TryAddPreserveInfo (corlib, "Aes", "AesManaged");
var corlibAes = GetCryptoType (corlib, "Aes");
Preserve (corlibAes, GetCryptoType (corlib, "AesManaged"));
AssemblyDefinition syscore;
if (context.TryGetLinkedAssembly ("System.Core", out syscore))
Preserve (corlibAes, GetCryptoType (syscore, "AesCryptoServiceProvider"));
}
void ProcessSystemCore (LinkContext context)
@@ -101,6 +108,8 @@ namespace Mono.Tuner {
void Preserve (TypeDefinition marker, TypeDefinition implementation)
{
if (marker == null || implementation == null)
return;
foreach (var constructor in implementation.GetConstructors ())
annotations.AddPreservedMethod (marker, constructor);
}
+7 -2
View File
@@ -96,14 +96,19 @@
#include <mono/utils/mono-proclib.h>
/* The process' environment strings */
#if defined(__APPLE__) && !defined (__arm__) && !defined (__aarch64__)
#if defined(__APPLE__)
#if defined (TARGET_OSX)
/* Apple defines this in crt_externs.h but doesn't provide that header for
* arm-apple-darwin9. We'll manually define the symbol on Apple as it does
* in fact exist on all implementations (so far)
*/
char ***_NSGetEnviron(void);
gchar ***_NSGetEnviron(void);
#define environ (*_NSGetEnviron())
#else
static char *mono_environ[1] = { NULL };
#define environ mono_environ
#endif /* defined (TARGET_OSX) */
#else
extern char **environ;
#endif
-3
View File
@@ -2066,9 +2066,6 @@ mono_class_layout_fields (MonoClass *class)
continue;
if (mono_field_is_deleted (field))
continue;
// Special static fields do not need a domain-level static slot
if (mono_class_field_is_special_static (field))
continue;
if (mono_type_has_exceptions (field->type)) {
mono_class_set_failure (class, MONO_EXCEPTION_TYPE_LOAD, NULL);
-3
View File
@@ -1040,9 +1040,6 @@ mono_class_describe_statics (MonoClass* klass)
continue;
if (!(field->type->attrs & (FIELD_ATTRIBUTE_STATIC | FIELD_ATTRIBUTE_HAS_FIELD_RVA)))
continue;
// Special static fields don't have a domain-level static slot
if (mono_class_field_is_special_static (field))
continue;
field_ptr = (const char*)addr + field->offset;
+1
View File
@@ -440,6 +440,7 @@ ICALL(SOCK_17, "Send_internal(intptr,byte[],int,int,System.Net.Sockets.SocketFla
ICALL(SOCK_18, "SetSocketOption_internal(intptr,System.Net.Sockets.SocketOptionLevel,System.Net.Sockets.SocketOptionName,object,byte[],int,int&)", ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal)
ICALL(SOCK_19, "Shutdown_internal(intptr,System.Net.Sockets.SocketShutdown,int&)", ves_icall_System_Net_Sockets_Socket_Shutdown_internal)
ICALL(SOCK_20, "Socket_internal(System.Net.Sockets.AddressFamily,System.Net.Sockets.SocketType,System.Net.Sockets.ProtocolType,int&)", ves_icall_System_Net_Sockets_Socket_Socket_internal)
ICALL(SOCK_20a, "SupportsPortReuse", ves_icall_System_Net_Sockets_Socket_SupportPortReuse)
ICALL(SOCK_21a, "cancel_blocking_socket_operation", icall_cancel_blocking_socket_operation)
ICALL(SOCK_22, "socket_pool_queue", icall_append_io_job)
+6 -1
View File
@@ -5846,7 +5846,8 @@ ves_icall_System_Environment_GetEnvironmentVariable (MonoString *name)
*/
#ifndef _MSC_VER
#ifndef __MINGW32_VERSION
#if defined(__APPLE__) && !defined (__arm__) && !defined (__aarch64__)
#if defined(__APPLE__)
#if defined (TARGET_OSX)
/* Apple defines this in crt_externs.h but doesn't provide that header for
* arm-apple-darwin9. We'll manually define the symbol on Apple as it does
* in fact exist on all implementations (so far)
@@ -5854,6 +5855,10 @@ ves_icall_System_Environment_GetEnvironmentVariable (MonoString *name)
gchar ***_NSGetEnviron(void);
#define environ (*_NSGetEnviron())
#else
static char *mono_environ[1] = { NULL };
#define environ mono_environ
#endif /* defined (TARGET_OSX) */
#else
extern
char **environ;
#endif
+2 -4
View File
@@ -725,8 +725,8 @@ compute_class_bitmap (MonoClass *class, gsize *bitmap, int size, int offset, int
if (field->type->byref)
break;
// Special static fields do not have a domain-level static slot
if (static_fields && mono_class_field_is_special_static (field))
if (static_fields && field->offset == -1)
/* special static */
continue;
pos = field->offset / sizeof (gpointer);
@@ -2419,8 +2419,6 @@ mono_class_field_is_special_static (MonoClassField *field)
if (mono_field_is_deleted (field))
return FALSE;
if (!(field->type->attrs & FIELD_ATTRIBUTE_LITERAL)) {
if (field->offset == -1)
return TRUE;
if (field_is_special_static (field->parent, field) != SPECIAL_STATIC_NONE)
return TRUE;
}
+10
View File
@@ -2540,6 +2540,16 @@ ves_icall_System_Net_Sockets_Socket_SendFile_internal (SOCKET sock, MonoString *
return ret;
}
gboolean
ves_icall_System_Net_Sockets_Socket_SupportPortReuse (void)
{
#if defined (SO_REUSEPORT) || defined (HOST_WIN32)
return TRUE;
#else
return FALSE;
#endif
}
void
mono_network_init(void)
{
+1
View File
@@ -223,6 +223,7 @@ extern MonoBoolean ves_icall_System_Net_Sockets_Socket_Poll_internal (SOCKET soc
extern void ves_icall_System_Net_Sockets_Socket_Disconnect_internal(SOCKET sock, MonoBoolean reuse, gint32 *error);
extern gboolean ves_icall_System_Net_Sockets_Socket_SendFile_internal (SOCKET sock, MonoString *filename, MonoArray *pre_buffer, MonoArray *post_buffer, gint flags);
void icall_cancel_blocking_socket_operation (MonoThread *thread);
extern gboolean ves_icall_System_Net_Sockets_Socket_SupportPortReuse (void);
extern void mono_network_init(void);
extern void mono_network_cleanup(void);
+6 -7
View File
@@ -7190,17 +7190,16 @@ mini_get_signature (MonoMethod *method, guint32 token, MonoGenericContext *conte
MonoMethodSignature *fsig;
if (method->wrapper_type != MONO_WRAPPER_NONE) {
MonoError error;
fsig = (MonoMethodSignature *)mono_method_get_wrapper_data (method, token);
if (context) {
fsig = mono_inflate_generic_signature (fsig, context, &error);
// FIXME:
g_assert (mono_error_ok (&error));
}
} else {
fsig = mono_metadata_parse_signature (method->klass->image, token);
}
if (context) {
MonoError error;
fsig = mono_inflate_generic_signature(fsig, context, &error);
// FIXME:
g_assert(mono_error_ok(&error));
}
return fsig;
}
+65 -136
View File
@@ -65,27 +65,12 @@ static gboolean optimize_for_xen = TRUE;
#define mono_mini_arch_unlock() mono_mutex_unlock (&mini_arch_mutex)
static mono_mutex_t mini_arch_mutex;
/*
* The code generated for sequence points reads from this location, which is
* made read-only when single stepping is enabled.
*/
static gpointer ss_trigger_page;
/* Enabled breakpoints read from this trigger page */
static gpointer bp_trigger_page;
/* The size of the breakpoint sequence */
static int breakpoint_size;
/* The size of the breakpoint instruction causing the actual fault */
static int breakpoint_fault_size;
/* The size of the single step instruction causing the actual fault */
static int single_step_fault_size;
/* The single step trampoline */
static gpointer ss_trampoline;
/* The breakpoint trampoline */
static gpointer bp_trampoline;
/* Offset between fp and the first argument in the callee */
#define ARGS_OFFSET 16
#define GP_SCRATCH_REG AMD64_R11
@@ -1325,8 +1310,6 @@ mono_arch_cpu_init (void)
void
mono_arch_init (void)
{
int flags;
mono_mutex_init_recursive (&mini_arch_mutex);
#if defined(__native_client_codegen__)
mono_native_tls_alloc (&nacl_instruction_depth, NULL);
@@ -1335,29 +1318,13 @@ mono_arch_init (void)
mono_native_tls_alloc (&nacl_legacy_prefix_tag, NULL);
#endif
#ifdef MONO_ARCH_NOMAP32BIT
flags = MONO_MMAP_READ;
/* amd64_mov_reg_imm () + amd64_mov_reg_membase () */
breakpoint_size = 13;
breakpoint_fault_size = 3;
#else
flags = MONO_MMAP_READ|MONO_MMAP_32BIT;
/* amd64_mov_reg_mem () */
breakpoint_size = 8;
breakpoint_fault_size = 8;
#endif
/* amd64_alu_membase_imm_size (code, X86_CMP, AMD64_R11, 0, 0, 4); */
single_step_fault_size = 4;
ss_trigger_page = mono_valloc (NULL, mono_pagesize (), flags);
bp_trigger_page = mono_valloc (NULL, mono_pagesize (), flags);
mono_mprotect (bp_trigger_page, mono_pagesize (), 0);
mono_aot_register_jit_icall ("mono_amd64_throw_exception", mono_amd64_throw_exception);
mono_aot_register_jit_icall ("mono_amd64_throw_corlib_exception", mono_amd64_throw_corlib_exception);
mono_aot_register_jit_icall ("mono_amd64_resume_unwind", mono_amd64_resume_unwind);
mono_aot_register_jit_icall ("mono_amd64_get_original_ip", mono_amd64_get_original_ip);
if (!mono_aot_only)
bp_trampoline = mini_get_breakpoint_trampoline ();
}
/*
@@ -1992,15 +1959,14 @@ mono_arch_create_vars (MonoCompile *cfg)
MonoInst *ins = mono_compile_create_var (cfg, &mono_defaults.int_class->byval_arg, OP_LOCAL);
ins->flags |= MONO_INST_VOLATILE;
cfg->arch.seq_point_info_var = ins;
ins = mono_compile_create_var (cfg, &mono_defaults.int_class->byval_arg, OP_LOCAL);
ins->flags |= MONO_INST_VOLATILE;
cfg->arch.ss_tramp_var = ins;
}
ins = mono_compile_create_var (cfg, &mono_defaults.int_class->byval_arg, OP_LOCAL);
ins = mono_compile_create_var (cfg, &mono_defaults.int_class->byval_arg, OP_LOCAL);
ins->flags |= MONO_INST_VOLATILE;
cfg->arch.ss_trigger_page_var = ins;
cfg->arch.ss_tramp_var = ins;
ins = mono_compile_create_var (cfg, &mono_defaults.int_class->byval_arg, OP_LOCAL);
ins->flags |= MONO_INST_VOLATILE;
cfg->arch.bp_tramp_var = ins;
}
if (cfg->method->save_lmf)
@@ -4186,35 +4152,21 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
mono_add_seq_point (cfg, bb, ins, code - cfg->native_code);
break;
case OP_SEQ_POINT: {
int i;
if (ins->flags & MONO_INST_SINGLE_STEP_LOC) {
if (cfg->compile_aot) {
MonoInst *var = cfg->arch.ss_tramp_var;
guint8 *label;
MonoInst *var = cfg->arch.ss_tramp_var;
guint8 *label;
/* Load ss_tramp_var */
amd64_mov_reg_membase (code, AMD64_R11, var->inst_basereg, var->inst_offset, 8);
/* Load the trampoline address */
amd64_mov_reg_membase (code, AMD64_R11, AMD64_R11, 0, 8);
/* Call it if it is non-null */
amd64_test_reg_reg (code, AMD64_R11, AMD64_R11);
label = code;
amd64_branch8 (code, X86_CC_Z, 0, FALSE);
amd64_call_reg (code, AMD64_R11);
amd64_patch (label, code);
} else {
/*
* Read from the single stepping trigger page. This will cause a
* SIGSEGV when single stepping is enabled.
* We do this _before_ the breakpoint, so single stepping after
* a breakpoint is hit will step to the next IL offset.
*/
MonoInst *var = cfg->arch.ss_trigger_page_var;
amd64_mov_reg_membase (code, AMD64_R11, var->inst_basereg, var->inst_offset, 8);
amd64_alu_membase_imm_size (code, X86_CMP, AMD64_R11, 0, 0, 4);
}
/* Load ss_tramp_var */
/* This is equal to &ss_trampoline */
amd64_mov_reg_membase (code, AMD64_R11, var->inst_basereg, var->inst_offset, 8);
/* Load the trampoline address */
amd64_mov_reg_membase (code, AMD64_R11, AMD64_R11, 0, 8);
/* Call it if it is non-null */
amd64_test_reg_reg (code, AMD64_R11, AMD64_R11);
label = code;
amd64_branch8 (code, X86_CC_Z, 0, FALSE);
amd64_call_reg (code, AMD64_R11);
amd64_patch (label, code);
}
/*
@@ -4240,12 +4192,26 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
amd64_call_reg (code, AMD64_R11);
amd64_patch (label, code);
} else {
/*
* A placeholder for a possible breakpoint inserted by
* mono_arch_set_breakpoint ().
MonoInst *var = cfg->arch.bp_tramp_var;
guint8 *label;
/*
* Emit a test+branch against a constant, the constant will be overwritten
* by mono_arch_set_breakpoint () to cause the test to fail.
*/
for (i = 0; i < breakpoint_size; ++i)
x86_nop (code);
amd64_mov_reg_imm (code, AMD64_R11, 0);
amd64_test_reg_reg (code, AMD64_R11, AMD64_R11);
label = code;
amd64_branch8 (code, X86_CC_Z, 0, FALSE);
g_assert (var);
g_assert (var->opcode == OP_REGOFFSET);
/* Load bp_tramp_var */
/* This is equal to &bp_trampoline */
amd64_mov_reg_membase (code, AMD64_R11, var->inst_basereg, var->inst_offset, 8);
/* Call the trampoline */
amd64_call_membase (code, AMD64_R11, 0);
amd64_patch (label, code);
}
/*
* Add an additional nop so skipping the bp doesn't cause the ip to point
@@ -7213,12 +7179,18 @@ mono_arch_emit_prolog (MonoCompile *cfg)
amd64_mov_reg_membase (code, AMD64_R11, AMD64_R11, MONO_STRUCT_OFFSET (SeqPointInfo, ss_tramp_addr), 8);
amd64_mov_membase_reg (code, ins->inst_basereg, ins->inst_offset, AMD64_R11, 8);
} else {
/* Initialize ss_trigger_page_var */
ins = cfg->arch.ss_trigger_page_var;
/* Initialize ss_tramp_var */
ins = cfg->arch.ss_tramp_var;
g_assert (ins->opcode == OP_REGOFFSET);
amd64_mov_reg_imm (code, AMD64_R11, (guint64)ss_trigger_page);
amd64_mov_reg_imm (code, AMD64_R11, (guint64)&ss_trampoline);
amd64_mov_membase_reg (code, ins->inst_basereg, ins->inst_offset, AMD64_R11, 8);
/* Initialize bp_tramp_var */
ins = cfg->arch.bp_tramp_var;
g_assert (ins->opcode == OP_REGOFFSET);
amd64_mov_reg_imm (code, AMD64_R11, (guint64)&bp_trampoline);
amd64_mov_membase_reg (code, ins->inst_basereg, ins->inst_offset, AMD64_R11, 8);
}
}
@@ -8471,7 +8443,6 @@ void
mono_arch_set_breakpoint (MonoJitInfo *ji, guint8 *ip)
{
guint8 *code = ip;
guint8 *orig_code = code;
if (ji->from_aot) {
guint32 native_offset = ip - (guint8*)ji->code_start;
@@ -8480,20 +8451,10 @@ mono_arch_set_breakpoint (MonoJitInfo *ji, guint8 *ip)
g_assert (info->bp_addrs [native_offset] == 0);
info->bp_addrs [native_offset] = mini_get_breakpoint_trampoline ();
} else {
/*
* In production, we will use int3 (has to fix the size in the md
* file). But that could confuse gdb, so during development, we emit a SIGSEGV
* instead.
*/
g_assert (code [0] == 0x90);
if (breakpoint_size == 8) {
amd64_mov_reg_mem (code, AMD64_R11, (guint64)bp_trigger_page, 4);
} else {
amd64_mov_reg_imm_size (code, AMD64_R11, (guint64)bp_trigger_page, 8);
amd64_mov_reg_membase (code, AMD64_R11, AMD64_R11, 0, 4);
}
g_assert (code - orig_code == breakpoint_size);
/* ip points to a mov r11, 0 */
g_assert (code [0] == 0x41);
g_assert (code [1] == 0xbb);
amd64_mov_reg_imm (code, AMD64_R11, 1);
}
}
@@ -8506,7 +8467,6 @@ void
mono_arch_clear_breakpoint (MonoJitInfo *ji, guint8 *ip)
{
guint8 *code = ip;
int i;
if (ji->from_aot) {
guint32 native_offset = ip - (guint8*)ji->code_start;
@@ -8514,28 +8474,15 @@ mono_arch_clear_breakpoint (MonoJitInfo *ji, guint8 *ip)
info->bp_addrs [native_offset] = NULL;
} else {
for (i = 0; i < breakpoint_size; ++i)
x86_nop (code);
amd64_mov_reg_imm (code, AMD64_R11, 0);
}
}
gboolean
mono_arch_is_breakpoint_event (void *info, void *sigctx)
{
#ifdef HOST_WIN32
EXCEPTION_RECORD* einfo = ((EXCEPTION_POINTERS*)info)->ExceptionRecord;
if (einfo->ExceptionCode == EXCEPTION_ACCESS_VIOLATION && (gpointer)einfo->ExceptionInformation [1] == bp_trigger_page)
return TRUE;
else
return FALSE;
#else
siginfo_t* sinfo = (siginfo_t*) info;
/* Sometimes the address is off by 4 */
if (sinfo->si_addr >= bp_trigger_page && (guint8*)sinfo->si_addr <= (guint8*)bp_trigger_page + 128)
return TRUE;
else
return FALSE;
#endif
/* We use soft breakpoints on amd64 */
return FALSE;
}
/*
@@ -8547,11 +8494,7 @@ mono_arch_is_breakpoint_event (void *info, void *sigctx)
void
mono_arch_skip_breakpoint (MonoContext *ctx, MonoJitInfo *ji)
{
if (ji->from_aot) {
/* The breakpoint instruction is a call */
} else {
MONO_CONTEXT_SET_IP (ctx, (guint8*)MONO_CONTEXT_GET_IP (ctx) + breakpoint_fault_size);
}
g_assert_not_reached ();
}
/*
@@ -8562,7 +8505,6 @@ mono_arch_skip_breakpoint (MonoContext *ctx, MonoJitInfo *ji)
void
mono_arch_start_single_stepping (void)
{
mono_mprotect (ss_trigger_page, mono_pagesize (), 0);
ss_trampoline = mini_get_single_step_trampoline ();
}
@@ -8574,7 +8516,6 @@ mono_arch_start_single_stepping (void)
void
mono_arch_stop_single_stepping (void)
{
mono_mprotect (ss_trigger_page, mono_pagesize (), MONO_MMAP_READ);
ss_trampoline = NULL;
}
@@ -8587,20 +8528,8 @@ mono_arch_stop_single_stepping (void)
gboolean
mono_arch_is_single_step_event (void *info, void *sigctx)
{
#ifdef HOST_WIN32
EXCEPTION_RECORD* einfo = ((EXCEPTION_POINTERS*)info)->ExceptionRecord;
if (einfo->ExceptionCode == EXCEPTION_ACCESS_VIOLATION && (gpointer)einfo->ExceptionInformation [1] == ss_trigger_page)
return TRUE;
else
return FALSE;
#else
siginfo_t* sinfo = (siginfo_t*) info;
/* Sometimes the address is off by 4 */
if (sinfo->si_addr >= ss_trigger_page && (guint8*)sinfo->si_addr <= (guint8*)ss_trigger_page + 128)
return TRUE;
else
return FALSE;
#endif
/* We use soft breakpoints on amd64 */
return FALSE;
}
/*
@@ -8612,7 +8541,7 @@ mono_arch_is_single_step_event (void *info, void *sigctx)
void
mono_arch_skip_single_step (MonoContext *ctx)
{
MONO_CONTEXT_SET_IP (ctx, (guint8*)MONO_CONTEXT_GET_IP (ctx) + single_step_fault_size);
g_assert_not_reached ();
}
/*
+1 -2
View File
@@ -209,11 +209,10 @@ typedef struct MonoCompileArch {
gpointer seq_point_info_var;
gpointer ss_trigger_page_var;
gpointer ss_tramp_var;
gpointer bp_tramp_var;
gpointer lmf_var;
} MonoCompileArch;
#ifdef TARGET_WIN32
#define PARAM_REGS 4
#else
+26 -19
View File
@@ -103,6 +103,7 @@ static gboolean v5_supported = FALSE;
static gboolean v6_supported = FALSE;
static gboolean v7_supported = FALSE;
static gboolean v7s_supported = FALSE;
static gboolean v7k_supported = FALSE;
static gboolean thumb_supported = FALSE;
static gboolean thumb2_supported = FALSE;
/*
@@ -970,6 +971,7 @@ mono_arch_init (void)
v6_supported = mono_hwcap_arm_is_v6;
v7_supported = mono_hwcap_arm_is_v7;
v7s_supported = mono_hwcap_arm_is_v7s;
v7k_supported = mono_hwcap_arm_is_v7k;
#if defined(__APPLE__)
/* iOS is special-cased here because we don't yet
@@ -991,6 +993,7 @@ mono_arch_init (void)
v6_supported = cpu_arch [4] >= '6';
v7_supported = cpu_arch [4] >= '7';
v7s_supported = strncmp (cpu_arch, "armv7s", 6) == 0;
v7k_supported = strncmp (cpu_arch, "armv7k", 6) == 0;
}
thumb_supported = strstr (cpu_arch, "thumb") != NULL;
@@ -1036,7 +1039,7 @@ mono_arch_cpu_enumerate_simd_versions (void)
gboolean
mono_arch_opcode_needs_emulation (MonoCompile *cfg, int opcode)
{
if (v7s_supported) {
if (v7s_supported || v7k_supported) {
switch (opcode) {
case OP_IDIV:
case OP_IREM:
@@ -4884,20 +4887,20 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
ARM_AND_REG_IMM (code, ins->dreg, ins->sreg1, imm8, rot_amount);
break;
case OP_IDIV:
g_assert (v7s_supported);
g_assert (v7s_supported || v7k_supported);
ARM_SDIV (code, ins->dreg, ins->sreg1, ins->sreg2);
break;
case OP_IDIV_UN:
g_assert (v7s_supported);
g_assert (v7s_supported || v7k_supported);
ARM_UDIV (code, ins->dreg, ins->sreg1, ins->sreg2);
break;
case OP_IREM:
g_assert (v7s_supported);
g_assert (v7s_supported || v7k_supported);
ARM_SDIV (code, ARMREG_LR, ins->sreg1, ins->sreg2);
ARM_MLS (code, ins->dreg, ARMREG_LR, ins->sreg2, ins->sreg1);
break;
case OP_IREM_UN:
g_assert (v7s_supported);
g_assert (v7s_supported || v7k_supported);
ARM_UDIV (code, ARMREG_LR, ins->sreg1, ins->sreg2);
ARM_MLS (code, ins->dreg, ARMREG_LR, ins->sreg2, ins->sreg1);
break;
@@ -5214,8 +5217,8 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
}
case OP_LOCALLOC: {
/* round the size to 8 bytes */
ARM_ADD_REG_IMM8 (code, ins->dreg, ins->sreg1, 7);
ARM_BIC_REG_IMM8 (code, ins->dreg, ins->dreg, 7);
ARM_ADD_REG_IMM8 (code, ins->dreg, ins->sreg1, (MONO_ARCH_FRAME_ALIGNMENT - 1));
ARM_BIC_REG_IMM8 (code, ins->dreg, ins->dreg, (MONO_ARCH_FRAME_ALIGNMENT - 1));
ARM_SUB_REG_REG (code, ARMREG_SP, ARMREG_SP, ins->dreg);
/* memzero the area: dreg holds the size, sp is the pointer */
if (ins->flags & MONO_INST_INIT) {
@@ -5290,14 +5293,15 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
}
case OP_START_HANDLER: {
MonoInst *spvar = mono_find_spvar_for_region (cfg, bb->region);
int param_area = ALIGN_TO (cfg->param_area, MONO_ARCH_FRAME_ALIGNMENT);
int i, rot_amount;
/* Reserve a param area, see filter-stack.exe */
if (cfg->param_area) {
if ((i = mono_arm_is_rotated_imm8 (cfg->param_area, &rot_amount)) >= 0) {
if (param_area) {
if ((i = mono_arm_is_rotated_imm8 (param_area, &rot_amount)) >= 0) {
ARM_SUB_REG_IMM (code, ARMREG_SP, ARMREG_SP, i, rot_amount);
} else {
code = mono_arm_emit_load_imm (code, ARMREG_IP, cfg->param_area);
code = mono_arm_emit_load_imm (code, ARMREG_IP, param_area);
ARM_SUB_REG_REG (code, ARMREG_SP, ARMREG_SP, ARMREG_IP);
}
}
@@ -5312,14 +5316,15 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
}
case OP_ENDFILTER: {
MonoInst *spvar = mono_find_spvar_for_region (cfg, bb->region);
int param_area = ALIGN_TO (cfg->param_area, MONO_ARCH_FRAME_ALIGNMENT);
int i, rot_amount;
/* Free the param area */
if (cfg->param_area) {
if ((i = mono_arm_is_rotated_imm8 (cfg->param_area, &rot_amount)) >= 0) {
if (param_area) {
if ((i = mono_arm_is_rotated_imm8 (param_area, &rot_amount)) >= 0) {
ARM_ADD_REG_IMM (code, ARMREG_SP, ARMREG_SP, i, rot_amount);
} else {
code = mono_arm_emit_load_imm (code, ARMREG_IP, cfg->param_area);
code = mono_arm_emit_load_imm (code, ARMREG_IP, param_area);
ARM_ADD_REG_REG (code, ARMREG_SP, ARMREG_SP, ARMREG_IP);
}
}
@@ -5338,14 +5343,15 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
}
case OP_ENDFINALLY: {
MonoInst *spvar = mono_find_spvar_for_region (cfg, bb->region);
int param_area = ALIGN_TO (cfg->param_area, MONO_ARCH_FRAME_ALIGNMENT);
int i, rot_amount;
/* Free the param area */
if (cfg->param_area) {
if ((i = mono_arm_is_rotated_imm8 (cfg->param_area, &rot_amount)) >= 0) {
if (param_area) {
if ((i = mono_arm_is_rotated_imm8 (param_area, &rot_amount)) >= 0) {
ARM_ADD_REG_IMM (code, ARMREG_SP, ARMREG_SP, i, rot_amount);
} else {
code = mono_arm_emit_load_imm (code, ARMREG_IP, cfg->param_area);
code = mono_arm_emit_load_imm (code, ARMREG_IP, param_area);
ARM_ADD_REG_REG (code, ARMREG_SP, ARMREG_SP, ARMREG_IP);
}
}
@@ -6262,8 +6268,7 @@ mono_arch_emit_prolog (MonoCompile *cfg)
}
/* the stack used in the pushed regs */
if (prev_sp_offset & 4)
alloc_size += 4;
alloc_size += ALIGN_TO (prev_sp_offset, MONO_ARCH_FRAME_ALIGNMENT) - prev_sp_offset;
cfg->stack_usage = alloc_size;
if (alloc_size) {
if ((i = mono_arm_is_rotated_imm8 (alloc_size, &rot_amount)) >= 0) {
@@ -6316,7 +6321,6 @@ mono_arch_emit_prolog (MonoCompile *cfg)
code = mono_arm_emit_load_imm (code, ARMREG_R0, (guint32)cfg->method);
mono_add_patch_info (cfg, code - cfg->native_code, MONO_PATCH_INFO_INTERNAL_METHOD, "mono_arm_unaligned_stack");
code = emit_call_seq (cfg, code);
code = emit_call_reg (code, ARMREG_LR);
arm_patch (buf [0], code);
}
*/
@@ -7678,6 +7682,9 @@ mono_arch_set_target (char *mtriple)
if (strstr (mtriple, "armv7s")) {
v7s_supported = TRUE;
}
if (strstr (mtriple, "armv7k")) {
v7k_supported = TRUE;
}
if (strstr (mtriple, "thumbv7s")) {
v5_supported = TRUE;
v6_supported = TRUE;
+4
View File
@@ -118,7 +118,11 @@
#define MONO_ARCH_INST_REGPAIR_REG2(desc,hreg1) ((desc) == 'l' || (desc) == 'f' || (desc) == 'g' ? ARM_MSW_REG : -1)
#ifdef TARGET_WATCHOS
#define MONO_ARCH_FRAME_ALIGNMENT 16
#else
#define MONO_ARCH_FRAME_ALIGNMENT 8
#endif
/* fixme: align to 16byte instead of 32byte (we align to 32byte to get
* reproduceable results for benchmarks */
+8
View File
@@ -658,6 +658,14 @@ register_opcode_emulation (int opcode, const char *name, const char *sigstr, gpo
{
#ifndef DISABLE_JIT
mini_register_opcode_emulation (opcode, name, sigstr, func, symbol, no_throw);
#else
MonoMethodSignature *sig = mono_create_icall_signature (sigstr);
g_assert (!sig->hasthis);
g_assert (sig->param_count < 3);
/* Opcode emulation functions are assumed to don't call mono_raise_exception () */
mono_register_jit_icall_full (func, name, sig, no_throw, TRUE, symbol);
#endif
}
+5 -5
View File
@@ -972,18 +972,18 @@ mono_arch_create_sdb_trampoline (gboolean single_step, MonoTrampInfo **info, gbo
code = mono_arch_emit_load_aotconst (buf, code, &ji, MONO_PATCH_INFO_JIT_ICALL_ADDR, "debugger_agent_single_step_from_context");
else
code = mono_arch_emit_load_aotconst (buf, code, &ji, MONO_PATCH_INFO_JIT_ICALL_ADDR, "debugger_agent_breakpoint_from_context");
amd64_call_reg (code, AMD64_R11);
} else {
if (single_step)
amd64_call_code (code, debugger_agent_single_step_from_context);
amd64_mov_reg_imm (code, AMD64_R11, debugger_agent_single_step_from_context);
else
amd64_call_code (code, debugger_agent_breakpoint_from_context);
}
amd64_mov_reg_imm (code, AMD64_R11, debugger_agent_breakpoint_from_context);
}
amd64_call_reg (code, AMD64_R11);
/* Restore registers from ctx */
for (i = 0; i < AMD64_NREG; ++i) {
if (i != AMD64_RIP && i != AMD64_RSP && i != AMD64_RBP)
amd64_mov_reg_membase (code, AMD64_RSP, i, gregs_offset + (i * sizeof (mgreg_t)), sizeof (mgreg_t));
amd64_mov_reg_membase (code, i, AMD64_RSP, gregs_offset + (i * sizeof (mgreg_t)), sizeof (mgreg_t));
}
amd64_mov_reg_membase (code, AMD64_R11, AMD64_RSP, gregs_offset + (AMD64_RBP * sizeof (mgreg_t)), sizeof (mgreg_t));
amd64_mov_membase_reg (code, AMD64_RBP, 0, AMD64_R11, sizeof (mgreg_t));
+3 -3
View File
@@ -34,10 +34,10 @@
/* h indicates whether to hide or just tag.
* (-!!h ^ p) is used instead of (h ? ~p : p) to avoid multiple mentions of p.
*/
#define MONO_GC_HIDE_POINTER(p,t,h) ((gpointer)(((-(size_t)!!(h) ^ (size_t)(p)) & ~3UL) | ((t) & 3UL)))
#define MONO_GC_REVEAL_POINTER(p,h) ((gpointer)((-(size_t)!!(h) ^ (size_t)(p)) & ~3UL))
#define MONO_GC_HIDE_POINTER(p,t,h) ((gpointer)(((-(size_t)!!(h) ^ (size_t)(p)) & ~(size_t)3) | ((t) & (size_t)3)))
#define MONO_GC_REVEAL_POINTER(p,h) ((gpointer)((-(size_t)!!(h) ^ (size_t)(p)) & ~(size_t)3))
#define MONO_GC_POINTER_TAG(p) ((size_t)(p) & 3UL)
#define MONO_GC_POINTER_TAG(p) ((size_t)(p) & (size_t)3)
#define MONO_GC_HANDLE_OCCUPIED_MASK (1)
#define MONO_GC_HANDLE_VALID_MASK (2)
+10 -2
View File
@@ -156,8 +156,7 @@ static HandleData gc_handles [] = {
static HandleData *
gc_handles_for_type (GCHandleType type)
{
g_assert (type < HANDLE_TYPE_MAX);
return &gc_handles [type];
return type < HANDLE_TYPE_MAX ? &gc_handles [type] : NULL;
}
/* This assumes that the world is stopped. */
@@ -439,6 +438,9 @@ mono_gchandle_get_target (guint32 gchandle)
guint index = MONO_GC_HANDLE_SLOT (gchandle);
guint type = MONO_GC_HANDLE_TYPE (gchandle);
HandleData *handles = gc_handles_for_type (type);
/* Invalid handles are possible; accessing one should produce NULL. (#34276) */
if (!handles)
return NULL;
guint bucket, offset;
g_assert (index < handles->capacity);
bucketize (index, &bucket, &offset);
@@ -451,6 +453,8 @@ sgen_gchandle_set_target (guint32 gchandle, GCObject *obj)
guint index = MONO_GC_HANDLE_SLOT (gchandle);
guint type = MONO_GC_HANDLE_TYPE (gchandle);
HandleData *handles = gc_handles_for_type (type);
if (!handles)
return;
guint bucket, offset;
gpointer slot;
@@ -499,6 +503,8 @@ sgen_gchandle_get_metadata (guint32 gchandle)
guint index = MONO_GC_HANDLE_SLOT (gchandle);
guint type = MONO_GC_HANDLE_TYPE (gchandle);
HandleData *handles = gc_handles_for_type (type);
if (!handles)
return NULL;
guint bucket, offset;
if (index >= handles->capacity)
return NULL;
@@ -520,6 +526,8 @@ mono_gchandle_free (guint32 gchandle)
guint index = MONO_GC_HANDLE_SLOT (gchandle);
guint type = MONO_GC_HANDLE_TYPE (gchandle);
HandleData *handles = gc_handles_for_type (type);
if (!handles)
return;
guint bucket, offset;
gpointer slot;
bucketize (index, &bucket, &offset);
+1
View File
@@ -611,6 +611,7 @@ TEST_IL_SRC= \
cpblkTest.il \
vbinterface.il \
calliTest.il \
calliGenericTest.il \
ckfiniteTest.il \
fault-handler.il \
locallocTest.il \
+32
View File
@@ -0,0 +1,32 @@
//Tests ldftn and calli with generic return signature
.assembly extern mscorlib{}
.assembly someTest{}
.module someTest
.class public auto ansi beforefieldinit Test`1<T>
extends [mscorlib]System.Object
{
// method line 1
.method public hidebysig
static default void test (native int ptr) cil managed
{
.maxstack 8
ldarg ptr
calli !T()
call void class [mscorlib]System.Console::WriteLine(int32)
ret
}
}
.class private auto ansi someTest
extends [mscorlib]System.Object {
.method public static void go() cil managed {
.entrypoint
ldftn int32 [mscorlib]System.Environment::get_ProcessorCount()
call void class Test`1<int32>::test(native int)
ret
}
}
+1 -1
View File
@@ -166,7 +166,7 @@ arch_sources += mach-support-arm.c
endif
if ARM64
arch_sources += mach-support-arm.c
arch_sources += mach-support-arm64.c
endif
else
+25
View File
@@ -18,6 +18,9 @@
#include "utils/mono-sigcontext.h"
#include "mach-support.h"
//For reg numbers
#include <mono/arch/amd64/amd64-codegen.h>
/* Known offsets used for TLS storage*/
/* All OSX versions up to 10.8 */
@@ -73,6 +76,28 @@ mono_mach_arch_mcontext_to_thread_state (void *context, thread_state_t state)
*arch_state = ctx->__ss;
}
void
mono_mach_arch_thread_state_to_mono_context (thread_state_t state, MonoContext *context)
{
x86_thread_state64_t *arch_state = (x86_thread_state64_t *) state;
context->gregs [AMD64_RAX] = arch_state->__rax;
context->gregs [AMD64_RBX] = arch_state->__rbx;
context->gregs [AMD64_RCX] = arch_state->__rcx;
context->gregs [AMD64_RDX] = arch_state->__rdx;
context->gregs [AMD64_RDI] = arch_state->__rdi;
context->gregs [AMD64_RBP] = arch_state->__rbp;
context->gregs [AMD64_RSP] = arch_state->__rsp;
context->gregs [AMD64_R8] = arch_state->__r8;
context->gregs [AMD64_R9] = arch_state->__r9;
context->gregs [AMD64_R10] = arch_state->__r10;
context->gregs [AMD64_R11] = arch_state->__r11;
context->gregs [AMD64_R12] = arch_state->__r12;
context->gregs [AMD64_R13] = arch_state->__r13;
context->gregs [AMD64_R14] = arch_state->__r14;
context->gregs [AMD64_R15] = arch_state->__r15;
context->gregs [AMD64_RIP] = arch_state->__rip;
}
int
mono_mach_arch_get_thread_state_size ()
{
+14 -47
View File
@@ -46,81 +46,61 @@ void *
mono_mach_arch_get_ip (thread_state_t state)
{
/* Can't use unified_thread_state on !ARM64 since this has to compile on armv6 too */
#ifdef TARGET_ARM64
arm_unified_thread_state_t *arch_state = (arm_unified_thread_state_t *) state;
return (void *) arch_state->ts_64.__pc;
#else
arm_thread_state_t *arch_state = (arm_thread_state_t *) state;
return (void *) arch_state->__pc;
#endif
}
void *
mono_mach_arch_get_sp (thread_state_t state)
{
#ifdef TARGET_ARM64
arm_unified_thread_state_t *arch_state = (arm_unified_thread_state_t *) state;
return (void *) arch_state->ts_64.__sp;
#else
arm_thread_state_t *arch_state = (arm_thread_state_t *) state;
return (void *) arch_state->__sp;
#endif
}
int
mono_mach_arch_get_mcontext_size ()
{
#ifdef TARGET_ARM64
return sizeof (struct __darwin_mcontext64);
#else
return sizeof (struct __darwin_mcontext);
#endif
}
void
mono_mach_arch_thread_state_to_mcontext (thread_state_t state, void *context)
{
#ifdef TARGET_ARM64
arm_unified_thread_state_t *arch_state = (arm_unified_thread_state_t *) state;
struct __darwin_mcontext64 *ctx = (struct __darwin_mcontext64 *) context;
ctx->__ss = arch_state->ts_64;
#else
arm_thread_state_t *arch_state = (arm_thread_state_t *) state;
struct __darwin_mcontext *ctx = (struct __darwin_mcontext *) context;
ctx->__ss = *arch_state;
#endif
}
void
mono_mach_arch_mcontext_to_thread_state (void *context, thread_state_t state)
{
#ifdef TARGET_ARM64
arm_unified_thread_state_t *arch_state = (arm_unified_thread_state_t *) state;
struct __darwin_mcontext64 *ctx = (struct __darwin_mcontext64 *) context;
arch_state->ts_64 = ctx->__ss;
#else
arm_thread_state_t *arch_state = (arm_thread_state_t *) state;
struct __darwin_mcontext *ctx = (struct __darwin_mcontext *) context;
*arch_state = ctx->__ss;
#endif
}
void
mono_mach_arch_thread_state_to_mono_context (thread_state_t state, MonoContext *context)
{
int i;
arm_thread_state_t *arch_state = (arm_thread_state_t *) state;
for (i = 0; i < 13; ++i)
context->regs [i] = arch_state->__r [i];
context->regs [ARMREG_R13] = arch_state->__sp;
context->regs [ARMREG_R14] = arch_state->__lr;
context->regs [ARMREG_R15] = arch_state->__pc;
context->pc = arch_state->__pc;
context->cpsr = arch_state->__cpsr;
}
int
mono_mach_arch_get_thread_state_size ()
{
#ifdef TARGET_ARM64
return sizeof (arm_unified_thread_state_t);
#else
return sizeof (arm_thread_state_t);
#endif
}
kern_return_t
@@ -129,21 +109,12 @@ mono_mach_arch_get_thread_state (thread_port_t thread, thread_state_t state, mac
#if defined(HOST_WATCHOS)
g_error ("thread_get_state() is not supported by this platform");
#else
#ifdef TARGET_ARM64
arm_unified_thread_state_t *arch_state = (arm_unified_thread_state_t *) state;
kern_return_t ret;
*count = ARM_UNIFIED_THREAD_STATE_COUNT;
ret = thread_get_state (thread, ARM_UNIFIED_THREAD_STATE, (thread_state_t) arch_state, count);
#else
arm_thread_state_t *arch_state = (arm_thread_state_t *) state;
kern_return_t ret;
*count = ARM_THREAD_STATE_COUNT;
ret = thread_get_state (thread, ARM_THREAD_STATE, (thread_state_t) arch_state, count);
#endif
return ret;
#endif
}
@@ -153,13 +124,9 @@ mono_mach_arch_set_thread_state (thread_port_t thread, thread_state_t state, mac
{
#if defined(HOST_WATCHOS)
g_error ("thread_set_state() is not supported by this platform");
#else
#ifdef TARGET_ARM64
return thread_set_state (thread, ARM_UNIFIED_THREAD_STATE, state, count);
#else
return thread_set_state (thread, ARM_THREAD_STATE, state, count);
#endif
#endif
}
void *
+178
View File
@@ -0,0 +1,178 @@
/*
* mach-support-arm.c: mach support for ARM
*
* Authors:
* Geoff Norton (gnorton@novell.com)
* Rodrigo Kumpera (kumpera@gmail.com)
*
* (C) 2010 Novell, Inc.
* (C) 2011 Xamarin, Inc.
*/
#include <config.h>
#if defined(__MACH__)
#include <stdint.h>
#include <glib.h>
#include <pthread.h>
#include "utils/mono-sigcontext.h"
#include "utils/mono-compiler.h"
#include "mach-support.h"
/* _mcontext.h now defines __darwin_mcontext32, not __darwin_mcontext, starting with Xcode 5.1 */
#ifdef _STRUCT_MCONTEXT32
#define __darwin_mcontext __darwin_mcontext32
#endif
/* Known offsets used for TLS storage*/
static const int known_tls_offsets[] = {
0x48, /*Found on iOS 6 */
0xA4,
0xA8,
};
#define TLS_PROBE_COUNT (sizeof (known_tls_offsets) / sizeof (int))
/* This is 2 slots less than the known low */
#define TLS_PROBE_LOW_WATERMARK 0x40
/* This is 24 slots above the know high, which is the same diff as the knowns high-low*/
#define TLS_PROBE_HIGH_WATERMARK 0x108
static int tls_vector_offset;
void *
mono_mach_arch_get_ip (thread_state_t state)
{
/* Can't use unified_thread_state on !ARM64 since this has to compile on armv6 too */
arm_unified_thread_state_t *arch_state = (arm_unified_thread_state_t *) state;
return (void *) arch_state->ts_64.__pc;
}
void *
mono_mach_arch_get_sp (thread_state_t state)
{
arm_unified_thread_state_t *arch_state = (arm_unified_thread_state_t *) state;
return (void *) arch_state->ts_64.__sp;
}
int
mono_mach_arch_get_mcontext_size ()
{
return sizeof (struct __darwin_mcontext64);
}
void
mono_mach_arch_thread_state_to_mcontext (thread_state_t state, void *context)
{
arm_unified_thread_state_t *arch_state = (arm_unified_thread_state_t *) state;
struct __darwin_mcontext64 *ctx = (struct __darwin_mcontext64 *) context;
ctx->__ss = arch_state->ts_64;
}
void
mono_mach_arch_mcontext_to_thread_state (void *context, thread_state_t state)
{
arm_unified_thread_state_t *arch_state = (arm_unified_thread_state_t *) state;
struct __darwin_mcontext64 *ctx = (struct __darwin_mcontext64 *) context;
arch_state->ts_64 = ctx->__ss;
}
void
mono_mach_arch_thread_state_to_mono_context (thread_state_t state, MonoContext *context)
{
int i;
arm_unified_thread_state_t *arch_state = (arm_unified_thread_state_t *) state;
for (i = 0; i < 29; ++i)
context->regs [i] = arch_state->ts_64.__x [i];
context->regs [ARMREG_R29] = arch_state->ts_64.__fp;
context->regs [ARMREG_R30] = arch_state->ts_64.__lr;
context->regs [ARMREG_SP] = arch_state->ts_64.__sp;
context->pc = arch_state->ts_64.__pc;
}
int
mono_mach_arch_get_thread_state_size ()
{
return sizeof (arm_unified_thread_state_t);
}
kern_return_t
mono_mach_arch_get_thread_state (thread_port_t thread, thread_state_t state, mach_msg_type_number_t *count)
{
arm_unified_thread_state_t *arch_state = (arm_unified_thread_state_t *) state;
kern_return_t ret;
*count = ARM_UNIFIED_THREAD_STATE_COUNT;
ret = thread_get_state (thread, ARM_UNIFIED_THREAD_STATE, (thread_state_t) arch_state, count);
return ret;
}
kern_return_t
mono_mach_arch_set_thread_state (thread_port_t thread, thread_state_t state, mach_msg_type_number_t count)
{
return thread_set_state (thread, ARM_UNIFIED_THREAD_STATE, state, count);
}
void *
mono_mach_get_tls_address_from_thread (pthread_t thread, pthread_key_t key)
{
/* Mach stores TLS values in a hidden array inside the pthread_t structure
* They are keyed off a giant array from a known offset into the pointer. This value
* is baked into their pthread_getspecific implementation
*/
intptr_t *p = (intptr_t *) thread;
intptr_t **tsd = (intptr_t **) ((char*)p + tls_vector_offset);
g_assert (tls_vector_offset != -1);
return (void *) &tsd [key];
}
void *
mono_mach_arch_get_tls_value_from_thread (pthread_t thread, guint32 key)
{
return *(void**)mono_mach_get_tls_address_from_thread (thread, key);
}
void
mono_mach_init (pthread_key_t key)
{
int i;
void *old_value = pthread_getspecific (key);
void *canary = (void*)0xDEADBEEFu;
pthread_key_create (&key, NULL);
g_assert (old_value != canary);
pthread_setspecific (key, canary);
/*First we probe for cats*/
for (i = 0; i < TLS_PROBE_COUNT; ++i) {
tls_vector_offset = known_tls_offsets [i];
if (mono_mach_arch_get_tls_value_from_thread (pthread_self (), key) == canary)
goto ok;
}
/*Fallback to scanning a large range of offsets*/
for (i = TLS_PROBE_LOW_WATERMARK; i <= TLS_PROBE_HIGH_WATERMARK; i += 4) {
tls_vector_offset = i;
if (mono_mach_arch_get_tls_value_from_thread (pthread_self (), key) == canary) {
g_warning ("Found new TLS offset at %d", i);
goto ok;
}
}
tls_vector_offset = -1;
g_warning ("could not discover the mach TLS offset");
ok:
pthread_setspecific (key, old_value);
}
#endif
+5
View File
@@ -46,6 +46,11 @@ mono_mach_arch_mcontext_to_thread_state (void *context, thread_state_t state)
g_assert_not_reached ();
}
void
mono_mach_arch_thread_state_to_mono_context (thread_state_t state, MonoContext *context)
{
g_assert_not_reached ();
}
int
mono_mach_arch_get_thread_state_size ()
+16
View File
@@ -72,6 +72,22 @@ mono_mach_arch_mcontext_to_thread_state (void *context, thread_state_t state)
*arch_state = ctx->__ss;
}
void
mono_mach_arch_thread_state_to_mono_context (thread_state_t state, MonoContext *context)
{
x86_thread_state32_t *arch_state = (x86_thread_state32_t *) state;
context->eax = arch_state->__eax;
context->ebx = arch_state->__ebx;
context->ecx = arch_state->__ecx;
context->edx = arch_state->__edx;
context->ebp = arch_state->__ebp;
context->esp = arch_state->__esp;
context->esi = arch_state->__edi;
context->edi = arch_state->__esi;
context->eip = arch_state->__eip;
}
int
mono_mach_arch_get_thread_state_size ()
{
+2
View File
@@ -6,6 +6,7 @@
#include <glib.h>
#include <pthread.h>
#include "mono/utils/mono-compiler.h"
#include "mono/utils/mono-context.h"
#include <mach/task.h>
#include <mach/mach_port.h>
#include <mach/mach_init.h>
@@ -30,6 +31,7 @@ void mono_mach_init (pthread_key_t key);
int mono_mach_arch_get_mcontext_size (void);
void mono_mach_arch_thread_state_to_mcontext (thread_state_t state, void *context);
void mono_mach_arch_mcontext_to_thread_state (void *context, thread_state_t state);
void mono_mach_arch_thread_state_to_mono_context (thread_state_t state, MonoContext *context);
int mono_mach_arch_get_thread_state_size (void);
kern_return_t mono_mach_get_threads (thread_act_array_t *threads, guint32 *count);
+12 -40
View File
@@ -45,6 +45,8 @@ mono_sigctx_to_monoctx (void *sigctx, MonoContext *mctx)
mctx->esi = 0xDEADBEEF;
mctx->edi = 0xDEADBEEF;
mctx->eip = 0xDEADBEEF;
#elif MONO_CROSS_COMPILE
g_assert_not_reached ();
#elif defined(MONO_SIGNAL_USE_SIGACTION)
ucontext_t *ctx = (ucontext_t*)sigctx;
@@ -89,6 +91,8 @@ mono_monoctx_to_sigctx (MonoContext *mctx, void *sigctx)
{
#if defined(__native_client__) || defined(HOST_WATCHOS)
printf("WARNING: mono_arch_monoctx_to_sigctx() called!\n");
#elif MONO_CROSS_COMPILE
g_assert_not_reached ();
#elif defined(MONO_SIGNAL_USE_SIGACTION)
ucontext_t *ctx = (ucontext_t*)sigctx;
@@ -143,7 +147,9 @@ mono_sigctx_to_monoctx (void *sigctx, MonoContext *mctx)
printf("WARNING: mono_arch_sigctx_to_monoctx() called!\n");
#endif
#if defined(MONO_SIGNAL_USE_SIGACTION)
#ifdef MONO_CROSS_COMPILE
g_assert_not_reached ();
#elif defined(UCONTEXT_REG_RAX)
ucontext_t *ctx = (ucontext_t*)sigctx;
mctx->gregs [AMD64_RAX] = UCONTEXT_REG_RAX (ctx);
@@ -184,25 +190,7 @@ mono_sigctx_to_monoctx (void *sigctx, MonoContext *mctx)
mctx->gregs [AMD64_R14] = context->R14;
mctx->gregs [AMD64_R15] = context->R15;
#else
MonoContext *ctx = (MonoContext *)sigctx;
mctx->gregs [AMD64_RAX] = ctx->gregs [AMD64_RAX];
mctx->gregs [AMD64_RBX] = ctx->gregs [AMD64_RBX];
mctx->gregs [AMD64_RCX] = ctx->gregs [AMD64_RCX];
mctx->gregs [AMD64_RDX] = ctx->gregs [AMD64_RDX];
mctx->gregs [AMD64_RBP] = ctx->gregs [AMD64_RBP];
mctx->gregs [AMD64_RSP] = ctx->gregs [AMD64_RSP];
mctx->gregs [AMD64_RSI] = ctx->gregs [AMD64_RSI];
mctx->gregs [AMD64_RDI] = ctx->gregs [AMD64_RDI];
mctx->gregs [AMD64_R8] = ctx->gregs [AMD64_R8];
mctx->gregs [AMD64_R9] = ctx->gregs [AMD64_R9];
mctx->gregs [AMD64_R10] = ctx->gregs [AMD64_R10];
mctx->gregs [AMD64_R11] = ctx->gregs [AMD64_R11];
mctx->gregs [AMD64_R12] = ctx->gregs [AMD64_R12];
mctx->gregs [AMD64_R13] = ctx->gregs [AMD64_R13];
mctx->gregs [AMD64_R14] = ctx->gregs [AMD64_R14];
mctx->gregs [AMD64_R15] = ctx->gregs [AMD64_R15];
mctx->gregs [AMD64_RIP] = ctx->gregs [AMD64_RIP];
g_assert_not_reached ();
#endif
}
@@ -213,7 +201,9 @@ mono_monoctx_to_sigctx (MonoContext *mctx, void *sigctx)
printf("WARNING: mono_arch_monoctx_to_sigctx() called!\n");
#endif
#if defined(MONO_SIGNAL_USE_SIGACTION)
#ifdef MONO_CROSS_COMPILE
g_assert_not_reached ();
#elif defined(UCONTEXT_REG_RAX)
ucontext_t *ctx = (ucontext_t*)sigctx;
UCONTEXT_REG_RAX (ctx) = mctx->gregs [AMD64_RAX];
@@ -254,25 +244,7 @@ mono_monoctx_to_sigctx (MonoContext *mctx, void *sigctx)
context->R14 = mctx->gregs [AMD64_R14];
context->R15 = mctx->gregs [AMD64_R15];
#else
MonoContext *ctx = (MonoContext *)sigctx;
ctx->gregs [AMD64_RAX] = mctx->gregs [AMD64_RAX];
ctx->gregs [AMD64_RBX] = mctx->gregs [AMD64_RBX];
ctx->gregs [AMD64_RCX] = mctx->gregs [AMD64_RCX];
ctx->gregs [AMD64_RDX] = mctx->gregs [AMD64_RDX];
ctx->gregs [AMD64_RBP] = mctx->gregs [AMD64_RBP];
ctx->gregs [AMD64_RSP] = mctx->gregs [AMD64_RSP];
ctx->gregs [AMD64_RSI] = mctx->gregs [AMD64_RSI];
ctx->gregs [AMD64_RDI] = mctx->gregs [AMD64_RDI];
ctx->gregs [AMD64_R8] = mctx->gregs [AMD64_R8];
ctx->gregs [AMD64_R9] = mctx->gregs [AMD64_R9];
ctx->gregs [AMD64_R10] = mctx->gregs [AMD64_R10];
ctx->gregs [AMD64_R11] = mctx->gregs [AMD64_R11];
ctx->gregs [AMD64_R12] = mctx->gregs [AMD64_R12];
ctx->gregs [AMD64_R13] = mctx->gregs [AMD64_R13];
ctx->gregs [AMD64_R14] = mctx->gregs [AMD64_R14];
ctx->gregs [AMD64_R15] = mctx->gregs [AMD64_R15];
ctx->gregs [AMD64_RIP] = mctx->gregs [AMD64_RIP];
g_assert_not_reached ();
#endif
}
+8 -2
View File
@@ -304,8 +304,14 @@ typedef struct {
#if defined (HOST_APPLETVOS)
#define MONO_CONTEXT_GET_CURRENT(ctx) do { \
fprintf (stderr, "MONO_CONTEXT_GET_CURRENT: Not implemented"); \
g_error ("MONO_CONTEXT_GET_CURRENT: Not implemented"); \
arm_unified_thread_state_t thread_state; \
int state_flavor = ARM_UNIFIED_THREAD_STATE; \
unsigned state_count = ARM_UNIFIED_THREAD_STATE_COUNT; \
thread_port_t self = mach_thread_self (); \
kern_return_t ret = thread_get_state (self, state_flavor, (thread_state_t) &thread_state, &state_count); \
g_assert (ret == 0); \
mono_mach_arch_thread_state_to_mono_context ((thread_state_t)&thread_state, &ctx); \
mach_port_deallocate (current_task (), self); \
} while (0);
#else
+2
View File
@@ -34,6 +34,7 @@ gboolean mono_hwcap_arm_is_v5 = FALSE;
gboolean mono_hwcap_arm_is_v6 = FALSE;
gboolean mono_hwcap_arm_is_v7 = FALSE;
gboolean mono_hwcap_arm_is_v7s = FALSE;
gboolean mono_hwcap_arm_is_v7k = FALSE;
gboolean mono_hwcap_arm_has_vfp = FALSE;
gboolean mono_hwcap_arm_has_vfp3 = FALSE;
gboolean mono_hwcap_arm_has_vfp3_d16 = FALSE;
@@ -162,6 +163,7 @@ mono_hwcap_print(FILE *f)
g_fprintf (f, "mono_hwcap_arm_is_v6 = %i\n", mono_hwcap_arm_is_v6);
g_fprintf (f, "mono_hwcap_arm_is_v7 = %i\n", mono_hwcap_arm_is_v7);
g_fprintf (f, "mono_hwcap_arm_is_v7s = %i\n", mono_hwcap_arm_is_v7s);
g_fprintf (f, "mono_hwcap_arm_is_v7k = %i\n", mono_hwcap_arm_is_v7k);
g_fprintf (f, "mono_hwcap_arm_has_vfp = %i\n", mono_hwcap_arm_has_vfp);
g_fprintf (f, "mono_hwcap_arm_has_vfp3 = %i\n", mono_hwcap_arm_has_vfp3);
g_fprintf (f, "mono_hwcap_arm_has_vfp3_d16 = %i\n", mono_hwcap_arm_has_vfp3_d16);
+1
View File
@@ -7,6 +7,7 @@ extern gboolean mono_hwcap_arm_is_v5;
extern gboolean mono_hwcap_arm_is_v6;
extern gboolean mono_hwcap_arm_is_v7;
extern gboolean mono_hwcap_arm_is_v7s;
extern gboolean mono_hwcap_arm_is_v7k;
extern gboolean mono_hwcap_arm_has_vfp;
extern gboolean mono_hwcap_arm_has_vfp3;
extern gboolean mono_hwcap_arm_has_vfp3_d16;
+13 -2
View File
@@ -7,6 +7,13 @@
* Copyright 2015 Xamarin, Inc (http://www.xamarin.com)
*/
#include <config.h>
/* enable pthread extensions */
#ifdef TARGET_MACH
#define _DARWIN_C_SOURCE
#endif
#include <mono/utils/mono-compiler.h>
#include <mono/utils/mono-semaphore.h>
#include <mono/utils/mono-threads.h>
@@ -230,7 +237,7 @@ mono_threads_init_platform (void)
void
mono_threads_platform_free (MonoThreadInfo *info)
{
#ifdef TARGET_OSX
#ifdef TARGET_MACH
mach_port_deallocate (current_task (), info->native_handle);
#endif
@@ -240,8 +247,12 @@ mono_threads_platform_free (MonoThreadInfo *info)
void
mono_threads_platform_register (MonoThreadInfo *info)
{
#ifdef TARGET_OSX
#ifdef TARGET_MACH
char thread_name [64];
info->native_handle = mach_thread_self ();
snprintf (thread_name, 64, "tid_%x", (int)info->native_handle);
pthread_setname_np (thread_name);
#endif
//See the above for what's wrong here.
+13
View File
@@ -10,6 +10,11 @@
#include <config.h>
/* enable pthread extensions */
#ifdef TARGET_MACH
#define _DARWIN_C_SOURCE
#endif
#include <mono/utils/mono-compiler.h>
#include <mono/utils/mono-semaphore.h>
#include <mono/utils/mono-threads.h>
@@ -163,7 +168,15 @@ dump_threads (void)
MOSTLY_ASYNC_SAFE_PRINTF ("\t0x?08\t- blocking with pending suspend (GOOD)\n");
FOREACH_THREAD_SAFE (info) {
#ifdef TARGET_MACH
char thread_name [256] = { 0 };
pthread_getname_np (mono_thread_info_get_tid (info), thread_name, 255);
MOSTLY_ASYNC_SAFE_PRINTF ("--thread %p id %p [%p] (%s) state %x %s\n", info, (void *) mono_thread_info_get_tid (info), (void*)(size_t)info->native_handle, thread_name, info->thread_state, info == cur ? "GC INITIATOR" : "" );
#else
MOSTLY_ASYNC_SAFE_PRINTF ("--thread %p id %p [%p] state %x %s\n", info, (void *) mono_thread_info_get_tid (info), (void*)(size_t)info->native_handle, info->thread_state, info == cur ? "GC INITIATOR" : "" );
#endif
} END_FOREACH_THREAD_SAFE
}
-21
View File
@@ -51,12 +51,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "profiler-logging", "profile
{158073ED-99AE-4196-9EDC-DDB2344F8466} = {158073ED-99AE-4196-9EDC-DDB2344F8466}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "profiler-cov", "profiler-cov.vcxproj", "{83D4D926-2983-4770-BA92-EB9CB8828C95}"
ProjectSection(ProjectDependencies) = postProject
{CB0D9E92-293C-439C-9AC7-C5F59B6E0771} = {CB0D9E92-293C-439C-9AC7-C5F59B6E0771}
{158073ED-99AE-4196-9EDC-DDB2344F8466} = {158073ED-99AE-4196-9EDC-DDB2344F8466}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jay", "..\mcs\jay\jay.vcxproj", "{5D485D32-3B9F-4287-AB24-C8DA5B89F537}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "profiler-codeanalyst", "profiler-codeanalyst.vcxproj", "{8FEF7F9E-F5F3-470E-91F4-404B7D6BC1BB}"
@@ -273,21 +267,6 @@ Global
{86663B87-4CD2-42B6-8D8E-C79DA1CCDEE6}.Release_SGen|x64.ActiveCfg = Release|x64
{86663B87-4CD2-42B6-8D8E-C79DA1CCDEE6}.Release|Win32.ActiveCfg = Release|Win32
{86663B87-4CD2-42B6-8D8E-C79DA1CCDEE6}.Release|x64.ActiveCfg = Release|x64
{83D4D926-2983-4770-BA92-EB9CB8828C95}.Debug_SGen|Win32.ActiveCfg = Debug|Win32
{83D4D926-2983-4770-BA92-EB9CB8828C95}.Debug_SGen|x64.ActiveCfg = Debug|x64
{83D4D926-2983-4770-BA92-EB9CB8828C95}.Debug_SGen|x64.Build.0 = Debug|x64
{83D4D926-2983-4770-BA92-EB9CB8828C95}.Debug|Win32.ActiveCfg = Debug|Win32
{83D4D926-2983-4770-BA92-EB9CB8828C95}.Debug|Win32.Build.0 = Debug|Win32
{83D4D926-2983-4770-BA92-EB9CB8828C95}.Debug|x64.ActiveCfg = Debug|x64
{83D4D926-2983-4770-BA92-EB9CB8828C95}.Debug|x64.Build.0 = Debug|x64
{83D4D926-2983-4770-BA92-EB9CB8828C95}.Release_SGen|Win32.ActiveCfg = Release|Win32
{83D4D926-2983-4770-BA92-EB9CB8828C95}.Release_SGen|Win32.Build.0 = Release|Win32
{83D4D926-2983-4770-BA92-EB9CB8828C95}.Release_SGen|x64.ActiveCfg = Release|x64
{83D4D926-2983-4770-BA92-EB9CB8828C95}.Release_SGen|x64.Build.0 = Release|x64
{83D4D926-2983-4770-BA92-EB9CB8828C95}.Release|Win32.ActiveCfg = Release|Win32
{83D4D926-2983-4770-BA92-EB9CB8828C95}.Release|Win32.Build.0 = Release|Win32
{83D4D926-2983-4770-BA92-EB9CB8828C95}.Release|x64.ActiveCfg = Release|x64
{83D4D926-2983-4770-BA92-EB9CB8828C95}.Release|x64.Build.0 = Release|x64
{5D485D32-3B9F-4287-AB24-C8DA5B89F537}.Debug_SGen|Win32.ActiveCfg = Debug|Win32
{5D485D32-3B9F-4287-AB24-C8DA5B89F537}.Debug_SGen|Win32.Build.0 = Debug|Win32
{5D485D32-3B9F-4287-AB24-C8DA5B89F537}.Debug_SGen|x64.ActiveCfg = Debug|Win32