Merge pull request #5355 from kumpera/fix_58379
authorRodrigo Kumpera <kumpera@users.noreply.github.com>
Tue, 15 Aug 2017 01:38:40 +0000 (21:38 -0400)
committerGitHub <noreply@github.com>
Tue, 15 Aug 2017 01:38:40 +0000 (21:38 -0400)
[mini] Emit widen ops when storing to locals of size < 4. Fixes #58379.

74 files changed:
CODEOWNERS
acceptance-tests/SUBMODULES.json
acceptance-tests/profiler-stress/runner.cs
external/bockbuild
external/nuget-buildtasks
external/roslyn-binaries
man/mprof-report.1
mcs/build/profiles/basic.make
mcs/class/System.Core/Makefile
mcs/class/System.Data.Linq/src/DbLinq/System.Data.Linq/Makefile
mcs/class/System.Runtime.DurableInstancing/Makefile
mcs/class/System.Web/Test/standalone/ApplicationPreStartMethods/test_01/Makefile
mcs/class/System.Web/Test/standalone/ApplicationPreStartMethods/test_02/Makefile
mcs/class/System.Web/Test/standalone/ApplicationPreStartMethods/test_03/Makefile
mcs/class/System.Web/Test/standalone/ApplicationPreStartMethods/test_04/Makefile
mcs/class/System.Web/Test/standalone/ApplicationPreStartMethods/test_05/Makefile
mcs/class/System.Web/Test/standalone/ApplicationPreStartMethods/test_06/Makefile
mcs/class/System.Web/Test/standalone/ApplicationPreStartMethods/test_07/Makefile
mcs/class/System.Web/Test/standalone/ApplicationPreStartMethods/test_08/Makefile
mcs/class/System.Web/Test/standalone/EnableFormsAuthentication/Test_01/Makefile
mcs/class/System.Web/Test/standalone/EnableFormsAuthentication/Test_02/Makefile
mcs/class/System.Web/Test/standalone/EnableFormsAuthentication/Test_03/Makefile
mcs/class/System.Web/Test/standalone/EnableFormsAuthentication/Test_04/Makefile
mcs/class/System.Web/Test/standalone/EnableFormsAuthentication/Test_05/Makefile
mcs/class/System.Web/Test/standalone/EnableFormsAuthentication/Test_06/Makefile
mcs/class/System.Web/Test/standalone/EnableFormsAuthentication/Test_07/Makefile
mcs/class/System.Web/Test/standalone/EnableFormsAuthentication/Test_08/Makefile
mcs/class/System.Web/Test/standalone/EnableFormsAuthentication/Test_09/Makefile
mcs/class/System.Web/Test/standalone/PageParserDefaultTypeProperties/Makefile
mcs/class/System.Web/Test/standalone/RegisterBuildProvider/Makefile
mcs/class/WindowsBase/Makefile
mcs/class/WindowsBase/System.Windows.Media.Converters/MatrixValueSerializer.cs
mcs/class/WindowsBase/System.Windows.Media/Matrix.cs
mcs/class/WindowsBase/System.Windows.Media/MatrixConverter.cs
mcs/class/WindowsBase/Test/System.Windows.Media/MatrixConverterTest.cs [new file with mode: 0644]
mcs/class/WindowsBase/Test/System.Windows.Media/MatrixTest.cs
mcs/class/WindowsBase/Test/System.Windows.Media/MatrixValueSerializerTest.cs [new file with mode: 0644]
mcs/class/WindowsBase/Test/System.Windows/SizeConverterTest.cs
mcs/class/WindowsBase/WindowsBase_test.dll.sources
mcs/class/corlib/Test/System.Runtime.Remoting.Proxies/RealProxyTest.cs [new file with mode: 0644]
mcs/class/corlib/corlib_test.dll.sources
mcs/class/corlib/testing_aot_full_corlib_test.dll.exclude.sources
mcs/packages/Makefile
mcs/tools/mdoc/Makefile
mcs/tools/mono-api-html/ClassComparer.cs
mcs/tools/mono-api-html/NamespaceComparer.cs
mcs/tools/mono-symbolicate/Makefile
mcs/tools/xbuild/Makefile
mcs/tools/xbuild/xbuild_test.make
mono/dis/get.c
mono/eglib/gmodule-unix.c
mono/eglib/gstr.c
mono/metadata/class-internals.h
mono/metadata/class.c
mono/metadata/icall.c
mono/metadata/mono-config.c
mono/metadata/object-internals.h
mono/metadata/object.c
mono/metadata/profiler.c
mono/mini/mini-llvm.c
mono/profiler/log.c
mono/utils/Makefile.am
mono/utils/mono-compiler.h
mono/utils/unlocked.h [new file with mode: 0644]
msvc/libmonoutils.vcxproj
msvc/libmonoutils.vcxproj.filters
packaging/MacSDK/msbuild.py
packaging/MacSDK/nuget.py
packaging/MacSDK/sqlite.py
scripts/Makefile.am
scripts/ci/clang-thread-sanitizer-blacklist [new file with mode: 0644]
scripts/ci/run-jenkins.sh
scripts/ci/run-test-default.sh
scripts/csi.in [new file with mode: 0644]

index 813309b95c59c70a9f07960b3e96d76d7a59eb53..29241f71f455c9c081cb0360d0a64c0da4f9afff 100644 (file)
 acceptance-tests/* @akoeplinger
 acceptance-tests/profiler-stress* @alexrp
 docs/sources/mono-api-profiler.html @alexrp
+man @marek-safar @miguel
 man/mprof-report.1 @alexrp
 mcs/build @marek-safar
 mcs/class @marek-safar
-mcs/errors @marek-safar
-mcs/mcs @marek-safar
-mcs/tests @marek-safar
 mcs/class/corlib/System.Reflection*/ @vargaz @lambdageek
 mcs/class/Mono.Btls.Interface @baulig
 mcs/class/Mono.Data.Tds @egorbo
@@ -37,12 +35,18 @@ mcs/class/System/Mono.Btls @baulig
 mcs/class/System/Mono.Net.Security @baulig
 mcs/class/System/Mono.Security.Interface @baulig
 mcs/class/System.Data @egorbo
+mcs/errors @marek-safar
+mcs/mcs @marek-safar
+mcs/tests @marek-safar
+mono/eglib @kumpera
+mono/metadata @vargaz
 mono/metadata/*profiler* @alexrp
 mono/metadata/monitor* @brzvlad
 mono/metadata/sgen* @brzvlad
 mono/metadata/threads* @luhenry @kumpera
 mono/metadata/threadpool* @luhenry
 mono/metadata/w32* @luhenry
+mono/mini @vargaz
 mono/mini/*cfgdump* @lewurm
 mono/mini/*exceptions* @lewurm
 mono/mini/*ppc* @lewurm
@@ -51,6 +55,7 @@ mono/mini/interp/* @lewurm
 mono/mini/*profiler* @alexrp
 mono/profiler @alexrp
 mono/sgen @brzvlad
+mono/utils @kumpera
 mono/utils/atomic* @alexrp
 mono/utils/mono-hwcap* @alexrp
 mono/utils/mono-mem* @alexrp
@@ -60,8 +65,6 @@ msvc/scripts @akoeplinger
 packaging/Windows @akoeplinger
 samples/profiler @alexrp
 samples/size @alexrp
-scripts/ci/run-jenkins.sh @akoeplinger
-scripts/ci/run-test-acceptance-tests.sh @akoeplinger
-scripts/ci/run-test-default.sh @akoeplinger
+scripts @akoeplinger
+scripts/ci @akoeplinger
 scripts/ci/run-test-profiler-stress-tests.sh @alexrp
-scripts/ci/util.sh @akoeplinger
index 1fedbe94fea1f463e15b192a8cd9d6d4592227ef..e641e67e70cab7b90ef2aef4f564a360c03d3367 100644 (file)
@@ -10,7 +10,7 @@
   {
     "name": "coreclr", 
     "url": "git://github.com/mono/coreclr.git", 
-    "rev": "c7da48acf72c40c0c0ed1a80ebfacea21bb3a271", 
+    "rev": "d0e6a36f782f5ee1ca0b7d3ec0c55725c3571b1f", 
     "remote-branch": "origin/mono", 
     "branch": "mono", 
     "directory": "coreclr"
@@ -31,4 +31,4 @@
     "branch": "master", 
     "directory": "benchmarker"
   }
-]
\ No newline at end of file
+]
index e5d44e68b4ac391c7ebd8a40d494e2ec202f56a1..e4a609b995f259e5cb45c144fb1a3b0076fc8fe5 100644 (file)
@@ -57,7 +57,7 @@ namespace Mono.Profiling.Tests.Stress {
                        "jit",
                };
 
-               static readonly TimeSpan _timeout = TimeSpan.FromHours (8);
+               static readonly TimeSpan _timeout = TimeSpan.FromHours (9);
 
                static readonly Dictionary<string, Predicate<Benchmark>> _filters = new Dictionary<string, Predicate<Benchmark>> {
                        { "ironjs-v8", FilterArmArchitecture },
index b445017309aac741a26d8c51bb0636234084bf23..141e6a55feee9052e347c424aff09b156e0d5497 160000 (submodule)
@@ -1 +1 @@
-Subproject commit b445017309aac741a26d8c51bb0636234084bf23
+Subproject commit 141e6a55feee9052e347c424aff09b156e0d5497
index 8d307472ea214f2b59636431f771894dbcba7258..9e04cc7f41899c880807d1d055a24c768670784a 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 8d307472ea214f2b59636431f771894dbcba7258
+Subproject commit 9e04cc7f41899c880807d1d055a24c768670784a
index 80b86f340b7f6fb7afe84443214e1cbd7ff70620..9d196fb777776880b2f3c31602aa167394ae2f6b 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 80b86f340b7f6fb7afe84443214e1cbd7ff70620
+Subproject commit 9d196fb777776880b2f3c31602aa167394ae2f6b
index f19a02aa14ea8679cda72518cc466f57ee5a4ad8..56663251bf8e0066c83fd9f700eb835d724a2ff2 100644 (file)
@@ -146,6 +146,9 @@ instruction pointer.
 This is equivalent to the value \[lq]100\[rq].
 A value of zero for \f[I]FREQ\f[] effectively disables sampling.
 .IP \[bu] 2
+\f[I]heapshot-on-shutdown\f[]: collect heap shot data when the runtime
+shuts down.
+.IP \[bu] 2
 \f[I]maxframes=NUM\f[]: when a stack trace needs to be performed,
 collect \f[I]NUM\f[] frames at the most.
 The default is 32.
@@ -180,16 +183,15 @@ with the current process id and \f[I]%t\f[] with the current date
 and time, then do according to \f[I]OUTSPEC\f[]:
 .RS 2
 .IP \[bu] 2
-if \f[I]OUTSPEC\f[] begins with a \f[I]|\f[] character, execute the
-rest as a program and feed the data to its standard input
+If \f[I]OUTSPEC\f[] begins with a \f[I]|\f[] character, execute the
+rest as a program and feed the data to its standard input.
 .IP \[bu] 2
-if \f[I]OUTSPEC\f[] begins with a \f[I]-\f[] character, use the
-rest of OUTSPEC as the filename, but force overwrite any existing
-file by that name
+If \f[I]OUTSPEC\f[] begins with a \f[I]#\f[] character, parse the
+rest as a file descriptor number, and feed the data to this file
+descriptor.
 .IP \[bu] 2
 otherwise write the data the the named file: note that is a file by
-that name already exists, a warning is issued and profiling is
-disabled.
+that name already exists, it is truncated.
 .RE
 .IP \[bu] 2
 \f[I]report\f[]: the profiling data is sent to mprof-report, which
@@ -214,10 +216,6 @@ counters, which is normally done every 1 second.
 .IP \[bu] 2
 \f[I]coverage\f[]: collect code coverage data. This implies enabling
 the \f[I]calls\f[] option.
-.IP \[bu] 2
-\f[I]onlycoverage\f[]: can only be used with \f[I]coverage\f[]. This
-disables most other events so that the profiler mostly only collects
-coverage data.
 .RE
 .SS Analyzing the profile data
 .PP
index ef393d92d0309bb5ebd7b36944b07d07d804ab76..a76de22836f059a3a5a1d7b286f78571036a907e 100644 (file)
@@ -34,7 +34,7 @@ PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:MONO -d:WIN_PLATFORM -d:BOOTSTRAP_B
 NO_SIGN_ASSEMBLY = yes
 NO_TEST = yes
 NO_INSTALL = yes
-FRAMEWORK_VERSION = 4.0
+FRAMEWORK_VERSION = 4.5
 
 # Compiler all using same bootstrap compiler
 LIBRARY_COMPILE = $(BOOT_COMPILE)
index ac79cff1623b5bbdfb8b26248207ad598f7a864f..7ac0624eafbb769e621f89c5c99683a689c85782 100644 (file)
@@ -34,12 +34,10 @@ LIB_MCS_FLAGS += -d:FULL_AOT_RUNTIME
 endif
 
 ifneq (basic, $(PROFILE))
-CLR_PROFILE := $(filter 2.0 4.0 4.5, $(FRAMEWORK_VERSION))
-endif
-
-ifdef CLR_PROFILE
+ifneq (2.1, $(FRAMEWORK_VERSION))
 LIB_REFS += Mono.Posix
 endif
+endif
 
 CC_PROFILE := $(filter monotouch% xammac, $(PROFILE))
 ifdef CC_PROFILE
index 20cc4b10bcaaac3e71ec797506343db1540e87e1..13bea782425e2c83a3db6fda2de69dc449bdbb38 100644 (file)
@@ -9,9 +9,4 @@ LIB_MCS_FLAGS =
 
 NO_TEST = yes
 
-ifeq (2.0, $(FRAMEWORK_VERSION))
-# This is a .NET 3.5 only assembly, but built during the 2.0 build
-LIB_MCS_FLAGS += -d:NET_3_5
-endif
-
 include ../../build/library.make
index eb1233ff7c8bd6c06cf3b9feed0912ab410d1cb8..e3369f2d139995fac4a685c691ebfbbbe7a4221d 100644 (file)
@@ -16,8 +16,7 @@ TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
 
 EXTRA_DISTFILES = $(RESOURCE_FILES)
 
-VALID_PROFILE := $(filter 2.0 4.0 4.5, $(FRAMEWORK_VERSION))
-ifndef VALID_PROFILE
+ifneq (4.5, $(FRAMEWORK_VERSION))
 LIBRARY_NAME = dummy-System.Runtime.DurableInstancing.dll
 NO_INSTALL = yes
 NO_SIGN_ASSEMBLY = yes
index 1c82c534157d9c9681ea8b2396e5b1394040f389..b40292afb4874465cd41951bb5eea7a4946629eb 100644 (file)
@@ -24,7 +24,7 @@ APPLICATION_ASSEMBLY_MCS_FLAGS = \
        -debug:full \
        -r:System.Web.dll
 
-VALID_PROFILE := $(filter 4.0, $(FRAMEWORK_VERSION))
+VALID_PROFILE := $(filter 4.5, $(FRAMEWORK_VERSION))
 
 ifndef VALID_PROFILE
 all:
index 3910e0042044541622d94681506107e649bfb186..7b4716e23dc96ab67fc7840d1a605d14b93279c5 100644 (file)
@@ -13,7 +13,7 @@ APPLICATION_ASSEMBLY_MCS_FLAGS = \
        -debug:full \
        -r:System.Web.dll
 
-VALID_PROFILE := $(filter 4.0, $(FRAMEWORK_VERSION))
+VALID_PROFILE := $(filter 4.5, $(FRAMEWORK_VERSION))
 
 ifndef VALID_PROFILE
 all:
index cf8e0f5f7436315b6140b24a9fba1d0b393b288a..f83a2bae241c479f586fd62a9dae202eb9a66adf 100644 (file)
@@ -13,7 +13,7 @@ APPLICATION_ASSEMBLY_MCS_FLAGS = \
        -debug:full \
        -r:System.Web.dll
 
-VALID_PROFILE := $(filter 4.0, $(FRAMEWORK_VERSION))
+VALID_PROFILE := $(filter 4.5, $(FRAMEWORK_VERSION))
 
 ifndef VALID_PROFILE
 all:
index ff0172cd7a46c627e942382ee89d8a9ab30f5bae..ec8ceca2bda88bb0525210a7933c5552fdadae04 100644 (file)
@@ -13,7 +13,7 @@ APPLICATION_ASSEMBLY_MCS_FLAGS = \
        -debug:full \
        -r:System.Web.dll
 
-VALID_PROFILE := $(filter 4.0, $(FRAMEWORK_VERSION))
+VALID_PROFILE := $(filter 4.5, $(FRAMEWORK_VERSION))
 
 ifndef VALID_PROFILE
 all:
index f9c8780885edc85afc11794dd5d466e738a9626b..b805579fcb6267fe680ddefc11d1b64be9d0266f 100644 (file)
@@ -13,7 +13,7 @@ APPLICATION_ASSEMBLY_MCS_FLAGS = \
        -debug:full \
        -r:System.Web.dll
 
-VALID_PROFILE := $(filter 4.0, $(FRAMEWORK_VERSION))
+VALID_PROFILE := $(filter 4.5, $(FRAMEWORK_VERSION))
 
 ifndef VALID_PROFILE
 all:
index a1b5012d9a22f717ae7adc175d3127c2b606f0e7..f87fe645151d89347baee268357d268edd24b551 100644 (file)
@@ -13,7 +13,7 @@ APPLICATION_ASSEMBLY_MCS_FLAGS = \
        -debug:full \
        -r:System.Web.dll
 
-VALID_PROFILE := $(filter 4.0, $(FRAMEWORK_VERSION))
+VALID_PROFILE := $(filter 4.5, $(FRAMEWORK_VERSION))
 
 ifndef VALID_PROFILE
 all:
index 610338580885f72906b064ad59eed6eb13b11bef..b23bc982b3d5cbd2911cc4a1aec6e652fb71c06b 100644 (file)
@@ -13,7 +13,7 @@ APPLICATION_ASSEMBLY_MCS_FLAGS = \
        -debug:full \
        -r:System.Web.dll
 
-VALID_PROFILE := $(filter 4.0, $(FRAMEWORK_VERSION))
+VALID_PROFILE := $(filter 4.5, $(FRAMEWORK_VERSION))
 
 ifndef VALID_PROFILE
 all:
index ba345317aaf6982e755ddb27f9490819e9e3e931..a41268321363bc01c912becdc7743e31db1582f9 100644 (file)
@@ -13,7 +13,7 @@ APPLICATION_ASSEMBLY_MCS_FLAGS = \
        -debug:full \
        -r:System.Web.dll
 
-VALID_PROFILE := $(filter 4.0, $(FRAMEWORK_VERSION))
+VALID_PROFILE := $(filter 4.5, $(FRAMEWORK_VERSION))
 
 ifndef VALID_PROFILE
 all:
index 17464eb5c6a05e43297852574e80a9c9afd01908..f0d1399fa1ecff1a4bc1f3385f67e9993fc989eb 100644 (file)
@@ -12,7 +12,7 @@ APPLICATION_ASSEMBLY_MCS_FLAGS = \
        -debug:full \
        -r:System.Web.dll
 
-VALID_PROFILE := $(filter 4.0, $(FRAMEWORK_VERSION))
+VALID_PROFILE := $(filter 4.5, $(FRAMEWORK_VERSION))
 
 ifndef VALID_PROFILE
 all:
index 5ebdf8d62b2a68d8d255851648db96b495d7d398..267882d694a3ae5a12427106682c56420bd01ddc 100644 (file)
@@ -12,7 +12,7 @@ APPLICATION_ASSEMBLY_MCS_FLAGS = \
        -debug:full \
        -r:System.Web.dll
 
-VALID_PROFILE := $(filter 4.0, $(FRAMEWORK_VERSION))
+VALID_PROFILE := $(filter 4.5, $(FRAMEWORK_VERSION))
 
 ifndef VALID_PROFILE
 all:
index a1c22ea4a648645d8f09bb994f025cf01b1ccbee..eed4f1273a38d58ad73342a720866c23ff079bd0 100644 (file)
@@ -12,7 +12,7 @@ APPLICATION_ASSEMBLY_MCS_FLAGS = \
        -debug:full \
        -r:System.Web.dll
 
-VALID_PROFILE := $(filter 4.0, $(FRAMEWORK_VERSION))
+VALID_PROFILE := $(filter 4.5, $(FRAMEWORK_VERSION))
 
 ifndef VALID_PROFILE
 all:
index ed1c11f82a0ab3ffb956805dc2d5501d9194e4e4..8c721a8d73a1242f35047cfdd82cd7bb78c63521 100644 (file)
@@ -12,7 +12,7 @@ APPLICATION_ASSEMBLY_MCS_FLAGS = \
        -debug:full \
        -r:System.Web.dll
 
-VALID_PROFILE := $(filter 4.0, $(FRAMEWORK_VERSION))
+VALID_PROFILE := $(filter 4.5, $(FRAMEWORK_VERSION))
 
 ifndef VALID_PROFILE
 all:
index 1c62f879d545e64f8e16f09f85c5785e47f203ee..264c7feff452f6662f95b27e955b35493544cdb8 100644 (file)
@@ -12,7 +12,7 @@ APPLICATION_ASSEMBLY_MCS_FLAGS = \
        -debug:full \
        -r:System.Web.dll
 
-VALID_PROFILE := $(filter 4.0, $(FRAMEWORK_VERSION))
+VALID_PROFILE := $(filter 4.5, $(FRAMEWORK_VERSION))
 
 ifndef VALID_PROFILE
 all:
index 0b88be3c34d822e278c2d83f158cfa204141aa75..a9dc48eb787f7c6caa0c4723343274e8a775e19a 100644 (file)
@@ -12,7 +12,7 @@ APPLICATION_ASSEMBLY_MCS_FLAGS = \
        -debug:full \
        -r:System.Web.dll
 
-VALID_PROFILE := $(filter 4.0, $(FRAMEWORK_VERSION))
+VALID_PROFILE := $(filter 4.5, $(FRAMEWORK_VERSION))
 
 ifndef VALID_PROFILE
 all:
index d912fce274e92fc63f91e6b431c8ca8f11b6188f..fb0fd1e3410a95e85c23588a6e934d5295084f9f 100644 (file)
@@ -12,7 +12,7 @@ APPLICATION_ASSEMBLY_MCS_FLAGS = \
        -debug:full \
        -r:System.Web.dll
 
-VALID_PROFILE := $(filter 4.0, $(FRAMEWORK_VERSION))
+VALID_PROFILE := $(filter 4.5, $(FRAMEWORK_VERSION))
 
 ifndef VALID_PROFILE
 all:
index 667e288b3e880196e95dd3623b29083a43940eff..71a45db3a6e9df484cb703b859abadbaedf73f7e 100644 (file)
@@ -12,7 +12,7 @@ APPLICATION_ASSEMBLY_MCS_FLAGS = \
        -debug:full \
        -r:System.Web.dll
 
-VALID_PROFILE := $(filter 4.0, $(FRAMEWORK_VERSION))
+VALID_PROFILE := $(filter 4.5, $(FRAMEWORK_VERSION))
 
 ifndef VALID_PROFILE
 all:
index 228532c1b45d9aa47aca7d4141523dbfe708c74b..8a259651aaf5080628b6a272b6b7cf093cc150fd 100644 (file)
@@ -12,7 +12,7 @@ APPLICATION_ASSEMBLY_MCS_FLAGS = \
        -debug:full \
        -r:System.Web.dll
 
-VALID_PROFILE := $(filter 4.0, $(FRAMEWORK_VERSION))
+VALID_PROFILE := $(filter 4.5, $(FRAMEWORK_VERSION))
 
 ifndef VALID_PROFILE
 all:
index 34938ef1d1734b9b9ee0b344ed7318f1cc969429..a75e30d792600f832a501d3187951ed609a2d71e 100644 (file)
@@ -13,7 +13,7 @@ APPLICATION_ASSEMBLY_MCS_FLAGS = \
        -debug:full \
        -r:System.Web.dll
 
-VALID_PROFILE := $(filter 4.0, $(FRAMEWORK_VERSION))
+VALID_PROFILE := $(filter 4.5, $(FRAMEWORK_VERSION))
 
 ifndef VALID_PROFILE
 all:
index 0809ee737b6e3904f44c77aef225ee33a7148f44..f0452d73e63deba5ae70224b7760453227b54e23 100644 (file)
@@ -14,7 +14,7 @@ APPLICATION_ASSEMBLY_MCS_FLAGS = \
        -debug:full \
        -r:System.Web.dll
 
-VALID_PROFILE := $(filter 4.0, $(FRAMEWORK_VERSION))
+VALID_PROFILE := $(filter 4.5, $(FRAMEWORK_VERSION))
 
 ifndef VALID_PROFILE
 all:
index a6b99082151893bb6cadf9fce5595d7f9aadc0af..05c2e6e20153622c0bbd36407db280a5556e87ae 100644 (file)
@@ -9,9 +9,6 @@ LIB_MCS_FLAGS = -unsafe -nowarn:67,618
 TEST_MCS_FLAGS = -unsafe
 TEST_LIB_REFS = WindowsBase System System.Xml System.Core System.IO.Compression
 
-ifeq (2.0, $(FRAMEWORK_VERSION))
-LIB_MCS_FLAGS += -d:NET_3_0
-endif
 ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
 LIB_REFS += System.Xaml
 TEST_LIB_REFS += System.Xaml
index 0d039c6416e17546526d1bdbf22fb4e1213f708e..5a7b95133d353e7578d10e2ceecc975b0ab7b961 100644 (file)
@@ -24,6 +24,7 @@
 //
 
 using System;
+using System.Globalization;
 using System.Windows.Markup;
 
 namespace System.Windows.Media.Converters {
@@ -32,22 +33,26 @@ namespace System.Windows.Media.Converters {
        {
                public override bool CanConvertFromString (string value, IValueSerializerContext context)
                {
-                       throw new NotImplementedException ();
+                       return true;
                }
 
                public override bool CanConvertToString (object value, IValueSerializerContext context)
                {
-                       throw new NotImplementedException ();
+                       return value is Matrix;
                }
 
                public override object ConvertFromString (string value, IValueSerializerContext context)
                {
-                       throw new NotImplementedException ();
+                       if (value == null)
+                               throw new NotSupportedException ("value != null");
+                       return Matrix.Parse (value);
                }
 
                public override string ConvertToString (object value, IValueSerializerContext context)
                {
-                       throw new NotImplementedException ();
+                       if (value is Matrix matrix)
+                               return matrix.ToString (CultureInfo.InvariantCulture);
+                       return base.ConvertToString (value, context);
                }
        }
 
index 4d0245c3746575153ead243e9585a895028811ae..e9c60b528db3bbaa88eab8cad06d50165b7df2c8 100644 (file)
@@ -25,6 +25,7 @@
 
 using System;
 using System.ComponentModel;
+using System.Globalization;
 using System.Windows.Markup;
 using System.Windows.Media.Converters;
 using System.Windows.Threading;
@@ -109,7 +110,16 @@ namespace System.Windows.Media {
 
                public override int GetHashCode ()
                {
-                       throw new NotImplementedException ();
+                       unchecked
+                       {
+                               var hashCode = _m11.GetHashCode ();
+                               hashCode = (hashCode * 397) ^ _m12.GetHashCode ();
+                               hashCode = (hashCode * 397) ^ _m21.GetHashCode ();
+                               hashCode = (hashCode * 397) ^ _m22.GetHashCode ();
+                               hashCode = (hashCode * 397) ^ _offsetX.GetHashCode ();
+                               hashCode = (hashCode * 397) ^ _offsetY.GetHashCode ();
+                               return hashCode;
+                       }
                }
 
                public void Invert ()
@@ -167,7 +177,39 @@ namespace System.Windows.Media {
 
                public static Matrix Parse (string source)
                {
-                       throw new NotImplementedException ();
+                       if (source == null)
+                               throw new ArgumentNullException ("source");
+                       Matrix value;
+                       if (source.Trim () == "Identity")
+                       {
+                               value = Identity;
+                       }
+                       else
+                       {
+                               var parts = source.Split (',');
+                               if (parts.Length != 6)
+                                       throw new FormatException (string.Format ("Invalid Matrix format: {0}", source));
+                               double m11;
+                               double m12;
+                               double m21;
+                               double m22;
+                               double offsetX;
+                               double offsetY;
+                               if (double.TryParse (parts[0], NumberStyles.Float, CultureInfo.InvariantCulture, out m11)
+                                   && double.TryParse (parts[1], NumberStyles.Float, CultureInfo.InvariantCulture, out m12)
+                                   && double.TryParse (parts[2], NumberStyles.Float, CultureInfo.InvariantCulture, out m21)
+                                   && double.TryParse (parts[3], NumberStyles.Float, CultureInfo.InvariantCulture, out m22)
+                                   && double.TryParse (parts[4], NumberStyles.Float, CultureInfo.InvariantCulture, out offsetX)
+                                   && double.TryParse (parts[5], NumberStyles.Float, CultureInfo.InvariantCulture, out offsetY))
+                               {
+                                       value = new Matrix (m11, m12, m21, m22, offsetX, offsetY);
+                               }
+                               else
+                               {
+                                       throw new FormatException (string.Format ("Invalid Matrix format: {0}", source));
+                               }
+                       }
+                       return value;
                }
 
                public void Prepend (Matrix matrix)
@@ -297,21 +339,19 @@ namespace System.Windows.Media {
                string IFormattable.ToString (string format,
                                              IFormatProvider provider)
                {
-                       throw new NotImplementedException ();
+                       return ToString (provider);
                }
 
                public override string ToString ()
                {
-                       if (IsIdentity)
-                               return "Identity";
-                       else
-                               return string.Format ("{0},{1},{2},{3},{4},{5}",
-                                                     _m11, _m12, _m21, _m22, _offsetX, _offsetY);
+                       return ToString (null);
                }
 
                public string ToString (IFormatProvider provider)
                {
-                       throw new NotImplementedException ();
+                       return IsIdentity
+                               ? "Identity"
+                               : string.Concat (_m11, ",", _m12, ",", _m21, ",", _m22, ",", _offsetX, ",", _offsetY);
                }
 
                public Point Transform (Point point)
index e5ab056a14f95f7c45b2720f5b0fd55cb8f4aca0..596d21199ef2657de3557d3db7ddf536cd42b256 100644 (file)
@@ -33,22 +33,24 @@ namespace System.Windows.Media {
        {
                public override bool CanConvertFrom (ITypeDescriptorContext context, Type sourceType)
                {
-                       throw new NotImplementedException ();
+                       return sourceType == typeof (string);
                }
 
                public override bool CanConvertTo (ITypeDescriptorContext context, Type destinationType)
                {
-                       throw new NotImplementedException ();
+                       return destinationType == typeof (string);
                }
 
                public override object ConvertFrom (ITypeDescriptorContext context, CultureInfo culture, object value)
                {
-                       throw new NotImplementedException ();
+                       if (!(value is string))
+                               throw new NotSupportedException ("MatrixConverter only supports converting from strings");
+                       return Matrix.Parse ((string)value);
                }
 
                public override object ConvertTo (ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
                {
-                       throw new NotImplementedException ();
+                       return ((Matrix)value).ToString (culture);
                }
        }
 
diff --git a/mcs/class/WindowsBase/Test/System.Windows.Media/MatrixConverterTest.cs b/mcs/class/WindowsBase/Test/System.Windows.Media/MatrixConverterTest.cs
new file mode 100644 (file)
index 0000000..9134aec
--- /dev/null
@@ -0,0 +1,64 @@
+using NUnit.Framework;
+using System;
+using System.Windows.Media;
+
+namespace MonoTests.System.Windows.Media {
+
+       [TestFixture]
+       public class MatrixConverterTest {
+               const double DELTA = 0.000000001d;
+
+               void CheckMatrix (Matrix expected, Matrix actual)
+               {
+                       Assert.AreEqual (expected.M11, actual.M11, DELTA);
+                       Assert.AreEqual (expected.M12, actual.M12, DELTA);
+                       Assert.AreEqual (expected.M21, actual.M21, DELTA);
+                       Assert.AreEqual (expected.M22, actual.M22, DELTA);
+                       Assert.AreEqual (expected.OffsetX, actual.OffsetX, DELTA);
+                       Assert.AreEqual (expected.OffsetY, actual.OffsetY, DELTA);
+               }
+
+               [Test]
+               public void CanConvertFrom ()
+               {
+                       var conv = new MatrixConverter ();
+                       Assert.IsTrue (conv.CanConvertFrom (typeof (string)));
+                       Assert.IsFalse (conv.CanConvertFrom (typeof (Matrix)));
+               }
+
+               [Test]
+               public void CanConvertTo ()
+               {
+                       var conv = new MatrixConverter ();
+                       Assert.IsTrue (conv.CanConvertTo (typeof (string)));
+                       Assert.IsFalse (conv.CanConvertTo (typeof (Matrix)));
+               }
+
+               [Test]
+               public void ConvertFrom ()
+               {
+                       var conv = new MatrixConverter ();
+                       object obj = conv.ConvertFrom ("1, 2, 3, 4, 5, 6");
+                       Assert.AreEqual (typeof (Matrix), obj.GetType ());
+                       CheckMatrix (new Matrix (1, 2, 3, 4, 5, 6), (Matrix)obj);
+               }
+
+               [Test]
+               [ExpectedException (typeof (NotSupportedException))]
+               public void ConvertFromInvalidType ()
+               {
+                       var conv = new MatrixConverter ();
+                       conv.ConvertFrom (new Matrix (10, 20, 30, 40, 50, 60));
+               }
+
+               [Test]
+               public void ConvertTo ()
+               {
+                       var conv = new MatrixConverter ();
+                       var matrix = new Matrix (1, 2, 3, 4, 5, 6);
+                       object obj = conv.ConvertTo (matrix, typeof (string));
+                       Assert.AreEqual (typeof (string), obj.GetType ());
+                       Assert.AreEqual ("1,2,3,4,5,6", (string)obj);
+               }
+       }
+}
\ No newline at end of file
index ceb99bdfa2da8d4fd45b6e85404fade72ab6dcba..cbccb4339bb10d2facce83d497a179b8f504f779 100644 (file)
@@ -158,7 +158,6 @@ namespace MonoTests.System.Windows.Media {
                }
 
                [Test]
-               [Category ("NotWorking")]
                public void Parse ()
                {
                        CheckMatrix (Matrix.Identity, Matrix.Parse ("Identity"));
diff --git a/mcs/class/WindowsBase/Test/System.Windows.Media/MatrixValueSerializerTest.cs b/mcs/class/WindowsBase/Test/System.Windows.Media/MatrixValueSerializerTest.cs
new file mode 100644 (file)
index 0000000..f8b9a6a
--- /dev/null
@@ -0,0 +1,79 @@
+using NUnit.Framework;
+using System;
+using System.Windows.Media.Converters;
+using System.Windows.Media;
+
+namespace MonoTests.System.Windows.Media {
+
+       [TestFixture]
+       public class MatrixValueSerializerTest {
+               const double DELTA = 0.000000001d;
+
+               void CheckMatrix (Matrix expected, Matrix actual)
+               {
+                       Assert.AreEqual (expected.M11, actual.M11, DELTA);
+                       Assert.AreEqual (expected.M12, actual.M12, DELTA);
+                       Assert.AreEqual (expected.M21, actual.M21, DELTA);
+                       Assert.AreEqual (expected.M22, actual.M22, DELTA);
+                       Assert.AreEqual (expected.OffsetX, actual.OffsetX, DELTA);
+                       Assert.AreEqual (expected.OffsetY, actual.OffsetY, DELTA);
+               }
+
+               [Test]
+               public void CanConvertFromString ()
+               {
+                       var serializer = new MatrixValueSerializer ();
+                       Assert.IsTrue (serializer.CanConvertFromString ("", null));
+               }
+
+               [Test]
+               public void CanConvertToString ()
+               {
+                       var serializer = new MatrixValueSerializer ();
+                       Assert.IsTrue (serializer.CanConvertToString (new Matrix (1, 2, 3, 4, 5 ,6), null));
+                       Assert.IsFalse (serializer.CanConvertToString ("", null));
+               }
+
+               [Test]
+               public void ConvertFromString ()
+               {
+                       var serializer = new MatrixValueSerializer ();
+                       object obj = serializer.ConvertFromString ("1, 2, 3, 4, 5 ,6", null);
+                       Assert.AreEqual (typeof (Matrix), obj.GetType ());
+                       CheckMatrix (new Matrix (1, 2, 3, 4, 5, 6), (Matrix)obj);
+               }
+
+               [Test]
+               public void RoundTripConvert()
+               {
+                       var serializer = new MatrixValueSerializer ();
+                       var matrix = new Matrix (1.1, 2.2, 3.3, 4.4, 5.5, 6.6);
+                       var obj = serializer.ConvertFromString (serializer.ConvertToString (matrix, null), null);
+                       CheckMatrix (matrix, (Matrix)obj);
+               }
+
+               [Test]
+               [ExpectedException (typeof (FormatException))]
+               public void ConvertFromStringShouldThrowExceptionWhenStringHasInvalidFormat ()
+               {
+                       var serializer = new MatrixValueSerializer ();
+                       serializer.ConvertFromString ("a,b,c,d,e,f", null);
+               }
+
+               [Test]
+               [ExpectedException (typeof (NotSupportedException))]
+               public void ConvertFromStringShouldThrowExceptionWhenStringIsNull ()
+               {
+                       var serializer = new MatrixValueSerializer ();
+                       serializer.ConvertFromString (null, null);
+               }
+
+               [Test]
+               [ExpectedException (typeof (NotSupportedException))]
+               public void ConvertToStringShouldThrowExceptionWhenInvalidType ()
+               {
+                       var serializer = new MatrixValueSerializer ();
+                       serializer.ConvertToString (10, null);
+               }
+       }
+}
\ No newline at end of file
index fb559eec9c645fb2b8df00d0ddbd17065cf7bae8..d320100f1a074164c6c944b3ef4d970ba7506ce6 100644 (file)
@@ -52,7 +52,6 @@ namespace MonoTests.System.Windows {
                }
 
                [Test]
-               [Category ("NotWorking")]
                public void ConvertFrom ()
                {
                        SizeConverter r = new SizeConverter ();
@@ -73,7 +72,6 @@ namespace MonoTests.System.Windows {
                }
 
                [Test]
-               [Category ("NotWorking")]
                [ExpectedException (typeof (ArgumentException))]
                public void ConvertFrom_negative ()
                {
@@ -82,7 +80,6 @@ namespace MonoTests.System.Windows {
                }
 
                [Test]
-               [Category ("NotWorking")]
                public void ConvertTo ()
                {
                        SizeConverter r = new SizeConverter ();
index 51cb1c62d042a60b529b17d10e40cd943d0d03a7..5fba4fc771069f5e0a6d9d4a0e42338e1ab55547 100644 (file)
@@ -43,5 +43,7 @@ System.Windows.Markup/DependsOnAttributeTest.cs
 System.Windows.Markup/MarkupExtensionReturnTypeAttributeTest.cs
 System.Windows.Markup/ValueSerializerTest.cs
 System.Windows.Media/MatrixTest.cs
+System.Windows.Media/MatrixConverterTest.cs
+System.Windows.Media/MatrixValueSerializerTest.cs
 System.Windows.Threading/DispatcherTest.cs
 System.Windows.Threading/DispatcherTimerTest.cs
diff --git a/mcs/class/corlib/Test/System.Runtime.Remoting.Proxies/RealProxyTest.cs b/mcs/class/corlib/Test/System.Runtime.Remoting.Proxies/RealProxyTest.cs
new file mode 100644 (file)
index 0000000..36d8906
--- /dev/null
@@ -0,0 +1,76 @@
+//
+// MonoTests.System.Runtime.Remoting.Proxies.RealProxyTest.cs
+//
+//
+
+using System;
+using System.Runtime.Remoting.Messaging;
+using System.Runtime.Remoting.Proxies;
+using NUnit.Framework;
+
+namespace MonoTests.System.Runtime.Remoting.Proxies {
+       [TestFixture]
+       public class RealProxyTest {
+
+               public class ExampleInterfaceProxy : RealProxy {
+                       public bool Called;
+
+                       public ExampleInterfaceProxy () : base (typeof(IComparable))
+                       {
+                               Called = false;
+                       }
+
+                       public override IMessage Invoke (IMessage msg)
+                       {
+                               Called = true;
+                               return new ReturnMessage (typeof(IComparable), null, 0, null, null);
+                       }
+               }
+
+               [Test]
+               public void InterfaceProxyGetTypeOkay ()
+               {
+                       // Regression test for #17325
+                       // Check that GetType () for a proxy of an interface
+                       // returns the interface.
+                       var prox = new ExampleInterfaceProxy ();
+                       var tprox = prox.GetTransparentProxy ();
+
+                       Assert.IsNotNull (tprox, "#1");
+
+                       var tproxType = tprox.GetType ();
+
+                       Assert.IsFalse (prox.Called, "#2"); // this is true on .NET Framework, but false on Mono.
+
+                       Assert.IsNotNull (tproxType, "#3");
+                       Assert.IsTrue (tproxType.IsAssignableFrom (typeof(IComparable)), "#4");
+               }
+
+               [Test]
+               public void InterfaceProxyGetTypeViaReflectionOkay ()
+               {
+                       // Regression test for #17325
+                       // Check that GetType () for a proxy of an interface
+                       // returns the interface.
+                       //
+                       // This versions calls GetType using reflection, which
+                       // avoids the fast path in the JIT.
+                       var prox = new ExampleInterfaceProxy ();
+                       var tprox = prox.GetTransparentProxy ();
+
+                       Assert.IsNotNull (tprox, "#1");
+
+
+                       var m = typeof(object).GetMethod ("GetType");
+
+                       var tproxType = m.Invoke (tprox, null);
+
+                       Assert.IsTrue (prox.Called, "#2");
+
+                       Assert.IsNotNull (tproxType, "#3");
+                       Assert.IsTrue (tproxType is Type, "#4");
+                       Assert.IsTrue ((tproxType as Type).IsAssignableFrom (typeof(IComparable)), "#5");
+               }
+
+       }
+}
index 1f8fe1b01681b2255dc7b26bf99fb7468e123b2d..5fee569b7c7770d6aac101d5457f9d3aef620fdc 100644 (file)
@@ -205,6 +205,7 @@ System.Runtime.Remoting.Channels/ChannelServicesTest.cs
 System.Runtime.Remoting.Contexts/SynchronizationAttributeTest.cs
 System.Runtime.Remoting.Messaging/CallContextTest.cs
 System.Runtime.Remoting.Metadata.W3cXsd2001/SoapHexBinaryTest.cs
+System.Runtime.Remoting.Proxies/RealProxyTest.cs
 System.Runtime.Serialization/FormatterServicesTests.cs
 System.Runtime.Serialization/ObjectIDGeneratorTests.cs
 System.Runtime.Serialization/SerializationBinderTest.cs
index 0b368fe3531598ba19cb259b31e939a6098e6677..63b58916eaee510654e48dace49a84ad71c09ea4 100644 (file)
@@ -40,6 +40,7 @@ System.Runtime.Remoting.Channels/ChannelServicesTest.cs
 System.Runtime.Remoting.Contexts/SynchronizationAttributeTest.cs
 System.Runtime.Remoting.Messaging/CallContextTest.cs
 System.Runtime.Remoting.Metadata.W3cXsd2001/SoapHexBinaryTest.cs
+System.Runtime.Remoting.Proxies/RealProxyTest.cs
 System.Security.AccessControl/AuthorizationRuleTest.cs
 System.Security.AccessControl/CommonAceTest.cs
 System.Security.AccessControl/CommonAclTest.cs
index 34a4d83fa9c2b864bfd9263319ab1873f61523d7..9980aa9be99033f1625cc42cbad82a02a96d85e3 100644 (file)
@@ -3,24 +3,55 @@ include ../build/rules.make
 
 ROSLYN_CSC_DIR = $(dir $(CSC_LOCATION))
 
-ROSLYN_FILES = \
+ROSLYN_FILES_FOR_MONO = \
        $(ROSLYN_CSC_DIR)/csc.exe                               \
        $(ROSLYN_CSC_DIR)/csc.rsp                               \
        $(ROSLYN_CSC_DIR)/csc.exe.config                        \
+       $(ROSLYN_CSC_DIR)/csi.exe                               \
+       $(ROSLYN_CSC_DIR)/csi.exe.config                        \
+       $(ROSLYN_CSC_DIR)/csi.rsp                               \
        $(ROSLYN_CSC_DIR)/Microsoft.CodeAnalysis.CSharp.dll     \
+       $(ROSLYN_CSC_DIR)/Microsoft.CodeAnalysis.CSharp.Scripting.dll \
+       $(ROSLYN_CSC_DIR)/Microsoft.CodeAnalysis.VisualBasic.dll \
        $(ROSLYN_CSC_DIR)/Microsoft.CodeAnalysis.dll            \
+       $(ROSLYN_CSC_DIR)/Microsoft.CodeAnalysis.Scripting.dll \
        $(ROSLYN_CSC_DIR)/System.Collections.Immutable.dll      \
-       $(ROSLYN_CSC_DIR)/System.Reflection.Metadata.dll
-
-DISTFILES = $(ROSLYN_FILES)
+       $(ROSLYN_CSC_DIR)/System.Reflection.Metadata.dll        \
+       $(ROSLYN_CSC_DIR)/VBCSCompiler.exe                      \
+       $(ROSLYN_CSC_DIR)/VBCSCompiler.exe.config
+
+ROSLYN_FILES_TO_COPY_FOR_MSBUILD = \
+       $(ROSLYN_CSC_DIR)/Microsoft.Build.Tasks.CodeAnalysis.dll \
+       $(ROSLYN_CSC_DIR)/Microsoft.CSharp.Core.targets          \
+       $(ROSLYN_CSC_DIR)/Microsoft.VisualBasic.Core.targets
+
+ROSLYN_FILES_TO_LINK_FOR_MSBUILD = \
+       csi.exe                                         \
+       csi.exe.config                                  \
+       csi.rsp                                         \
+       Microsoft.CodeAnalysis.dll                      \
+       Microsoft.CodeAnalysis.CSharp.dll               \
+       Microsoft.CodeAnalysis.CSharp.Scripting.dll     \
+       Microsoft.CodeAnalysis.Scripting.dll            \
+       System.Collections.Immutable.dll                \
+       System.Reflection.Metadata.dll                  \
+       VBCSCompiler.exe                                \
+       VBCSCompiler.exe.config
+
+DISTFILES = $(ROSLYN_FILES_FOR_MONO) $(ROSLYN_FILES_TO_COPY_FOR_MSBUILD)
 
 ifeq ($(PROFILE), $(DEFAULT_PROFILE))
 
 TARGET_DIR = $(DESTDIR)$(mono_libdir)/mono/$(FRAMEWORK_VERSION)
+MSBUILD_ROSLYN_DIR = $(DESTDIR)$(mono_libdir)/mono/msbuild/15.0/bin/Roslyn
 
 install-local:
        $(MKINSTALLDIRS) $(TARGET_DIR)
-       $(INSTALL_LIB) $(ROSLYN_FILES) $(TARGET_DIR)
+       $(INSTALL_LIB) $(ROSLYN_FILES_FOR_MONO) $(TARGET_DIR)
+       $(MKINSTALLDIRS) $(MSBUILD_ROSLYN_DIR)
+       $(INSTALL_LIB) $(ROSLYN_FILES_TO_COPY_FOR_MSBUILD) $(MSBUILD_ROSLYN_DIR)
+
+       (cd $(MSBUILD_ROSLYN_DIR); for asm in $(ROSLYN_FILES_TO_LINK_FOR_MSBUILD); do ln -fs ../../../../$(FRAMEWORK_VERSION)/$$asm . ; done)
 
 endif
 
index 285a031f5d216538ccc7aacb4e96170a2dcbd6a7..e4bd162730ca1f72810851af9a40176d4c84c2ab 100644 (file)
@@ -55,6 +55,11 @@ DIFF = diff -rupZ
 DIFF_QUIET = diff --brief -Z
 endif
 
+ifdef MCS_MODE
+DIFF = echo "WARNING: running in mcs mode, tests are specific to roslyn and would fail. Skipping diff check."
+DIFF_QUIET = $(DIFF)
+endif
+
 dist-local: dist-default dist-tests
 
 dist-tests:
index f6cf940c9e41c63eeb8ad5f6cb9f0fae6a16c52d..721baf1194eb6e40fed350e539f3ba6ed66658a0 100644 (file)
@@ -252,7 +252,12 @@ namespace Xamarin.ApiDiff {
 
                public override void Removed (XElement source)
                {
-                       Output.Write ("<h3>Removed Type <span class='breaking' data-is-breaking>{0}.{1}</span></h3>", State.Namespace, GetTypeName (source));
+                       string name = State.Namespace + "." + GetTypeName (source);
+
+                       if (State.IgnoreRemoved.Any (re => re.IsMatch (name)))
+                               return;
+
+                       Output.Write ("<h3>Removed Type <span class='breaking' data-is-breaking>{0}</span></h3>", name);
                }
 
                public virtual string GetTypeName (XElement type)
index 063e34ecbf7f5c74ccdef96f6f283ba3d996f889..bc369d1906a975088f2f83a52f2f3ecd0ebf9c25 100644 (file)
@@ -91,6 +91,10 @@ namespace Xamarin.ApiDiff {
                public override void Removed (XElement source)
                {
                        var name = source.Attribute ("name").Value;
+
+                       if (State.IgnoreRemoved.Any (re => re.IsMatch (name)))
+                               return;
+
                        Output.WriteLine ("<!-- start namespace {0} --> <div>", name);
                        Output.WriteLine ("<h2>Removed Namespace {0}</h2>", name);
                        Output.WriteLine ();
index ea774840c110573a7faebc0f4caabb47c2eaf3e1..440dfe9f8e65876bdcd3a44346190982a73832c3 100644 (file)
@@ -35,6 +35,10 @@ CHECK_DIFF = @\
                exit 1; \
        fi
 
+ifdef MCS_MODE
+CHECK_DIFF = @echo "WARNING: running in mcs mode, tests are specific to roslyn and would fail. Skipping diff check."
+endif
+
 PREPARE_OUTDIR = @\
        rm -rf $(OUT_DIR); \
        mkdir -p $(OUT_DIR); \
index 93d925ff273209a3a0b07647061c2ad33cf8ece2..406829f8021e462580eb1fbdd272df99a1602f0f 100644 (file)
@@ -14,11 +14,7 @@ include ../../build/executable.make
 XBUILD_DIR=.
 include $(XBUILD_DIR)/xbuild_test.make
 
-ifeq (4.0, $(FRAMEWORK_VERSION))
-install-local: xbuild-net4-fail
-else
 install-local: install-extras
-endif
 
 PORTABLE_TARGETS_SRC:=data/Portable/Targets
 PCL5_FX_SRC:=data/Portable/Frameworks/v5.0
index 4c503c060ac3b432270f45b7367477750751875d..d7488d66411dac1f15bbd594867b2a8ab6e68363 100644 (file)
@@ -6,16 +6,8 @@ export TESTING_MONO=a
 export MSBuildExtensionsPath=$(XBUILD_DATA_DIR)
 export XBUILD_FRAMEWORK_FOLDERS_PATH= $(topdir)/class/Microsoft.Build/xbuild-testing
 
-ifeq (4.0, $(FRAMEWORK_VERSION))
-NO_TEST=true
-else
 test-local: copy-targets Test/test-config-file-$(PROFILE)
 clean-local: clean-targets clean-test-config
-endif
-
-xbuild-net4-fail:
-       @echo "The net_4_0 profile contains reference assemblies only and cannot be installed/tested as an xbuild toolset"
-       @exit 1
 
 Test/test-config-file-$(PROFILE): $(XBUILD_DATA_DIR)/xbuild.exe.config_test.in
        sed -e 's/@ASM_VERSION@/$(XBUILD_ASSEMBLY_VERSION)/g' $(XBUILD_DATA_DIR)/xbuild.exe.config_test.in > Test/test-config-file-$(PROFILE)
index a994e4603d30214cbfb5d5a40e7fd9d17459d023..f5b64acdd0dab72058234fb16f54291d593a7e47 100755 (executable)
@@ -3143,12 +3143,16 @@ get_method_override (MonoImage *m, guint32 token, MonoGenericContainer *containe
                                g_free (meth_str);
                                return ret;
                        } else {
-                               char *meth_str = get_method_core (m, decl, FALSE, container);
-                               char *ret = g_strdup_printf ("Could not decode method override %s due to %s", meth_str, mono_error_get_message (&error));
+                               if (!mono_error_ok (&error)) {
+                                       char *meth_str = get_method_core (m, decl, FALSE, container);
+                                       char *ret = g_strdup_printf ("Could not decode method override %s due to %s", meth_str, mono_error_get_message (&error));
 
-                               mono_error_cleanup (&error);
-                               g_free (meth_str);
-                               return ret;
+                                       mono_error_cleanup (&error);
+                                       g_free (meth_str);
+                                       return ret;
+                               } else {
+                                       return get_method_core (m, decl, FALSE, container);
+                               }
                        }
                }
        }
index 9dd5eaa3d543be12f59583fe0d439bfbaece2b32..77f8b8dd515195523e50ea6de908cd6caa39209b 100644 (file)
@@ -273,7 +273,7 @@ g_module_close (GModule *module)
 gchar *
 g_module_build_path (const gchar *directory, const gchar *module_name)
 {
-       char *lib_prefix = "";
+       const char *lib_prefix = "";
        
        if (module_name == NULL)
                return NULL;
@@ -281,10 +281,8 @@ g_module_build_path (const gchar *directory, const gchar *module_name)
        if (strncmp (module_name, "lib", 3) != 0)
                lib_prefix = LIBPREFIX;
        
-       if (directory && *directory){ 
-               
+       if (directory && *directory)
                return g_strdup_printf ("%s/%s%s" LIBSUFFIX, directory, lib_prefix, module_name);
-       }
        return g_strdup_printf ("%s%s" LIBSUFFIX, lib_prefix, module_name); 
 }
 
index 98d8faf2679e9822d47a3831b32f3160d766a194..949ef88d39ffc5baff221917ba6a3c32e14801ce 100644 (file)
 
 #include <errno.h>
 
+/*
+ *  Linux knows two different versions of strerror_r () that can only be distinguished
+ *  by using feature test macros.  Please check the man pages for more details.
+ */
+#if defined (_POSIX_C_SOURCE) && defined (_GNU_SOURCE)
+#if (_POSIX_C_SOURCE >= 200112L) && !_GNU_SOURCE
+#define USE_STRERROR_R_XSI
+#endif
+#endif
+
 /* 
  * g_strndup and g_vasprintf need to allocate memory with g_malloc if 
  * ENABLE_OVERRIDABLE_ALLOCATORS is defined so that it can be safely freed with g_free 
@@ -231,10 +241,11 @@ g_strerror (gint errnum)
 #ifdef HAVE_STRERROR_R
                char tmp_buff [128]; //Quite arbitrary, should be large enough
                char *buff = tmp_buff;
-               int buff_len = sizeof (tmp_buff);
-               int r;
+               size_t buff_len = sizeof (tmp_buff);
                buff [0] = 0;
 
+#ifdef USE_STRERROR_R_XSI
+               int r;
                while ((r = strerror_r (errnum, buff, buff_len - 1))) {
                        if (r != ERANGE) {
                                buff = g_strdup_printf ("Invalid Error code '%d'", errnum);
@@ -251,10 +262,17 @@ g_strerror (gint errnum)
                        error_messages [errnum] = g_strdup (buff);
                if (buff != tmp_buff)
                        g_free (buff);
-#else
+#else /* USE_STRERROR_R_XSI */
+               int r;
+               r = strerror_r (errnum, buff, buff_len);
+               if (!error_messages [errnum])
+                       error_messages [errnum] = g_strdup (buff);
+#endif /* USE_STRERROR_R_XSI */
+
+#else /* HAVE_STRERROR_R */
                if (!error_messages [errnum])
                        error_messages [errnum] = g_strdup_printf ("Error code '%d'", errnum);
-#endif
+#endif /* HAVE_STRERROR_R */
 
 
 #ifndef G_OS_WIN32
index 3ff6e77cbb990f3d2b15b3252b2cb22628ebe4ac..909e950c6c934c642b55c47aa2eeb21800faa031 100644 (file)
@@ -757,17 +757,17 @@ typedef struct {
 
 typedef struct {
        guint64 new_object_count;
-       size_t initialized_class_count;
-       size_t generic_vtable_count;
+       gsize initialized_class_count;
+       gsize generic_vtable_count;
        size_t used_class_count;
        size_t method_count;
        size_t class_vtable_size;
        size_t class_static_data_size;
        size_t generic_instance_count;
-       size_t generic_class_count;
-       size_t inflated_method_count;
+       gsize generic_class_count;
+       gsize inflated_method_count;
        size_t inflated_method_count_2;
-       size_t inflated_type_count;
+       gsize inflated_type_count;
        size_t generics_metadata_size;
        size_t delegate_creations;
        size_t imt_tables_size;
index cd3f8bf703b433073663ebb089962c6306f760cf..2e3dcd73856b25bb5cf6694a8b4594c04ca3ce1d 100644 (file)
@@ -46,6 +46,7 @@
 #include <mono/utils/mono-logger-internals.h>
 #include <mono/utils/mono-memory-model.h>
 #include <mono/utils/atomic.h>
+#include <mono/utils/unlocked.h>
 #include <mono/utils/bsearch.h>
 #include <mono/utils/checked-build.h>
 
@@ -864,7 +865,7 @@ mono_class_inflate_generic_type_with_mempool (MonoImage *image, MonoType *type,
                }
        }
 
-       mono_stats.inflated_type_count++;
+       UnlockedIncrementSize (&mono_stats.inflated_type_count);
        return inflated;
 }
 
@@ -928,7 +929,7 @@ mono_class_inflate_generic_type_no_copy (MonoImage *image, MonoType *type, MonoG
        if (!inflated)
                return type;
 
-       mono_stats.inflated_type_count++;
+       UnlockedIncrementSize (&mono_stats.inflated_type_count);
        return inflated;
 }
 
@@ -1089,7 +1090,7 @@ mono_class_inflate_generic_method_full_checked (MonoMethod *method, MonoClass *k
                return (MonoMethod*)cached;
        }
 
-       mono_stats.inflated_method_count++;
+       UnlockedIncrementSize (&mono_stats.inflated_method_count);
 
        inflated_methods_size += sizeof (MonoMethodInflated);
 
@@ -3568,7 +3569,7 @@ mono_class_setup_vtable_full (MonoClass *klass, GList *in_setup)
                return;
        }
 
-       mono_stats.generic_vtable_count ++;
+       UnlockedIncrementSize (&mono_stats.generic_vtable_count);
        in_setup = g_list_prepend (in_setup, klass);
 
        if (mono_class_is_ginst (klass)) {
@@ -4902,7 +4903,7 @@ mono_class_init (MonoClass *klass)
                        goto leave;
        }
 
-       mono_stats.initialized_class_count++;
+       UnlockedIncrementSize (&mono_stats.initialized_class_count);
 
        if (mono_class_is_ginst (klass) && !mono_class_get_generic_class (klass)->is_dynamic) {
                MonoClass *gklass = mono_class_get_generic_class (klass)->container_class;
@@ -5047,10 +5048,10 @@ mono_class_init (MonoClass *klass)
                return !mono_class_has_failure (klass);
        }
 
-       mono_stats.initialized_class_count++;
+       UnlockedIncrementSize (&mono_stats.initialized_class_count);
 
        if (mono_class_is_ginst (klass) && !mono_class_get_generic_class (klass)->is_dynamic)
-               mono_stats.generic_class_count++;
+               UnlockedIncrementSize (&mono_stats.generic_class_count);
 
        if (mono_class_is_ginst (klass) || image_is_dynamic (klass->image) || !klass->type_token || (has_cached_info && !cached_info.has_nested_classes))
                klass->nested_classes_inited = TRUE;
index 76ccc633aacb095aa61157cda783347c1df962ee..2e485848486d0363b3b7d0929849fcec894b26b6 100644 (file)
@@ -1256,7 +1256,13 @@ ves_icall_System_Object_GetType (MonoObjectHandle obj, MonoError *error)
        if (mono_class_is_transparent_proxy (klass)) {
                MonoTransparentProxyHandle proxy_obj = MONO_HANDLE_CAST (MonoTransparentProxy, obj);
                MonoRemoteClass *remote_class = MONO_HANDLE_GETVAL (proxy_obj, remote_class);
-               MonoType *proxy_type = &remote_class->proxy_class->byval_arg;
+               /* If it's a transparent proxy for an interface, return the
+                * interface type, not the unhelpful proxy_class class (which
+                * is just MarshalByRefObject). */
+               MonoType *proxy_type =
+                       mono_remote_class_is_interface_proxy (remote_class) ?
+                       &remote_class->interfaces[0]->byval_arg :
+                       &remote_class->proxy_class->byval_arg;
                return mono_type_get_object_handle (domain, proxy_type, error);
        } else
 #endif
index e3d19ca7c130c3ef57cf87b841a6920a1712e55d..7ee7fe2e23a7fabca3e238729679264827738188 100644 (file)
@@ -686,7 +686,7 @@ mono_set_config_dir (const char *dir)
        /* If this environment variable is set, overrides the directory computed */
        char *env_mono_cfg_dir = g_getenv ("MONO_CFG_DIR");
        if (env_mono_cfg_dir == NULL && dir != NULL)
-               env_mono_cfg_dir = strdup (dir);
+               env_mono_cfg_dir = g_strdup (dir);
 
        mono_cfg_dir = env_mono_cfg_dir;
 }
index 6167cb0ca127efd96d6f3cfb66ca2d3e058c4e8f..62c8df717de03de5d56228b9a3708350ba93d163 100644 (file)
@@ -1571,6 +1571,9 @@ ves_icall_array_new_specific (MonoVTable *vtable, uintptr_t n);
 MonoRemoteClass*
 mono_remote_class (MonoDomain *domain, MonoStringHandle class_name, MonoClass *proxy_class, MonoError *error);
 
+gboolean
+mono_remote_class_is_interface_proxy (MonoRemoteClass *remote_class);
+
 MonoObject *
 mono_remoting_invoke (MonoObject *real_proxy, MonoMethodMessage *msg, MonoObject **exc, MonoArray **out_args, MonoError *error);
 
index 3d3d68c8a1084a19699bea369f7b25ed57987945..6afa95de3981b09ab0df3e4aaad406b5f20791c9 100644 (file)
@@ -1148,7 +1148,7 @@ mono_method_get_imt_slot (MonoMethod *method)
 
        sig = mono_method_signature (method);
        hashes_count = sig->param_count + 4;
-       hashes_start = (guint32 *)malloc (hashes_count * sizeof (guint32));
+       hashes_start = (guint32 *)g_malloc (hashes_count * sizeof (guint32));
        hashes = hashes_start;
 
        if (! MONO_CLASS_IS_INTERFACE (method->klass)) {
@@ -1300,7 +1300,7 @@ imt_sort_slot_entries (MonoImtBuilderEntry *entries) {
        MONO_REQ_GC_NEUTRAL_MODE;
 
        int number_of_entries = entries->children + 1;
-       MonoImtBuilderEntry **sorted_array = (MonoImtBuilderEntry **)malloc (sizeof (MonoImtBuilderEntry*) * number_of_entries);
+       MonoImtBuilderEntry **sorted_array = (MonoImtBuilderEntry **)g_malloc (sizeof (MonoImtBuilderEntry*) * number_of_entries);
        GPtrArray *result = g_ptr_array_new ();
        MonoImtBuilderEntry *current_entry;
        int i;
@@ -1365,7 +1365,7 @@ build_imt_slots (MonoClass *klass, MonoVTable *vt, MonoDomain *domain, gpointer*
        int i;
        GSList *list_item;
        guint32 imt_collisions_bitmap = 0;
-       MonoImtBuilderEntry **imt_builder = (MonoImtBuilderEntry **)calloc (MONO_IMT_SIZE, sizeof (MonoImtBuilderEntry*));
+       MonoImtBuilderEntry **imt_builder = (MonoImtBuilderEntry **)g_calloc (MONO_IMT_SIZE, sizeof (MonoImtBuilderEntry*));
        int method_count = 0;
        gboolean record_method_count_for_max_collisions = FALSE;
        gboolean has_generic_virtual = FALSE, has_variant_iface = FALSE;
@@ -2155,6 +2155,22 @@ mono_class_create_runtime_vtable (MonoDomain *domain, MonoClass *klass, MonoErro
 }
 
 #ifndef DISABLE_REMOTING
+/**
+ * mono_remote_class_is_interface_proxy:
+ * \param remote_class
+ *
+ * Returns TRUE if the given remote class is a proxying an interface (as
+ * opposed to a class deriving from MarshalByRefObject).
+ */
+gboolean
+mono_remote_class_is_interface_proxy (MonoRemoteClass *remote_class)
+{
+       /* This if condition is taking advantage of how mono_remote_class ()
+        * works: if that code changes, this needs to change too. */
+       return (remote_class->interface_count >= 1 &&
+               remote_class->proxy_class == mono_defaults.marshalbyrefobject_class);
+}
+
 /**
  * mono_class_proxy_vtable:
  * \param domain the application domain
@@ -2249,6 +2265,18 @@ mono_class_proxy_vtable (MonoDomain *domain, MonoRemoteClass *remote_class, Mono
        /* we need to keep the GC descriptor for a transparent proxy or we confuse the precise GC */
        pvt->gc_descr = mono_defaults.transparent_proxy_class->gc_descr;
 
+       if (mono_remote_class_is_interface_proxy (remote_class)) {
+               /* If it's a transparent proxy for an interface, set the
+                * MonoVTable:type to the interface type, not the placeholder
+                * MarshalByRefObject class.  This is used when mini JITs calls
+                * to Object.GetType ()
+                */
+               MonoType *itf_proxy_type = &remote_class->interfaces[0]->byval_arg;
+               pvt->type = mono_type_get_object_checked (domain, itf_proxy_type, error);
+               if (!is_ok (error))
+                       goto failure;
+       }
+
        /* initialize vtable */
        mono_class_setup_vtable (klass);
        for (i = 0; i < klass->vtable_size; ++i) {
@@ -2516,6 +2544,12 @@ mono_remote_class (MonoDomain *domain, MonoStringHandle class_name, MonoClass *p
        key = mp_key;
 
        if (mono_class_is_interface (proxy_class)) {
+               /* If we need to proxy an interface, we use this stylized
+                * representation (interface_count >= 1, proxy_class is
+                * MarshalByRefObject).  The code in
+                * mono_remote_class_is_interface_proxy () depends on being
+                * able to detect that we're doing this, so if this
+                * representation changes, change GetType, too. */
                rc = (MonoRemoteClass *)mono_domain_alloc (domain, MONO_SIZEOF_REMOTE_CLASS + sizeof(MonoClass*));
                rc->interface_count = 1;
                rc->interfaces [0] = proxy_class;
index 23f65469c81d412832909bd5b1f3d080072a1d74..b10423120d43a649f8fd9a0c160a0fb3f307523f 100644 (file)
@@ -181,7 +181,7 @@ mono_profiler_enable_coverage (void)
        if (!mono_debug_enabled ())
                mono_debug_init (MONO_DEBUG_FORMAT_MONO);
 
-       return TRUE;
+       return mono_profiler_state.code_coverage = TRUE;
 }
 
 static void
@@ -218,7 +218,7 @@ mono_profiler_get_coverage_data (MonoProfilerHandle handle, MonoMethod *method,
        guint32 size;
 
        const unsigned char *start = mono_method_header_get_code (header, &size, NULL);
-       const unsigned char *end = start - size;
+       const unsigned char *end = start + size;
        MonoDebugMethodInfo *minfo = mono_debug_lookup_method (method);
 
        for (guint32 i = 0; i < info->entries; i++) {
index bdcbd9ca72a02314cc27213ae86e98cc49def13c..f072ac56c1eb5f3561fbd7802ffbf85b31643771 100644 (file)
@@ -4117,26 +4117,26 @@ emit_handler_start (EmitContext *ctx, MonoBasicBlock *bb, LLVMBuilderRef builder
        }
 
        /* Start a new bblock which CALL_HANDLER can branch to */
-       target_bb = bblocks [bb->block_num].call_handler_target_bb;
-       if (target_bb) {
-               ctx->builder = builder = create_builder (ctx);
-               LLVMPositionBuilderAtEnd (ctx->builder, target_bb);
+       ctx->builder = builder = create_builder (ctx);
+       LLVMPositionBuilderAtEnd (ctx->builder, target_bb);
 
-               ctx->bblocks [bb->block_num].end_bblock = target_bb;
+       ctx->bblocks [bb->block_num].end_bblock = target_bb;
 
-               /* Store the exception into the IL level exvar */
-               if (bb->in_scount == 1) {
-                       g_assert (bb->in_scount == 1);
-                       exvar = bb->in_stack [0];
+       /* Store the exception into the IL level exvar */
+       if (bb->in_scount == 1) {
+               g_assert (bb->in_scount == 1);
+               exvar = bb->in_stack [0];
 
-                       // FIXME: This is shared with filter clauses ?
-                       g_assert (!values [exvar->dreg]);
+               // FIXME: This is shared with filter clauses ?
+               g_assert (!values [exvar->dreg]);
 
-                       g_assert (ctx->ex_var);
-                       values [exvar->dreg] = LLVMBuildLoad (builder, ctx->ex_var, "");
-                       emit_volatile_store (ctx, exvar->dreg);
-               }
+               g_assert (ctx->ex_var);
+               values [exvar->dreg] = LLVMBuildLoad (builder, ctx->ex_var, "");
+               emit_volatile_store (ctx, exvar->dreg);
        }
+
+       /* Make normal branches to the start of the clause branch to the new bblock */
+       bblocks [bb->block_num].bblock = target_bb;
 }
 
 static void
index 8a3790aac248ed44baa2d156137da838cfb65e42..4f463c28b951ccbefe112d7063472abd352d3e76 100644 (file)
@@ -4256,12 +4256,12 @@ proflog_icall_SetMonitorEvents (MonoBoolean value)
        mono_coop_mutex_lock (&log_profiler.api_mutex);
 
        if (value) {
-               ENABLE (PROFLOG_EXCEPTION_EVENTS);
+               ENABLE (PROFLOG_MONITOR_EVENTS);
                mono_profiler_set_monitor_contention_callback (log_profiler.handle, monitor_contention);
                mono_profiler_set_monitor_acquired_callback (log_profiler.handle, monitor_acquired);
                mono_profiler_set_monitor_failed_callback (log_profiler.handle, monitor_failed);
        } else {
-               DISABLE (PROFLOG_EXCEPTION_EVENTS);
+               DISABLE (PROFLOG_MONITOR_EVENTS);
                mono_profiler_set_monitor_contention_callback (log_profiler.handle, NULL);
                mono_profiler_set_monitor_acquired_callback (log_profiler.handle, NULL);
                mono_profiler_set_monitor_failed_callback (log_profiler.handle, NULL);
index e16931a28881757afdbc91db5950eb92841fda37..b277688859176ae54ff3a4d3c5b16ff574eccbb5 100644 (file)
@@ -175,7 +175,8 @@ monoutils_sources = \
        checked-build.h \
        os-event.h \
        refcount.h      \
-       w32api.h
+       w32api.h        \
+       unlocked.h
 
 arch_sources = 
 
index f4409e384c5166d5a3c753439734a6a4f6e771a9..746c84fb5131455564551cf4186402cbf41820f0 100644 (file)
@@ -113,13 +113,19 @@ typedef SSIZE_T ssize_t;
 #define MONO_GNUC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
 #endif
 
-/* Used to tell clang's ThreadSanitizer to not report data races that occur within a certain function */
 #if defined(__has_feature)
 #if __has_feature(thread_sanitizer)
-#define MONO_NO_SANITIZE_THREAD __attribute__ ((no_sanitize("thread")))
+#define MONO_HAS_CLANG_THREAD_SANITIZER 1
 #else
-#define MONO_NO_SANITIZE_THREAD
+#define MONO_HAS_CLANG_THREAD_SANITIZER 0
+#endif
+#else
+#define MONO_HAS_CLANG_THREAD_SANITIZER 0
 #endif
+
+/* Used to tell Clang's ThreadSanitizer to not report data races that occur within a certain function */
+#if MONO_HAS_CLANG_THREAD_SANITIZER
+#define MONO_NO_SANITIZE_THREAD __attribute__ ((no_sanitize("thread")))
 #else
 #define MONO_NO_SANITIZE_THREAD
 #endif
diff --git a/mono/utils/unlocked.h b/mono/utils/unlocked.h
new file mode 100644 (file)
index 0000000..5b812ac
--- /dev/null
@@ -0,0 +1,42 @@
+/**
+ * \file
+ * Contains inline functions to explicitly mark data races that should not be changed.
+ * This way, instruments like Clang's ThreadSanitizer can be told to ignore very specific instructions.
+ *
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
+ */
+
+#ifndef _UNLOCKED_H_
+#define _UNLOCKED_H_
+
+#include <glib.h>
+#include <mono/utils/mono-compiler.h>
+
+#if MONO_HAS_CLANG_THREAD_SANITIZER
+#define MONO_UNLOCKED_ATTRS MONO_NO_SANITIZE_THREAD MONO_NEVER_INLINE static
+#else
+#define MONO_UNLOCKED_ATTRS MONO_ALWAYS_INLINE static inline
+#endif
+
+MONO_UNLOCKED_ATTRS
+gint32
+UnlockedIncrement (gint32 *val)
+{
+       return ++*val;
+}
+
+MONO_UNLOCKED_ATTRS
+gint64
+UnlockedIncrement64 (gint64 *val)
+{
+       return ++*val;
+}
+
+MONO_UNLOCKED_ATTRS
+gsize
+UnlockedIncrementSize (gsize *val)
+{
+       return ++*val;
+}
+
+#endif /* _UNLOCKED_H_ */
index 29903290d3381140bf7742288fbc2128591c5f4a..350a54654e475e39aa163f1c125cbaff0c19b47b 100644 (file)
     <ClInclude Include="..\mono\utils\strenc.h" />\r
     <ClInclude Include="..\mono\utils\valgrind.h" />\r
     <ClInclude Include="..\mono\utils\atomic.h" />\r
+    <ClInclude Include="..\mono\utils\unlocked.h" />
     <ClInclude Include="..\mono\utils\mono-hwcap.h" />\r
     <ClInclude Include="..\mono\utils\mono-hwcap-x86.h" />\r
     <ClInclude Include="..\mono\utils\bsearch.h" />\r
index 30b819626b6fc91f3f5f3cea2ffabec06f416384..30badee3648d03e88c2a0eec33f164a87902f672 100644 (file)
     <ClInclude Include="..\mono\utils\os-event.h">\r
       <Filter>Header Files</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="..\mono\utils\unlocked.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>\r
   <ItemGroup>\r
     <Filter Include="Header Files">\r
index d3623d1d44402d20bf3c097d181b203a92005893..d11e25bd8343acbe0bda3471cab6a2f9237cdd61 100644 (file)
@@ -2,8 +2,8 @@ import fileinput
 
 class MSBuild (GitHubPackage):
        def __init__ (self):
-               GitHubPackage.__init__ (self, 'mono', 'msbuild', '15.3',
-                       revision = '9fcd43ddc7c2f9b250b0d7e823ae01862246b35a')
+               GitHubPackage.__init__ (self, 'mono', 'msbuild', '15.4',
+                       revision = 'ba7f97df0352dbdd58a4bceb8830c219b76d7d22')
 
        def build (self):
                self.sh ('./cibuild.sh --scope Compile --target Mono --host Mono --config Release')
index a28b37c0a07b0cb1c751d8609805712c93f7e6df..61de39e94ad88e55b9076b1bdcfbc09eb2660703 100644 (file)
@@ -4,7 +4,7 @@ import fileinput
 class NuGetBinary (Package):
 
     def __init__(self):
-        Package.__init__(self, name='NuGet', version='4.3.0-preview1', sources=[
+        Package.__init__(self, name='NuGet', version='4.3.0', sources=[
                          'https://dist.nuget.org/win-x86-commandline/v%{version}/nuget.exe'])
 
     def build(self):
index f0f5082c47a779aa684af95527d6f314783a79ed..37f0191d1c6417da97a162e486144cb69ab5ccd0 100644 (file)
@@ -1,3 +1,3 @@
 Package('sqlite-autoconf', '3090200', sources=[
-    'http://www.sqlite.org/2015/%{name}-%{version}.tar.gz'
+    'https://www.sqlite.org/2015/%{name}-%{version}.tar.gz'
 ])
index e865d73039126367418da7d9eff4def1de67f50b..b208d06d1f76a2651c321bc32ab7b4cc518369ee 100644 (file)
@@ -37,6 +37,7 @@ bin_SCRIPTS = \
        peverify                \
        mcs                     \
        csc                                     \
+       csi                     \
        mono-package-runtime    \
        mono-heapviz            \
        $(scripts_mono_configuration_crypto)
@@ -159,6 +160,7 @@ EXTRA_DIST =                        \
        mcs.in                          \
        csc.in                          \
        dmcs.in                         \
+       csi.in                  \
        mono-package-runtime    \
        mono-test-install       \
        mono-heapviz            \
@@ -211,6 +213,10 @@ dmcs: dmcs.in Makefile
        $(REWRITE_COMMON) $(srcdir)/dmcs.in > $@.tmp
        mv -f $@.tmp $@
 
+csi: csi.in Makefile
+       $(REWRITE_COMMON) $(srcdir)/csi.in > $@.tmp
+       mv -f $@.tmp $@
+
 mono-service: mono-service.in Makefile
        $(REWRITE4) -e 's,@''exe_name@,$@,g' $(srcdir)/mono-service.in > $@.tmp
        mv -f $@.tmp $@
diff --git a/scripts/ci/clang-thread-sanitizer-blacklist b/scripts/ci/clang-thread-sanitizer-blacklist
new file mode 100644 (file)
index 0000000..ef12456
--- /dev/null
@@ -0,0 +1,351 @@
+# ------------------------------------------------------------ #
+#   mono/eglib
+# ------------------------------------------------------------ #
+
+fun:monoeg_g_hash_table_iter_next
+
+# ------------------------------------------------------------ #
+#   mono/metadata
+# ------------------------------------------------------------ #
+
+# class.c #
+
+fun:inflate_generic_type
+fun:init_sizes_with_info
+fun:make_generic_param_class
+fun:mono_class_create_from_typedef
+fun:mono_class_from_generic_parameter_internal
+fun:mono_class_get_field_count
+fun:mono_class_get_method_from_name_flags
+fun:mono_class_get_methods
+fun:mono_class_has_failure
+fun:mono_class_has_finalizer
+fun:mono_class_inflate_generic_method_full_checked
+fun:mono_class_inflate_generic_type_no_copy
+fun:mono_class_inflate_generic_type_with_mempool
+fun:mono_class_init
+fun:mono_class_layout_fields
+fun:mono_class_setup_basic_field_info
+fun:mono_class_setup_fields
+fun:mono_class_setup_methods
+fun:mono_class_setup_vtable_full
+fun:mono_class_setup_vtable_general
+fun:mono_generic_class_get_class
+fun:mono_method_get_context_general
+fun:mono_type_get_basic_type_from_generic
+fun:mono_type_get_underlying_type
+
+# class-accessors.c #
+
+fun:mono_class_get_flags
+fun:mono_class_get_method_count
+fun:mono_class_set_method_count
+
+# class-inlines.h #
+
+fun:mono_class_is_ginst
+fun:mono_class_is_gtd
+
+# domain.c #
+
+fun:mono_domain_alloc0
+
+# gc.c #
+
+fun:finalize_domain_objects
+fun:finalizer_thread
+fun:mono_domain_finalize
+fun:mono_gc_cleanup
+
+# handle.h #
+
+fun:mono_stack_mark_pop
+
+# handle.c #
+
+fun:mono_handle_new
+fun:mono_handle_stack_scan
+
+# icall.c #
+
+fun:ves_icall_System_Array_FastCopy
+fun:ves_icall_System_Reflection_MonoMethodInfo_get_parameter_info
+fun:ves_icall_RuntimeType_GetConstructors_native
+
+# image.c #
+
+fun:mono_image_alloc
+fun:mono_image_alloc0
+fun:mono_image_strdup
+
+# jit-info.c #
+
+fun:jit_info_table_add
+fun:jit_info_table_chunk_index
+fun:jit_info_table_find
+fun:jit_info_table_index
+fun:mono_jit_compile_method_with_opt
+fun:mono_jit_info_init
+fun:mono_jit_info_table_find_internal
+
+# loader.c #
+
+fun:cache_memberref_sig
+fun:mon_new
+fun:mono_get_method_from_token
+fun:mono_method_get_signature_checked
+fun:mono_method_signature_checked
+
+# marshal.c #
+
+fun:mono_marshal_get_native_wrapper
+fun:mono_marshal_isinst_with_cache
+
+# metadata.c #
+
+fun:img_set_cache_get
+fun:_mono_metadata_generic_class_equal
+fun:mono_metadata_lookup_generic_class
+fun:mono_type_get_type
+fun:mono_type_is_struct
+
+# monitor.c #
+
+fun:mono_monitor_ensure_owned
+fun:mono_monitor_exit_inflated
+fun:mono_monitor_try_enter_inflated
+fun:mono_monitor_try_enter_internal
+fun:mono_object_hash
+fun:ves_icall_System_Threading_Monitor_Monitor_pulse_all
+fun:ves_icall_System_Threading_Monitor_Monitor_test_synchronised
+fun:ves_icall_System_Threading_Monitor_Monitor_wait
+
+# mono-conc-hash.c #
+
+fun:mono_conc_g_hash_table_lookup_extended
+fun:set_key
+
+# mono-hash.c #
+
+fun:mono_g_hash_table_find_slot
+fun:mono_g_hash_table_max_chain_length
+
+# object.c #
+
+fun:mono_class_compute_gc_descriptor
+fun:mono_class_create_runtime_vtable
+fun:mono_class_vtable_full
+fun:mono_delegate_ctor_with_method
+fun:mono_object_handle_isinst
+fun:mono_runtime_class_init_full
+
+# reflection.c #
+
+fun:method_object_construct
+fun:reflected_equal
+
+# reflection-cache.h #
+
+fun:cache_object_handle
+
+# runtime.c #
+
+fun:mono_runtime_is_shutting_down
+fun:mono_runtime_try_shutdown
+
+# sgen-mono.c #
+
+fun:mono_gc_alloc_string
+fun:mono_gc_alloc_vector
+fun:mono_gc_thread_in_critical_region
+fun:mono_gc_wbarrier_set_arrayref
+fun:sgen_client_gchandle_created
+fun:sgen_client_gchandle_destroyed
+
+# threadpool.c #
+
+fun:worker_callback
+
+# threadpool-worker-default.c #
+
+fun:heuristic_adjust
+fun:heuristic_notify_work_completed
+fun:heuristic_should_adjust
+fun:hill_climbing_update
+fun:monitor_should_keep_running
+fun:monitor_thread
+
+# threads.c #
+
+fun:build_wait_tids
+fun:create_thread
+fun:mono_thread_clr_state
+fun:mono_thread_detach_internal
+fun:mono_threads_add_joinable_thread
+fun:mono_threads_join_threads
+fun:remove_and_abort_threads
+
+# w32handle.c #
+
+fun:mono_w32handle_init_handle
+fun:mono_w32handle_lookup_data
+fun:mono_w32handle_unref_core
+
+# ------------------------------------------------------------ #
+#   mono/mini
+# ------------------------------------------------------------ #
+
+# alias-analysis.c #
+
+fun:recompute_aliased_variables
+
+# method-to-ir.c #
+
+fun:mono_method_to_ir
+
+# mini.c #
+
+fun:mini_method_compile
+fun:mono_allocate_stack_slots
+fun:mono_jit_compile_method_inner
+fun:mono_save_seq_point_info
+fun:mono_time_track_end
+fun:mono_type_to_load_membase
+
+# mini-amd64.c #
+
+fun:mono_arch_get_delegate_invoke_impl
+
+# mini-exceptions.c #
+
+fun:mono_thread_state_init_from_sigctx
+
+# mini-generic-sharing.c #
+
+fun:mini_get_basic_type_from_generic
+fun:mini_is_gsharedvt_type
+fun:mini_type_get_underlying_type
+fun:mono_class_fill_runtime_generic_context
+fun:mono_generic_context_check_used
+fun:mono_method_check_context_used
+
+# mini-native-types.c #
+
+fun:mini_native_type_replace_type
+
+# mini-runtime.c #
+
+fun:mono_jit_find_compiled_method_with_jit_info
+
+# mini-trampolines.c #
+
+fun:common_call_trampoline
+fun:mini_resolve_imt_method
+fun:mono_create_jit_trampoline
+fun:mono_delegate_trampoline
+fun:mono_magic_trampoline
+fun:mono_rgctx_lazy_fetch_trampoline
+fun:mono_vcall_trampoline
+
+# ------------------------------------------------------------ #
+#   mono/sgen
+# ------------------------------------------------------------ #
+
+# sgen-alloc.c #
+
+fun:sgen_alloc_obj
+fun:sgen_clear_tlabs
+fun:sgen_try_alloc_obj_nolock
+
+# sgen-array-list.h #
+
+fun:sgen_array_list_bucketize
+
+# sgen-array-list.c #
+
+fun:sgen_array_list_add
+fun:sgen_array_list_find_unset
+
+# sgen-cardtable.h #
+
+fun:sgen_card_table_mark_address
+
+# sgen-fin-weak-hash.c #
+
+fun:add_stage_entry
+
+# sgen-gc.h #
+
+fun:sgen_set_nursery_scan_start
+
+# sgen-gc.c #
+
+fun:mono_gc_wbarrier_generic_store
+fun:sgen_conservatively_pin_objects_from
+
+# sgen-gchandles.c #
+
+fun:is_slot_set
+fun:link_get
+fun:mono_gchandle_free
+fun:sgen_gchandle_iterate
+
+# sgen-marksweep.c #
+
+fun:ensure_block_is_checked_for_sweeping
+fun:major_finish_sweep_checking
+fun:set_block_state
+fun:sweep_block
+fun:sweep_block_for_size
+fun:unlink_slot_from_free_list_uncontested
+
+# sgen-nursery-allocator.c #
+
+fun:sgen_fragment_allocator_add
+fun:sgen_fragment_allocator_alloc
+fun:sgen_fragment_allocator_par_range_alloc
+fun:sgen_fragment_allocator_release
+
+# ------------------------------------------------------------ #
+#   mono/utils
+# ------------------------------------------------------------ #
+
+# hazard-pointer.c #
+
+fun:is_pointer_hazardous
+fun:mono_get_hazardous_pointer
+
+# memfuncs.c #
+
+fun:mono_gc_bzero_aligned
+fun:mono_gc_memmove_aligned
+
+# mono-conc-hashtable.c #
+
+fun:mono_conc_hashtable_lookup
+
+# mono-context.c #
+
+fun:mono_sigctx_to_monoctx
+
+# mono-lazy-init.h #
+
+fun:mono_lazy_initialize
+
+# mono-threads-posix-signals.c #
+
+fun:restart_signal_handler
+fun:suspend_signal_handler
+
+# mono-threads-state-machine.c #
+
+fun:check_thread_state
+fun:mono_threads_transition_finish_async_suspend
+
+# os-event-unix.c #
+
+fun:mono_os_event_set
+
+# refcount.h #
+
+fun:mono_refcount_decrement
index 4eeedc730de5cb9b01d36713c73f501d2a5ff564..fcc26b7eff6e02dcbe4470a76569be0cae8c8109 100755 (executable)
@@ -5,12 +5,23 @@ export TESTCMD=${MONO_REPO_ROOT}/scripts/ci/run-step.sh
 
 export TEST_HARNESS_VERBOSE=1
 
+make_timeout=300m
+
 if [[ $CI_TAGS == *'collect-coverage'* ]]; then
     # Collect coverage for further use by lcov and similar tools.
     # Coverage must be collected with -O0 and debug information.
     export CFLAGS="-ggdb3 --coverage -O0"
     # Collect coverage on all optimizations
     export MONO_ENV_OPTIONS="$MONO_ENV_OPTIONS -O=all"
+elif [[ ${CI_TAGS} == *'clang-sanitizer'* ]]; then
+       export CC="clang"
+       export CXX="clang++"
+       export CFLAGS="-g -O1 -fsanitize=thread -fsanitize-blacklist=${MONO_REPO_ROOT}/scripts/ci/clang-thread-sanitizer-blacklist -mllvm -tsan-instrument-atomics=false"
+       export LDFLAGS="-fsanitize=thread"
+       # TSAN_OPTIONS are used by programs that were compiled with Clang's ThreadSanitizer
+       # see https://github.com/google/sanitizers/wiki/ThreadSanitizerFlags for more details
+       export TSAN_OPTIONS="history_size=7:exitcode=0:force_seq_cst_atomics=1"
+       make_timeout=30m
 elif [[ ${label} == w* ]]; then
     # Passing -ggdb3 on Cygwin breaks linking against libmonosgen-x.y.dll
     export CFLAGS="-g -O2"
@@ -88,7 +99,7 @@ if [[ ${CI_TAGS} == *'monolite'* ]]; then make get-monolite-latest; fi
 make_parallelism=-j4
 if [[ ${label} == 'debian-8-ppc64el' ]]; then make_parallelism=-j1; fi
 
-${TESTCMD} --label=make --timeout=300m --fatal make ${make_parallelism} -w V=1
+${TESTCMD} --label=make --timeout=${make_timeout} --fatal make ${make_parallelism} -w V=1
 
 if [[ ${CI_TAGS} == *'checked-coop'* ]]; then export MONO_CHECK_MODE=gc,thread; fi
 if [[ ${CI_TAGS} == *'checked-all'* ]]; then export MONO_CHECK_MODE=all; fi
index de0ec47d2ca7403a6d854458fd4d1a86b2c491b1..daad48d3cc538f196077065665e323834e0c5d65 100755 (executable)
@@ -99,11 +99,11 @@ ${TESTCMD} --label=System.IO.Compression --timeout=5m make -w -C mcs/class/Syste
 if [[ ${label} == w* ]]; then ${TESTCMD} --label=symbolicate --skip; else ${TESTCMD} --label=symbolicate --timeout=60m make -w -C mcs/tools/mono-symbolicate check; fi
 ${TESTCMD} --label=monolinker --timeout=10m make -w -C mcs/tools/linker check
 
-if [[ ${label} == osx-* ]]
+if [[ $CI_TAGS == *'ms-test-suite'* ]]
 then ${TESTCMD} --label=ms-test-suite --timeout=30m make -w -C acceptance-tests check-ms-test-suite
 else ${TESTCMD} --label=ms-test-suite --skip;
 fi
-if [[ ${label} == 'ubuntu-1404-amd64' ]]; then
+if [[ $CI_TAGS == *'apidiff'* ]]; then
     source ${MONO_REPO_ROOT}/scripts/ci/util.sh
     if ${TESTCMD} --label=apidiff --timeout=15m --fatal make -w -C mcs -j4 mono-api-diff
     then report_github_status "success" "API Diff" "No public API changes found." || true
diff --git a/scripts/csi.in b/scripts/csi.in
new file mode 100644 (file)
index 0000000..4d5026f
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec @bindir@/mono --gc-params=nursery-size=64m $MONO_OPTIONS @mono_instdir@/4.5/csi.exe "$@"