[submodule "external/api-doc-tools"]
path = external/api-doc-tools
url = git://github.com/mono/api-doc-tools.git
+[submodule "external/api-snapshot"]
+ path = external/api-snapshot
+ url = git://github.com/mono/api-snapshot.git
AC_ARG_ENABLE(minimal, [ --enable-minimal=LIST drop support for LIST subsystems.
LIST is a comma-separated list from: aot, profiler, decimal, pinvoke, debug, appdomains, verifier,
- reflection_emit, reflection_emit_save, large_code, logging, com, ssa, generics, attach, jit, simd, soft_debug, perfcounters, normalization, assembly_remapping, shared_perfcounters, remoting,
+ reflection_emit, reflection_emit_save, large_code, logging, com, ssa, generics, attach, jit, simd, soft_debug, perfcounters, normalization, desktop_loader, shared_perfcounters, remoting,
security, lldb, mdb, sgen_remset, sgen_marksweep_par, sgen_marksweep_fixed, sgen_marksweep_fixed_par, sgen_copying.],
[
for feature in `echo "$enable_minimal" | sed -e "s/,/ /g"`; do
AC_MSG_NOTICE([Disabled String normalization support.])
fi
-if test "x$mono_feature_disable_assembly_remapping" = "xyes"; then
- AC_DEFINE(DISABLE_ASSEMBLY_REMAPPING, 1, [Disable assembly remapping.])
- AC_MSG_NOTICE([Disabled Assembly remapping.])
+#TODO: remove assembly_remapping feature name once everyone is using desktop_loader
+if test "x$mono_feature_disable_assembly_remapping" = "xyes" || "x$mono_feature_disable_desktop_loader" = "xyes"; then
+ AC_DEFINE(DISABLE_DESKTOP_LOADER, 1, [Disable desktop assembly loader semantics.])
+ AC_MSG_NOTICE([Disabled desktop assembly loader semantics.])
fi
if test "x$mono_feature_disable_shared_perfcounters" = "xyes"; then
--- /dev/null
+Subproject commit d6eb25eb492847b8c2634d0b01829a17e6226258
-Subproject commit fd1d6c404d763c98b6f0e64e98ab65f92e808245
+Subproject commit c4212c9701f7aaa6fb53aff071c8832f2df43aa3
-Subproject commit 2f070ea5c26c4093b1bcdf5fbdc6fbfdb688d419
+Subproject commit 76767209e09be647a5c7e0d272c3f22b87adfd6b
-Subproject commit a84847cb307985f2a0cfcdf124d68ec0626704b7
+Subproject commit 814f76de6a972c5c3dd3ec6b10dc900fd73d08d2
TestResult-*.xml
TestResult*.xml
.dep_dirs-*
+apidiff/*
errors/*.log
errors/dummy.xml
class/Mono.Data.Sqlite/test.db
$(MAKE) -C class/Mono.CSharp.Debugger install DESTDIR="$$DESTDIR" || exit 1; \
tar cvjf "$$chargedir".tar.bz2 "$$chargedir" ; \
rm -rf "$$chargedir"
+
+# Targets for creating API diffs of the framework
+
+MONO_API_SNAPSHOT_PATH := $(topdir)../external/api-snapshot/
+GENAPI := $(MONO_API_SNAPSHOT_PATH)tools/genapi/GenAPI.exe
+MONO_API_SNAPSHOT_PROFILE_PATH := $(MONO_API_SNAPSHOT_PATH)profiles/$(PROFILE)/
+MONO_API_ASSEMBLIES_IGNORED := $(addprefix $(topdir)class/lib/$(PROFILE)/, SystemWebTestShim.dll standalone-runner-support.dll nunit.core.dll nunit.core.extensions.dll nunit.core.interfaces.dll nunit.framework.dll nunit.framework.extensions.dll nunit.mocks.dll nunit.util.dll nunit-console-runner.dll nunitlite.dll)
+MONO_API_ASSEMBLIES := $(filter-out $(MONO_API_ASSEMBLIES_IGNORED), $(wildcard $(topdir)class/lib/$(PROFILE)/*.dll)) $(wildcard $(topdir)class/lib/$(PROFILE)/Facades/*.dll)
+MONO_API_ASSEMBLIES_CS := $(MONO_API_ASSEMBLIES:$(topdir)class/lib/$(PROFILE)/%.dll=$(MONO_API_SNAPSHOT_PROFILE_PATH)%.cs)
+
+$(MONO_API_SNAPSHOT_PROFILE_PATH)%.cs: $(topdir)class/lib/$(PROFILE)/%.dll $(GENAPI) $(MONO_API_SNAPSHOT_PATH)profiles/license-header.txt
+ @mkdir -p $(dir $@)
+ $(Q) MONO_PATH=$(topdir)class/lib/$(BUILD_TOOLS_PROFILE) $(RUNTIME) $(GENAPI) -libPath:$(topdir)class/lib/$(PROFILE),$(topdir)class/lib/$(PROFILE)/Facades -out:$(dir $@) -headerFile:$(MONO_API_SNAPSHOT_PATH)profiles/license-header.txt -assemblyAttributes -typeForwardedTo -assemblyVersion -assembly:$< || echo "Couldn't process assembly." > $@
+
+mono-api-current: $(MONO_API_ASSEMBLIES_CS)
+
+mono-api-diff:
+ @echo "Regenerating API snapshot..."
+ $(Q) rm -rf "$(MONO_API_SNAPSHOT_PROFILE_PATH)"
+ $(Q) $(MAKE) mono-api-current
+ @echo "Checking public API differences..."
+ $(Q) cd $(MONO_API_SNAPSHOT_PATH); git add -A .
+ $(Q) cd $(MONO_API_SNAPSHOT_PATH); git diff --no-renames HEAD > $(abspath $(topdir))/temp.patch
+ @mkdir -p apidiff
+ $(Q) sed -e "/@diffdata@/r temp.patch" -e "/@diffdata@/d" -e "s/@title@/Public API Diff/g" -e "s/@description@/If the changes are intentional, run <code>make -C mcs mono-api-diff<\/code> locally and commit changes in external\/api-snapshot./g" diff.html.in > apidiff/index.html
+ $(Q) if [ -s temp.patch ]; then echo "Error: Found public API differences, see mcs/apidiff/index.html. If the changes are intentional, please go to external/api-snapshot and commit them."; rm -f temp.patch; exit 1; else echo "No differences found."; rm -f temp.patch; fi
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.1.0")]
+[assembly: AssemblyVersion ("4.0.2.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
--- /dev/null
+//
+// Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyTitle ("System.Reflection.DispatchProxy.dll")]
+[assembly: AssemblyDescription ("System.Reflection.DispatchProxy.dll")]
+[assembly: AssemblyDefaultAlias ("System.Reflection.DispatchProxy.dll")]
+[assembly: AssemblyCompany ("Xamarin, Inc.")]
+[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
+[assembly: AssemblyCopyright ("Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)")]
+[assembly: AssemblyVersion ("4.0.2.0")]
+[assembly: AssemblyInformationalVersion ("4.0.0.0")]
+[assembly: AssemblyFileVersion ("4.0.0.0")]
--- /dev/null
+MCS_BUILD_DIR = ../../../build
+
+thisdir = class/Facades/System.Reflection.DispatchProxy
+SUBDIRS =
+include $(MCS_BUILD_DIR)/rules.make
+
+LIBRARY_SUBDIR = Facades
+LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
+
+LIBRARY = System.Reflection.DispatchProxy.dll
+
+KEY_FILE = ../../msfinal.pub
+SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
+LIB_REFS = System
+LIB_MCS_FLAGS = $(SIGN_FLAGS) /unsafe
+
+NO_TEST = yes
+
+include $(MCS_BUILD_DIR)/library.make
--- /dev/null
+../../../build/common/MonoTODOAttribute.cs
+Assembly/AssemblyInfo.cs
+System.Reflection/DispatchProxy.cs
--- /dev/null
+//
+// DispatchProxy.cs
+//
+// Author:
+// Alexander Köplinger (alexander.koeplinger@xamarin.com)
+//
+// (C) 2016 Xamarin, Inc.
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace System.Reflection
+{
+ public abstract class DispatchProxy
+ {
+ [MonoTODO]
+ protected DispatchProxy()
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static T Create<T, TProxy> () where TProxy : DispatchProxy
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ protected abstract object Invoke (MethodInfo targetMethod, object[] args);
+ }
+}
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.0.0")]
+[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.1.0")]
+[assembly: AssemblyVersion ("4.0.2.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.1.0.0")]
+[assembly: AssemblyVersion ("4.1.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.1.0.0")]
+[assembly: AssemblyVersion ("4.1.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.1.0.0")]
+[assembly: AssemblyVersion ("4.1.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.1.0")]
+[assembly: AssemblyVersion ("4.0.2.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.1.0")]
+[assembly: AssemblyVersion ("4.0.2.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
-[assembly: AssemblyVersion ("4.0.10.0")]
+[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
System.Diagnostics.FileVersionInfo System.Security.Cryptography.Primitives System.Security.Cryptography.Algorithms System.ValueTuple \
System.Text.Encoding.CodePages
-build_PARALLEL_SUBDIRS = $(basic_PARALLEL_SUBDIRS)
+build_PARALLEL_SUBDIRS = $(basic_PARALLEL_SUBDIRS) System.Text.RegularExpressions System.Diagnostics.Contracts
monodroid_SUBDIRS = $(monotouch_SUBDIRS)
monodroid_PARALLEL_SUBDIRS = $(monotouch_PARALLEL_SUBDIRS)
orbis_PARALLEL_SUBDIRS = $(common_SUBDIRS) $(mobile_only_SUBDIRS)
mobile_only_SUBDIRS = System.Net.Ping System.Runtime.Serialization.Formatters System.Security.Cryptography.Csp System.Security.Cryptography.Pkcs \
-System.Security.Cryptography.Cng System.Runtime.Loader System.Xml.XPath.XmlDocument
+System.Security.Cryptography.Cng System.Runtime.Loader System.Xml.XPath.XmlDocument System.Reflection.DispatchProxy
mobile_only_DEPS_SUBDIRS = System.Security.Cryptography.OpenSsl
System.Xml.Serialization \
Mono.CSharp \
Microsoft.CSharp \
- System.Reflection.DispatchProxy \
System.Reflection.Context \
System.Net.Http.WinHttpHandler
<Compile Include="..\referencesource\System.Data\System\Data\ProviderBase\DbMetaDataFactory.cs" />\r
<Compile Include="..\referencesource\System.Data\System\Data\ProviderBase\WrappedIUnknown.cs" />\r
<Compile Include="..\referencesource\System.Data\System\Data\Sql\IBinarySerialize.cs" />\r
+ <Compile Include="..\referencesource\System.Data\System\Data\Sql\invalidudtexception.cs" />\r
<Compile Include="..\referencesource\System.Data\System\Data\Sql\SqlDataSourceEnumerator.cs" />\r
<Compile Include="..\referencesource\System.Data\System\Data\Sql\SqlFacetAttribute.cs" />\r
<Compile Include="..\referencesource\System.Data\System\Data\Sql\SqlFunctionAttribute.cs" />\r
../referencesource/System.Data/System/Data/ProviderBase/DbMetaDataFactory.cs
../referencesource/System.Data/System/Data/ProviderBase/WrappedIUnknown.cs
../referencesource/System.Data/System/Data/Sql/IBinarySerialize.cs
+../referencesource/System.Data/System/Data/Sql/invalidudtexception.cs
../referencesource/System.Data/System/Data/Sql/SqlDataSourceEnumerator.cs
../referencesource/System.Data/System/Data/Sql/SqlFacetAttribute.cs
../referencesource/System.Data/System/Data/Sql/SqlFunctionAttribute.cs
+++ /dev/null
-//
-// AssemblyInfo.cs
-//
-// Author:
-// Alexander Köplinger (alexander.koeplinger@xamarin.com)
-//
-// (C) 2016 Xamarin, Inc.
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Reflection;
-using System.Resources;
-using System.Security;
-using System.Security.Permissions;
-using System.Diagnostics;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about the assembly
-
-[assembly: AssemblyTitle ("System.Reflection.DispatchProxy.dll")]
-[assembly: AssemblyDescription ("System.Reflection.DispatchProxy.dll")]
-[assembly: AssemblyDefaultAlias ("System.Reflection.DispatchProxy.dll")]
-
-[assembly: AssemblyCompany (Consts.MonoCompany)]
-[assembly: AssemblyProduct (Consts.MonoProduct)]
-[assembly: AssemblyCopyright (Consts.MonoCopyright)]
-[assembly: AssemblyVersion (Consts.FxVersion)]
-[assembly: SatelliteContractVersion (Consts.FxVersion)]
-[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
-
-[assembly: NeutralResourcesLanguage ("en-US")]
-[assembly: CLSCompliant (true)]
-[assembly: AssemblyDelaySign (true)]
-
-[assembly: AssemblyKeyFile("../msfinal.pub")]
-
-[assembly: SecurityCritical]
-
-[assembly: ComVisible (false)]
\ No newline at end of file
+++ /dev/null
-thisdir = class/System.Reflection.DispatchProxy
-SUBDIRS =
-include ../../build/rules.make
-
-LIBRARY = System.Reflection.DispatchProxy.dll
-LIB_REFS = System
-LIB_MCS_FLAGS =
-
-NO_TEST = yes
-
-include ../../build/library.make
+++ /dev/null
-../../build/common/Consts.cs
-../../build/common/Locale.cs
-../../build/common/MonoTODOAttribute.cs
-Assembly/AssemblyInfo.cs
-System.Reflection/DispatchProxy.cs
+++ /dev/null
-//
-// DispatchProxy.cs
-//
-// Author:
-// Alexander Köplinger (alexander.koeplinger@xamarin.com)
-//
-// (C) 2016 Xamarin, Inc.
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-namespace System.Reflection
-{
- public abstract class DispatchProxy
- {
- [MonoTODO]
- protected DispatchProxy()
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public static T Create<T, TProxy> () where TProxy : DispatchProxy
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- protected abstract object Invoke (MethodInfo targetMethod, object[] args);
- }
-}
{
class AppleTlsProvider : MonoTlsProvider
{
- static readonly Guid id = new Guid ("981af8af-a3a3-419a-9f01-a518e3a17c1c");
-
public override string Name {
get { return "apple-tls"; }
}
public override Guid ID {
- get { return id; }
+ get { return MNS.MonoTlsProviderFactory.AppleTlsId; }
}
public override IMonoSslStream CreateSslStream (
{
class MonoBtlsProvider : MonoTlsProvider
{
- static readonly Guid id = new Guid ("432d18c9-9348-4b90-bfbf-9f2a10e1f15b");
-
public override Guid ID {
- get { return id; }
+ get { return MNS.MonoTlsProviderFactory.BtlsId; }
}
public override string Name {
get { return "btls"; }
*/
class LegacyTlsProvider : MSI.MonoTlsProvider
{
- static readonly Guid id = new Guid ("809e77d5-56cc-4da8-b9f0-45e65ba9cceb");
-
public override Guid ID {
- get { return id; }
+ get { return MonoTlsProviderFactory.LegacyId; }
}
public override string Name {
+++ /dev/null
-//
-// MonoTlsProviderFactory.cs
-//
-// Author:
-// Chris Hamons <chris.hamons@xamarin.com>
-// Martin Baulig <martin.baulig@xamarin.com>
-//
-// Copyright (c) 2015 Xamarin, Inc.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-#if !ONLY_APPLETLS
-#error Use MonoTlsProviderFactory.cs instead
-#endif
-
-#if SECURITY_DEP
-
-#if MONO_SECURITY_ALIAS
-extern alias MonoSecurity;
-using MSI = MonoSecurity::Mono.Security.Interface;
-using MX = MonoSecurity::Mono.Security.X509;
-#else
-using MSI = Mono.Security.Interface;
-using MX = Mono.Security.X509;
-#endif
-using System.Security.Cryptography.X509Certificates;
-using Mono.AppleTls;
-
-using System;
-using System.Net;
-using System.Collections.Generic;
-using System.Runtime.CompilerServices;
-
-namespace Mono.Net.Security
-{
- /*
- * Keep in sync with Mono.Security/Mono.Security.Interface/MonoTlsProvider.cs.
- * Simple implementation that does hard codes only a single provider
- */
- static partial class MonoTlsProviderFactory
- {
- #region Internal API
-
- /*
- * APIs in this section are for consumption within System.dll only - do not access via
- * reflection or from friend assemblies.
- *
- */
- internal static MSI.MonoTlsProvider GetProviderInternal ()
- {
- return GetTlsProvider ();
- }
-
- #endregion
-
- static object locker = new object ();
- static MSI.MonoTlsProvider provider;
- static MSI.MonoTlsProvider GetTlsProvider ()
- {
- lock (locker) {
- if (provider == null)
- provider = new AppleTlsProvider ();
- return provider;
- }
- }
-
-
- #region Mono.Security visible API
-
- /*
- * "Public" section, intended to be consumed via reflection.
- *
- * Mono.Security.dll provides a public wrapper around these.
- */
-
- internal static MSI.MonoTlsProvider GetProvider ()
- {
- return GetTlsProvider ();
- }
-
- internal static bool IsProviderSupported (string name)
- {
- return true;
- }
-
- internal static MSI.MonoTlsProvider GetProvider (string name)
- {
- return GetTlsProvider ();
- }
-
- internal static bool IsInitialized => true;
-
- internal static void Initialize ()
- {
- }
-
- internal static void Initialize (string provider)
- {
- }
- #endregion
- }
-}
-#endif
-
+++ /dev/null
-// Copyright 2015 Xamarin Inc. All rights reserved.
-#if SECURITY_DEP
-
-#if MONO_SECURITY_ALIAS
-extern alias MonoSecurity;
-using MSI = MonoSecurity::Mono.Security.Interface;
-#else
-using MSI = Mono.Security.Interface;
-#endif
-
-#if MONO_FEATURE_BTLS
-using Mono.Btls;
-#endif
-
-using System;
-
-namespace Mono.Net.Security
-{
- static partial class MonoTlsProviderFactory
- {
- static MSI.MonoTlsProvider CreateDefaultProviderImpl ()
- {
- MSI.MonoTlsProvider provider = null;
- var type = Environment.GetEnvironmentVariable ("XA_TLS_PROVIDER");
- switch (type) {
- case null:
- case "default":
- case "legacy":
- return new LegacyTlsProvider ();
-#if MONO_FEATURE_BTLS
- case "btls":
- if (!IsBtlsSupported ())
- throw new NotSupportedException ("BTLS in not supported!");
- return new MonoBtlsProvider ();
-#endif
- default:
- throw new NotSupportedException (string.Format ("Invalid TLS Provider: `{0}'.", provider));
- }
- }
- }
-}
-#endif
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if SECURITY_DEP && !ONLY_APPLETLS // ONLY_APPLETLS uses MonoTlsProviderFactory.Apple.cs instead
+#if SECURITY_DEP
#if MONO_SECURITY_ALIAS
extern alias MonoSecurity;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
+#if MONO_FEATURE_BTLS
+using Mono.Btls;
+#endif
+
+#if MONO_FEATURE_APPLETLS
+using Mono.AppleTls;
+#endif
+
#if !MOBILE
using System.Reflection;
#endif
*/
static partial class MonoTlsProviderFactory
{
- #region Internal API
+#region Internal API
/*
* APIs in this section are for consumption within System.dll only - do not access via
if (provider == null)
throw new NotSupportedException ("TLS Support not available.");
+ if (!providerCache.ContainsKey (provider.ID))
+ providerCache.Add (provider.ID, provider);
+
+ X509Helper2.Initialize ();
+
defaultProvider = provider;
initialized = true;
}
throw new NotSupportedException ("TLS Subsystem already initialized.");
defaultProvider = LookupProvider (provider, true);
+
+ X509Helper2.Initialize ();
initialized = true;
}
}
- [MethodImpl (MethodImplOptions.InternalCall)]
- internal extern static bool IsBtlsSupported ();
-
static object locker = new object ();
static bool initialized;
static MSI.MonoTlsProvider defaultProvider;
- #endregion
-
- static Dictionary<string,string> providerRegistration;
+ /*
+ * @providerRegistration maps provider names to a tuple containing its ID and full type name.
+ * On non-reflection enabled systems (such as XI and XM), we can use the Guid to uniquely
+ * identify the provider.
+ *
+ * @providerCache maps the provider's Guid to the MSI.MonoTlsProvider instance.
+ *
+ */
+ static Dictionary<string,Tuple<Guid,string>> providerRegistration;
+ static Dictionary<Guid,MSI.MonoTlsProvider> providerCache;
+#if !ONLY_APPLETLS && !MONOTOUCH && !XAMMAC
static Type LookupProviderType (string name, bool throwOnError)
{
lock (locker) {
InitializeProviderRegistration ();
- string typeName;
- if (!providerRegistration.TryGetValue (name, out typeName)) {
+ Tuple<Guid,string> entry;
+ if (!providerRegistration.TryGetValue (name, out entry)) {
if (throwOnError)
throw new NotSupportedException (string.Format ("No such TLS Provider: `{0}'.", name));
return null;
}
- var type = Type.GetType (typeName, false);
+ var type = Type.GetType (entry.Item2, false);
if (type == null && throwOnError)
- throw new NotSupportedException (string.Format ("Could not find TLS Provider: `{0}'.", typeName));
+ throw new NotSupportedException (string.Format ("Could not find TLS Provider: `{0}'.", entry.Item2));
return type;
}
}
+#endif
static MSI.MonoTlsProvider LookupProvider (string name, bool throwOnError)
{
- var type = LookupProviderType (name, throwOnError);
- if (type == null)
- return null;
-
- try {
- return (MSI.MonoTlsProvider)Activator.CreateInstance (type, true);
- } catch (Exception ex) {
- throw new NotSupportedException (string.Format ("Unable to instantiate TLS Provider `{0}'.", type), ex);
+ lock (locker) {
+ InitializeProviderRegistration ();
+ Tuple<Guid,string> entry;
+ if (!providerRegistration.TryGetValue (name, out entry)) {
+ if (throwOnError)
+ throw new NotSupportedException (string.Format ("No such TLS Provider: `{0}'.", name));
+ return null;
+ }
+
+ // Check cache before doing the reflection lookup.
+ MSI.MonoTlsProvider provider;
+ if (providerCache.TryGetValue (entry.Item1, out provider))
+ return provider;
+
+#if !ONLY_APPLETLS && !MONOTOUCH && !XAMMAC
+ var type = Type.GetType (entry.Item2, false);
+ if (type == null && throwOnError)
+ throw new NotSupportedException (string.Format ("Could not find TLS Provider: `{0}'.", entry.Item2));
+
+ try {
+ provider = (MSI.MonoTlsProvider)Activator.CreateInstance (type, true);
+ } catch (Exception ex) {
+ throw new NotSupportedException (string.Format ("Unable to instantiate TLS Provider `{0}'.", type), ex);
+ }
+#endif
+
+ if (provider == null) {
+ if (throwOnError)
+ throw new NotSupportedException (string.Format ("No such TLS Provider: `{0}'.", name));
+ return null;
+ }
+
+ providerCache.Add (entry.Item1, provider);
+ return provider;
}
}
+#endregion
+
+ internal static readonly Guid AppleTlsId = new Guid ("981af8af-a3a3-419a-9f01-a518e3a17c1c");
+ internal static readonly Guid BtlsId = new Guid ("432d18c9-9348-4b90-bfbf-9f2a10e1f15b");
+ internal static readonly Guid LegacyId = new Guid ("809e77d5-56cc-4da8-b9f0-45e65ba9cceb");
+
static void InitializeProviderRegistration ()
{
lock (locker) {
if (providerRegistration != null)
return;
- providerRegistration = new Dictionary<string,string> ();
- providerRegistration.Add ("legacy", "Mono.Net.Security.LegacyTlsProvider");
-
+ providerRegistration = new Dictionary<string,Tuple<Guid,string>> ();
+ providerCache = new Dictionary<Guid,MSI.MonoTlsProvider> ();
+
+ var appleTlsEntry = new Tuple<Guid,String> (AppleTlsId, "Mono.AppleTls.AppleTlsProvider");
+
+#if ONLY_APPLETLS || MONOTOUCH || XAMMAC
+ providerRegistration.Add ("default", appleTlsEntry);
+ providerRegistration.Add ("apple", appleTlsEntry);
+#else
+ var legacyEntry = new Tuple<Guid,String> (BtlsId, "Mono.Net.Security.LegacyTlsProvider");
+#if MONO_FEATURE_BTLS
+ var btlsEntry = new Tuple<Guid,String> (LegacyId, "Mono.Btls.MonoBtlsProvider");
+#endif
+
+ providerRegistration.Add ("legacy", legacyEntry);
+
if (Platform.IsMacOS)
- providerRegistration.Add ("default", "Mono.AppleTls.AppleTlsProvider");
+ providerRegistration.Add ("default", appleTlsEntry);
else
- providerRegistration.Add ("default", "Mono.Net.Security.LegacyTlsProvider");
+ providerRegistration.Add ("default", legacyEntry);
+#if MONO_FEATURE_BTLS
if (IsBtlsSupported ())
- providerRegistration.Add ("btls", "Mono.Btls.MonoBtlsProvider");
-
- providerRegistration.Add ("apple", "Mono.AppleTls.AppleTlsProvider");
-
- X509Helper2.Initialize ();
+ providerRegistration.Add ("btls", btlsEntry);
+#endif
+
+ providerRegistration.Add ("apple", appleTlsEntry);
+#endif
}
}
-#if !MONODROID && !MONOTOUCH && !XAMMAC
- static MSI.MonoTlsProvider TryDynamicLoad ()
+#region Platform-Specific code
+
+#if MONO_FEATURE_BTLS
+ [MethodImpl (MethodImplOptions.InternalCall)]
+ internal extern static bool IsBtlsSupported ();
+#endif
+
+#if MONODROID
+ static MSI.MonoTlsProvider CreateDefaultProviderImpl ()
+ {
+ MSI.MonoTlsProvider provider = null;
+ var type = Environment.GetEnvironmentVariable ("XA_TLS_PROVIDER");
+ switch (type) {
+ case null:
+ case "default":
+ case "legacy":
+ return new LegacyTlsProvider ();
+#if MONO_FEATURE_BTLS
+ case "btls":
+ if (!IsBtlsSupported ())
+ throw new NotSupportedException ("BTLS in not supported!");
+ return new MonoBtlsProvider ();
+#endif
+ default:
+ throw new NotSupportedException (string.Format ("Invalid TLS Provider: `{0}'.", provider));
+ }
+ }
+#elif ONLY_APPLETLS || MONOTOUCH || XAMMAC
+ static MSI.MonoTlsProvider CreateDefaultProviderImpl ()
+ {
+ return new AppleTlsProvider ();
+ }
+#else
+ static MSI.MonoTlsProvider CreateDefaultProviderImpl ()
{
var variable = Environment.GetEnvironmentVariable ("MONO_TLS_PROVIDER");
if (string.IsNullOrEmpty (variable))
return LookupProvider (variable, true);
}
-
- static MSI.MonoTlsProvider CreateDefaultProviderImpl ()
- {
- var provider = TryDynamicLoad ();
- if (provider != null)
- return provider;
-
- return new LegacyTlsProvider ();
- }
#endif
- #region Mono.Security visible API
+#endregion
+
+#region Mono.Security visible API
/*
* "Public" section, intended to be consumed via reflection.
internal static bool IsProviderSupported (string name)
{
- return LookupProvider (name, false) != null;
+ lock (locker) {
+ InitializeProviderRegistration ();
+ return providerRegistration.ContainsKey (name);
+ }
}
internal static MSI.MonoTlsProvider GetProvider (string name)
{
InitializeInternal (provider);
}
- #endregion
+#endregion
}
}
#endif
#include mobile_System.dll.sources
System/AndroidPlatform.cs
-Mono.Net.Security/MonoTlsProviderFactory.Droid.cs
Mono.Btls/MonoBtlsX509LookupAndroid.cs
#include mobile_System.dll.sources
-System.Net/MacProxy.cs
-
-Mono.Net.Security/MonoTlsProviderFactory.Apple.cs
Mono.Net.Security/LegacyTlsProvider.cs
Mono.Net.Security/MobileAuthenticatedStream.cs
Mono.Net.Security/MobileTlsContext.cs
-Mono.Net.Security/MonoTlsProviderFactory.Apple.cs
Mono.Net.Security/MonoTlsProviderFactory.cs
Mono.Net.Security/MonoTlsProviderImpl.cs
Mono.Net.Security/MonoTlsStream.cs
#include mobile_System.dll.sources
-Mono.Net.Security/MonoTlsProviderFactory.Apple.cs
#include net_4_x_System.dll.sources
-Mono.Net.Security/MonoTlsProviderFactory.Apple.cs
<Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\shared\System\Collections\Generic\KeyValuePair.cs" />\r
<Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\shared\System\Diagnostics\Debug.cs" />\r
<Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\shared\System\IO\Win32Marshal.cs" />\r
+ <Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\shared\System\Runtime\CompilerServices\IsReadOnlyAttribute.cs" />\r
<Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\shared\System\Runtime\CompilerServices\ITuple.cs" />\r
+ <Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\shared\System\Runtime\CompilerServices\RuntimeFeature.cs" />\r
<Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\shared\System\Runtime\CompilerServices\TupleElementNamesAttribute.cs" />\r
<Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\shared\System\Threading\DeferredDisposableLifetime.cs" />\r
<Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\shared\System\TupleExtensions.cs" />\r
../../../external/corert/src/System.Private.CoreLib/shared/System/Diagnostics/Debug.cs
+../../../external/corert/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IsReadOnlyAttribute.cs
../../../external/corert/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ITuple.cs
+../../../external/corert/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/RuntimeFeature.cs
../../../external/corert/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/TupleElementNamesAttribute.cs
../../../external/corert/src/System.Private.CoreLib/shared/System/Threading/DeferredDisposableLifetime.cs
static internal Task<bool> s_falseTask = Task.FromResult<bool>(false);
+#if MONO
+ static internal Task<bool> TrueTask => s_trueTask;
+ static internal Task<bool> FalseTask => s_falseTask;
+#endif
+
[BidMethod] // this method accepts BID format as an argument, this attribute allows FXCopBid rule to validate calls to it
static private void TraceException(
string trace,
internal const string InstanceName = "InstanceName";
internal const string IsClustered = "IsClustered";
internal const string Version = "Version";
+#if !MONO
private const int timeoutSeconds = ADP.DefaultCommandTimeout;
+#endif
private long timeoutTime; // variable used for timeout computations, holds the value of the hi-res performance counter at which this request should expire
private SqlDataSourceEnumerator() : base() {
[Serializable]
public sealed class InvalidUdtException : SystemException {
-
+#if MONO
+ class HResults {
+ internal const int InvalidUdt = unchecked((int)0x80131937);
+ }
+#endif
internal InvalidUdtException() : base() {
HResult = HResults.InvalidUdt;
}
--- /dev/null
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8" />
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0" />
+ <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
+ <title>@title@</title>
+ <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.11.0/styles/github.min.css">
+ <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/diff2html/2.3.0/diff2html.min.css">
+ <link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Open+Sans' />
+ </head>
+ <body style="font-family: 'Open Sans'">
+ <h1>@title@</h1>
+ <p>@description@</p>
+ <div id="diff"><!--<![CDATA[
+@diffdata@
+]]>-->
+ </div>
+
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.3/jquery.js"></script>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.11.0/highlight.min.js"></script>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.11.0/languages/cs.min.js"></script>
+
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/diff2html/2.3.0/diff2html.min.js"></script>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/diff2html/2.3.0/diff2html-ui.min.js"></script>
+
+ <script>
+ $(document).ready(function() {
+ var diff2htmlUi = new Diff2HtmlUI({diff: $("#diff")[0].childNodes[0].nodeValue});
+ diff2htmlUi.draw('#diff', {showFiles: true, matching: 'lines'});
+ diff2htmlUi.highlightCode('#diff');
+ });
+ </script>
+ </body>
+</html>
static string machine_config_file = null;
static string config_dir = null;
static string style = "linux";
+ static bool bundled_header = false;
static string os_message = "";
static bool compress;
static bool nomain;
else
environment.Add (env.Substring (0, p), env.Substring (p+1));
break;
+ case "--bundled-header":
+ bundled_header = true;
+ break;
default:
sources.Add (args [i]);
break;
using (StreamWriter tc = new StreamWriter (File.Create (temp_c))) {
string prog = null;
-#if XAMARIN_ANDROID
- tc.WriteLine ("/* This source code was produced by mkbundle, do not edit */");
- tc.WriteLine ("\n#ifndef NULL\n#define NULL (void *)0\n#endif");
- tc.WriteLine (@"
+ if (bundled_header) {
+ tc.WriteLine ("/* This source code was produced by mkbundle, do not edit */");
+ tc.WriteLine ("\n#ifndef NULL\n#define NULL (void *)0\n#endif");
+ tc.WriteLine (@"
typedef struct {
const char *name;
const unsigned char *data;
void mono_register_bundled_assemblies (const MonoBundledAssembly **assemblies);
void mono_register_config_for_assembly (const char* assembly_name, const char* config_xml);
");
-#else
- tc.WriteLine ("#include <mono/metadata/mono-config.h>");
- tc.WriteLine ("#include <mono/metadata/assembly.h>\n");
-#endif
+ } else {
+ tc.WriteLine ("#include <mono/metadata/mono-config.h>");
+ tc.WriteLine ("#include <mono/metadata/assembly.h>\n");
+ }
if (compress) {
tc.WriteLine ("typedef struct _compressed_data {");
" --skip-scan Skip scanning assemblies that could not be loaded (but still embed them).\n" +
" --i18n ENCODING none, all or comma separated list of CJK, MidWest, Other, Rare, West.\n" +
" -v Verbose output\n" +
+ " --bundled-header Do not attempt to include 'mono-config.h'. Define the entry points directly in the generated code\n" +
"\n" +
"--simple Simple mode does not require a C toolchain and can cross compile\n" +
" --cross TARGET Generates a binary for the given TARGET\n"+
set_domain_search_path (domain);
+ MonoAssemblyCandidatePredicate predicate = NULL;
+ void* predicate_ud = NULL;
+#if !defined(DISABLE_DESKTOP_LOADER)
+ if (G_LIKELY (mono_loader_get_strict_strong_names ())) {
+ predicate = &mono_assembly_candidate_predicate_sn_same_name;
+ predicate_ud = aname;
+ }
+#endif
if (domain->search_path && domain->search_path [0] != NULL) {
if (mono_trace_is_traced (G_LOG_LEVEL_DEBUG, MONO_TRACE_ASSEMBLY)) {
mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_ASSEMBLY, "Domain %s search path is:", domain->friendly_name);
}
mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_ASSEMBLY, "End of domain %s search path.", domain->friendly_name);
}
- result = real_load (domain->search_path, aname->culture, aname->name, refonly, &mono_assembly_candidate_predicate_sn_same_name, aname);
+ result = real_load (domain->search_path, aname->culture, aname->name, refonly, predicate, predicate_ud);
}
if (result == NULL && assemblies_path && assemblies_path [0] != NULL) {
- result = real_load (assemblies_path, aname->culture, aname->name, refonly, &mono_assembly_candidate_predicate_sn_same_name, aname);
+ result = real_load (assemblies_path, aname->culture, aname->name, refonly, predicate, predicate_ud);
}
return result;
/* Contains the list of directories that point to auxiliary GACs */
static char **extra_gac_paths = NULL;
-#ifndef DISABLE_ASSEMBLY_REMAPPING
+#ifndef DISABLE_DESKTOP_LOADER
#define FACADE_ASSEMBLY(str) {str, 0, NULL, FALSE, TRUE}
mono_os_mutex_init_recursive (&assemblies_mutex);
mono_os_mutex_init (&assembly_binding_mutex);
-#ifndef DISABLE_ASSEMBLY_REMAPPING
+#ifndef DISABLE_DESKTOP_LOADER
assembly_remapping_table = g_hash_table_new (g_str_hash, g_str_equal);
int i;
return dest_aname;
}
-#ifndef DISABLE_ASSEMBLY_REMAPPING
+#ifndef DISABLE_DESKTOP_LOADER
const AssemblyVersionMap *vmap = (AssemblyVersionMap *)g_hash_table_lookup (assembly_remapping_table, aname->name);
if (vmap) {
const AssemblyVersionSet* vset;
g_free (corlib_file);
return_corlib_and_facades:
- if (corlib)
+ if (corlib && !strcmp (runtime->framework_version, "4.5")) // FIXME: stop hardcoding 4.5 here
default_path [1] = g_strdup_printf ("%s/Facades", corlib->basedir);
return corlib;
gboolean
framework_assembly_sn_match (MonoAssemblyName *wanted_name, MonoAssemblyName *candidate_name)
{
-#ifndef DISABLE_ASSEMBLY_REMAPPING
+#ifndef DISABLE_DESKTOP_LOADER
const AssemblyVersionMap *vmap = (AssemblyVersionMap *)g_hash_table_lookup (assembly_remapping_table, wanted_name->name);
if (vmap) {
if (!vmap->framework_facade_assembly) {
return mono_assembly_load_corlib (mono_get_runtime_info (), status);
}
+ MonoAssemblyCandidatePredicate predicate = NULL;
+ void* predicate_ud = NULL;
+#if !defined(DISABLE_DESKTOP_LOADER)
+ if (G_LIKELY (mono_loader_get_strict_strong_names ())) {
+ predicate = &mono_assembly_candidate_predicate_sn_same_name;
+ predicate_ud = aname;
+ }
+#endif
+
len = strlen (aname->name);
for (ext_index = 0; ext_index < 2; ext_index ++) {
ext = ext_index == 0 ? ".dll" : ".exe";
if (basedir) {
fullpath = g_build_filename (basedir, filename, NULL);
- result = mono_assembly_open_predicate (fullpath, refonly, FALSE, &mono_assembly_candidate_predicate_sn_same_name, aname, status);
+ result = mono_assembly_open_predicate (fullpath, refonly, FALSE, predicate, predicate_ud, status);
g_free (fullpath);
if (result) {
result->in_gac = FALSE;
}
}
- result = load_in_path (filename, default_path, status, refonly, &mono_assembly_candidate_predicate_sn_same_name, aname);
+ result = load_in_path (filename, default_path, status, refonly, predicate, predicate_ud);
if (result)
result->in_gac = FALSE;
g_free (filename);
void
mono_ginst_get_desc (GString *str, MonoGenericInst *ginst);
+void
+mono_loader_set_strict_strong_names (gboolean enabled);
+
+gboolean
+mono_loader_get_strict_strong_names (void);
+
#endif /* __MONO_METADATA_INTERNALS_H__ */
#endif
+/* If TRUE (but also see DISABLE_STICT_STRONG_NAMES #define), Mono will check
+ * that the public key token and version of a candidate assembly matches the
+ * requested strong name. If FALSE, as long as the name matches, the candidate
+ * will be allowed.
+ */
+static gboolean check_strong_names_strictly = TRUE;
+
// Amount initially reserved in each imageset's mempool.
// FIXME: This number is arbitrary, a more practical number should be found
#define INITIAL_IMAGE_SET_SIZE 1024
return owner;
}
+
+void
+mono_loader_set_strict_strong_names (gboolean enabled)
+{
+ check_strong_names_strictly = enabled;
+}
+
+gboolean
+mono_loader_get_strict_strong_names (void)
+{
+ return check_strong_names_strictly;
+}
} else if (strcmp (argv [i], "--nacl-null-checks-off") == 0){
nacl_null_checks_off = TRUE;
#endif
+ } else if (strncmp (argv [i], "--assembly-loader=", strlen("--assembly-loader=")) == 0) {
+ gchar *arg = argv [i] + strlen ("--assembly-loader=");
+ if (strcmp (arg, "strict") == 0)
+ mono_loader_set_strict_strong_names (TRUE);
+ else if (strcmp (arg, "legacy") == 0)
+ mono_loader_set_strict_strong_names (FALSE);
+ else
+ fprintf (stderr, "Warning: unknown argument to --assembly-loader. Should be \"strict\" or \"legacy\"\n");
} else if (strncmp (argv [i], MONO_HANDLERS_ARGUMENT, MONO_HANDLERS_ARGUMENT_LEN) == 0) {
//Install specific custom handlers.
if (!mono_runtime_install_custom_handlers (argv[i] + MONO_HANDLERS_ARGUMENT_LEN)) {
}
mono_set_defaults (mini_verbose, opt);
-#ifdef ENABLE_INTERPRETER
- mono_interp_init ();
-#endif
domain = mini_init (argv [i], forced_version);
mono_gc_set_stack_end (&domain);
typedef struct {
MonoDomain *domain;
+ MonoDomain *original_domain;
MonoInvocation *base_frame;
MonoInvocation *current_frame;
MonoInvocation *env_frame;
#include <mono/metadata/marshal.h>
#include <mono/metadata/environment.h>
#include <mono/metadata/mono-debug.h>
+#include <mono/utils/atomic.h>
#include "interp.h"
#include "interp-internals.h"
static char* dump_stack (stackval *stack, stackval *sp);
static char* dump_frame (MonoInvocation *inv);
static MonoArray *get_trace_ips (MonoDomain *domain, MonoInvocation *top);
-static void ves_exec_method_with_context (MonoInvocation *frame, ThreadContext *context);
+static void ves_exec_method_with_context (MonoInvocation *frame, ThreadContext *context, unsigned short *start_with_ip, MonoException *filter_exception);
typedef void (*ICallMethod) (MonoInvocation *frame);
} else
mono_value_copy (data, val->data.vt, type->data.klass);
return;
- case MONO_TYPE_GENERICINST:
+ case MONO_TYPE_GENERICINST: {
+ MonoClass *container_class = type->data.generic_class->container_class;
+
+ if (container_class->valuetype && !container_class->enumtype) {
+ mono_value_copy (data, val->data.vt, mono_class_from_mono_type (type));
+ return;
+ }
stackval_to_data (&type->data.generic_class->container_class->byval_arg, val, data, pinvoke);
return;
+ }
default:
g_warning ("got type %x", type->type);
g_assert_not_reached ();
MonoError error;
ThreadContext *context = mono_native_tls_get_value (thread_context_id);
+ if (!context)
+ return;
+
MonoInvocation *frame = context->current_frame;
while (frame) {
if (exc)
frame.invoke_trap = 1;
context->managed_code = 1;
- ves_exec_method_with_context (&frame, context);
+ ves_exec_method_with_context (&frame, context, NULL, NULL);
context->managed_code = 0;
if (context == &context_struct)
mono_native_tls_set_value (thread_context_id, NULL);
break;
}
- ves_exec_method_with_context (&frame, context);
+ ves_exec_method_with_context (&frame, context, NULL, NULL);
context->managed_code = 0;
if (context == &context_struct)
mono_native_tls_set_value (thread_context_id, NULL);
MonoMethod *wrapper;
RuntimeMethod *rmethod;
- if (method->wrapper_type && method->wrapper_type != MONO_WRAPPER_RUNTIME_INVOKE)
- return NULL;
+ /* HACK: method_ptr of delegate should point to a runtime method*/
+ if (method->wrapper_type && method->wrapper_type == MONO_WRAPPER_DYNAMIC_METHOD)
+ return mono_interp_get_runtime_method (mono_domain_get (), method, error);
rmethod = mono_interp_get_runtime_method (mono_domain_get (), method, error);
if (rmethod->jit_entry)
#define MINT_IN_DEFAULT default:
#endif
-static void
-ves_exec_method_with_context (MonoInvocation *frame, ThreadContext *context);
-
static void
-ves_exec_method_with_context_with_ip (MonoInvocation *frame, ThreadContext *context, unsigned short *start_with_ip, MonoException *filter_exception)
+ves_exec_method_with_context (MonoInvocation *frame, ThreadContext *context, unsigned short *start_with_ip, MonoException *filter_exception)
{
MonoInvocation child_frame;
GSList *finally_ips = NULL;
}
}
- ves_exec_method_with_context (&child_frame, context);
+ ves_exec_method_with_context (&child_frame, context, NULL, NULL);
context->current_frame = frame;
mono_error_cleanup (&error); /* FIXME: don't swallow the error */
}
- ves_exec_method_with_context (&child_frame, context);
+ ves_exec_method_with_context (&child_frame, context, NULL, NULL);
context->current_frame = frame;
mono_error_cleanup (&error); /* FIXME: don't swallow the error */
}
- ves_exec_method_with_context (&child_frame, context);
+ ves_exec_method_with_context (&child_frame, context, NULL, NULL);
context->current_frame = frame;
sp [0].data.p = unboxed;
}
- ves_exec_method_with_context (&child_frame, context);
+ ves_exec_method_with_context (&child_frame, context, NULL, NULL);
context->current_frame = frame;
sp [0].data.p = unboxed;
}
- ves_exec_method_with_context (&child_frame, context);
+ ves_exec_method_with_context (&child_frame, context, NULL, NULL);
context->current_frame = frame;
sp -= 2;
* (double *) sp->data.p = sp[1].data.f;
MINT_IN_BREAK;
+ MINT_IN_CASE(MINT_MONO_ATOMIC_STORE_I4)
+ ++ip;
+ sp -= 2;
+ InterlockedWrite ((gint32 *) sp->data.p, sp [1].data.i);
+ MINT_IN_BREAK;
#define BINOP(datamem, op) \
--sp; \
sp [-1].data.datamem = sp [-1].data.datamem op sp [0].data.datamem; \
g_assert (csig->call_convention == MONO_CALL_DEFAULT);
- ves_exec_method_with_context (&child_frame, context);
+ ves_exec_method_with_context (&child_frame, context, NULL, NULL);
context->current_frame = frame;
MINT_IN_CASE(MINT_STELEM_I1) /* fall through */
MINT_IN_CASE(MINT_STELEM_U1) /* fall through */
MINT_IN_CASE(MINT_STELEM_I2) /* fall through */
+ MINT_IN_CASE(MINT_STELEM_U2) /* fall through */
MINT_IN_CASE(MINT_STELEM_I4) /* fall through */
MINT_IN_CASE(MINT_STELEM_I8) /* fall through */
MINT_IN_CASE(MINT_STELEM_R4) /* fall through */
case MINT_STELEM_I2:
mono_array_set ((MonoArray *)o, gint16, aindex, sp [2].data.i);
break;
+ case MINT_STELEM_U2:
+ mono_array_set ((MonoArray *)o, guint16, aindex, sp [2].data.i);
+ break;
case MINT_STELEM_I4:
mono_array_set ((MonoArray *)o, gint32, aindex, sp [2].data.i);
break;
MINT_IN_CASE(MINT_ICALL_PPP_V)
MINT_IN_CASE(MINT_ICALL_PPI_V)
sp = do_icall (context, *ip, sp, rtm->data_items [*(guint16 *)(ip + 1)]);
+ if (*mono_thread_interruption_request_flag ()) {
+ MonoException *exc = mono_thread_interruption_checkpoint ();
+ if (exc) {
+ frame->ex = exc;
+ context->search_for_handler = 1;
+ }
+ }
if (frame->ex != NULL)
goto handle_exception;
ip += 2;
if (sp > frame->stack)
g_warning ("retobj: more values on stack: %d", sp-frame->stack);
goto exit_frame;
+ MINT_IN_CASE(MINT_MONO_TLS) {
+ MonoTlsKey key = *(gint32 *)(ip + 1);
+ sp->data.p = ((gpointer (*)()) mono_tls_get_tls_getter (key, FALSE)) ();
+ sp++;
+ ip += 3;
+ MINT_IN_BREAK;
+ }
+ MINT_IN_CASE(MINT_MONO_JIT_ATTACH) {
+ ++ip;
+
+ context->original_domain = NULL;
+ MonoDomain *tls_domain = (MonoDomain *) ((gpointer (*)()) mono_tls_get_tls_getter (TLS_KEY_DOMAIN, FALSE)) ();
+ gpointer tls_jit = ((gpointer (*)()) mono_tls_get_tls_getter (TLS_KEY_DOMAIN, FALSE)) ();
+
+ if (tls_domain != context->domain || !tls_jit)
+ context->original_domain = mono_jit_thread_attach (context->domain);
+ MINT_IN_BREAK;
+ }
+ MINT_IN_CASE(MINT_MONO_JIT_DETACH)
+ ++ip;
+ mono_jit_set_domain (context->original_domain);
+ MINT_IN_BREAK;
#define RELOP(datamem, op) \
--sp; \
sp [-1].data.p = alloca (len);
MonoMethodHeader *header = mono_method_get_header_checked (frame->runtime_method->method, &error);
mono_error_cleanup (&error); /* FIXME: don't swallow the error */
- if (header->init_locals)
+ if (header && header->init_locals)
memset (sp [-1].data.p, 0, len);
++ip;
MINT_IN_BREAK;
stackval retval;
memcpy (&dup_frame, inv, sizeof (MonoInvocation));
dup_frame.retval = &retval;
- ves_exec_method_with_context_with_ip (&dup_frame, context, inv->runtime_method->code + clause->data.filter_offset, frame->ex);
+ ves_exec_method_with_context (&dup_frame, context, inv->runtime_method->code + clause->data.filter_offset, frame->ex);
if (dup_frame.retval->data.i) {
#if DEBUG_INTERP
if (tracing)
DEBUG_LEAVE ();
}
-static void
-ves_exec_method_with_context (MonoInvocation *frame, ThreadContext *context)
-{
- ves_exec_method_with_context_with_ip (frame, context, NULL, NULL);
-}
-
void
ves_exec_method (MonoInvocation *frame)
{
frame->runtime_method = mono_interp_get_runtime_method (context->domain, frame->method, &error);
mono_error_cleanup (&error); /* FIXME: don't swallow the error */
context->managed_code = 1;
- ves_exec_method_with_context (frame, context);
+ ves_exec_method_with_context (frame, context, NULL, NULL);
context->managed_code = 0;
if (frame->ex) {
if (context != &context_struct && context->current_env) {
OPDEF(MINT_STELEM_I1, "stelem.i1", 1, MintOpNoArgs)
OPDEF(MINT_STELEM_U1, "stelem.u1", 1, MintOpNoArgs)
OPDEF(MINT_STELEM_I2, "stelem.i2", 1, MintOpNoArgs)
+OPDEF(MINT_STELEM_U2, "stelem.u2", 1, MintOpNoArgs)
OPDEF(MINT_STELEM_I4, "stelem.i4", 1, MintOpNoArgs)
OPDEF(MINT_STELEM_I8, "stelem.i8", 1, MintOpNoArgs)
OPDEF(MINT_STELEM_R4, "stelem.r4", 1, MintOpNoArgs)
OPDEF(MINT_ICALL_PPP_V, "mono_icall_ppp_v", 2, MintOpClassToken)
OPDEF(MINT_ICALL_PPI_V, "mono_icall_ppi_v", 2, MintOpClassToken)
OPDEF(MINT_MONO_LDPTR, "mono_ldptr", 2, MintOpClassToken)
+OPDEF(MINT_MONO_TLS, "mono_tls", 2, MintOpInt)
OPDEF(MINT_MONO_NEWOBJ, "mono_newobj", 2, MintOpClassToken)
OPDEF(MINT_MONO_RETOBJ, "mono_retobj", 1, MintOpNoArgs)
OPDEF(MINT_MONO_FREE, "mono_free", 1, MintOpNoArgs)
+OPDEF(MINT_MONO_ATOMIC_STORE_I4, "mono_atomic.store.i4", 1, MintOpNoArgs)
+OPDEF(MINT_MONO_JIT_ATTACH, "mono_jit_attach", 1, MintOpNoArgs)
+OPDEF(MINT_MONO_JIT_DETACH, "mono_jit_detach", 1, MintOpNoArgs)
// FIXME: MintOp
OPDEF(MINT_JIT_CALL, "mono_jit_call", 2, MintOpNoArgs)
}
}
+static MonoClassField *
+interp_field_from_token (MonoMethod *method, guint32 token, MonoClass **klass, MonoGenericContext *generic_context)
+{
+ MonoClassField *field = NULL;
+ if (method->wrapper_type != MONO_WRAPPER_NONE) {
+ field = (MonoClassField *) mono_method_get_wrapper_data (method, token);
+ *klass = field->parent;
+ } else {
+ MonoError error;
+ error_init (&error);
+ field = mono_field_from_token_checked (method->klass->image, token, klass, generic_context, &error);
+ mono_error_cleanup (&error); /* FIXME: don't swallow the error */
+ }
+ return field;
+}
+
static void
generate (MonoMethod *method, RuntimeMethod *rtm, unsigned char *is_bb_start, MonoGenericContext *generic_context)
{
case CEE_CASTCLASS:
CHECK_STACK (&td, 1);
token = read32 (td.ip + 1);
- klass = mono_class_get_full (image, token, generic_context);
+ klass = mini_get_class (method, token, generic_context);
ADD_CODE(&td, MINT_CASTCLASS);
ADD_CODE(&td, get_data_item_index (&td, klass));
td.sp [-1].klass = klass;
case CEE_ISINST:
CHECK_STACK (&td, 1);
token = read32 (td.ip + 1);
- klass = mono_class_get_full (image, token, generic_context);
+ klass = mini_get_class (method, token, generic_context);
ADD_CODE(&td, MINT_ISINST);
ADD_CODE(&td, get_data_item_index (&td, klass));
td.ip += 5;
CHECK_STACK (&td, 1);
token = read32 (td.ip + 1);
- g_assert (method->wrapper_type == MONO_WRAPPER_NONE);
- klass = mono_class_get_full (image, token, generic_context);
+ klass = mini_get_class (method, token, generic_context);
if (mini_type_is_reference (&klass->byval_arg)) {
+ int mt = mint_type (&klass->byval_arg);
ADD_CODE (&td, MINT_CASTCLASS);
ADD_CODE (&td, get_data_item_index (&td, klass));
SET_TYPE (td.sp - 1, stack_type [mt], klass);
case CEE_LDFLDA:
CHECK_STACK (&td, 1);
token = read32 (td.ip + 1);
- field = mono_field_from_token (image, token, &klass, generic_context);
+ field = interp_field_from_token (method, token, &klass, generic_context);
gboolean is_static = !!(field->type->attrs & FIELD_ATTRIBUTE_STATIC);
mono_class_init (klass);
if (is_static) {
case CEE_LDFLD: {
CHECK_STACK (&td, 1);
token = read32 (td.ip + 1);
- field = mono_field_from_token (image, token, &klass, generic_context);
+ field = interp_field_from_token (method, token, &klass, generic_context);
gboolean is_static = !!(field->type->attrs & FIELD_ATTRIBUTE_STATIC);
mono_class_init (klass);
case CEE_STFLD: {
CHECK_STACK (&td, 2);
token = read32 (td.ip + 1);
- field = mono_field_from_token (image, token, &klass, generic_context);
+ field = interp_field_from_token (method, token, &klass, generic_context);
gboolean is_static = !!(field->type->attrs & FIELD_ATTRIBUTE_STATIC);
mono_class_init (klass);
mt = mint_type(field->type);
}
case CEE_LDSFLDA:
token = read32 (td.ip + 1);
- field = mono_field_from_token (image, token, &klass, generic_context);
+ field = interp_field_from_token (method, token, &klass, generic_context);
ADD_CODE(&td, MINT_LDSFLDA);
ADD_CODE(&td, get_data_item_index (&td, field));
td.ip += 5;
break;
case CEE_LDSFLD:
token = read32 (td.ip + 1);
- field = mono_field_from_token (image, token, &klass, generic_context);
+ field = interp_field_from_token (method, token, &klass, generic_context);
mt = mint_type(field->type);
ADD_CODE(&td, mt == MINT_TYPE_VT ? MINT_LDSFLD_VT : MINT_LDSFLD);
ADD_CODE(&td, get_data_item_index (&td, field));
case CEE_STSFLD:
CHECK_STACK (&td, 1);
token = read32 (td.ip + 1);
- field = mono_field_from_token (image, token, &klass, generic_context);
+ field = interp_field_from_token (method, token, &klass, generic_context);
mt = mint_type(field->type);
ADD_CODE(&td, mt == MINT_TYPE_VT ? MINT_STSFLD_VT : MINT_STSFLD);
ADD_CODE(&td, get_data_item_index (&td, field));
if (method->wrapper_type != MONO_WRAPPER_NONE)
klass = (MonoClass *)mono_method_get_wrapper_data (method, token);
else
- klass = mono_class_get_full (image, token, generic_context);
+ klass = mini_get_class (method, token, generic_context);
ADD_CODE(&td, td.sp [-1].type == STACK_TYPE_VT ? MINT_STOBJ_VT : MINT_STOBJ);
ADD_CODE(&td, get_data_item_index (&td, klass));
if (method->wrapper_type != MONO_WRAPPER_NONE)
klass = (MonoClass *)mono_method_get_wrapper_data (method, token);
else
- klass = mono_class_get_full (image, token, generic_context);
+ klass = mini_get_class (method, token, generic_context);
if (mono_class_is_nullable (klass)) {
MonoMethod *target_method = mono_class_get_method_from_name (klass, "Box", 1);
if (method->wrapper_type != MONO_WRAPPER_NONE)
klass = (MonoClass *)mono_method_get_wrapper_data (method, token);
else
- klass = mono_class_get_full (image, token, generic_context);
+ klass = mini_get_class (method, token, generic_context);
unsigned char lentype = (td.sp - 1)->type;
if (lentype == STACK_TYPE_I8) {
if (method->wrapper_type != MONO_WRAPPER_NONE)
klass = (MonoClass *) mono_method_get_wrapper_data (method, token);
else
- klass = mono_class_get_full (image, token, generic_context);
+ klass = mini_get_class (method, token, generic_context);
if (!klass->valuetype && method->wrapper_type == MONO_WRAPPER_NONE && !readonly) {
ADD_CODE (&td, MINT_LDELEMA_TC);
case CEE_LDELEM:
CHECK_STACK (&td, 2);
token = read32 (td.ip + 1);
- klass = mono_class_get_full (image, token, generic_context);
+ klass = mini_get_class (method, token, generic_context);
switch (mint_type (&klass->byval_arg)) {
case MINT_TYPE_I1:
ENSURE_I4 (&td, 1);
CHECK_STACK (&td, 3);
ENSURE_I4 (&td, 2);
token = read32 (td.ip + 1);
- klass = mono_class_get_full (image, token, generic_context);
+ klass = mini_get_class (method, token, generic_context);
switch (mint_type (&klass->byval_arg)) {
case MINT_TYPE_U1:
SIMPLE_OP (td, MINT_STELEM_U1);
break;
+ case MINT_TYPE_U2:
+ SIMPLE_OP (td, MINT_STELEM_U2);
+ break;
case MINT_TYPE_I4:
SIMPLE_OP (td, MINT_STELEM_I4);
break;
g_assert(klass->valuetype);
SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_MP);
break;
+ case CEE_MONO_TLS: {
+ gint32 key = read32 (td.ip + 1);
+ td.ip += 5;
+ g_assert (key < TLS_KEY_NUM);
+ ADD_CODE (&td, MINT_MONO_TLS);
+ WRITE32 (&td, &key);
+ PUSH_SIMPLE_TYPE (&td, STACK_TYPE_MP);
+ break;
+ }
+ case CEE_MONO_ATOMIC_STORE_I4:
+ CHECK_STACK (&td, 2);
+ SIMPLE_OP (td, MINT_MONO_ATOMIC_STORE_I4);
+ td.sp -= 2;
+ td.ip++;
+ break;
case CEE_MONO_SAVE_LMF:
case CEE_MONO_RESTORE_LMF:
case CEE_MONO_NOT_TAKEN:
PUSH_TYPE (&td, STACK_TYPE_MP, NULL);
++td.ip;
break;
+ case CEE_MONO_JIT_ATTACH:
+ ADD_CODE (&td, MINT_MONO_JIT_ATTACH);
+ ++td.ip;
+ break;
+ case CEE_MONO_JIT_DETACH:
+ ADD_CODE (&td, MINT_MONO_JIT_DETACH);
+ ++td.ip;
+ break;
default:
g_error ("transform.c: Unimplemented opcode: 0xF0 %02x at 0x%x\n", *td.ip, td.ip-header->code);
}
case CEE_INITOBJ:
CHECK_STACK(&td, 1);
token = read32 (td.ip + 1);
- klass = mono_class_get_full (image, token, generic_context);
+ klass = mini_get_class (method, token, generic_context);
if (klass->valuetype) {
ADD_CODE (&td, MINT_INITOBJ);
i32 = mono_class_value_size (klass, NULL);
break;
case CEE_CONSTRAINED_:
token = read32 (td.ip + 1);
- constrained_class = mono_class_get_full (image, token, generic_context);
+ constrained_class = mini_get_class (method, token, generic_context);
mono_class_init (constrained_class);
td.ip += 5;
break;
size = mono_type_size (type, &align);
} else {
int align;
- MonoClass *szclass = mono_class_get_full (image, token, generic_context);
+ MonoClass *szclass = mini_get_class (method, token, generic_context);
mono_class_init (szclass);
#if 0
if (!szclass->valuetype)
break;
case MonoInlineType:
if (method->wrapper_type == MONO_WRAPPER_NONE) {
- class = mono_class_get_full (image, read32 (ip + 1), generic_context);
+ class = mini_get_class (method, read32 (ip + 1), generic_context);
mono_class_init (class);
/* quick fix to not do this for the fake ptr classes - probably should not be getting the vtable at all here */
#if 0
return method;
}
-static inline MonoClass*
+MonoClass*
mini_get_class (MonoMethod *method, guint32 token, MonoGenericContext *context)
{
MonoError error;
}
#endif
+#ifdef ENABLE_INTERPRETER
+ mono_interp_init ();
+#endif
+
mono_os_mutex_init_recursive (&jit_mutex);
mono_cross_helpers_run ();
MonoType* mini_get_underlying_type (MonoType *type) MONO_LLVM_INTERNAL;
MonoType* mini_type_get_underlying_type (MonoType *type);
+MonoClass* mini_get_class (MonoMethod *method, guint32 token, MonoGenericContext *context);
MonoMethod* mini_get_shared_method (MonoMethod *method);
MonoMethod* mini_get_shared_method_to_register (MonoMethod *method);
MonoMethod* mini_get_shared_method_full (MonoMethod *method, gboolean all_vt, gboolean is_gsharedvt);
return 0;
}
+ static Nullable<bool> s_nullb;
+ static AStruct s_struct1;
+
+ /* test if VES uses correct sizes for value type write to static field */
+ public static int test_0_static_nullable_bool () {
+ s_struct1 = new AStruct (0x1337dead);
+ s_nullb = true;
+ /* make sure that the write to s_nullb didn't smash the value after it */
+ if (s_struct1.i != 0x1337dead)
+ return 2;
+ return 0;
+ }
+
public static int test_71_long_shift_right () {
ulong value = 38654838087;
int x = 0;
call_missing_method.exe \
calliGenericTest.exe \
cominterop.exe \
- constant-division.exe \
- context-static.exe \
cross-domain.exe \
- delegate-async-exit.exe \
- delegate-delegate-exit.exe \
- delegate-exit.exe \
delegate-with-null-target.exe \
- delegate1.exe \
- delegate3.exe \
- delegate5.exe \
- delegate8.exe \
delegate9.exe \
- dynamic-method-access.2.exe \
- dynamic-method-finalize.2.exe \
- dynamic-method-resurrection.exe \
dynamic-method-stack-traces.exe \
even-odd.exe \
exception18.exe \
}
public class Tester {
- static readonly int seed = unchecked(DateTime.Now.Ticks.GetHashCode());
+ public static readonly int seed = unchecked(DateTime.Now.Ticks.GetHashCode());
Random rand = new Random(seed);
public static void Main (string[] args)
{
Console.WriteLine("Starting cache testers");
+ Console.WriteLine("Thread seed: " + Tester.seed);
List<Tester> testers = new List<Tester>();
for (int count = 0; count < 10; count++) {
testers.Add(new Tester());
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
+ 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."
+ else report_github_status "error" "API Diff" "The public API changed." "$BUILD_URL/Public_API_Diff/"
+ fi
+else ${TESTCMD} --label=apidiff --skip
+fi
rm -fr /tmp/jenkins-temp-aspnet*
--- /dev/null
+#!/bin/bash -e
+
+function report_github_status {
+ if [ -z "$1" ]; then echo "No status specified. Skipping GitHub manual status report."; return 1; fi;
+ if [ -z "$2" ]; then echo "No context specified. Skipping GitHub manual status report."; return 1; fi;
+ if [ -z "$3" ]; then echo "No description specified. Skipping GitHub manual status report."; return 1; fi;
+ if [ -z "${ghprbActualCommit}" ]; then echo "Not a pull request. Skipping GitHub manual status report."; return 1; fi;
+ if [ -z "${GITHUB_STATUS_AUTH_TOKEN}" ]; then echo "No auth token specified. Skipping GitHub manual status report."; return 1; fi;
+
+ wget -qO- --header "Content-Type: application/json" --post-data "{\"state\": \"$1\", \"context\":\"$2\", \"description\": \"$3\", \"target_url\": \"$4\"}" "https://api.github.com/repos/mono/mono/statuses/${ghprbActualCommit}?access_token=${GITHUB_STATUS_AUTH_TOKEN}"
+}