Compare commits

...
100 Commits
Author SHA1 Message Date
Marius UngureanuandMartin Baulig df99fccf69 Apply suggestions from code review
Co-Authored-By: Martin Baulig <[email protected]>
2019-05-31 12:08:46 +02:00
Marius Ungureanu 27554bf06b Plug leak of CustomAttribute initializer name
All the CustomAttribute initializer names (fields, property) except the last were leaked. Ensure all names are freed.

Fixes #14543
2019-05-31 12:08:46 +02:00
Vlad Brezae ddf393026a [marshal] Fix race between delegate marshaling and finalization
When passing a delegate to native code, we pass the delegate_trampoline which can be used to invoke the delegate from native code and we store this mapping (delegate_trampoline->delegate) in a hashtable so we can get a delegate for the delegate_trampoline, when marshalling the opposite way. If we are trying to marshal a ftnptr (for managed code) to a delegate and we don't find this mapping we can crash. This could happen if the finalization for some other delegate that uses the same ftnptr removes this entry from the table. We solve this by never freeing these entries. The first delegate-ftnptr pair will always be alive. This is easier, faster and potentially uses less memory than tracking in the hashtable every pair. There should be a small and limited set of methods marshalled to native.

Fixes https://github.com/mono/mono/issues/13231
2019-05-31 12:05:50 +02:00
Alexander Köplinger 4181954955 [bcl] Add nunit exclude categories for monotouch/monodroid profiles (#14695)
We didn't set all the categories that the products used in our profiles.

Now that the products can consume the exclude categories from mono we
need to unify the values.

Removed ValueAdd since it's not used anymore and combined MacNotWorking
into NotOnMac.

(cherry picked from commit f46191114b)
2019-05-29 17:00:41 +02:00
Alexander Köplinger 0ca2187eb3 [System] Fix MultiCastOptionTest on WatchOS
With https://github.com/mono/mono/commit/cf69b4725976e51416bfdff22f3e1834006af00a it started doing DNS lookups for localhost and we don't have sockets on the watch.

(cherry picked from commit 4fcbbd8fb7)
2019-05-29 16:45:47 +02:00
Alexander Köplinger 197461e034 [sdks] Only package android-sources on macOS
rsync might not be installed on other platforms and we only need android-sources in one sdks archive.

(cherry picked from commit edd6c013b0)
2019-05-29 00:30:56 +02:00
Alexander Köplinger 356964caf2 [sdks] Don't package android-sources on Windows
We don't need it there.

(cherry picked from commit a2f66ddca1)
2019-05-28 19:50:49 +02:00
Alexander Köplinger 271b64409d [sdks] Add linker sources to android sdks archive (#14686)
(cherry picked from commit c96878fb16)
2019-05-28 18:56:11 +02:00
Alexander Köplinger 1e2119b6df [bcl] Write newline-separated nunit/xunit excludes file for sdks archive (#14681)
During XI integration we noticed that just using the verbatim commandline
-exclude or -notrait is not ideal since XI uses the nunit/xunit APIs to
pass that information and not the command line parser.

Instead we now write the exclude categories/traits as a newline-separated file.

(cherry picked from commit 07c58ee2ed)
2019-05-28 18:51:43 +02:00
monojenkins da671d0b3c [2019-04] [mscorlib] Ensure monotouch[_runtime] API are identical (#14680)
* [mscorlib] Ensure monotouch[_runtime] API are identical

Ensure the API surface for `mscorlib.Core.dll` is identical between the
`monotouch` and `monotouch_runtime` (used for REPL and the interpreter).

This ensure code compiled against one will be fine when building against
the other (e.g. avoiding linker errors).

In practice this means:

1. Expose the API needed for `System.Reflection.Emit` in XI

	- throwing `PlatformNotSupportedException` **by default**; or
	- calling the mono runtime when the interpreter is enabled;

2. Do not expose additional, not supported, API (e.g. COM related)

	- `monotouch_runtime` configuration was built without `FULL_AOT_RUNTIME`
	  and that brings some other stuff that is not AOT related

Follow up to #14606

Existing diff

Removed methods:

```csharp
public Reflection.Emit.AssemblyBuilder DefineDynamicAssembly (Reflection.AssemblyName name, Reflection.Emit.AssemblyBuilderAccess access);
public Reflection.Emit.AssemblyBuilder DefineDynamicAssembly (Reflection.AssemblyName name, Reflection.Emit.AssemblyBuilderAccess access, System.Collections.Generic.IEnumerable<Reflection.Emit.CustomAttributeBuilder> assemblyAttributes);

[Obsolete ("Declarative security for assembly level is no longer enforced")]
public Reflection.Emit.AssemblyBuilder DefineDynamicAssembly (Reflection.AssemblyName name, Reflection.Emit.AssemblyBuilderAccess access, Security.Policy.Evidence evidence);
public Reflection.Emit.AssemblyBuilder DefineDynamicAssembly (Reflection.AssemblyName name, Reflection.Emit.AssemblyBuilderAccess access, string dir);
public Reflection.Emit.AssemblyBuilder DefineDynamicAssembly (Reflection.AssemblyName name, Reflection.Emit.AssemblyBuilderAccess access, System.Collections.Generic.IEnumerable<Reflection.Emit.CustomAttributeBuilder> assemblyAttributes, Security.SecurityContextSource securityContextSource);

[Obsolete ("Declarative security for assembly level is no longer enforced")]
public Reflection.Emit.AssemblyBuilder DefineDynamicAssembly (Reflection.AssemblyName name, Reflection.Emit.AssemblyBuilderAccess access, string dir, Security.Policy.Evidence evidence);

[Obsolete ("Declarative security for assembly level is no longer enforced")]
public Reflection.Emit.AssemblyBuilder DefineDynamicAssembly (Reflection.AssemblyName name, Reflection.Emit.AssemblyBuilderAccess access, Security.PermissionSet requiredPermissions, Security.PermissionSet optionalPermissions, Security.PermissionSet refusedPermissions);
public Reflection.Emit.AssemblyBuilder DefineDynamicAssembly (Reflection.AssemblyName name, Reflection.Emit.AssemblyBuilderAccess access, string dir, bool isSynchronized, System.Collections.Generic.IEnumerable<Reflection.Emit.CustomAttributeBuilder> assemblyAttributes);

[Obsolete ("Declarative security for assembly level is no longer enforced")]
public Reflection.Emit.AssemblyBuilder DefineDynamicAssembly (Reflection.AssemblyName name, Reflection.Emit.AssemblyBuilderAccess access, Security.Policy.Evidence evidence, Security.PermissionSet requiredPermissions, Security.PermissionSet optionalPermissions, Security.PermissionSet refusedPermissions);

[Obsolete ("Declarative security for assembly level is no longer enforced")]
public Reflection.Emit.AssemblyBuilder DefineDynamicAssembly (Reflection.AssemblyName name, Reflection.Emit.AssemblyBuilderAccess access, string dir, Security.PermissionSet requiredPermissions, Security.PermissionSet optionalPermissions, Security.PermissionSet refusedPermissions);

[Obsolete ("Declarative security for assembly level is no longer enforced")]
public Reflection.Emit.AssemblyBuilder DefineDynamicAssembly (Reflection.AssemblyName name, Reflection.Emit.AssemblyBuilderAccess access, string dir, Security.Policy.Evidence evidence, Security.PermissionSet requiredPermissions, Security.PermissionSet optionalPermissions, Security.PermissionSet refusedPermissions);

[Obsolete ("Declarative security for assembly level is no longer enforced")]
public Reflection.Emit.AssemblyBuilder DefineDynamicAssembly (Reflection.AssemblyName name, Reflection.Emit.AssemblyBuilderAccess access, string dir, Security.Policy.Evidence evidence, Security.PermissionSet requiredPermissions, Security.PermissionSet optionalPermissions, Security.PermissionSet refusedPermissions, bool isSynchronized);

[Obsolete ("Declarative security for assembly level is no longer enforced")]
public Reflection.Emit.AssemblyBuilder DefineDynamicAssembly (Reflection.AssemblyName name, Reflection.Emit.AssemblyBuilderAccess access, string dir, Security.Policy.Evidence evidence, Security.PermissionSet requiredPermissions, Security.PermissionSet optionalPermissions, Security.PermissionSet refusedPermissions, bool isSynchronized, System.Collections.Generic.IEnumerable<Reflection.Emit.CustomAttributeBuilder> assemblyAttributes);
```

Removed methods:

```csharp
public virtual Reflection.Emit.AssemblyBuilder DefineDynamicAssembly (Reflection.AssemblyName name, Reflection.Emit.AssemblyBuilderAccess access);
public virtual Reflection.Emit.AssemblyBuilder DefineDynamicAssembly (Reflection.AssemblyName name, Reflection.Emit.AssemblyBuilderAccess access, Security.Policy.Evidence evidence);
public virtual Reflection.Emit.AssemblyBuilder DefineDynamicAssembly (Reflection.AssemblyName name, Reflection.Emit.AssemblyBuilderAccess access, string dir);
public virtual Reflection.Emit.AssemblyBuilder DefineDynamicAssembly (Reflection.AssemblyName name, Reflection.Emit.AssemblyBuilderAccess access, string dir, Security.Policy.Evidence evidence);
public virtual Reflection.Emit.AssemblyBuilder DefineDynamicAssembly (Reflection.AssemblyName name, Reflection.Emit.AssemblyBuilderAccess access, Security.PermissionSet requiredPermissions, Security.PermissionSet optionalPermissions, Security.PermissionSet refusedPermissions);
public virtual Reflection.Emit.AssemblyBuilder DefineDynamicAssembly (Reflection.AssemblyName name, Reflection.Emit.AssemblyBuilderAccess access, Security.Policy.Evidence evidence, Security.PermissionSet requiredPermissions, Security.PermissionSet optionalPermissions, Security.PermissionSet refusedPermissions);
public virtual Reflection.Emit.AssemblyBuilder DefineDynamicAssembly (Reflection.AssemblyName name, Reflection.Emit.AssemblyBuilderAccess access, string dir, Security.PermissionSet requiredPermissions, Security.PermissionSet optionalPermissions, Security.PermissionSet refusedPermissions);
public virtual Reflection.Emit.AssemblyBuilder DefineDynamicAssembly (Reflection.AssemblyName name, Reflection.Emit.AssemblyBuilderAccess access, string dir, Security.Policy.Evidence evidence, Security.PermissionSet requiredPermissions, Security.PermissionSet optionalPermissions, Security.PermissionSet refusedPermissions);
public virtual Reflection.Emit.AssemblyBuilder DefineDynamicAssembly (Reflection.AssemblyName name, Reflection.Emit.AssemblyBuilderAccess access, string dir, Security.Policy.Evidence evidence, Security.PermissionSet requiredPermissions, Security.PermissionSet optionalPermissions, Security.PermissionSet refusedPermissions, bool isSynchronized);
```

Added constructor:

```csharp
public AssemblyBuilder ();
```

Removed properties:

```csharp
public override string CodeBase { get; }
public override System.Reflection.MethodInfo EntryPoint { get; }
public override string EscapedCodeBase { get; }
public override System.Security.Policy.Evidence Evidence { get; }
public override string FullName { get; }
public override bool GlobalAssemblyCache { get; }
public override string ImageRuntimeVersion { get; }
public override bool IsDynamic { get; }
public override string Location { get; }
public override System.Reflection.Module ManifestModule { get; }
public override bool ReflectionOnly { get; }
```

Removed methods:

```csharp
public void AddResourceFile (string name, string fileName);
public void AddResourceFile (string name, string fileName, System.Reflection.ResourceAttributes attribute);
public ModuleBuilder DefineDynamicModule (string name, bool emitSymbolInfo);
public ModuleBuilder DefineDynamicModule (string name, string fileName);
public ModuleBuilder DefineDynamicModule (string name, string fileName, bool emitSymbolInfo);
public System.Resources.IResourceWriter DefineResource (string name, string description, string fileName);
public System.Resources.IResourceWriter DefineResource (string name, string description, string fileName, System.Reflection.ResourceAttributes attribute);
public void DefineUnmanagedResource (byte[] resource);
public void DefineUnmanagedResource (string resourceFileName);
public void DefineVersionInfoResource ();
public void DefineVersionInfoResource (string product, string productVersion, string company, string copyright, string trademark);
public override bool Equals (object obj);
public override object[] GetCustomAttributes (bool inherit);
public override object[] GetCustomAttributes (System.Type attributeType, bool inherit);
public override System.Type[] GetExportedTypes ();
public override System.IO.FileStream GetFile (string name);
public override System.IO.FileStream[] GetFiles (bool getResourceModules);
public override int GetHashCode ();
public override System.Reflection.Module[] GetLoadedModules (bool getResourceModules);
public override System.Reflection.ManifestResourceInfo GetManifestResourceInfo (string resourceName);
public override string[] GetManifestResourceNames ();
public override System.IO.Stream GetManifestResourceStream (string name);
public override System.IO.Stream GetManifestResourceStream (System.Type type, string name);
public override System.Reflection.Module GetModule (string name);
public override System.Reflection.Module[] GetModules (bool getResourceModules);
public override System.Reflection.AssemblyName GetName (bool copiedName);
public override System.Reflection.AssemblyName[] GetReferencedAssemblies ();
public override System.Reflection.Assembly GetSatelliteAssembly (System.Globalization.CultureInfo culture);
public override System.Reflection.Assembly GetSatelliteAssembly (System.Globalization.CultureInfo culture, System.Version version);
public override System.Type GetType (string name, bool throwOnError, bool ignoreCase);
public override bool IsDefined (System.Type attributeType, bool inherit);
public void Save (string assemblyFileName);
public void Save (string assemblyFileName, System.Reflection.PortableExecutableKinds portableExecutableKind, System.Reflection.ImageFileMachine imageFileMachine);
public void SetEntryPoint (System.Reflection.MethodInfo entryMethod, PEFileKinds fileKind);
public override string ToString ();
```

Added constructor:

```csharp
public ConstructorBuilder ();
```

Removed properties:

```csharp
public override System.Reflection.CallingConventions CallingConvention { get; }
public override System.Reflection.Module Module { get; }

[Obsolete]
public System.Type ReturnType { get; }
```

Removed methods:

```csharp
public void AddDeclarativeSecurity (System.Security.Permissions.SecurityAction action, System.Security.PermissionSet pset);
public void SetSymCustomAttribute (string name, byte[] data);
public override string ToString ();
```

Removed property:

```csharp
public override System.Reflection.Module Module { get; }
```

Added property:

```csharp
public override System.Reflection.MethodImplAttributes MethodImplementationFlags { get; }
```

Removed methods:

```csharp
public override System.Delegate CreateDelegate (System.Type delegateType);
public override System.Delegate CreateDelegate (System.Type delegateType, object target);
public override string ToString ();
```

Added properties:

```csharp
public override bool IsByRefLike { get; }
public override bool IsSZArray { get; }
public override bool IsVariableBoundArray { get; }
```

Removed method:

```csharp
public override bool IsAssignableFrom (System.Reflection.TypeInfo typeInfo);
```

Added constructor:

```csharp
public EventBuilder ();
```

Removed properties:

```csharp
public override int MetadataToken { get; }
public override System.Reflection.Module Module { get; }
```

Removed method:

```csharp
[Obsolete ("An alternate API is available: Emit the MarshalAs custom attribute instead.")]
public void SetMarshal (UnmanagedMarshal unmanagedMarshal);
```

Added properties:

```csharp
public override bool IsByRefLike { get; }
public override bool IsConstructedGenericType { get; }
public override bool IsSZArray { get; }
public override bool IsTypeDefinition { get; }
public override bool IsVariableBoundArray { get; }
```

Removed methods:

```csharp
public override System.Type[] GetGenericParameterConstraints ();
public override bool IsAssignableFrom (System.Reflection.TypeInfo typeInfo);
public override bool IsInstanceOfType (object o);
```

Modified properties:

```diff
-public virtual int ILOffset { get; }
+public int ILOffset { get; }
```

Removed method:

```csharp
public virtual void MarkSequencePoint (System.Diagnostics.SymbolStore.ISymbolDocumentWriter document, int startLine, int startColumn, int endLine, int endColumn);
```

Added property:

```csharp
public override bool IsConstructedGenericMethod { get; }
```

Removed methods:

```csharp
public void AddDeclarativeSecurity (System.Security.Permissions.SecurityAction action, System.Security.PermissionSet pset);

[Obsolete ("An alternate API is available: Emit the MarshalAs custom attribute instead.")]
public void SetMarshal (UnmanagedMarshal unmanagedMarshal);
public void SetSymCustomAttribute (string name, byte[] data);
```

Removed properties:

```csharp
public override int MetadataToken { get; }
public override System.Guid ModuleVersionId { get; }
public override string ScopeName { get; }
```

Removed methods:

```csharp
public System.Diagnostics.SymbolStore.ISymbolDocumentWriter DefineDocument (string url, System.Guid language, System.Guid languageVendor, System.Guid documentType);
public void DefineManifestResource (string name, System.IO.Stream stream, System.Reflection.ResourceAttributes attribute);
public System.Resources.IResourceWriter DefineResource (string name, string description);
public System.Resources.IResourceWriter DefineResource (string name, string description, System.Reflection.ResourceAttributes attribute);
public void DefineUnmanagedResource (byte[] resource);
public void DefineUnmanagedResource (string resourceFileName);
public override object[] GetCustomAttributes (bool inherit);
public override object[] GetCustomAttributes (System.Type attributeType, bool inherit);
public override System.Reflection.FieldInfo GetField (string name, System.Reflection.BindingFlags bindingAttr);
public override System.Reflection.FieldInfo[] GetFields (System.Reflection.BindingFlags bindingFlags);
protected override System.Reflection.MethodInfo GetMethodImpl (string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConvention, System.Type[] types, System.Reflection.ParameterModifier[] modifiers);
public override System.Reflection.MethodInfo[] GetMethods (System.Reflection.BindingFlags bindingFlags);
public System.Diagnostics.SymbolStore.ISymbolWriter GetSymWriter ();
public override System.Type GetType (string className);
public override System.Type GetType (string className, bool ignoreCase);
public override System.Type GetType (string className, bool throwOnError, bool ignoreCase);
public override System.Type[] GetTypes ();
public override bool IsDefined (System.Type attributeType, bool inherit);
public override bool IsResource ();
public override System.Reflection.FieldInfo ResolveField (int metadataToken, System.Type[] genericTypeArguments, System.Type[] genericMethodArguments);
public override System.Reflection.MemberInfo ResolveMember (int metadataToken, System.Type[] genericTypeArguments, System.Type[] genericMethodArguments);
public override System.Reflection.MethodBase ResolveMethod (int metadataToken, System.Type[] genericTypeArguments, System.Type[] genericMethodArguments);
public override byte[] ResolveSignature (int metadataToken);
public override string ResolveString (int metadataToken);
public override System.Type ResolveType (int metadataToken, System.Type[] genericTypeArguments, System.Type[] genericMethodArguments);
public void SetSymCustomAttribute (string name, byte[] data);
```

Modified properties:

```diff
-public virtual int Attributes { get; }
+public int Attributes { get; }
-public virtual string Name { get; }
+public string Name { get; }
-public virtual int Position { get; }
+public int Position { get; }
```

Removed method:

```csharp
[Obsolete ("An alternate API is available: Emit the MarshalAs custom attribute instead.")]
public virtual void SetMarshal (UnmanagedMarshal unmanagedMarshal);
```

Removed interface:

```csharp
System.Runtime.InteropServices._SignatureHelper
```

Removed methods:

```csharp
public override bool Equals (object obj);
public override int GetHashCode ();
public override string ToString ();
```

Removed property:

```csharp
public override bool ContainsGenericParameters { get; }
```

Added properties:

```csharp
public override bool IsByRefLike { get; }
public override bool IsSZArray { get; }
public override bool IsSecurityCritical { get; }
public override bool IsSecuritySafeCritical { get; }
public override bool IsSecurityTransparent { get; }
public override bool IsVariableBoundArray { get; }
```

Removed methods:

```csharp
public void AddDeclarativeSecurity (System.Security.Permissions.SecurityAction action, System.Security.PermissionSet pset);
public override bool IsAssignableFrom (System.Reflection.TypeInfo typeInfo);
protected override bool IsValueTypeImpl ();
```

Removed methods:

```csharp
public static object GetActiveObject (string progID);
public static IntPtr GetComInterfaceForObjectInContext (object o, System.Type t);
public static int GetComSlotForMethodInfo (System.Reflection.MemberInfo m);
public static int GetEndComSlot (System.Type t);
public static IntPtr GetExceptionPointers ();
public static IntPtr GetIDispatchForObjectInContext (object o);
public static IntPtr GetITypeInfoForType (System.Type t);
public static IntPtr GetIUnknownForObjectInContext (object o);

[Obsolete ("This method has been deprecated")]
public static IntPtr GetManagedThunkForUnmanagedMethodPtr (IntPtr pfnMethodToWrap, IntPtr pbSignature, int cbSignature);
public static System.Reflection.MemberInfo GetMethodInfoForComSlot (System.Type t, int slot, ref ComMemberType memberType);

[Obsolete ("This method has been deprecated")]
public static System.Threading.Thread GetThreadFromFiberCookie (int cookie);
public static System.Type GetTypeForITypeInfo (IntPtr piTypeInfo);

[Obsolete]
public static string GetTypeInfoName (UCOMITypeInfo pTI);
public static System.Guid GetTypeLibGuid (ComTypes.ITypeLib typelib);

[Obsolete]
public static System.Guid GetTypeLibGuid (UCOMITypeLib pTLB);
public static System.Guid GetTypeLibGuidForAssembly (System.Reflection.Assembly asm);
public static int GetTypeLibLcid (ComTypes.ITypeLib typelib);

[Obsolete]
public static int GetTypeLibLcid (UCOMITypeLib pTLB);
public static string GetTypeLibName (ComTypes.ITypeLib typelib);

[Obsolete]
public static string GetTypeLibName (UCOMITypeLib pTLB);
public static void GetTypeLibVersionForAssembly (System.Reflection.Assembly inputAssembly, out int majorVersion, out int minorVersion);

[Obsolete ("This method has been deprecated")]
public static IntPtr GetUnmanagedThunkForManagedMethodPtr (IntPtr pfnMethodToWrap, IntPtr pbSignature, int cbSignature);
public static bool IsTypeVisibleFromCom (System.Type t);
public static int NumParamBytes (System.Reflection.MethodInfo m);

[Obsolete]
public static void ReleaseThreadCache ();
```

* [csproj] Update project files

* Bump API snapshot submodule
2019-05-28 14:48:24 +02:00
Alexander Köplinger af47bd50b2 [sdks] Explicitly set version of the mac/ios/watchos/tvos platform SDKs (#14663)
Otherwise the Xcode linker tries to guess the version from the path,
and since we use Xcode101.app it'd use sdk=101 as the version which is wrong.

By explicitly specifying e.g. `$(XCODE_DIR)/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk`
as the sysroot it correctly guesses sdk=12.1 instead.

See also https://github.com/xamarin/xamarin-macios/commit/834c0a9fd7062c0c25011721fd7d524b8a60b41e

(cherry picked from commit 7ca8e89ce7)
2019-05-28 01:39:17 +02:00
monojenkins 4766e2227a [2019-04] [System] Fix monotouch_runtime repl assemblies (#14638)
They were missing some exclude files that caused unnecessary p/invokes to be retained.

Fixes https://github.com/mono/mono/issues/13526
2019-05-27 14:01:57 +02:00
monojenkins 02d008c624 [2019-04] [System.Core] Ensure monotouch[_runtime] API are identical (#14617)
* [System.Core] Ensure monotouch[_runtime] API are identical

Ensure the API surface for `System.Core.dll` is identical between the
`monotouch` and `monotouch_runtime` (used for REPL and the interpreter).

This ensure code compiled against one will be fine when building against
the other (e.g. avoiding linker errors).

Removed methods:

```csharp
public void CompileToMethod (System.Reflection.Emit.MethodBuilder method);
public void CompileToMethod (System.Reflection.Emit.MethodBuilder method, System.Runtime.CompilerServices.DebugInfoGenerator debugInfoGenerator);
```

Removed methods:

```csharp
[Obsolete ("do not use this method")]
public static IRuntimeVariables MergeRuntimeVariables (IRuntimeVariables first, IRuntimeVariables second, int[] indexes);

[Obsolete ("do not use this method")]
public static System.Linq.Expressions.Expression Quote (System.Linq.Expressions.Expression expression, object hoistedLocals, object[] locals);
```

* [csproj] Update project files

* Bump API snapshot submodule
2019-05-24 15:39:50 +02:00
monojenkins 0c0df14755 [2019-04] Throw ObjectDisposedException instead of crashing when Cairo.Context handle == IntPtr.Zero (#14626)
* Throw ObjectDisposedException instead of crashing when Cairo.Context.handle == IntPtr.Zero

We are seeing instances where VS for Mac is crashing with a SIGSEGV when
calling into certain Cairo.Context functions.  Looking at the code, it's clear
that it's possible to have Context.handle == IntPtr.Zero after disposing the
object.

From research, it looks like passing a nullptr to raw cairo functions can
result in a SIGSEGV:
    https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/93807

This change adds check to see if Conext.handle == IntPtr.Zero in Context
painting, font, and path methods.  This will turn uncatchable SIGSEGVs
into ObjectDisposedException.

* Update Context.cs

* Ensure SetTarget results in a valid handle
2019-05-24 15:20:08 +02:00
Alexander Köplinger 9a3a2665f0 [sdks] Fix min OSX version of runtime files in Mac SDK (#14615)
It was using an unescaped makefile variable in the template, i.e. ended up empty which meant the build just took the host version as the min version.

Fixed the variable and also moved it to CFLAGS/CXXFLAGS instead of CPPFLAGS to be consistent with ios.mk

(cherry picked from commit 82a9931248)
2019-05-24 14:11:21 +02:00
Alexander Köplinger c01bc7bca9 [tests] Add xunit.execution.dotnet.dll to tests directory (#14595)
So it gets included in the sdks archive

(cherry picked from commit f5f3c6aabe)
2019-05-23 20:18:42 +02:00
Bernhard Urban 9d909ca613 [arm] one more attempt to fix slotsize issue on llvmonly (#14444) (#14534)
[2019-04] [arm] one more attempt to fix slotsize issue on llvmonly (#14444)

Backport of https://github.com/mono/mono/pull/14444
2019-05-23 10:00:37 -04:00
Marek Habersack 26b9087b44 [Android] Fix runtime loading of DSOs for 64-bit processes
Context: https://github.com/xamarin/xamarin-android/issues/2780

On Android the executable for the application is going to be
`/system/bin/app_process{32,64}` depending on the application's architecture.
However, libraries for the different architectures live in different
subdirectories of `/system`: `lib` for 32-bit apps and `lib64` for 64-bit ones.
Thus appending `/lib` below will fail to load the DSO for a 64-bit app, even if
it exists there, because it will have a different architecture. The quickest fix
is to use `lib64` explicitly for 64-bit Android apps.
2019-05-23 10:46:30 +02:00
Alexander Köplinger a3d0f993c2 [tests] Add Xunit.NetCore.Extensions.dll to tests directory (#14571)
So it gets included in the sdks archive

(cherry picked from commit 2c76de1ee1)
2019-05-22 19:48:58 +02:00
Alexander Köplinger 92e73f22ea [2019-04] Bump gtk-sharp in bockbuild
Brings in mono/gtk-sharp#273.

Cherry-pick of https://github.com/mono/mono/pull/14537
2019-05-21 11:39:07 +02:00
monojenkins 4caae35744 [interp] disable inlining for built-in types (#14530)
[2019-04] [interp] disable inlining for built-in types

Fixes https://github.com/mono/mono/issues/14246

Backport of #14501.

/cc @lewurm
2019-05-20 16:16:11 -04:00
Alexander Köplinger d4e20f02e8 [sdks] Lipo arm64_32 binaries for watchOS
(cherry picked from commit ca5e8f207b)
2019-05-12 17:48:09 -07:00
monojenkins f506b6556b [2019-04] [WinForms] fix EditingCellFormattedValue getter and setter for bool value (#14436)
* [WinForms] If DataGridViewCheckBoxCell not in threeState mode EditingCellFormattedValue must return true or false, instead of value of CheckState type

* [WinForms] DataGrid: fix type check in EditingCellFormattedValue setter. When set bool value to EditingCellFormattedValue there will be exception. Type equality must be done through IsAssignableFrom not direct

* [WinForms] DataGrid: Add test for EditingCellFormattedValue getter and setter.
2019-05-12 05:39:39 -07:00
monojenkins cfd117ef41 [2019-04] Revert "[System] Add FSEvent FileSystemWatcher to monotouch BCL profile" (#14447)
* Revert "[System] Add FSEvent FileSystemWatcher to 'monotouch' BCL profile"

This reverts commit 46fc5352f3dfe0027e684a0f61e71130fccd559f.

While iOS FileSystemWatcher works, we now find that it is used unofficially-available  symbols and cannot publish apps using those.

Fixes https://github.com/mono/mono/issues/14290

* [csproj] Update project files
2019-05-12 05:21:40 -07:00
monojenkins 719fd63c43 [2019-04] [runtime] Use MAP_JIT automatically when running under a hardened runtime on osx. (#14414)
* [runtime] Use MAP_JIT automatically when running under a hardened runtime on osx.

* Fix memory ordering.
2019-05-12 05:19:22 -07:00
monojenkins 7bcbc7c2bf [2019-04] [corlib] Implement AssemblyBuilder.get_ReflectionOnly() (#14457)
* [corlib] Implement AssemblyBuilder.get_ReflectionOnly()

Fixes #13028

* Bump API snapshot submodule
2019-05-12 05:11:27 -07:00
monojenkins 3ac7efc336 [arm64] set MONO_ARCH_HAVE_UNWIND_BACKTRACE for watch4 (#14453)
[2019-04] [arm64] set MONO_ARCH_HAVE_UNWIND_BACKTRACE for watch4

Fixes a couple of mscorlib test failures, failing with
> Stack walks are not supported on this platform


Backport of #14440.

/cc @lewurm
2019-05-11 09:15:44 -04:00
monojenkins 482111976a [metadata] use handle stack in mono_runtime_object_init_handle (#14446)
[2019-04] [metadata] use handle stack in mono_runtime_object_init_handle

Fixes this crash on watchOS with llvmonly:
https://gist.github.com/lewurm/921b77a238c6fd60757a5ee9f54279d1

The hint here was that the crash happened in `mono_handle_stack_scan ()` and inspecting the handle stack there. After enabling `MONO_HANDLE_TRACK_OWNER` and `MONO_HANDLE_TRACK_SP` in `handle.h`, I got this:
https://gist.github.com/lewurm/71f936a126879ef2b96d00399e6b2bd9


@lambdageek suggested this fix after showing this trace to him. As far as I understand we do _not_ know the root cause yet. The handle leak happens in this trace:
https://gist.github.com/lewurm/b76fbc391f22d897bfd532ac1b67e2aa
`mono_runtime_object_init_checked ()` already should take care of the handle stack 😕


Contributes to #13006

Backport of #14399.

/cc @akoeplinger @lewurm
2019-05-10 18:06:04 -04:00
Egor Bogatov 7a8db67341 Update CultureInfoTest.cs 2019-05-10 13:54:54 +02:00
Egor Bogatov dce3386dbb Fix TextView 2019-05-10 13:54:54 +02:00
lateralusX ad01218417 Mutex memory leak on sgen GC (nursery, major).
During GC we allocate a gray queue protected by a mutex, sgen_gray_object_queue_init.
This mutex is never destroyed when clearing up the object containing it,
sgen_gray_object_queue_dispose, so it will leak. Overtime this could cause
OOM on some systems depending on how memory related to system primitives are
handled and partitioned.
2019-05-10 11:08:31 +02:00
Bernhard Urban b8a6096bb1 [2019-04] Do not allocate handles in ReleaseMutex. (#14429)
[2019-04] Do not allocate handles in ReleaseMutex.

Backport of https://github.com/mono/mono/pull/14403
2019-05-10 04:32:27 -04:00
monojenkins c35f4c3e5f Usually do not create a handle in mono_runtime_invoke_handle. Use mono_runtime_invoke_handle_void instead. (#14422)
[2019-04] Usually do not create a handle in mono_runtime_invoke_handle.

Use mono_runtime_invoke_handle_void instead.


Backport of #14404.

/cc @lewurm @jaykrell
2019-05-09 20:15:36 -04:00
Ankit Jain 08d062aca7 Bump msbuild to track mono-2019-04 (#14287) 2019-05-09 12:38:50 -04:00
monojenkins 82601ba547 [llvmonly] make local copy of trace_ips pointer from exception object (#14410)
[2019-04] [llvmonly] make local copy of trace_ips pointer from exception object

Fixes a race in llvmonly (watchOS):
```
Process 397 stopped
* thread %10, name = 'tid_8e2f', stop reason = EXC_BAD_ACCESS (code=1, address=0x28)
    frame %0: 0x0177f690 mscorlibtests`mono_llvm_load_exception at mini-exceptions.c:3886:23
   3883                 size_t upper = mono_array_length_internal (mono_ex->trace_ips);
   3884
   3885                 for (int i = 0; i < upper; i += TRACE_IP_ENTRY_SIZE) {
-> 3886                         gpointer curr_ip = mono_array_get_internal (mono_ex->trace_ips, gpointer, i);
   3887                         for (int j = 0; j < TRACE_IP_ENTRY_SIZE; ++j) {
   3888                                 gpointer p = mono_array_get_internal (mono_ex->trace_ips, gpointer, i + j);
   3889                                 trace_ips = g_list_append (trace_ips, p);
Target 0: (mscorlibtests) stopped.

(lldb) mbt
* thread %10
  * frame %0: 0x0177f690 mscorlibtests`mono_llvm_load_exception at mini-exceptions.c:3886:23
    frame %1: 0x00e23b7a mscorlibtests`mscorlibtests1_MonoTests_System_LazyTest__c__DisplayClass16_0__ConcurrentInitializationb__1 + 254
    frame %2: 0x0087af98 mscorlibtests`mscorlib_wrapper_delegate_invoke__Module_invoke_void + 610
    frame %3: 0x00368856 mscorlibtests`mscorlib_System_Threading_ThreadHelper_ThreadStart_Context_object + 448
  [...]
(lldb) p/x mono_ex
(MonoException *) $2 = 0x01d9e968
(lldb) p/x mono_ex->trace_ips
(MonoArray *) $3 = 0x00000000
(lldb) thread list
Process 397 stopped
  thread %1: tid = 0x38772, 0x018156aa mscorlibtests`jit_info_table_copy_and_split_chunk(table=0x17635a00, chunk=0x17b767f0) at jit-info.c:483:28, name = 'tid_303', queue = 'com.apple.main-thread'
  thread %3: tid = 0x387ad, 0x1c4f9764 libsystem_kernel.dylib`__psynch_cvwait + 24, name = 'SGen worker'
  thread %4: tid = 0x387b0, 0x1c4f1224 libsystem_kernel.dylib`semaphore_wait_trap + 8, name = 'Finalizer'
  thread %5: tid = 0x387b5, 0x1c4fa6cc libsystem_kernel.dylib`__workq_kernreturn + 8
  thread %6: tid = 0x387b6, 0x1c4f11d4 libsystem_kernel.dylib`mach_msg_trap + 20, name = 'com.apple.uikit.eventfetch-thread'
* thread %10: tid = 0x389a6, 0x0177f690 mscorlibtests`mono_llvm_load_exception at mini-exceptions.c:3886:23, name = 'tid_8e2f', stop reason = EXC_BAD_ACCESS (code=1, address=0x28)
  thread %11: tid = 0x38985, 0x1c4f9764 libsystem_kernel.dylib`__psynch_cvwait + 24, name = 'tid_8113'
  thread %12: tid = 0x38986, 0x1c4f123c libsystem_kernel.dylib`semaphore_timedwait_trap + 8, name = 'Thread Pool Worker'
  thread %13: tid = 0x38987, 0x1c4f123c libsystem_kernel.dylib`semaphore_timedwait_trap + 8, name = 'Thread Pool Worker'
  thread %14: tid = 0x389a3, 0x1c4f123c libsystem_kernel.dylib`semaphore_timedwait_trap + 8, name = 'Thread Pool Worker'
  thread %15: tid = 0x389a4, 0x1c4f123c libsystem_kernel.dylib`semaphore_timedwait_trap + 8, name = 'Thread Pool Worker'
  thread %16: tid = 0x389a5, 0x1c4f123c libsystem_kernel.dylib`semaphore_timedwait_trap + 8, name = 'Thread Pool Worker'
(lldb) thread select 1
* thread %1, name = 'tid_303', queue = 'com.apple.main-thread'
    frame %0: 0x018156aa mscorlibtests`jit_info_table_copy_and_split_chunk(table=0x17635a00, chunk=0x17b767f0) at jit-info.c:483:28
   480                          jit_info_table_split_chunk (chunk, &new_table->chunks [j], &new_table->chunks [j + 1]);
   481                          j += 2;
   482                  } else {
-> 483                          new_table->chunks [j] = table->chunks [i];
   484                          ++new_table->chunks [j]->refcount;
   485                          ++j;
   486                  }
(lldb) mbt
* thread %1
  * frame %0: 0x018156aa mscorlibtests`jit_info_table_copy_and_split_chunk(table=0x17635a00, chunk=0x17b767f0) at jit-info.c:483:28
    frame %1: 0x01815304 mscorlibtests`jit_info_table_chunk_overflow(table=0x17635a00, chunk=0x17b767f0) at jit-info.c:579:10
    frame %2: 0x018146ee mscorlibtests`jit_info_table_add(domain=0x16624cc0, table_ptr=0x16624d9c, ji=0x176f4428) at jit-info.c:614:33
    frame %3: 0x01814662 mscorlibtests`mono_jit_info_table_add(domain=0x16624cc0, ji=0x176f4428) at jit-info.c:674:2
    frame %4: 0x0175f5da mscorlibtests`mono_aot_find_jit_info(domain=0x16624cc0, image=0x16c07200, addr=0x00271ff1) at aot-runtime.c:3710:3
    frame %5: 0x0181443e mscorlibtests`mono_jit_info_table_find_internal(domain=0x16624cc0, addr=0x00271ff1, try_aot=1, allow_trampolines=0) at jit-info.c:306:9
    frame %6: 0x018145e0 mscorlibtests`mono_jit_info_table_find(domain=0x16624cc0, addr=0x00271ff1) at jit-info.c:335:9
    frame %7: 0x01780212 mscorlibtests`build_stack_trace(frame_ctx=0x01c2fb18, state=0x01c2ffb8) at mini-exceptions.c:392:31
    frame %8: 0x1c598aa2 libunwind.dylib`_Unwind_Backtrace + 232
    frame %9: 0x0177f4fc mscorlibtests`throw_exception(ex=0x01d9e968, rethrow=0) at mini-exceptions.c:3800:3
    frame %10: 0x0177f3c8 mscorlibtests`mono_llvm_throw_exception(ex=0x01d9e968) at mini-exceptions.c:3823:2
    frame %11: 0x00439ed0 mscorlibtests`mscorlib_System_Runtime_ExceptionServices_ExceptionDispatchInfo_Throw + 116
    frame %12: 0x00271ff0 mscorlibtests`mscorlib_System_LazyHelper_ThrowException + 98
    frame %13: 0x002730c2 mscorlibtests`mscorlib_System_Lazy_1_T_REF_CreateValue + 194
    frame %14: 0x00273390 mscorlibtests`mscorlib_System_Lazy_1_T_REF_get_Value + 128
    frame %15: 0x0027307a mscorlibtests`mscorlib_System_Lazy_1_T_REF_CreateValue + 122
    frame %16: 0x00273390 mscorlibtests`mscorlib_System_Lazy_1_T_REF_get_Value + 128
    frame %17: 0x00e22eb0 mscorlibtests`mscorlibtests1_MonoTests_System_LazyTest_ConcurrentInitialization + 1422
    frame %18: 0x008948e2 mscorlibtests`aot_wrapper_gsharedvt_out_sig_pinvoke_void_this_ + 28
    frame %19: 0x008664a2 mscorlibtests`mscorlib_wrapper_runtime_invoke_object_runtime_invoke_sig_void_intptr_intptr_object_intptr_intptr_intptr + 312
```


Contributes to #13006

Backport of #14400.

/cc @lewurm
2019-05-09 12:06:28 -04:00
Alexander Köplinger 7d5deb616d [sdks] Add .cs source files to ios archive
XI/XM install the Mono sources as part of their package.

(cherry picked from commit a597cee5b0)
2019-05-09 17:25:43 +02:00
monojenkins a0ae702117 A deadlock happens when during a process_suspend there is a pending invoke and then when it's calling the invoke there is another call to process_suspend in the same thread. (#14388) 2019-05-09 10:24:45 -03:00
Alexander Köplinger aee4ff6671 [sdks] Make sure the mono-version.txt directory exists
(cherry picked from commit 8370fe318b)
2019-05-09 11:49:24 +02:00
Alexander Köplinger 30e8a2329b Bump helix-binaries
Helix recently started using Python 3 so we need to have a compatible xunit-reporter.py script.

(cherry picked from commit be571243e4)
2019-05-09 10:40:02 +02:00
Alexander Köplinger 1e96a5cfe6 [sdks] Add Mono version to ios/mac archive 2019-05-08 17:09:10 +02:00
Alexander Köplinger a98c697a6d [sdks] Add Mono binaries to mac archive 2019-05-08 12:45:07 +02:00
monojenkins a5c39e9ac4 [2019-04] [loader] Don't store through a null ptr (#14112)
* [loader] Dont't store through a null ptr

If 'status' is null, don't try to write to it.

Fixes https://github.com/mono/mono/issues/13941

* [metadata] Protect writes to MonoImageOpenStatus* in a few places.

When possible assert that `MonoImageOpenStatus *status` arguments to various
functions in the runtime aren't null.  There are a few places (MONO_API) where
it's possible that callers are passing null.  In that case, use a local
MonoImageOpenStatus, or check for null before doing assignments.
2019-05-07 20:41:23 +02:00
Alexis Christoforides 11e10a07ad [corlib] Fix exception 'replacement' in IsolatedStorageFile.MoveFile()
This was caused by changes in File.Move coming from https://github.com/mono/mono/pull/12000
2019-05-07 14:34:03 -04:00
monojenkins 10db3b9dd0 [debugger-agent] Ignore thread_end event if thread is detached (#14003)
The thread_stopped profiler event can be raised by the thread_info_key_dtor tls
key destructor when the thread is already doesn't have a domain set.  In that
case, don't call process_profiler_event since it cannot handle a thread with
null TLS values.

Addresses https://github.com/xamarin/xamarin-android/issues/2920
with the following stack trace

```
* thread #20, name = 'Filter', stop reason = signal SIGSEGV: invalid address (fault address: 0xbc)
  * frame #0: libmonosgen-2.0.so`mono_class_vtable_checked(domain=0x0000000000000000, klass=0x0000007200230648, error=0x00000071e92f9178) at object.c:1890
    frame #1: libmonosgen-2.0.so`get_current_thread_ptr_for_domain(domain=0x0000000000000000, thread=0x00000071ebfec508) at threads.c:595
    frame #2: libmonosgen-2.0.so`mono_thread_current at threads.c:1939
    frame #3: libmonosgen-2.0.so`process_event(event=<unavailable>, arg=<unavailable>, il_offset=<unavailable>, ctx=<unavailable>, events=<unavailable>, suspend_policy=<unavailable>) at debugger-agent.c:3715
    frame #4: libmonosgen-2.0.so`thread_end [inlined] process_profiler_event(event=EVENT_KIND_THREAD_DEATH, arg=0x00000071ebfec508) at debugger-agent.c:3875
    frame #5: libmonosgen-2.0.so`thread_end(prof=<unavailable>, tid=<unavailable>) at debugger-agent.c:3991
    frame #6: libmonosgen-2.0.so`mono_profiler_raise_thread_stopped(tid=<unavailable>) at profiler-events.h:105
    frame #7: libmonosgen-2.0.so`mono_thread_detach_internal(thread=<unavailable>) at threads.c:979
    frame #8: libmonosgen-2.0.so`thread_detach(info=0x00000071e949a000) at threads.c:3215
    frame #9: libmonosgen-2.0.so`unregister_thread(arg=<unavailable>) at mono-threads.c:544
    frame #10: libmonosgen-2.0.so`thread_info_key_dtor(arg=0x00000071e949a000) at mono-threads.c:774
    frame #11: 0x00000072899c58e8 libc.so`pthread_key_clean_all() + 124
    frame #12: 0x00000072899c5374 libc.so`pthread_exit + 76
    frame #13: 0x00000072899c5264 libc.so`__pthread_start(void*) + 44
    frame #14: 0x000000728996617c libc.so`__start_thread + 72
```
2019-05-07 20:22:46 +02:00
monojenkins 186a3b768e [2019-04] [corlib] Fix a few NSLogWriter issues. (#13952)
* [corlib] Make NSLogWriter thread-safe.

* [corlib] Simplify newline checking in NSLogWriter.

Checking the StringBuilder buffer after writing to it instead of the input
string/char[] makes the code somewhat simpler.

* [corlib] Fix NSLogWriter.Write to take into account the index and count parameters.
2019-05-07 20:21:33 +02:00
monojenkins cd42fa383f [arm] fix armv7k regression on struct passing (#14380)
[2019-04] [arm] fix armv7k regression on struct passing

We can't use `slotsize=8` on `armv7k` as it leads to stack corruption.

Note that `mtouch` already calls the AOT compiler with `--aot=mtriple=arm64_32-ios`, so no changes are required there.

Regression introduced by https://github.com/mono/mono/pull/12992

Fixes https://github.com/mono/mono/issues/13454


Backport of #14362.

/cc @lewurm
2019-05-07 11:37:30 -04:00
Alexander Köplinger 3134b554ed [sdks] Add Mono libraries to mac archive 2019-05-07 17:19:43 +02:00
Alexander Köplinger c716c2200b [sdks] Add mono-2.pc to mac archive
Xamarin.Mac needs it.
2019-05-07 15:59:38 +02:00
Alexander Köplinger 4616c1c2d6 [sdks] Add Mono libraries and frameworks to iOS archive 2019-05-07 15:59:38 +02:00
Alexander Köplinger 6f7e90d908 [sdks] Remove --with-monotouch from configure arguments
They are only needed for BCL builds and those are disabled by --disable-mcs-build
2019-05-07 15:59:38 +02:00
Alexander Köplinger bec31562b2 [sdks] Fix README.md 2019-05-07 15:59:38 +02:00
monojenkins 18b454c267 Bump API snapshot submodule 2019-05-06 15:02:14 +02:00
Marek Safar 5ce3f8f62b [Facades] Include missing enums in System.Memory 2019-05-06 15:02:14 +02:00
Alexander Köplinger 6c135b00e3 [tests] Write nunit/xunit exclude categories to a file (#14281)
So we can include it in the SDKs archive.

(cherry picked from commit 4eea0870e1)
2019-05-06 14:01:19 +02:00
monojenkins 1a105af0bc [arm] amend stack pointer properly in exception trampoline (#14314)
[2019-04] [arm] amend stack pointer properly in exception trampoline

The previous attempt ( https://github.com/mono/mono/pull/14078 ) only fixed it for ABIs where the stack pointer alignment is 8 bytes. ABIs, such as watchOS, require 16 byte alignment.

Fixes https://github.com/mono/mono/issues/14223

Backport of #14310.

/cc @lewurm
2019-05-03 13:56:18 -04:00
Zoltan Varga fd4b429551 [aot] Avoid passing -march=arm to llc when using thumb, it forces arm32 code generation.
Fixes https://github.com/mono/mono/issues/14247.
2019-05-02 15:46:37 +02:00
monojenkins 705aa0209b [2019-04] [corlib] Add API that was dropped during the coreFX System.IO integra… (#14275)
* [corlib] Add API that was dropped during the coreFX System.IO integration

* Bump API snapshot submodule
2019-05-01 14:23:21 -04:00
Jay Krell 9091e89cbf Remove libgcc_s_seh-1.dll dependency when targeting Win32 with gcc. (#14251)
Don't use popcount intrinsic.
Alternative but not exactly contradictory to https://github.com/mono/mono/pull/14248.

Note that this is a single inlinable instruction on x86,
if you assume at least SSE4 from circa 2007, which I am avoiding here.

(cherry picked from commit 90a91429ae)
2019-04-29 16:14:35 +02:00
Alexander Köplinger 64630570f7 [nunit-lite] Use .NOTPARALLEL to possibly fix some races
We're seeing occasional build errors on CI that seem to be some kind
of race when compiling nunit-lite and nunit-lite-console.

(cherry picked from commit c3541fc543)
2019-04-29 14:12:29 +02:00
Vlad Brezae dd06ea25fa [interp] Fix GetFunctionPointer (#14176)
This method returns a function pointer that can be called with a calli instruction. On interpreter we use a pointer to InterpMethod while on jit we use the native code address. Normally, GetFunctionPointer should return the InterpMethod pointer if called from interp or the native code address if called from jit. Since we don't have any information about the execution engine of the caller, we solve this by intrinsifying all these calls, that happen in the interpreter.

Passing such function pointers between jitted and interp code is probably still unreliable.

Fixes https://github.com/mono/mono/issues/13654
2019-04-26 21:10:08 +02:00
monojenkins c1b2d24d3b [2019-04] Fix arm32 tailcall_reg/tailcall_membase. (#14236)
* When moving parameters for tailcall, and having pushed ip, and adjusting the offset to account for that, split the adjustment between sp and frame pointer, as frame pointer may or may not be sp. This fixes https://github.com/mono/mono/issues/11489.

* Revert "[Tailcall] [arm] [jit] Fix moving tailcall parameters. (#12701)"

This reverts commit 257efc6374.
2019-04-26 10:53:21 -04:00
monojenkins b7cc391243 [interp] fix op_explicit for cast from nfloat to nint and vice versa (#14222)
[2019-04] [interp] fix op_explicit for cast from nfloat to nint and vice versa

Fixes https://github.com/xamarin/xamarin-macios/issues/5809

/cc @spouliot 

Backport of #14201.

/cc @lewurm
2019-04-25 05:36:18 -04:00
monojenkins 28a266a434 [2019-04] [interp] Fix interp strmfld vt (#14212)
* [interp] Fix store remote value type field

Looks like the culprit for some random mcs tests failures

* [interp] Delete dummy code
2019-04-25 12:07:08 +03:00
monojenkins f103f5ce57 [2019-04] [acceptance-tests] Run roslyn tests using in-tree mono instead of system mono (#14198)
We were inadvertently running the roslyn tests against the system mono in CI.
Instead we now install mono to a custom prefix, prepend that to PATH and run
the roslyn tests against the correct mono we just built.
2019-04-24 11:30:46 +02:00
monojenkins 525877cfe1 [aot] partial revert of #14043 (#14138)
[2019-04] [aot] partial revert of #14043

We need to emit a real call here. On arm/android we would emit this now:
```asm
ldr pc, =label
.ltorg         # place address of `label` here.
```
which is a jump to `label`, not a call.

We need a different solution to make larger assemblies work, but for now
I revert it so the `2019-02` intergration is unblocked.

Partial revert of #14043


Backport of #14135.

/cc @lewurm
2019-04-23 11:46:27 -04:00
monojenkins 3d2df4c76e [interp] Fix buffer overflow when incrementing sp (#14148)
Fixes https://github.com/mono/mono/issues/14079
2019-04-23 16:46:03 +03:00
monojenkins fc25025f64 [2019-04] Protecting boxing a null value (#14115)
When a static method is called the obj is not used, so it can be null and it doesn't need to be boxed. Adding an assert in the method to prevent other crash in this method if a NULL is received.
2019-04-18 11:39:40 -03:00
Jay Krell 1c08f4db80 Increase gsharedvt trampolines by 10% from 4000 to 4400.
There are many minor arguments here.

Where this matters most -- iOS -- the pool is already dynamic.

Other platforms could use a dynamic pool or JIT (despite FullAOT).
Using JIT would defeat the test coverage.

Mitigates https://github.com/mono/mono/issues/13888.
If this feels too tenative, go bigger.
2019-04-18 14:02:32 +02:00
monojenkins 030986fed7 [2019-04] [aot] change method table generation so that it works for larger assemblies on ARM (#14053)
[2019-04] [aot] change method table generation so that it works for larger assemblies on ARM

At the end of the AOT compilation, we dump a table containing all method
entrypoints using the toolchain linker to resolve the addresses. Previously
we used `bl` for that, however on larger assemblies the offset might
overflow the 24bit immediate (thus, the linker bailing out with
"Error: branch out of range"). Instead, using `ldr pc,=<label>` followed
by `.ltorg` emits the full 32bit address to a method. That takes 8 bytes
for each method instead of 4 bytes.


( I couldn't reopen https://github.com/mono/mono/pull/3486 anymore)

Backport of #14043.

/cc @marek-safar @lewurm
2019-04-16 17:55:54 -04:00
monojenkins 0f956be2e8 [arm] align stack pointer in throw trampoline (#14085)
[2019-04] [arm] align stack pointer in throw trampoline

This is a regression introduced by e46fa20466

Fixes https://github.com/mono/mono/issues/13672

Backport of #14078.

/cc @akoeplinger @lewurm
2019-04-16 16:16:20 -04:00
Alexis Christoforides 68eea797de [MacSDK] Bump F# to 4.5 (#10919) (#14058)
* Use a custom prefix instead of trying to infer it, which doesn't work under bockbuild.

The following line is problematic in the scope of building the Mac SDK package (using bockbuild):

https://github.com/fsharp/fsharp/blob/ccfccbacfdb16b2ab143cf83f5ece20f738fd864/mono/config.make#L5

It's problematic because where `mono` lives in this case would be something like `/macsdk-staging-dir/bin/mono` which is not the actual prefix (prefix here being the final destination, `/Library/Frameworks/Mono.framework/...`) but a staging area that bockbuild uses (this is how we build on system prefixes without installing on CI)

For the F# build, bockbuild expects things to end up  in `/fsharp-staging-dir/$(prefix)` (because that's what most `make install`s do when given `DESTDIR=/fsharp-staging-dir/`). If things end up in _any other_ directory in `/fsharp-staging-dir/`  (like `/fsharp-staging-dir/macsdk-staging-dir` in our case) that would cause us to miss packaging those files (this has happened before, with packages that have broken or different use of `DESTDIR`). So there is an added write-protection for anywhere in `/fsharp-staging-dir` that *isn't*  `/fsharp-staging-dir/$(prefix)` , because a write-protection error, while obtuse, is much preferable to missing the fact that some files are not packaged (as would have happened here)

So the fix is to stop trying to infer the prefix, and return to providing it explicitly to the build system (this used to be the case via the `configure` step)

* Also, if we are doing an override of the 'make' command, we need to take care of passing DESTDIR ourselves too

* Since now we perform 'make install' on the make step, make the 'install' step into a no-operation.

* Look for sn where mono is, not in the final destination (which again, may not be the same)
2019-04-16 09:43:19 -04:00
sancheolz 73430f2f78 [WinForms] Fix displayed image in TreeNode when ImageIndex set to -2 When ImageIndex in TreeNode set to -2 must not displayed any image 2019-04-15 14:26:45 +02:00
Alexander Köplinger c3c1df05ba [corlib] Disable FileTest.SymLinkStats() on TVOS
Symlinks on TVOS run into sandboxing restrictions. We've already disabled a similar test.

This test was added recently as part of 26e0b1deec.

(cherry picked from commit b85fdbdb10)
2019-04-12 14:27:32 +02:00
Maxim Lipnin a184b94276 Remove #if-def for TypedReference.MakeTypedReference readonly restriction 2019-04-12 10:54:24 +02:00
Maxim Lipnin a5c373ff40 [w32error] Add ENONET error case 2019-04-12 08:29:15 +02:00
Zoltan Varga 453c277692 [jit] Make dlmalloc use mono_valloc so it picks up the MAP_JIT flag on osx.
Fixes https://github.com/mono/mono/issues/13878.
2019-04-12 08:28:18 +02:00
Aleksey Kliger 432e2032c9 [utils] stub mono_setmmapjit on Win32 and Wasm 2019-04-12 08:27:34 +02:00
Miguel de Icaza 31efbed2fe Do not use MAP_JIT by default, instead make this something that is toggled by Xamarin.Mac which needs it 2019-04-12 08:27:34 +02:00
Ankit Jain a0d6820d94 [nuget] Bump to nuget 5.0.0 2019-04-11 13:39:15 +02:00
Alexander Köplinger d7431c205e [cil-strip] Fix reading of undefined NativeType values in old Cecil
cil-strip crashed when processing this method: https://github.com/mono/corefx/blob/f54e64b341a7b114c3502e197b46670cacb28639/src/Microsoft.CSharp/tests/DefaultParameterTests.cs#L88

It uses `MarshalAs((UnmanagedType)2000)`, i.e. an undefined value for the
native type. The old Cecil embedded in cil-strip tried to read more than one
byte which blows up in this case. Upstream Cecil just reads a single byte:
https://github.com/jbevain/cecil/blob/1b79b96d29f1e8e9ba832191b1b42ea9cb750d20/Mono.Cecil/AssemblyReader.cs#L3700-L3703

Fixes https://github.com/mono/mono/issues/13639
2019-04-11 13:38:06 +02:00
Alexander Köplinger 342edb8e52 [corlib] Disable a ParameterInfoTest test on MONOTOUCH
It needs SRE and even with interpreter config this doesn't work yet.

(cherry picked from commit 766b3204c3)
2019-04-10 21:00:11 +02:00
Alexander Köplinger aecfd90d2a [configure] Add failsafe for missing submodules (#13957)
GitHub provides a way to download a .zip/.tar.gz of the repository content in their UI, however the archive doesn't contain git submodules.

The mono build then fails with confusing "missing file" errors.

Since GitHub doesn't let us disable the archive download we should at least add some logic to detect this broken case and bail out.

(cherry picked from commit e8caaa1dbd)
2019-04-10 15:26:48 +02:00
Alexander Köplinger 1e53aaa2b3 [System.Net.Http] Make some tests specific to HttpClientHandler
Otherwise they throw PNSE on e.g. WatchOS.

(cherry picked from commit 0b6dbfa349)
2019-04-10 15:03:59 +02:00
monojenkins d9d7943901 [metadata] Don't free_aggregate_modifiers in mono_metadata_free_type (#13796)
The aggregate modifiers container is owned by a MonoImageSet.  The aggregate
modifiers may be shared by more than one MonoType that happen to need the same
modifiers. (Similar to how generic instantiations are shared)

When the image set is cleaned up the aggregate modifier cleanup will free the
types in the aggregate modifiers container (the call to
free_aggregate_modifiers in mono_metadata_clean_for_image).

With this extra call to free_aggregate_modifiers in mono_metadata_free_type may
cause the same memory to be freed twice.

Fixes https://github.com/mono/mono/issues/13775
2019-04-09 18:51:21 -04:00
Bernhard Urban 5fd5f4ab42 [AOT] fix winaot LLVM profile (#13909) (#13944)
[2019-04] [AOT] fix winaot LLVM profile

Regression due to https://github.com/mono/mono/pull/13877

Backport of #13909
2019-04-09 15:05:52 -04:00
monojenkins 5ab8c20e76 [2019-04] [merp] Restore non-assertion behavior in debugger-engine.c (#13932)
In my batch of changes here: https://github.com/mono/mono/commit/c3fe80a0c43be780e35f3a4091d3dc1023b35a00#diff-dca5f20c7ac28a5a4487805c49836fdbL340

I changed

```
			if (!seq_points)
				/* Could be AOT code */
				continue;
```

into

```
			seq_points = (MonoSeqPointInfo *) ji->seq_points;

			if (!seq_points) {
				MonoMethod *jmethod = jinfo_get_method (ji);
				if (jmethod->is_inflated) {
					MonoJitInfo *seq_ji;
					MonoMethod *declaring = mono_method_get_declaring_generic_method (jmethod);
					mono_jit_search_all_backends_for_jit_info (domain, declaring, &seq_ji);
					seq_points = (MonoSeqPointInfo *) seq_ji->seq_points;
				}
			}
```

which doesn't account for the case when it can't find the seq_points. When seq_points is NULL at the end of that block, we don't `continue;` as we did before. Instead we assert, and crash the runtime.

This PR undoes this change, making us continue if `!seq_points`.

Backport of #13865.
2019-04-09 11:29:06 +02:00
Alexander Köplinger 56ce963113 [System.Data] Remove unnecessary file from xunit tests (#13935)
It contained DllImports to some Windows APIs which causes issues on xamarin-macios which expects all pinvokes to exist.

Turns out we don't even need that file.

(cherry picked from commit 3903a50e43)
2019-04-08 23:52:00 +02:00
monojenkins 8d6a92f914 [AOT] remove confusing llcopts flag (#13911)
[2019-04] [AOT] remove confusing llcopts flag

Introduced by
https://github.com/mono/mono/commit/2eeaf888c1d0a681c8705bd609f76196d8fb82ed



Backport of #13877.

/cc @lewurm
2019-04-08 13:56:05 -04:00
Alexander Köplinger b3ff0883cc Bump bockbuild to get GTK fix (#13912)
https://github.com/mono/bockbuild/pull/93
2019-04-08 15:49:13 +02:00
Aleksey Kliger 982adf1ac4 [mono-dl] Don't do thread state transitions in mono_dl_fallback_register
1. it doesn't touch the managed runtime

2. it may be called (arguably it ought to be called only) before the runtime is
initialized (and in particular before the current thread is attached).
2019-04-05 16:04:41 -04:00
monojenkins daf75c61ca [gsharedvt] Fix sizeof opcode (#13832)
[2019-04] [gsharedvt] Fix sizeof opcode

We were setting the stack type by using another global local named ins.

This lead to missing methods in the aot image due to invalid IL. Fixes https://github.com/mono/mono/issues/13479.

Backport of #13817.

/cc @lewurm @BrzVlad
2019-04-04 09:55:23 -04:00
Alexander Köplinger ba238de63b Update csproj file
(cherry picked from commit e75ba60277)
2019-04-04 11:10:15 +02:00
Alexander Köplinger 21e76d610e [corlib] Disable EncodingTest.AllEncodingsAreSerializable() on XM4.5 too
(cherry picked from commit 9eb2dbf4cc)
2019-04-04 01:57:10 +02:00
Alexander Köplinger 84aa2ebf15 [MacSDK] Bump bockbuild for fix to #13804 2019-04-04 00:14:25 +02:00
Alexander Köplinger 4d67a0f9f2 [2019-04] Bump linker to latest master (#13818)
(cherry picked from commit 6717c3422a)
2019-04-03 23:40:32 +02:00
Alexander Köplinger 0796cd6829 [System] Clear MONO_CFG_DIR before starting mcs in CodeDOM CSharpCodeGenerator for XM4.5 (#13742)
* [System] Clear MONO_CFG_DIR before starting mcs in CodeDOM CSharpCodeGenerator

This showed up in the xamarin-macios 2019-02 integration.
When you used Xslt with a custom C# script in a Xamarin.Mac Full application
we'd try to launch mcs via CodeDOM to compile the script.

This started failing in 2019-02 because System.Native (mono-native) wasn't found,
the reason is that XM sets MONO_CFG_DIR to point to the Contents/MonoBundle
in the app bundle where it packages the global config file with dllmaps.

However the started Mono wasn't able to find mono-native since the config
there uses a different name for the file.

To prevent that we now clear MONO_CFG_DIR so it uses the default value for the
mono process we're starting (note that setting it to String.Empty doesn't work)

* Make it specific to XM 4.5

(cherry picked from commit 448cf31a8d)
2019-04-02 10:46:33 +02:00
Jo Shields 2046cf5d26 Fix tarball builds
(cherry picked from commit 262a543a17)
2019-04-01 15:52:05 -04:00
Alexander Köplinger 0f705a4acd Apply API snapshot and csproj changes 2019-04-01 21:51:24 +02:00
Jo Shields f683efc4a6 Merge pull request #13766 from directhex/2019-04
Bump version to 6.2
2019-04-01 11:40:49 -04:00
Jo Shields 7a7bebbfb2 Bump version to 6.2 2019-04-01 10:33:13 -04:00
185 changed files with 1845 additions and 573 deletions

No files matched your search

+2 -3
View File
@@ -21,13 +21,12 @@ endif
SUBDIRS = $(build_with_msvc) mk po $(libgc_dir) llvm mono $(ikvm_native_dir) support data runtime scripts man samples $(tools_dir) $(build_without_msvc) $(docs_dir) acceptance-tests
# Keep in sync with SUBDIRS
DIST_SUBDIRS = $(build_with_msvc) m4 mk po $(libgc_dir) llvm mono ikvm-native support data runtime scripts man samples tools $(build_without_msvc) docs acceptance-tests
DIST_SUBDIRS = $(build_with_msvc) m4 mk po $(libgc_dir) llvm mono ikvm-native support data runtime scripts man samples tools $(build_without_msvc) docs acceptance-tests netcore
all: update_submodules
SUBMODULE_ERROR='Could not recursively update all git submodules. You may experience compilation problems if some submodules are out of date'
update_submodules:
@$(srcdir)/scripts/update_submodules.sh
@cd $(srcdir) && scripts/update_submodules.sh
.PHONY: update_submodules
+2
View File
@@ -1,4 +1,6 @@
check-roslyn:
@echo "Runnning roslyn tests using mono from PATH:"
mono --version
@$(MAKE) validate-roslyn RESET_VERSIONS=1
cd $(ROSLYN_PATH); \
./build.sh --restore --build --test --mono || exit; \
+4 -3
View File
@@ -4,7 +4,7 @@
# This line is parsed by tools besides autoconf, such as msvc/mono.winconfig.targets.
# It should remain in the format they expect.
#
AC_INIT(mono, [6.1.0],
AC_INIT(mono, [6.2.0],
[https://github.com/mono/mono/issues/new])
AC_CONFIG_SRCDIR([README.md])
@@ -1247,7 +1247,8 @@ with_bitcode_default=no
enable_cooperative_suspend_default=no
enable_hybrid_suspend_default=no
INVARIANT_AOT_OPTIONS=nimt-trampolines=2000,ntrampolines=10000,nrgctx-fetch-trampolines=256,ngsharedvt-trampolines=4000,nftnptr-arg-trampolines=4000
# For the sake of clearer error messages, these numbers should all be different from each other.
INVARIANT_AOT_OPTIONS=nimt-trampolines=2000,ntrampolines=10000,nrgctx-fetch-trampolines=256,ngsharedvt-trampolines=4400,nftnptr-arg-trampolines=4000
AOT_BUILD_ATTRS=$INVARIANT_AOT_OPTIONS
@@ -1415,7 +1416,7 @@ elif test x$with_runtime_preset = xwinaot_llvm; then
mono_feature_disable_reflection_emit='yes'
mono_feature_disable_appdomains='yes'
INVARIANT_AOT_OPTIONS="llcopts=-mattr=sse4.1,$INVARIANT_AOT_OPTIONS"
INVARIANT_AOT_OPTIONS="llvmllc=-mattr=sse4.1,$INVARIANT_AOT_OPTIONS"
AOT_BUILD_FLAGS="--runtime=mobile -O=gsharedvt --llvm --aot=full,$INVARIANT_AOT_OPTIONS"
AOT_RUN_FLAGS="--runtime=mobile --full-aot"
AOT_MODE="full"
+1 -1
+1 -1
+4 -6
View File
@@ -246,12 +246,6 @@ program that comes with Mono, and calling it like this:
.fi
.TP
.I llcopts=[options]
Use this option to add more flags to the built-in set of flags passed to the
LLVM system compiler. If not provided, it will fallback to
.I -mcpu=generic
on x86 systems.
.TP
.I llvm-outfile=[filename]
Gives the path for the temporary LLVM bitcode file created during AOT.
.I dedup
@@ -646,6 +640,10 @@ running a 1.1 program on a 2.0 version:
Configures the virtual machine to be better suited for server
operations (currently, allows a heavier threadpool initialization).
.TP
\fB--use-map-jit\fR
Instructs Mono to generate code using MAP_JIT on MacOS. Necessary for
bundled applications.
.TP
\fB--verify-all\fR
Verifies mscorlib and assemblies in the global
assembly cache for valid IL, and all user code for IL
+1 -1
View File
@@ -6,7 +6,7 @@
PLATFORM_MCS_FLAGS =
PLATFORM_RUNTIME = $(RUNTIME)
PLATFORM_CORLIB = mscorlib.dll
PLATFORM_TEST_HARNESS_EXCLUDES = NotOnMac,MacNotWorking,
PLATFORM_TEST_HARNESS_EXCLUDES = NotOnMac
EXTERNAL_MCS = mcs
EXTERNAL_MBAS = mbas
+1 -1
View File
@@ -6,7 +6,7 @@
PLATFORM_MCS_FLAGS =
PLATFORM_RUNTIME =
PLATFORM_CORLIB = mscorlib.dll
PLATFORM_TEST_HARNESS_EXCLUDES = NotOnWindows,
PLATFORM_TEST_HARNESS_EXCLUDES = NotOnWindows
EXTERNAL_MCS = mcs
EXTERNAL_MBAS = vbc.exe
+2
View File
@@ -34,3 +34,5 @@ NO_INSTALL = yes
MOBILE_DYNAMIC = yes
MOBILE_PROFILE = yes
NO_CONSOLE = yes
PROFILE_TEST_HARNESS_EXCLUDES = MobileNotWorking PKITS InetAccess AndroidNotWorking
+3 -1
View File
@@ -3,4 +3,6 @@ include $(topdir)/build/profiles/monotouch_runtime.make
PROFILE_MCS_FLAGS += \
-d:FULL_AOT_RUNTIME
NO_SRE=1
NO_SRE = yes
PROFILE_TEST_HARNESS_EXCLUDES += SRE NotWorkingLinqInterpreter
+3 -1
View File
@@ -39,4 +39,6 @@ NO_CONSOLE = yes
PROFILE_DISABLE_BTLS=1
MONO_FEATURE_APPLETLS=1
ONLY_APPLETLS=1
ENABLE_GSS=1
ENABLE_GSS=1
PROFILE_TEST_HARNESS_EXCLUDES = MobileNotWorking PKITS InetAccess
+2 -3
View File
@@ -40,7 +40,6 @@ MOBILE_PROFILE = yes
NO_VTS_TEST = yes
NO_CONSOLE = yes
PROFILE_DISABLE_BTLS = yes
NO_SRE=1
NO_SRE = yes
# Note need for trailing comma. If you add, keep it
PROFILE_TEST_HARNESS_EXCLUDES = MobileNotWorking,PKITS,
PROFILE_TEST_HARNESS_EXCLUDES = MobileNotWorking PKITS SRE NotWorkingLinqInterpreter
+1 -2
View File
@@ -30,5 +30,4 @@ NO_INSTALL = yes
NO_CONSOLE = yes
MOBILE_PROFILE = yes
# Note need for trailing comma. If you add, keep it
PROFILE_TEST_HARNESS_EXCLUDES := MobileNotWorking,PKITS,
PROFILE_TEST_HARNESS_EXCLUDES := MobileNotWorking PKITS
+2
View File
@@ -14,3 +14,5 @@ NO_SRE = yes
ALWAYS_AOT_BCL = yes
ALWAYS_AOT_TESTS = yes
PROFILE_TEST_HARNESS_EXCLUDES += SRE
+2 -3
View File
@@ -38,7 +38,6 @@ ALWAYS_AOT_BCL = yes
ALWAYS_AOT_TESTS = yes
MOBILE_PROFILE = yes
NO_VTS_TEST = yes
NO_SRE=1
NO_SRE = yes
# Note need for trailing comma. If you add, keep it
PROFILE_TEST_HARNESS_EXCLUDES = MobileNotWorking,PKITS,
PROFILE_TEST_HARNESS_EXCLUDES = MobileNotWorking PKITS SRE NotWorkingLinqInterpreter
+2
View File
@@ -38,3 +38,5 @@ ENABLE_GSS=1
PROFILE_DISABLE_BTLS=1
MONO_FEATURE_APPLETLS=1
ONLY_APPLETLS=1
PROFILE_TEST_HARNESS_EXCLUDES = MobileNotWorking PKITS
+1
View File
@@ -9,6 +9,7 @@
empty :=
space := $(empty) $(empty)
comma := ,
_FILTER_OUT = $(foreach x,$(2),$(if $(findstring $(1),$(x)),,$(x)))
# given $(thisdir), we compute the path to the top directory
+31 -20
View File
@@ -147,17 +147,15 @@ ifdef HAVE_CS_TESTS
test_assemblies += $(test_lib_output)
check: run-test
test-local: $(test_assemblies)
test-local: $(test_assemblies) $(test_lib_dir)/nunit-excludes.txt
run-test-local: run-test-lib
run-test-ondotnet-local: run-test-ondotnet-lib
ifdef TEST_WITH_INTERPRETER
TEST_HARNESS_EXCLUDES = -exclude=$(PLATFORM_TEST_HARNESS_EXCLUDES)$(PROFILE_TEST_HARNESS_EXCLUDES)NotWorking,NotWorkingRuntimeInterpreter,CAS
else
TEST_HARNESS_EXCLUDES = -exclude=$(PLATFORM_TEST_HARNESS_EXCLUDES)$(PROFILE_TEST_HARNESS_EXCLUDES)NotWorking,CAS
endif
TEST_HARNESS_EXCLUDES = $(PLATFORM_TEST_HARNESS_EXCLUDES) $(PROFILE_TEST_HARNESS_EXCLUDES) NotWorking CAS
TEST_HARNESS_EXCLUDES_ONDOTNET = /exclude:$(PLATFORM_TEST_HARNESS_EXCLUDES)$(PROFILE_TEST_HARNESS_EXCLUDES)NotDotNet,CAS
ifdef TEST_WITH_INTERPRETER
TEST_HARNESS_EXCLUDES += NotWorkingRuntimeInterpreter
endif
NOSHADOW_FLAG =
@@ -241,15 +239,19 @@ endif # PLATFORM_AOT_SUFFIX
ifneq ($(wildcard $(MKBUNDLE_TEST_BIN)),)
TEST_HARNESS_EXEC=$(MKBUNDLE_TEST_BIN)
TEST_HARNESS_EXCLUDES:=$(TEST_HARNESS_EXCLUDES),StaticLinkedAotNotWorking
TEST_HARNESS_EXCLUDES:=$(TEST_HARNESS_EXCLUDES) StaticLinkedAotNotWorking
else
TEST_HARNESS_EXEC=$(TEST_RUNTIME) $(TEST_RUNTIME_FLAGS) $(TEST_COVERAGE_FLAGS) $(AOT_RUN_FLAGS) $(TEST_HARNESS)
endif
$(test_lib_dir)/nunit-excludes.txt: $(topdir)/build/tests.make | $(test_lib_dir)
@rm -f $@
@$(foreach entry,$(TEST_HARNESS_EXCLUDES),echo "$(entry)" >> $@;)
## FIXME: i18n problem in the 'sed' command below
run-test-lib: test-local test-local-aot-compile copy-nunitlite-appconfig
ok=:; \
PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" MONO_REGISTRY_PATH="$(HOME)/.mono/registry" MONO_TESTS_IN_PROGRESS="yes" DBG_RUNTIME_ARGS="$(TEST_RUNTIME_FLAGS)" $(TEST_HARNESS_EXEC) $(test_assemblies) $(NOSHADOW_FLAG) $(TEST_HARNESS_FLAGS) $(LOCAL_TEST_HARNESS_FLAGS) $(TEST_HARNESS_EXCLUDES) $(LABELS_ARG) -format:nunit2 -result:TestResult-$(PROFILE).xml $(FIXTURE_ARG) $(TESTNAME_ARG)|| ok=false; \
PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" MONO_REGISTRY_PATH="$(HOME)/.mono/registry" MONO_TESTS_IN_PROGRESS="yes" DBG_RUNTIME_ARGS="$(TEST_RUNTIME_FLAGS)" $(TEST_HARNESS_EXEC) $(test_assemblies) $(NOSHADOW_FLAG) $(TEST_HARNESS_FLAGS) $(LOCAL_TEST_HARNESS_FLAGS) -exclude=$(subst $(space),$(comma),$(TEST_HARNESS_EXCLUDES)) $(LABELS_ARG) -format:nunit2 -result:TestResult-$(PROFILE).xml $(FIXTURE_ARG) $(TESTNAME_ARG)|| ok=false; \
if [ ! -f "TestResult-$(PROFILE).xml" ]; then echo "<?xml version='1.0' encoding='utf-8'?><test-results failures='1' total='1' not-run='0' name='bcl-tests' date='$$(date +%F)' time='$$(date +%T)'><test-suite name='$(strip $(test_assemblies))' success='False' time='0'><results><test-case name='$(notdir $(strip $(test_assemblies))).crash' executed='True' success='False' time='0'><failure><message>The test runner didn't produce a test result XML, probably due to a crash of the runtime. Check the log for more details.</message><stack-trace></stack-trace></failure></test-case></results></test-suite></test-results>" > TestResult-$(PROFILE).xml; fi; \
$$ok
@@ -257,7 +259,7 @@ run-test-lib: test-local test-local-aot-compile copy-nunitlite-appconfig
run-test-ondotnet-lib: LOCAL_TEST_COMPILER_ONDOTNET_FLAGS:=-d:RUN_ONDOTNET
run-test-ondotnet-lib: test-local
ok=:; \
$(TEST_HARNESS) $(test_assemblies) $(NOSHADOW_FLAG) $(TEST_HARNESS_FLAGS) $(LOCAL_TEST_HARNESS_ONDOTNET_FLAGS) $(TEST_HARNESS_EXCLUDES_ONDOTNET) $(LABELS_ARG) -format:nunit2 -result:TestResult-ondotnet-$(PROFILE).xml $(FIXTURE_ARG) $(TESTNAME_ARG) || ok=false; \
$(TEST_HARNESS) $(test_assemblies) $(NOSHADOW_FLAG) $(TEST_HARNESS_FLAGS) $(LOCAL_TEST_HARNESS_ONDOTNET_FLAGS) /exclude:$(subst $(space),$(comma),$(TEST_HARNESS_EXCLUDES) NotDotNet) $(LABELS_ARG) -format:nunit2 -result:TestResult-ondotnet-$(PROFILE).xml $(FIXTURE_ARG) $(TESTNAME_ARG) || ok=false; \
$$ok
@@ -314,15 +316,17 @@ XTEST_HARNESS_PATH := $(topdir)/../external/xunit-binaries
XTEST_HARNESS = $(XTEST_HARNESS_PATH)/xunit.console.exe
XTEST_RESULT_FILE := TestResult-$(PROFILE)-xunit.xml
XTEST_HARNESS_FLAGS := -noappdomain -noshadow -parallel none -nunit $(XTEST_RESULT_FILE)
ifdef OUTER_LOOP
XTEST_TRAIT := -notrait category=failing -notrait category=nonmonotests -notrait Benchmark=true
else
XTEST_TRAIT := -notrait category=failing -notrait category=nonmonotests -notrait Benchmark=true -notrait category=outerloop
XTEST_NOTRAITS := category=failing category=nonmonotests Benchmark=true
ifndef OUTER_LOOP
XTEST_NOTRAITS += category=outerloop
endif
# The logic is double inverted so this actually excludes tests not intented for current platform
# best to search for `property name="category"` in the xml output to see what's going on
# https://github.com/dotnet/buildtools/blob/master/src/xunit.netcore.extensions/Discoverers/PlatformSpecificDiscoverer.cs
XTEST_TRAIT_PLATFORM := -notrait category=non$(XTEST_PLATFORM)tests
XTEST_NOTRAITS += category=non$(XTEST_PLATFORM)tests
TEST_MONO_PATH := $(TEST_MONO_PATH)$(PLATFORM_PATH_SEPARATOR)$(XTEST_HARNESS_PATH)
@@ -339,17 +343,24 @@ XTEST_COVERAGE_FLAGS = -O=-aot --profile=coverage:output=$(topdir)/class/lib/$(P
endif
check: run-xunit-test-local
xunit-test-local: $(xtest_lib_output)
xunit-test-local: $(xtest_lib_output) $(test_lib_dir)/xunit-excludes.txt $(test_lib_dir)/Xunit.NetCore.Extensions.dll $(test_lib_dir)/xunit.execution.dotnet.dll
run-xunit-test-local: run-xunit-test-lib
# cp -rf is a HACK for xunit runner to require xunit.execution.dOTNET.dll file in local folder on .net only
$(test_lib_dir)/xunit-excludes.txt: $(topdir)/build/tests.make | $(test_lib_dir)
@rm -f $@
$(foreach entry,$(XTEST_NOTRAITS),echo "$(entry)" >> $@;)
$(test_lib_dir)/Xunit.NetCore.Extensions.dll: $(topdir)/build/tests.make $(topdir)/../external/xunit-binaries/Xunit.NetCore.Extensions.dll | $(test_lib_dir)
@cp -f $(topdir)/../external/xunit-binaries/Xunit.NetCore.Extensions.dll $@
$(test_lib_dir)/xunit.execution.dotnet.dll: $(topdir)/build/tests.make $(topdir)/../external/xunit-binaries/xunit.execution.dotnet.dll | $(test_lib_dir)
@cp -f $(topdir)/../external/xunit-binaries/xunit.execution.dotnet.dll $@
run-xunit-test-lib: xunit-test-local
@cp -rf $(XTEST_HARNESS_PATH)/xunit.execution.dotnet.dll $(test_lib_dir)/xunit.execution.dotnet.dll
ok=:; \
PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" REMOTE_EXECUTOR="$(XTEST_REMOTE_EXECUTOR_ABSPATH)" $(TEST_RUNTIME) $(TEST_RUNTIME_FLAGS) $(XTEST_COVERAGE_FLAGS) $(AOT_RUN_FLAGS) $(XTEST_HARNESS) $(xtest_lib_output) $(XTEST_HARNESS_FLAGS) $(XTEST_TRAIT) $(XTEST_TRAIT_PLATFORM) || ok=false; \
PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" REMOTE_EXECUTOR="$(XTEST_REMOTE_EXECUTOR_ABSPATH)" $(TEST_RUNTIME) $(TEST_RUNTIME_FLAGS) $(XTEST_COVERAGE_FLAGS) $(AOT_RUN_FLAGS) $(XTEST_HARNESS) $(xtest_lib_output) $(XTEST_HARNESS_FLAGS) -notrait $(subst $(space), -notrait ,$(XTEST_NOTRAITS)) || ok=false; \
if [ -n "$$MONO_BABYSITTER_NUNIT_XML_LIST_FILE" ]; then echo "$(abspath $(XTEST_RESULT_FILE))" >> "$$MONO_BABYSITTER_NUNIT_XML_LIST_FILE"; fi; \
$$ok
@rm -f $(test_lib_dir)/xunit.execution.dotnet.dll
# Some xunit tests want to be executed in a separate process (see RemoteExecutorTestBase)
$(XTEST_REMOTE_EXECUTOR): $(topdir)/../external/corefx/src/Common/tests/System/Diagnostics/RemoteExecutorConsoleApp/RemoteExecutorConsoleApp.cs | $(test_lib_dir)
@@ -33,8 +33,10 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.MemoryManager<>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.MemoryHandle))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.MemoryPool<>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.OperationStatus))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.ReadOnlySequenceSegment<>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.ReadOnlySequence<>))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.StandardFormat))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.Binary.BinaryPrimitives))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.Text.Base64))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.Text.Utf8Formatter))]
+53 -2
View File
@@ -49,7 +49,7 @@ namespace Cairo {
public class Context : IDisposable
{
IntPtr handle = IntPtr.Zero;
IntPtr handle;
static int native_glyph_size, c_compiler_long_size;
@@ -105,6 +105,12 @@ namespace Cairo {
Dispose (false);
}
private void ThrowIfDisposed()
{
if (handle == IntPtr.Zero)
throw new ObjectDisposedException("Cairo.Context");
}
public void Dispose ()
{
Dispose (true);
@@ -307,9 +313,14 @@ namespace Cairo {
public void SetTarget (Surface target)
{
IntPtr newHandle = NativeMethods.cairo_create (target.Handle);
if (newHandle == IntPtr.Zero)
throw new InvalidOperationException ("Surface had an invalid handle.");
if (handle != IntPtr.Zero)
NativeMethods.cairo_destroy (handle);
handle = NativeMethods.cairo_create (target.Handle);
handle = newHandle;
}
[Obsolete("Use GetScaledFont/SetScaledFont")]
@@ -325,11 +336,13 @@ namespace Cairo {
public ScaledFont GetScaledFont ()
{
ThrowIfDisposed();
return new ScaledFont (NativeMethods.cairo_get_scaled_font (handle), false);
}
public void SetScaledFont (ScaledFont font)
{
ThrowIfDisposed();
NativeMethods.cairo_set_scaled_font (handle, font.Handle);
}
@@ -339,32 +352,38 @@ namespace Cairo {
public void SetSourceColor (Color color)
{
ThrowIfDisposed();
NativeMethods.cairo_set_source_rgba (handle, color.R, color.G, color.B, color.A);
}
public void SetSourceRGB (double r, double g, double b)
{
ThrowIfDisposed();
NativeMethods.cairo_set_source_rgb (handle, r, g, b);
}
public void SetSourceRGBA (double r, double g, double b, double a)
{
ThrowIfDisposed();
NativeMethods.cairo_set_source_rgba (handle, r, g, b, a);
}
//[Obsolete ("Use SetSource method (with double parameters)")]
public void SetSourceSurface (Surface source, int x, int y)
{
ThrowIfDisposed();
NativeMethods.cairo_set_source_surface (handle, source.Handle, x, y);
}
public void SetSource (Surface source, double x, double y)
{
ThrowIfDisposed();
NativeMethods.cairo_set_source_surface (handle, source.Handle, x, y);
}
public void SetSource (Surface source)
{
ThrowIfDisposed();
NativeMethods.cairo_set_source_surface (handle, source.Handle, 0, 0);
}
@@ -372,116 +391,139 @@ namespace Cairo {
public void NewPath ()
{
ThrowIfDisposed();
NativeMethods.cairo_new_path (handle);
}
public void NewSubPath ()
{
ThrowIfDisposed();
NativeMethods.cairo_new_sub_path (handle);
}
public void MoveTo (PointD p)
{
ThrowIfDisposed();
MoveTo (p.X, p.Y);
}
public void MoveTo (double x, double y)
{
ThrowIfDisposed();
NativeMethods.cairo_move_to (handle, x, y);
}
public void LineTo (PointD p)
{
ThrowIfDisposed();
LineTo (p.X, p.Y);
}
public void LineTo (double x, double y)
{
ThrowIfDisposed();
NativeMethods.cairo_line_to (handle, x, y);
}
public void CurveTo (PointD p1, PointD p2, PointD p3)
{
ThrowIfDisposed();
CurveTo (p1.X, p1.Y, p2.X, p2.Y, p3.X, p3.Y);
}
public void CurveTo (double x1, double y1, double x2, double y2, double x3, double y3)
{
ThrowIfDisposed();
NativeMethods.cairo_curve_to (handle, x1, y1, x2, y2, x3, y3);
}
public void RelMoveTo (Distance d)
{
ThrowIfDisposed();
RelMoveTo (d.Dx, d.Dy);
}
public void RelMoveTo (double dx, double dy)
{
ThrowIfDisposed();
NativeMethods.cairo_rel_move_to (handle, dx, dy);
}
public void RelLineTo (Distance d)
{
ThrowIfDisposed();
RelLineTo (d.Dx, d.Dy);
}
public void RelLineTo (double dx, double dy)
{
ThrowIfDisposed();
NativeMethods.cairo_rel_line_to (handle, dx, dy);
}
public void RelCurveTo (Distance d1, Distance d2, Distance d3)
{
ThrowIfDisposed();
RelCurveTo (d1.Dx, d1.Dy, d2.Dx, d2.Dy, d3.Dx, d3.Dy);
}
public void RelCurveTo (double dx1, double dy1, double dx2, double dy2, double dx3, double dy3)
{
ThrowIfDisposed();
NativeMethods.cairo_rel_curve_to (handle, dx1, dy1, dx2, dy2, dx3, dy3);
}
public void Arc (double xc, double yc, double radius, double angle1, double angle2)
{
ThrowIfDisposed();
NativeMethods.cairo_arc (handle, xc, yc, radius, angle1, angle2);
}
public void ArcNegative (double xc, double yc, double radius, double angle1, double angle2)
{
ThrowIfDisposed();
NativeMethods.cairo_arc_negative (handle, xc, yc, radius, angle1, angle2);
}
public void Rectangle (Rectangle rectangle)
{
ThrowIfDisposed();
Rectangle (rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height);
}
public void Rectangle (PointD p, double width, double height)
{
ThrowIfDisposed();
Rectangle (p.X, p.Y, width, height);
}
public void Rectangle (double x, double y, double width, double height)
{
ThrowIfDisposed();
NativeMethods.cairo_rectangle (handle, x, y, width, height);
}
public void ClosePath ()
{
ThrowIfDisposed();
NativeMethods.cairo_close_path (handle);
}
public Path CopyPath ()
{
ThrowIfDisposed();
return new Path (NativeMethods.cairo_copy_path (handle));
}
public Path CopyPathFlat ()
{
ThrowIfDisposed();
return new Path (NativeMethods.cairo_copy_path_flat (handle));
}
public void AppendPath (Path path)
{
ThrowIfDisposed();
NativeMethods.cairo_append_path (handle, path.Handle);
}
@@ -490,36 +532,43 @@ namespace Cairo {
#region Painting Methods
public void Paint ()
{
ThrowIfDisposed();
NativeMethods.cairo_paint (handle);
}
public void PaintWithAlpha (double alpha)
{
ThrowIfDisposed();
NativeMethods.cairo_paint_with_alpha (handle, alpha);
}
public void Mask (Pattern pattern)
{
ThrowIfDisposed();
NativeMethods.cairo_mask (handle, pattern.Handle);
}
public void MaskSurface (Surface surface, double surface_x, double surface_y)
{
ThrowIfDisposed();
NativeMethods.cairo_mask_surface (handle, surface.Handle, surface_x, surface_y);
}
public void Stroke ()
{
ThrowIfDisposed();
NativeMethods.cairo_stroke (handle);
}
public void StrokePreserve ()
{
ThrowIfDisposed();
NativeMethods.cairo_stroke_preserve (handle);
}
public Rectangle StrokeExtents ()
{
ThrowIfDisposed();
double x1, y1, x2, y2;
NativeMethods.cairo_stroke_extents (handle, out x1, out y1, out x2, out y2);
return new Rectangle (x1, y1, x2 - x1, y2 - y1);
@@ -527,6 +576,7 @@ namespace Cairo {
public void Fill ()
{
ThrowIfDisposed();
NativeMethods.cairo_fill (handle);
}
@@ -539,6 +589,7 @@ namespace Cairo {
public void FillPreserve ()
{
ThrowIfDisposed();
NativeMethods.cairo_fill_preserve (handle);
}
-1
View File
@@ -186,7 +186,6 @@
<Compile Include="..\..\..\external\cecil\Mono\Disposable.cs" />
<Compile Include="..\..\..\external\cecil\Mono\Empty.cs" />
<Compile Include="..\..\..\external\cecil\Mono\MergeSort.cs" />
<Compile Include="..\..\..\external\cecil\Mono\Type.cs" />
<Compile Include="..\..\..\external\cecil\ProjectInfo.cs" />
<Compile Include="Consts.cs" />
</ItemGroup>
-2
View File
@@ -37,10 +37,8 @@ else
MANAGED_INTERP := $(filter orbis winaot monotouch monotouch_tv monotouch_watch, $(PROFILE))
ifdef MANAGED_INTERP
LIB_MCS_FLAGS += -d:NO_FEATURE_STATIC_DELEGATE,FEATURE_MAKE_RUN_METHODS
PROFILE_TEST_HARNESS_EXCLUDES := $(PROFILE_TEST_HARNESS_EXCLUDES)NotWorkingLinqInterpreter,
else
LIB_MCS_FLAGS += -d:FEATURE_COMPILE,FEATURE_COMPILE_TO_METHODBUILDER
PROFILE_TEST_HARNESS_EXCLUDES := $(PROFILE_TEST_HARNESS_EXCLUDES)SRE,
endif
endif
+6
View File
@@ -1196,6 +1196,8 @@
<Compile Include="System.IO.Pipes\NamedPipeServerStream.NotSupported.cs" />
<Compile Include="System.IO.Pipes\PipeStream.NotSupported.cs" />
<Compile Include="System.IO.Pipes\SafePipeHandle.NotSupported.cs" />
<Compile Include="System.Linq.Expressions\LambdaExpression.NotSupported.cs" />
<Compile Include="System.Runtime.CompilerServices\RuntimeOps.NotSupported.cs" />
</ItemGroup>
</When>
<When Condition="'$(Platform)' == 'monotouch_tv'">
@@ -1253,6 +1255,8 @@
<Compile Include="System.IO.Pipes\NamedPipeServerStream.NotSupported.cs" />
<Compile Include="System.IO.Pipes\PipeStream.NotSupported.cs" />
<Compile Include="System.IO.Pipes\SafePipeHandle.NotSupported.cs" />
<Compile Include="System.Linq.Expressions\LambdaExpression.NotSupported.cs" />
<Compile Include="System.Runtime.CompilerServices\RuntimeOps.NotSupported.cs" />
</ItemGroup>
</When>
<When Condition="'$(Platform)' == 'monotouch'">
@@ -1310,6 +1314,8 @@
<Compile Include="System.IO.Pipes\NamedPipeServerStream.NotSupported.cs" />
<Compile Include="System.IO.Pipes\PipeStream.NotSupported.cs" />
<Compile Include="System.IO.Pipes\SafePipeHandle.NotSupported.cs" />
<Compile Include="System.Linq.Expressions\LambdaExpression.NotSupported.cs" />
<Compile Include="System.Runtime.CompilerServices\RuntimeOps.NotSupported.cs" />
</ItemGroup>
</When>
<When Condition="'$(Platform)' == 'monodroid'">
@@ -0,0 +1,13 @@
using System;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
namespace System.Linq.Expressions {
public partial class LambdaExpression {
public void CompileToMethod (MethodBuilder method) => throw new PlatformNotSupportedException ();
public void CompileToMethod (MethodBuilder method, DebugInfoGenerator debugInfoGenerator) => throw new PlatformNotSupportedException ();
}
}
@@ -0,0 +1,15 @@
using System;
using System.Reflection.Emit;
using System.Linq.Expressions;
namespace System.Runtime.CompilerServices {
public partial class RuntimeOps {
[Obsolete ("do not use this method")]
public static IRuntimeVariables MergeRuntimeVariables (IRuntimeVariables first, IRuntimeVariables second, int[] indexes) => throw new PlatformNotSupportedException ();
[Obsolete ("do not use this method")]
public static Expression Quote (Expression expression, object hoistedLocals, object[] locals) => throw new PlatformNotSupportedException ();
}
}
@@ -1,3 +1,4 @@
#include common_System.Core.dll.sources
#include interpreter_System.Core.dll.sources
#include pipes_pns.sources
#include sre_pns.sources
+2
View File
@@ -0,0 +1,2 @@
System.Linq.Expressions/LambdaExpression.NotSupported.cs
System.Runtime.CompilerServices/RuntimeOps.NotSupported.cs
@@ -119,7 +119,6 @@
../../../external/corefx/src/System.Data.SqlClient/tests/Tools/TDS/TDS.EndPoint/SSPI/SecResult.cs
../../../external/corefx/src/System.Data.SqlClient/tests/Tools/TDS/TDS.EndPoint/SSPI/SecurityHandle.cs
../../../external/corefx/src/System.Data.SqlClient/tests/Tools/TDS/TDS.EndPoint/SSPI/SecurityInteger.cs
../../../external/corefx/src/System.Data.SqlClient/tests/Tools/TDS/TDS.EndPoint/SSPI/SecurityWrapper.cs
../../../external/corefx/src/System.Data.SqlClient/tests/Tools/TDS/TDS.EndPoint/SSPI/SSPIContext.Unix.cs
../../../external/corefx/src/System.Data.SqlClient/tests/Tools/TDS/TDS.EndPoint/SSPI/SSPIResponse.cs
@@ -22,7 +22,7 @@ namespace MonoTests.System.Net.Http
internal static bool IsSocketsHandler (HttpClientHandler handler) => false;
internal static HttpClient CreateHttpClient ()
internal static HttpClient CreateHttpClientWithHttpClientHandler ()
{
return new HttpClient (CreateHttpClientHandler ());
}
@@ -22,7 +22,7 @@ namespace MonoTests.System.Net.Http
internal static bool IsSocketsHandler (HttpClientHandler handler) => UsingSocketsHandler;
internal static HttpClient CreateHttpClient ()
internal static HttpClient CreateHttpClientWithHttpClientHandler ()
{
return new HttpClient (CreateHttpClientHandler ());
}
@@ -188,9 +188,12 @@ namespace MonoTests.System.Net.Http
}
[Test]
public void Ctor_Default ()
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void Ctor_HttpClientHandler ()
{
var client = HttpClientTestHelpers.CreateHttpClient ();
var client = HttpClientTestHelpers.CreateHttpClientWithHttpClientHandler ();
Assert.IsNull (client.BaseAddress, "#1");
Assert.IsNotNull (client.DefaultRequestHeaders, "#2"); // TODO: full check
Assert.AreEqual (int.MaxValue, client.MaxResponseContentBufferSize, "#3");
@@ -292,7 +295,7 @@ namespace MonoTests.System.Net.Http
[Test]
public void Properties ()
{
var client = HttpClientTestHelpers.CreateHttpClient ();
var client = new HttpClient ();
client.BaseAddress = null;
client.MaxResponseContentBufferSize = int.MaxValue;
client.Timeout = Timeout.InfiniteTimeSpan;
@@ -305,7 +308,7 @@ namespace MonoTests.System.Net.Http
[Test]
public void Properties_Invalid ()
{
var client = HttpClientTestHelpers.CreateHttpClient ();
var client = new HttpClient ();
try {
client.MaxResponseContentBufferSize = 0;
Assert.Fail ("#1");
@@ -446,7 +449,7 @@ namespace MonoTests.System.Net.Http
});
try {
var client = HttpClientTestHelpers.CreateHttpClient ();
var client = HttpClientTestHelpers.CreateHttpClientWithHttpClientHandler ();
var request = new HttpRequestMessage (HttpMethod.Get, $"http://localhost:{port}/Send_Complete_Default/");
var response = client.SendAsync (request, HttpCompletionOption.ResponseHeadersRead).Result;
@@ -496,7 +499,7 @@ namespace MonoTests.System.Net.Http
});
try {
var client = HttpClientTestHelpers.CreateHttpClient ();
var client = HttpClientTestHelpers.CreateHttpClientWithHttpClientHandler ();
var request = new HttpRequestMessage (HttpMethod.Get, $"http://localhost:{port}/Send_Complete_Version_1_0/");
request.Version = HttpVersion.Version10;
var response = client.SendAsync (request, HttpCompletionOption.ResponseHeadersRead).Result;
@@ -670,7 +673,7 @@ namespace MonoTests.System.Net.Http
});
try {
var client = HttpClientTestHelpers.CreateHttpClient ();
var client = HttpClientTestHelpers.CreateHttpClientWithHttpClientHandler ();
client.DefaultRequestHeaders.Add("User-Agent", "MLK Android Phone 1.1.9");
@@ -706,7 +709,7 @@ namespace MonoTests.System.Net.Http
});
try {
var client = HttpClientTestHelpers.CreateHttpClient ();
var client = HttpClientTestHelpers.CreateHttpClientWithHttpClientHandler ();
client.DefaultRequestHeaders.Add("Host", "customhost");
@@ -741,7 +744,7 @@ namespace MonoTests.System.Net.Http
try {
try {
var client = HttpClientTestHelpers.CreateHttpClient ();
var client = HttpClientTestHelpers.CreateHttpClientWithHttpClientHandler ();
client.DefaultRequestHeaders.TransferEncodingChunked = true;
client.GetAsync ($"http://localhost:{port}/Send_Transfer_Encoding_Chunked_Needs_Content/").Wait ();
// fails with
@@ -783,7 +786,7 @@ namespace MonoTests.System.Net.Http
});
try {
var client = HttpClientTestHelpers.CreateHttpClient ();
var client = HttpClientTestHelpers.CreateHttpClientWithHttpClientHandler ();
client.DefaultRequestHeaders.TransferEncodingChunked = true;
client.GetAsync ($"http://localhost:{port}/Send_Transfer_Encoding_Chunked/").Wait ();
@@ -813,7 +816,7 @@ namespace MonoTests.System.Net.Http
});
try {
var client = HttpClientTestHelpers.CreateHttpClient ();
var client = HttpClientTestHelpers.CreateHttpClientWithHttpClientHandler ();
client.DefaultRequestHeaders.TransferEncoding.Add (new TransferCodingHeaderValue ("chunked2"));
var request = new HttpRequestMessage (HttpMethod.Get, $"http://localhost:{port}/Send_Transfer_Encoding_Custom/");
@@ -845,7 +848,7 @@ namespace MonoTests.System.Net.Http
});
try {
var client = HttpClientTestHelpers.CreateHttpClient ();
var client = HttpClientTestHelpers.CreateHttpClientWithHttpClientHandler ();
var request = new HttpRequestMessage (HttpMethod.Get, $"http://localhost:{port}/Send_Complete_Content/");
Assert.IsTrue (request.Headers.TryAddWithoutValidation ("aa", "vv"), "#0");
var response = client.SendAsync (request, HttpCompletionOption.ResponseHeadersRead).Result;
@@ -876,7 +879,7 @@ namespace MonoTests.System.Net.Http
});
try {
var client = HttpClientTestHelpers.CreateHttpClient ();
var client = HttpClientTestHelpers.CreateHttpClientWithHttpClientHandler ();
client.MaxResponseContentBufferSize = 1000;
var request = new HttpRequestMessage (HttpMethod.Get, $"http://localhost:{port}/Send_Complete_Content_MaxResponseContentBufferSize/");
var response = client.SendAsync (request, HttpCompletionOption.ResponseHeadersRead).Result;
@@ -902,7 +905,7 @@ namespace MonoTests.System.Net.Http
});
try {
var client = HttpClientTestHelpers.CreateHttpClient ();
var client = HttpClientTestHelpers.CreateHttpClientWithHttpClientHandler ();
client.MaxResponseContentBufferSize = 1000;
var request = new HttpRequestMessage (HttpMethod.Get, $"http://localhost:{port}/Send_Complete_Content_MaxResponseContentBufferSize_Error/");
@@ -998,7 +1001,7 @@ namespace MonoTests.System.Net.Http
});
try {
var client = HttpClientTestHelpers.CreateHttpClient ();
var client = HttpClientTestHelpers.CreateHttpClientWithHttpClientHandler ();
var request = new HttpRequestMessage (HttpMethod.Get, $"http://localhost:{port}/Send_Complete_Error/");
var response = client.SendAsync (request, HttpCompletionOption.ResponseHeadersRead).Result;
@@ -1022,7 +1025,7 @@ namespace MonoTests.System.Net.Http
});
try {
var client = HttpClientTestHelpers.CreateHttpClient ();
var client = HttpClientTestHelpers.CreateHttpClientWithHttpClientHandler ();
var r = new HttpRequestMessage (HttpMethod.Get, $"http://localhost:{port}/Send_Content_Get/");
var response = client.SendAsync (r).Result;
@@ -1050,7 +1053,7 @@ namespace MonoTests.System.Net.Http
});
try {
var client = HttpClientTestHelpers.CreateHttpClient ();
var client = HttpClientTestHelpers.CreateHttpClientWithHttpClientHandler ();
var r = new HttpRequestMessage (HttpMethod.Get, $"http://localhost:{port}/Send_Content_BomEncoding/");
var response = client.SendAsync (r).Result;
@@ -1076,7 +1079,7 @@ namespace MonoTests.System.Net.Http
});
try {
var client = HttpClientTestHelpers.CreateHttpClient ();
var client = HttpClientTestHelpers.CreateHttpClientWithHttpClientHandler ();
var r = new HttpRequestMessage (HttpMethod.Put, $"http://localhost:{port}/Send_Content_Put/");
r.Content = new StringContent ("my text");
var response = client.SendAsync (r).Result;
@@ -1141,9 +1144,12 @@ namespace MonoTests.System.Net.Http
}
[Test]
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void Send_Invalid ()
{
var client = HttpClientTestHelpers.CreateHttpClient ();
var client = HttpClientTestHelpers.CreateHttpClientWithHttpClientHandler ();
try {
client.SendAsync (null).Wait (WaitTimeout);
Assert.Fail ("#1");
@@ -1237,7 +1243,7 @@ namespace MonoTests.System.Net.Http
});
try {
var client = HttpClientTestHelpers.CreateHttpClient ();
var client = HttpClientTestHelpers.CreateHttpClientWithHttpClientHandler ();
client.DefaultRequestHeaders.TransferEncodingChunked = true;
@@ -1291,7 +1297,7 @@ namespace MonoTests.System.Net.Http
});
try {
var client = HttpClientTestHelpers.CreateHttpClient ();
var client = HttpClientTestHelpers.CreateHttpClientWithHttpClientHandler ();
var imageContent = new StreamContent (new MemoryStream ());
@@ -1326,7 +1332,7 @@ namespace MonoTests.System.Net.Http
AddListenerContext (listener, context); // add another request handler for the second request
try {
var client = HttpClientTestHelpers.CreateHttpClient ();
var client = HttpClientTestHelpers.CreateHttpClientWithHttpClientHandler ();
var t1 = client.GetStringAsync ($"http://localhost:{port}/GetString_Many/");
var t2 = client.GetStringAsync ($"http://localhost:{port}/GetString_Many/");
Assert.IsTrue (Task.WaitAll (new [] { t1, t2 }, WaitTimeout));
@@ -1352,7 +1358,7 @@ namespace MonoTests.System.Net.Http
});
try {
var client = HttpClientTestHelpers.CreateHttpClient ();
var client = HttpClientTestHelpers.CreateHttpClientWithHttpClientHandler ();
try {
client.GetByteArrayAsync ($"http://localhost:{port}/GetByteArray_ServerError/").Wait (WaitTimeout);
Assert.Fail ("#1");
@@ -1511,7 +1517,7 @@ namespace MonoTests.System.Net.Http
Assert.Ignore ("Throws System.NullReferenceException");
try {
using (var client = HttpClientTestHelpers.CreateHttpClient ()) {
using (var client = HttpClientTestHelpers.CreateHttpClientWithHttpClientHandler ()) {
client.GetAsync ("http://255.255.255.255").Wait (WaitTimeout);
}
} catch (AggregateException e) {
@@ -95,7 +95,7 @@ namespace MonoTests.System.Net.Http
[Test]
public void Ctor_RelativeUri ()
{
var client = HttpClientTestHelpers.CreateHttpClient ();
var client = new HttpClient ();
client.BaseAddress = new Uri ("http://en.wikipedia.org/wiki/");
var uri = new Uri ("Computer", UriKind.Relative);
var req = new HttpRequestMessage (HttpMethod.Get, uri);
@@ -120,7 +120,7 @@ namespace MonoTests.System.Net.Http
[Test]
public void Ctor_RelativeUriString ()
{
var client = HttpClientTestHelpers.CreateHttpClient ();
var client = new HttpClient ();
client.BaseAddress = new Uri ("http://en.wikipedia.org/wiki/");
var req = new HttpRequestMessage (HttpMethod.Get, "Computer");
// HttpRequestMessage does not rewrite it here.
@@ -26,7 +26,7 @@ namespace MonoTests.System.Web.Services.Description
public class ServiceDescriptionTest
{
[Test]
[Category ("MacNotWorking")] // https://bugzilla.xamarin.com/show_bug.cgi?id=51254
[Category ("NotOnMac")] // https://bugzilla.xamarin.com/show_bug.cgi?id=51254
public void SimpleWrite ()
{
ServiceDescription sd = new ServiceDescription ();
+1 -2
View File
@@ -116,8 +116,7 @@ test-local: $(topdir)/class/lib/$(PROFILE)/tests/DummyAssembly.dll
include ../../build/library.make
TEST_HARNESS_EXCLUDES = -exclude=Interactive,NotWorking,CAS
TEST_HARNESS_EXCLUDES_ONDOTNET = -exclude=Interactive,NotDotNet,CAS
TEST_HARNESS_EXCLUDES += Interactive
$(the_lib): $(RESOURCES)
@@ -59,13 +59,14 @@ namespace System.Windows.Forms {
public DataGridViewCheckBoxCell (bool threeState) : this()
{
this.threeState = threeState;
editingCellFormattedValue = CheckState.Unchecked;
if (threeState)
editingCellFormattedValue = CheckState.Unchecked;
}
public virtual object EditingCellFormattedValue {
get { return editingCellFormattedValue; }
set {
if (FormattedValueType == null || value == null || value.GetType() != FormattedValueType || !(value is Boolean) || !(value is CheckState)) {
if (FormattedValueType == null || value == null || !FormattedValueType.IsAssignableFrom(value.GetType())) {
throw new ArgumentException("Cannot set this property.");
}
editingCellFormattedValue = value;
@@ -192,7 +193,11 @@ namespace System.Windows.Forms {
public virtual void PrepareEditingCellForEdit (bool selectAll)
{
editingCellFormattedValue = GetCurrentValue ();
CheckState cs = GetCurrentValue();
if (threeState)
editingCellFormattedValue = cs;
else
editingCellFormattedValue = cs == CheckState.Checked;
}
public override string ToString ()
@@ -1071,7 +1071,7 @@ namespace System.Windows.Forms
return TreeView.ImageList.Images.IndexOfKey (selected_image_key);
if (!string.IsNullOrEmpty (TreeView.SelectedImageKey))
return TreeView.ImageList.Images.IndexOfKey (TreeView.SelectedImageKey);
if (TreeView.SelectedImageIndex >= 0)
if (selected_image_index == -1 && TreeView.SelectedImageIndex >= 0)
return TreeView.SelectedImageIndex;
} else {
if (image_index >= 0)
@@ -1080,12 +1080,9 @@ namespace System.Windows.Forms
return TreeView.ImageList.Images.IndexOfKey (image_key);
if (!string.IsNullOrEmpty (TreeView.ImageKey))
return TreeView.ImageList.Images.IndexOfKey (TreeView.ImageKey);
if (TreeView.ImageIndex >= 0)
if (image_index == -1 && TreeView.ImageIndex >= 0)
return TreeView.ImageIndex;
}
if (TreeView.ImageList.Images.Count > 0)
return 0;
return -1;
}
@@ -199,6 +199,36 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (null, c.EditedFormattedValue, "A1");
}
[Test]
public void EditingCellFormattedValue()
{
var boolCheckBoxCell = new DataGridViewCheckBoxCell();
Assert.AreEqual(false, boolCheckBoxCell.EditingCellFormattedValue, "A1");
boolCheckBoxCell.EditingCellFormattedValue = true;
Assert.AreEqual(true, boolCheckBoxCell.EditingCellFormattedValue, "A2");
var treeStateCheckBoxCell = new DataGridViewCheckBoxCell(true);
Assert.AreEqual(CheckState.Unchecked, treeStateCheckBoxCell.EditingCellFormattedValue, "A3");
treeStateCheckBoxCell.EditingCellFormattedValue = CheckState.Checked;
Assert.AreEqual(CheckState.Checked, treeStateCheckBoxCell.EditingCellFormattedValue, "A4");
}
[Test]
[ExpectedException(typeof(ArgumentException))]
public void BoolEditingCellFormattedValueCheckStateSet()
{
var boolCheckBoxCell = new DataGridViewCheckBoxCell();
boolCheckBoxCell.EditingCellFormattedValue = CheckState.Checked;
}
[Test]
[ExpectedException(typeof(ArgumentException))]
public void TreeStateEditingCellFormattedValueBoolSet()
{
var treeStateCheckBoxCell = new DataGridViewCheckBoxCell(true);
treeStateCheckBoxCell.EditingCellFormattedValue = false;
}
[Test]
public void FormattedValueType ()
{
@@ -90,7 +90,15 @@ namespace Microsoft.CSharp
* reset MONO_GC_PARAMS - we are invoking compiler possibly with another GC that
* may not handle some of the options causing compilation failure
*/
mcs.StartInfo.EnvironmentVariables ["MONO_GC_PARAMS"] = String.Empty;
mcs.StartInfo.EnvironmentVariables.Remove ("MONO_GC_PARAMS");
#if XAMMAC_4_5
/*/
* reset MONO_CFG_DIR - we don't want to propagate the current config to another mono
* since it's specific to the XM application and won't work on system mono.
*/
mcs.StartInfo.EnvironmentVariables.Remove ("MONO_CFG_DIR");
#endif
mcs.StartInfo.CreateNoWindow=true;
mcs.StartInfo.UseShellExecute=false;
+3 -27
View File
@@ -3616,21 +3616,13 @@
</When>
<When Condition="'$(Platform)' == 'monotouch_watch'">
<ItemGroup>
<Compile Include="..\..\..\external\corefx\src\Common\src\Interop\OSX\Interop.CoreFoundation.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Interop\OSX\Interop.EventStream.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Interop\OSX\Interop.Libraries.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Interop\OSX\Interop.RunLoop.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\Interop.Errors.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\Interop.IOErrors.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\Interop.Libraries.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.RealPath.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.Sync.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Net.Security.Native\Interop.GssApiException.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Net.Security.Native\Interop.GssBuffer.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Net.Security.Native\Interop.NetSecurityNative.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Microsoft\Win32\SafeHandles\GssSafeHandles.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Microsoft\Win32\SafeHandles\SafeCreateHandle.OSX.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Microsoft\Win32\SafeHandles\SafeEventStreamHandle.OSX.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\System\Net\ContextAwareResult.Unix.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\System\Net\ContextFlagsAdapterPal.Unix.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\System\Net\Security\CertificateHelper.Unix.cs" />
@@ -3639,7 +3631,7 @@
<Compile Include="..\..\..\external\corefx\src\Common\src\System\Net\Security\Unix\SafeDeleteNegoContext.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\System\Net\Security\Unix\SafeFreeCredentials.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\System\Net\Security\Unix\SafeFreeNegoCredentials.cs" />
<Compile Include="..\..\..\external\corefx\src\System.IO.FileSystem.Watcher\src\System\IO\FileSystemWatcher.OSX.cs" />
<Compile Include="..\..\..\external\corefx\src\System.IO.FileSystem.Watcher\src\System\IO\FileSystemWatcher.UnknownUnix.cs" />
<Compile Include="..\Mono.Security\Mono.Security.Cryptography\PKCS8.cs" />
<Compile Include="..\Mono.Security\Mono.Security.X509.Extensions\AuthorityKeyIdentifierExtension.cs" />
<Compile Include="..\Mono.Security\Mono.Security.X509.Extensions\BasicConstraintsExtension.cs" />
@@ -3723,21 +3715,13 @@
</When>
<When Condition="'$(Platform)' == 'monotouch_tv'">
<ItemGroup>
<Compile Include="..\..\..\external\corefx\src\Common\src\Interop\OSX\Interop.CoreFoundation.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Interop\OSX\Interop.EventStream.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Interop\OSX\Interop.Libraries.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Interop\OSX\Interop.RunLoop.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\Interop.Errors.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\Interop.IOErrors.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\Interop.Libraries.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.RealPath.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.Sync.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Net.Security.Native\Interop.GssApiException.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Net.Security.Native\Interop.GssBuffer.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Net.Security.Native\Interop.NetSecurityNative.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Microsoft\Win32\SafeHandles\GssSafeHandles.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Microsoft\Win32\SafeHandles\SafeCreateHandle.OSX.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Microsoft\Win32\SafeHandles\SafeEventStreamHandle.OSX.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\System\Net\ContextAwareResult.Unix.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\System\Net\ContextAwareResult.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\System\Net\ContextFlagsAdapterPal.Unix.cs" />
@@ -3750,7 +3734,7 @@
<Compile Include="..\..\..\external\corefx\src\Common\src\System\Net\Security\Unix\SafeFreeCredentials.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\System\Net\Security\Unix\SafeFreeNegoCredentials.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\System\Net\TlsStream.cs" />
<Compile Include="..\..\..\external\corefx\src\System.IO.FileSystem.Watcher\src\System\IO\FileSystemWatcher.OSX.cs" />
<Compile Include="..\..\..\external\corefx\src\System.IO.FileSystem.Watcher\src\System\IO\FileSystemWatcher.UnknownUnix.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.HttpListener\src\System\Net\WebSockets\HttpListenerWebSocketContext.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.Requests\src\System\Net\CommandStream.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.Requests\src\System\Net\FtpControlStream.cs" />
@@ -3865,21 +3849,13 @@
</When>
<When Condition="'$(Platform)' == 'monotouch'">
<ItemGroup>
<Compile Include="..\..\..\external\corefx\src\Common\src\Interop\OSX\Interop.CoreFoundation.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Interop\OSX\Interop.EventStream.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Interop\OSX\Interop.Libraries.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Interop\OSX\Interop.RunLoop.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\Interop.Errors.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\Interop.IOErrors.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\Interop.Libraries.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.RealPath.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Native\Interop.Sync.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Net.Security.Native\Interop.GssApiException.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Net.Security.Native\Interop.GssBuffer.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Interop\Unix\System.Net.Security.Native\Interop.NetSecurityNative.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Microsoft\Win32\SafeHandles\GssSafeHandles.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Microsoft\Win32\SafeHandles\SafeCreateHandle.OSX.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\Microsoft\Win32\SafeHandles\SafeEventStreamHandle.OSX.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\System\Net\ContextAwareResult.Unix.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\System\Net\ContextAwareResult.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\System\Net\ContextFlagsAdapterPal.Unix.cs" />
@@ -3892,7 +3868,7 @@
<Compile Include="..\..\..\external\corefx\src\Common\src\System\Net\Security\Unix\SafeFreeCredentials.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\System\Net\Security\Unix\SafeFreeNegoCredentials.cs" />
<Compile Include="..\..\..\external\corefx\src\Common\src\System\Net\TlsStream.cs" />
<Compile Include="..\..\..\external\corefx\src\System.IO.FileSystem.Watcher\src\System\IO\FileSystemWatcher.OSX.cs" />
<Compile Include="..\..\..\external\corefx\src\System.IO.FileSystem.Watcher\src\System\IO\FileSystemWatcher.UnknownUnix.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.HttpListener\src\System\Net\WebSockets\HttpListenerWebSocketContext.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.Requests\src\System\Net\CommandStream.cs" />
<Compile Include="..\..\..\external\corefx\src\System.Net.Requests\src\System\Net\FtpControlStream.cs" />
@@ -59,7 +59,7 @@ public class SslStreamTest {
}
[Test] //bug https://bugzilla.novell.com/show_bug.cgi?id=457120
[Category ("MacNotWorking")] // Works but launches a prompt on 10.12 that will fail if you don't click in a few seconds
[Category ("NotOnMac")] // Works but launches a prompt on 10.12 that will fail if you don't click in a few seconds
[Category ("NotWorking")] // https://github.com/mono/mono/issues/8450
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
@@ -201,6 +201,9 @@ namespace MonoTests.System.Net.Sockets
}
[Test]
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void Group ()
{
IPAddress group;
@@ -234,6 +237,9 @@ namespace MonoTests.System.Net.Sockets
}
[Test]
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void InterfaceIndex ()
{
IPAddress group;
@@ -296,6 +302,9 @@ namespace MonoTests.System.Net.Sockets
}
[Test]
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
public void LocalAddress ()
{
IPAddress group;
@@ -582,7 +582,7 @@ mgk3bWUV6ChegutbguiKrI/DbO7wPiDLxw==
}
[Test]
[Category ("MacNotWorking")] // SecCertificateCreateWithData does different things on 10.11 vs 10.12 with invalid certificates https://bugzilla.xamarin.com/show_bug.cgi?id=53689
[Category ("NotOnMac")] // SecCertificateCreateWithData does different things on 10.11 vs 10.12 with invalid certificates https://bugzilla.xamarin.com/show_bug.cgi?id=53689
[ExpectedException (typeof (CryptographicException))]
public void Pkcs12_1_WithoutPassword ()
{
@@ -597,7 +597,7 @@ mgk3bWUV6ChegutbguiKrI/DbO7wPiDLxw==
}
[Test]
[Category ("MacNotWorking")] // SecCertificateCreateWithData does different things on 10.11 vs 10.12 with invalid certificates https://bugzilla.xamarin.com/show_bug.cgi?id=53689
[Category ("NotOnMac")] // SecCertificateCreateWithData does different things on 10.11 vs 10.12 with invalid certificates https://bugzilla.xamarin.com/show_bug.cgi?id=53689
public void Pkcs12_2_Properties ()
{
CheckPkcs12 (new X509Certificate (farscape_nopwd_pfx));
@@ -729,7 +729,7 @@ mgk3bWUV6ChegutbguiKrI/DbO7wPiDLxw==
[Test]
[ExpectedException (typeof (CryptographicException))]
[Category ("MacNotWorking")] // SecCertificateCreateWithData does different things on 10.11 vs 10.12 with invalid certificates https://bugzilla.xamarin.com/show_bug.cgi?id=53689
[Category ("NotOnMac")] // SecCertificateCreateWithData does different things on 10.11 vs 10.12 with invalid certificates https://bugzilla.xamarin.com/show_bug.cgi?id=53689
public void Pkcs7_Ctor ()
{
new X509Certificate (farscape_pkcs7);
-9
View File
@@ -1,9 +0,0 @@
System.IO/DefaultWatcher.cs
System.IO/FAMWatcher.cs
System.IO/NullFileWatcher.cs
System.IO/FileAction.cs
System.IO/FileSystemWatcher.cs
System.IO/IFileWatcher.cs
System.IO/KeventWatcher.cs
System.IO/SearchPattern.cs
System.IO/CoreFXFileSystemWatcherProxy.cs
@@ -1,4 +1,2 @@
#include mono_fsw.sources
../../../external/corefx/src/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.UnknownUnix.cs
corefx/Unix/Interop.cs
corefx/Unix/Interop.Read.cs
@@ -4,13 +4,3 @@
Mono.AppleTls/MonoCertificatePal.Mobile.cs
Mono.AppleTls/SafeHandles.cs
../../../external/corefx/src/Common/src/Interop/OSX/Interop.Libraries.cs
../../../external/corefx/src/Common/src/Interop/OSX/Interop.EventStream.cs
../../../external/corefx/src/Common/src/Interop/OSX/Interop.RunLoop.cs
../../../external/corefx/src/Common/src/Interop/OSX/Interop.CoreFoundation.cs
../../../external/corefx/src/Common/src/Interop/Unix/System.Native/Interop.Sync.cs
../../../external/corefx/src/Common/src/Interop/Unix/System.Native/Interop.RealPath.cs
../../../external/corefx/src/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.OSX.cs
../../../external/corefx/src/Common/src/Microsoft/Win32/SafeHandles/SafeCreateHandle.OSX.cs
../../../external/corefx/src/Common/src/Microsoft/Win32/SafeHandles/SafeEventStreamHandle.OSX.cs
@@ -1 +1,2 @@
#include monotouch_System.dll.exclude.sources
@@ -1 +1,2 @@
#include monotouch_System.dll.exclude.sources
+11 -1
View File
@@ -1,6 +1,5 @@
#include common.sources
#include common_networking.sources
#include mono_fsw.sources
Microsoft.CSharp/CSharpCodeGenerator.cs
Microsoft.VisualBasic/VBCodeGenerator.cs
@@ -134,6 +133,17 @@ System.Diagnostics/PerformanceCounterType.cs
System.Diagnostics/TraceSourceInfo.cs
System.Diagnostics/Win32EventLog.cs
System.IO/DefaultWatcher.cs
System.IO/FAMWatcher.cs
System.IO/NullFileWatcher.cs
System.IO/FileAction.cs
System.IO/FileSystemWatcher.cs
System.IO/IFileWatcher.cs
System.IO/KeventWatcher.cs
System.IO/SearchPattern.cs
System.IO/CoreFXFileSystemWatcherProxy.cs
System.IO.Ports/Handshake.cs
System.IO.Ports/ISerialStream.cs
System.IO.Ports/Parity.cs
+1 -3
View File
@@ -93,9 +93,7 @@ RESOURCE_FILES = \
REFERENCE_SOURCES_FLAGS = -d:FEATURE_PAL,GENERICS_WORK,FEATURE_LIST_PREDICATES,FEATURE_SERIALIZATION,FEATURE_ENCODINGNLS,FEATURE_ASCII,FEATURE_LATIN1,FEATURE_UTF7,FEATURE_UTF32,MONO_HYBRID_ENCODING_SUPPORT,FEATURE_ASYNC_IO,NEW_EXPERIMENTAL_ASYNC_IO,FEATURE_UTF32,FEATURE_EXCEPTIONDISPATCHINFO,FEATURE_CORRUPTING_EXCEPTIONS,FEATURE_EXCEPTION_NOTIFICATIONS,FEATURE_STRONGNAME_MIGRATION,FEATURE_USE_LCID,FEATURE_FUSION,FEATURE_CRYPTO,FEATURE_X509_SECURESTRINGS,FEATURE_SYNCHRONIZATIONCONTEXT,FEATURE_SYNCHRONIZATIONCONTEXT_WAIT,FEATURE_DEFAULT_INTERFACES,HAS_CORLIB_CONTRACTS
ifdef NO_SRE
PROFILE_TEST_HARNESS_EXCLUDES := $(PROFILE_TEST_HARNESS_EXCLUDES)SRE,
else
ifndef NO_SRE
LIB_MCS_FLAGS += -d:MONO_FEATURE_SRE
endif
@@ -252,20 +252,18 @@ namespace System.Globalization
if (source.IsEmpty)
return;
var ti = CultureInfo.CurrentCulture.TextInfo;
fixed (char* pSource = &MemoryMarshal.GetReference (source))
fixed (char* pResult = &MemoryMarshal.GetReference (destination)) {
int length = 0;
char* a = pSource, b = pResult;
if (toUpper) {
while (length < source.Length) {
*b++ = ti.ToUpper (*a++);
*b++ = this.ToUpper (*a++);
length++;
}
} else {
while (length < source.Length) {
*b++ = ti.ToLower (*a++);
*b++ = this.ToLower (*a++);
length++;
}
}
@@ -609,8 +609,12 @@ namespace System.IO.IsolatedStorage {
try {
File.Copy (source_full_path, dest_full_path, overwrite);
} catch (IOException) {
throw new IsolatedStorageException ("Operation not allowed.");
}
catch (IOException e) {
throw new IsolatedStorageException ("Operation not allowed.", e);
}
catch (UnauthorizedAccessException e) {
throw new IsolatedStorageException ("Operation not allowed.", e);
}
}
@@ -872,8 +876,12 @@ namespace System.IO.IsolatedStorage {
try {
Directory.Move (src_full_path, dest_full_path);
} catch (IOException) {
throw new IsolatedStorageException ("Operation not allowed.");
}
catch (IOException e) {
throw new IsolatedStorageException ("Operation not allowed.", e);
}
catch (UnauthorizedAccessException e) {
throw new IsolatedStorageException ("Operation not allowed.", e);
}
}
@@ -904,8 +912,8 @@ namespace System.IO.IsolatedStorage {
try {
File.Move (source_full_path, dest_full_path);
} catch (IOException) {
throw new IsolatedStorageException ("Operation not allowed.");
} catch (UnauthorizedAccessException e) {
throw new IsolatedStorageException ("Operation not allowed.", e);
}
}
@@ -402,9 +402,10 @@ namespace System.Reflection.Emit
}
}
[MonoTODO]
public override bool ReflectionOnly {
get { return base.ReflectionOnly; }
get {
return access == (uint)AssemblyBuilderAccess.ReflectionOnly;
}
}
public void AddResourceFile (string name, string fileName)
@@ -27,11 +27,103 @@
//
#if !MONO_FEATURE_SRE
using System.Globalization;
using System.IO;
namespace System.Reflection.Emit
{
public class AssemblyBuilder : Assembly
{
private AssemblyBuilder () {}
public override string CodeBase {
get {
throw new PlatformNotSupportedException ();
}
}
public override MethodInfo EntryPoint {
get {
throw new PlatformNotSupportedException ();
}
}
public override string EscapedCodeBase {
get {
throw new PlatformNotSupportedException ();
}
}
public override System.Security.Policy.Evidence Evidence {
get {
throw new PlatformNotSupportedException ();
}
}
public override string FullName {
get {
throw new PlatformNotSupportedException ();
}
}
public override bool GlobalAssemblyCache {
get {
throw new PlatformNotSupportedException ();
}
}
public override string ImageRuntimeVersion {
get {
throw new PlatformNotSupportedException ();
}
}
public override bool IsDynamic {
get {
throw new PlatformNotSupportedException ();
}
}
public override string Location {
get {
throw new PlatformNotSupportedException ();
}
}
public override Module ManifestModule {
get {
throw new PlatformNotSupportedException ();
}
}
public override bool ReflectionOnly {
get {
throw new PlatformNotSupportedException ();
}
}
public void AddResourceFile (string name, string fileName) => throw new PlatformNotSupportedException ();
public void AddResourceFile (string name, string fileName, ResourceAttributes attribute) => throw new PlatformNotSupportedException ();
public ModuleBuilder DefineDynamicModule (string name, bool emitSymbolInfo) => throw new PlatformNotSupportedException ();
public ModuleBuilder DefineDynamicModule (string name, string fileName) => throw new PlatformNotSupportedException ();
public ModuleBuilder DefineDynamicModule (string name, string fileName, bool emitSymbolInfo) => throw new PlatformNotSupportedException ();
public System.Resources.IResourceWriter DefineResource (string name, string description, string fileName) => throw new PlatformNotSupportedException ();
public System.Resources.IResourceWriter DefineResource (string name, string description, string fileName, ResourceAttributes attribute) => throw new PlatformNotSupportedException ();
public void DefineUnmanagedResource (byte[] resource) => throw new PlatformNotSupportedException ();
public void DefineUnmanagedResource (string resourceFileName) => throw new PlatformNotSupportedException ();
public void DefineVersionInfoResource () => throw new PlatformNotSupportedException ();
public void DefineVersionInfoResource (string product, string productVersion, string company, string copyright, string trademark) => throw new PlatformNotSupportedException ();
public static AssemblyBuilder DefineDynamicAssembly (AssemblyName name, AssemblyBuilderAccess access)
{
throw new PlatformNotSupportedException ();
@@ -47,11 +139,55 @@ namespace System.Reflection.Emit
throw new PlatformNotSupportedException ();
}
public override bool Equals (object obj) => throw new PlatformNotSupportedException ();
public override object[] GetCustomAttributes (bool inherit) => throw new PlatformNotSupportedException ();
public override object[] GetCustomAttributes (System.Type attributeType, bool inherit) => throw new PlatformNotSupportedException ();
public ModuleBuilder GetDynamicModule (string name)
{
throw new PlatformNotSupportedException ();
}
public override Type[] GetExportedTypes () => throw new PlatformNotSupportedException ();
public override FileStream GetFile (string name) => throw new PlatformNotSupportedException ();
public override FileStream[] GetFiles (bool getResourceModules) => throw new PlatformNotSupportedException ();
public override int GetHashCode () => throw new PlatformNotSupportedException ();
public override Module[] GetLoadedModules (bool getResourceModules) => throw new PlatformNotSupportedException ();
public override ManifestResourceInfo GetManifestResourceInfo (string resourceName) => throw new PlatformNotSupportedException ();
public override string[] GetManifestResourceNames () => throw new PlatformNotSupportedException ();
public override Stream GetManifestResourceStream (string name) => throw new PlatformNotSupportedException ();
public override Stream GetManifestResourceStream (Type type, string name) => throw new PlatformNotSupportedException ();
public override Module GetModule (string name) => throw new PlatformNotSupportedException ();
public override Module[] GetModules (bool getResourceModules) => throw new PlatformNotSupportedException ();
public override AssemblyName GetName (bool copiedName) => throw new PlatformNotSupportedException ();
public override AssemblyName[] GetReferencedAssemblies () => throw new PlatformNotSupportedException ();
public override Assembly GetSatelliteAssembly (CultureInfo culture) => throw new PlatformNotSupportedException ();
public override Assembly GetSatelliteAssembly (CultureInfo culture, Version version) => throw new PlatformNotSupportedException ();
public override Type GetType (string name, bool throwOnError, bool ignoreCase) => throw new PlatformNotSupportedException ();
public override bool IsDefined (Type attributeType, bool inherit) => throw new PlatformNotSupportedException ();
public void Save (string assemblyFileName) => throw new PlatformNotSupportedException ();
public void Save (string assemblyFileName, PortableExecutableKinds portableExecutableKind, ImageFileMachine imageFileMachine) => throw new PlatformNotSupportedException ();
public void SetCustomAttribute (CustomAttributeBuilder customBuilder)
{
throw new PlatformNotSupportedException ();
@@ -64,6 +200,10 @@ namespace System.Reflection.Emit
}
public void SetEntryPoint (MethodInfo entryMethod) => throw new PlatformNotSupportedException ();
public void SetEntryPoint (MethodInfo entryMethod, PEFileKinds fileKind) => throw new PlatformNotSupportedException ();
public override string ToString () => throw new PlatformNotSupportedException ();
}
}
@@ -36,6 +36,8 @@ namespace System.Reflection.Emit
{
public class ConstructorBuilder : ConstructorInfo
{
internal ConstructorBuilder () {}
public bool InitLocals { get; set; }
public override MethodAttributes Attributes {
@@ -44,18 +46,37 @@ namespace System.Reflection.Emit
}
}
public override CallingConventions CallingConvention {
get {
throw new PlatformNotSupportedException ();
}
}
public override Type DeclaringType {
get {
throw new PlatformNotSupportedException ();
}
}
public override Module Module {
get {
throw new PlatformNotSupportedException ();
}
}
public override string Name {
get {
throw new PlatformNotSupportedException ();
}
}
[Obsolete]
public Type ReturnType {
get {
throw new PlatformNotSupportedException ();
}
}
public ParameterBuilder DefineParameter (int iSequence, ParameterAttributes attributes, string strParamName)
{
throw new PlatformNotSupportedException ();
@@ -98,6 +119,7 @@ namespace System.Reflection.Emit
IEnumerable<ExceptionHandler> exceptionHandlers, IEnumerable<int> tokenFixups) =>
throw new PlatformNotSupportedException ();
public void AddDeclarativeSecurity (System.Security.Permissions.SecurityAction action, System.Security.PermissionSet pset) { throw new PlatformNotSupportedException (); }
public override System.Reflection.MethodImplAttributes GetMethodImplementationFlags() { throw new PlatformNotSupportedException (); }
public override System.RuntimeMethodHandle MethodHandle { get { throw new PlatformNotSupportedException (); } }
public override object Invoke(System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object[] parameters, System.Globalization.CultureInfo culture) { throw new PlatformNotSupportedException (); }
@@ -106,6 +128,8 @@ namespace System.Reflection.Emit
public override object[] GetCustomAttributes(System.Type attributeType, bool inherit) { throw new PlatformNotSupportedException (); }
public override System.Type ReflectedType { get { throw new PlatformNotSupportedException (); } }
public override object Invoke(object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object[] parameters, System.Globalization.CultureInfo culture) { throw new PlatformNotSupportedException (); }
public void SetSymCustomAttribute (string name, byte[] data) { throw new PlatformNotSupportedException (); }
public override string ToString () { throw new PlatformNotSupportedException (); }
}
}
@@ -94,10 +94,10 @@ namespace System.Reflection.Emit
public bool InitLocals { get; set; }
public override MethodImplAttributes MethodImplementationFlags {
public override Module Module {
get {
throw new PlatformNotSupportedException ();
}
}
}
public override string Name {
@@ -137,6 +137,9 @@ namespace System.Reflection.Emit
public override Type ReflectedType { get { throw new PlatformNotSupportedException (); } }
public override ICustomAttributeProvider ReturnTypeCustomAttributes { get { throw new PlatformNotSupportedException (); } }
public override sealed Delegate CreateDelegate (Type delegateType) { throw new PlatformNotSupportedException (); }
public override sealed Delegate CreateDelegate (Type delegateType, object target) { throw new PlatformNotSupportedException (); }
public override object[] GetCustomAttributes (bool inherit) { throw new PlatformNotSupportedException (); }
public override object[] GetCustomAttributes (Type attributeType, bool inherit) { throw new PlatformNotSupportedException (); }
public override MethodImplAttributes GetMethodImplementationFlags () { throw new PlatformNotSupportedException (); }
@@ -148,6 +151,8 @@ namespace System.Reflection.Emit
public ParameterBuilder DefineParameter (int position, ParameterAttributes attributes, string parameterName) => throw new PlatformNotSupportedException ();
public DynamicILInfo GetDynamicILInfo () => throw new PlatformNotSupportedException ();
public override string ToString () => throw new PlatformNotSupportedException ();
}
}
@@ -39,11 +39,8 @@ namespace System.Reflection.Emit
public override System.Type DeclaringType { get { throw new PlatformNotSupportedException (); } }
public override string FullName { get { throw new PlatformNotSupportedException (); } }
public override System.Guid GUID { get { throw new PlatformNotSupportedException (); } }
public override bool IsByRefLike { get { throw new PlatformNotSupportedException (); } }
public override bool IsConstructedGenericType { get { throw new PlatformNotSupportedException (); } }
public override bool IsSZArray { get { throw new PlatformNotSupportedException (); } }
public override bool IsTypeDefinition { get { throw new PlatformNotSupportedException (); } }
public override bool IsVariableBoundArray { get { throw new PlatformNotSupportedException (); } }
public override System.Reflection.Module Module { get { throw new PlatformNotSupportedException (); } }
public override string Name { get { throw new PlatformNotSupportedException (); } }
public override string Namespace { get { throw new PlatformNotSupportedException (); } }
@@ -81,6 +78,7 @@ namespace System.Reflection.Emit
protected override bool HasElementTypeImpl() { throw new PlatformNotSupportedException (); }
public override object InvokeMember(string name, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object target, object[] args, System.Reflection.ParameterModifier[] modifiers, System.Globalization.CultureInfo culture, string[] namedParameters) { throw new PlatformNotSupportedException (); }
protected override bool IsArrayImpl() { throw new PlatformNotSupportedException (); }
public override bool IsAssignableFrom (System.Reflection.TypeInfo typeInfo) { throw new PlatformNotSupportedException (); }
protected override bool IsByRefImpl() { throw new PlatformNotSupportedException (); }
protected override bool IsCOMObjectImpl() { throw new PlatformNotSupportedException (); }
public override bool IsDefined(System.Type attributeType, bool inherit) { throw new PlatformNotSupportedException (); }
@@ -32,6 +32,8 @@ namespace System.Reflection.Emit
{
public class EventBuilder
{
private EventBuilder () {}
public void AddOtherMethod (MethodBuilder mdBuilder)
{
throw new PlatformNotSupportedException ();
@@ -44,9 +44,13 @@ namespace System.Reflection.Emit
public System.Reflection.Emit.FieldToken GetToken() { throw null; }
public override object GetValue(object obj) { throw null; }
public override bool IsDefined(System.Type attributeType, bool inherit) { throw null; }
public override int MetadataToken { get { throw new PlatformNotSupportedException (); } }
public override Module Module { get { throw new PlatformNotSupportedException (); } }
public void SetConstant(object defaultValue) { throw new PlatformNotSupportedException (); }
public void SetCustomAttribute(System.Reflection.ConstructorInfo con, byte[] binaryAttribute) { throw new PlatformNotSupportedException (); }
public void SetCustomAttribute(System.Reflection.Emit.CustomAttributeBuilder customBuilder) { throw new PlatformNotSupportedException (); }
[Obsolete ("An alternate API is available: Emit the MarshalAs custom attribute instead.")]
public void SetMarshal (UnmanagedMarshal unmanagedMarshal) { throw new PlatformNotSupportedException (); }
public void SetOffset(int iOffset) { throw new PlatformNotSupportedException (); }
public override void SetValue(object obj, object val, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Globalization.CultureInfo culture) { throw new PlatformNotSupportedException (); }
}
@@ -43,14 +43,9 @@ namespace System.Reflection.Emit
public override System.Reflection.GenericParameterAttributes GenericParameterAttributes { get { throw new PlatformNotSupportedException (); } }
public override int GenericParameterPosition { get { throw new PlatformNotSupportedException (); } }
public override System.Guid GUID { get { throw new PlatformNotSupportedException (); } }
public override bool IsByRefLike { get { throw new PlatformNotSupportedException (); } }
public override bool IsConstructedGenericType { get { throw new PlatformNotSupportedException (); } }
public override bool IsGenericParameter { get { throw new PlatformNotSupportedException (); } }
public override bool IsGenericType { get { throw new PlatformNotSupportedException (); } }
public override bool IsGenericTypeDefinition { get { throw new PlatformNotSupportedException (); } }
public override bool IsSZArray { get { throw new PlatformNotSupportedException (); } }
public override bool IsTypeDefinition { get { throw new PlatformNotSupportedException (); } }
public override bool IsVariableBoundArray { get { throw new PlatformNotSupportedException (); } }
public override System.Reflection.Module Module { get { throw new PlatformNotSupportedException (); } }
public override string Name { get { throw new PlatformNotSupportedException (); } }
public override string Namespace { get { throw new PlatformNotSupportedException (); } }
@@ -70,6 +65,7 @@ namespace System.Reflection.Emit
public override System.Reflection.FieldInfo GetField(string name, System.Reflection.BindingFlags bindingAttr) { throw new PlatformNotSupportedException (); }
public override System.Reflection.FieldInfo[] GetFields(System.Reflection.BindingFlags bindingAttr) { throw new PlatformNotSupportedException (); }
public override System.Type[] GetGenericArguments() { throw new PlatformNotSupportedException (); }
public override System.Type[] GetGenericParameterConstraints () { throw new PlatformNotSupportedException (); }
public override System.Type GetGenericTypeDefinition() { throw new PlatformNotSupportedException (); }
public override int GetHashCode() { throw new PlatformNotSupportedException (); }
public override System.Type GetInterface(string name, bool ignoreCase) { throw new PlatformNotSupportedException (); }
@@ -87,9 +83,11 @@ namespace System.Reflection.Emit
public override object InvokeMember(string name, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object target, object[] args, System.Reflection.ParameterModifier[] modifiers, System.Globalization.CultureInfo culture, string[] namedParameters) { throw new PlatformNotSupportedException (); }
protected override bool IsArrayImpl() { throw new PlatformNotSupportedException (); }
public override bool IsAssignableFrom(System.Type c) { throw new PlatformNotSupportedException (); }
public override bool IsAssignableFrom (TypeInfo typeInfo) { throw new PlatformNotSupportedException (); }
protected override bool IsByRefImpl() { throw new PlatformNotSupportedException (); }
protected override bool IsCOMObjectImpl() { throw new PlatformNotSupportedException (); }
public override bool IsDefined(System.Type attributeType, bool inherit) { throw new PlatformNotSupportedException (); }
public override bool IsInstanceOfType (object o) { throw new PlatformNotSupportedException (); }
protected override bool IsPointerImpl() { throw new PlatformNotSupportedException (); }
protected override bool IsPrimitiveImpl() { throw new PlatformNotSupportedException (); }
public override bool IsSubclassOf(System.Type c) { throw new PlatformNotSupportedException (); }
@@ -38,7 +38,7 @@ namespace System.Reflection.Emit
{
}
public int ILOffset {
public virtual int ILOffset {
get {
throw new PlatformNotSupportedException ();
}
@@ -217,6 +217,11 @@ namespace System.Reflection.Emit
throw new PlatformNotSupportedException ();
}
public virtual void MarkSequencePoint (System.Diagnostics.SymbolStore.ISymbolDocumentWriter document, int startLine, int startColumn, int endLine, int endColumn)
{
throw new PlatformNotSupportedException ();
}
public virtual void ThrowException (Type excType)
{
throw new PlatformNotSupportedException ();
@@ -41,7 +41,6 @@ namespace System.Reflection.Emit
public override bool ContainsGenericParameters { get { throw new PlatformNotSupportedException (); } }
public override System.Type DeclaringType { get { throw new PlatformNotSupportedException (); } }
public bool InitLocals { get { throw new PlatformNotSupportedException (); } set { throw new PlatformNotSupportedException (); } }
public override bool IsConstructedGenericMethod { get { throw new PlatformNotSupportedException (); } }
public override bool IsGenericMethod { get { throw new PlatformNotSupportedException (); } }
public override bool IsGenericMethodDefinition { get { throw new PlatformNotSupportedException (); } }
public override System.RuntimeMethodHandle MethodHandle { get { throw new PlatformNotSupportedException (); } }
@@ -52,6 +51,8 @@ namespace System.Reflection.Emit
public override System.Type ReturnType { get { throw new PlatformNotSupportedException (); } }
public override System.Reflection.ICustomAttributeProvider ReturnTypeCustomAttributes { get { throw new PlatformNotSupportedException (); } }
public string Signature { get { throw new PlatformNotSupportedException (); } }
public void AddDeclarativeSecurity (System.Security.Permissions.SecurityAction action, System.Security.PermissionSet pset) { throw new PlatformNotSupportedException (); }
public void CreateMethodBody(byte[] il, int count) { throw new PlatformNotSupportedException (); }
public System.Reflection.Emit.GenericTypeParameterBuilder[] DefineGenericParameters(params string[] names) { throw new PlatformNotSupportedException (); }
public System.Reflection.Emit.ParameterBuilder DefineParameter(int position, System.Reflection.ParameterAttributes attributes, string strParamName) { throw new PlatformNotSupportedException (); }
@@ -74,10 +75,13 @@ namespace System.Reflection.Emit
public void SetCustomAttribute(System.Reflection.ConstructorInfo con, byte[] binaryAttribute) { throw new PlatformNotSupportedException (); }
public void SetCustomAttribute(System.Reflection.Emit.CustomAttributeBuilder customBuilder) { throw new PlatformNotSupportedException (); }
public void SetImplementationFlags(System.Reflection.MethodImplAttributes attributes) { throw new PlatformNotSupportedException (); }
[Obsolete ("An alternate API is available: Emit the MarshalAs custom attribute instead.")]
public void SetMarshal (UnmanagedMarshal unmanagedMarshal) { throw new PlatformNotSupportedException (); }
public void SetMethodBody(byte[] il, int maxStack, byte[] localSignature, System.Collections.Generic.IEnumerable<System.Reflection.Emit.ExceptionHandler> exceptionHandlers, System.Collections.Generic.IEnumerable<int> tokenFixups) { throw new PlatformNotSupportedException (); }
public void SetParameters(params System.Type[] parameterTypes) { throw new PlatformNotSupportedException (); }
public void SetReturnType(System.Type returnType) { throw new PlatformNotSupportedException (); }
public void SetSignature(System.Type returnType, System.Type[] returnTypeRequiredCustomModifiers, System.Type[] returnTypeOptionalCustomModifiers, System.Type[] parameterTypes, System.Type[][] parameterTypeRequiredCustomModifiers, System.Type[][] parameterTypeOptionalCustomModifiers) { throw new PlatformNotSupportedException (); }
public void SetSymCustomAttribute (string name, byte[] data) { throw new PlatformNotSupportedException (); }
public override string ToString() { throw new PlatformNotSupportedException (); }
}
}
@@ -0,0 +1,25 @@
#if !MONO_FEATURE_SRE
using System.Runtime.InteropServices;
namespace System.Reflection.Emit {
public partial class MethodRental : _MethodRental {
private MethodRental () {}
public const int JitImmediate = 1;
public const int JitOnDemand = 0;
public static void SwapMethodBody (Type cls, int methodtoken, IntPtr rgIL, int methodSize, int flags) => throw new PlatformNotSupportedException ();
void _MethodRental.GetIDsOfNames ([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId) => throw new PlatformNotSupportedException ();
void _MethodRental.GetTypeInfo (uint iTInfo, uint lcid, IntPtr ppTInfo) => throw new PlatformNotSupportedException ();
void _MethodRental.GetTypeInfoCount (out uint pcTInfo) => throw new PlatformNotSupportedException ();
void _MethodRental.Invoke (uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr) => throw new PlatformNotSupportedException ();
}
}
#endif
@@ -35,15 +35,24 @@ namespace System.Reflection.Emit
internal ModuleBuilder() => throw new PlatformNotSupportedException();
public override System.Reflection.Assembly Assembly { get { throw new PlatformNotSupportedException(); } }
public override string FullyQualifiedName { get { throw new PlatformNotSupportedException(); } }
public override int MetadataToken { get { throw new PlatformNotSupportedException(); } }
public override System.Guid ModuleVersionId { get { throw new PlatformNotSupportedException(); } }
public override string Name { get { throw new PlatformNotSupportedException(); } }
public override string ScopeName { get { throw new PlatformNotSupportedException(); } }
public void CreateGlobalFunctions() => throw new PlatformNotSupportedException();
public System.Diagnostics.SymbolStore.ISymbolDocumentWriter DefineDocument (string url, System.Guid language, System.Guid languageVendor, System.Guid documentType) => throw new PlatformNotSupportedException ();
public System.Reflection.Emit.EnumBuilder DefineEnum(string name, System.Reflection.TypeAttributes visibility, System.Type underlyingType) { throw new PlatformNotSupportedException(); }
public System.Reflection.Emit.MethodBuilder DefineGlobalMethod(string name, System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type returnType, System.Type[] parameterTypes) { throw new PlatformNotSupportedException(); }
public System.Reflection.Emit.MethodBuilder DefineGlobalMethod(string name, System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type returnType, System.Type[] requiredReturnTypeCustomModifiers, System.Type[] optionalReturnTypeCustomModifiers, System.Type[] parameterTypes, System.Type[][] requiredParameterTypeCustomModifiers, System.Type[][] optionalParameterTypeCustomModifiers) { throw new PlatformNotSupportedException(); }
public System.Reflection.Emit.MethodBuilder DefineGlobalMethod(string name, System.Reflection.MethodAttributes attributes, System.Type returnType, System.Type[] parameterTypes) { throw new PlatformNotSupportedException(); }
public System.Reflection.Emit.FieldBuilder DefineInitializedData(string name, byte[] data, System.Reflection.FieldAttributes attributes) { throw new PlatformNotSupportedException(); }
public void DefineManifestResource (string name, System.IO.Stream stream, System.Reflection.ResourceAttributes attribute) => throw new PlatformNotSupportedException ();
public System.Reflection.Emit.MethodBuilder DefinePInvokeMethod(string name, string dllName, System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type returnType, System.Type[] parameterTypes, System.Runtime.InteropServices.CallingConvention nativeCallConv, System.Runtime.InteropServices.CharSet nativeCharSet) { throw new PlatformNotSupportedException(); }
public System.Reflection.Emit.MethodBuilder DefinePInvokeMethod(string name, string dllName, string entryName, System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type returnType, System.Type[] parameterTypes, System.Runtime.InteropServices.CallingConvention nativeCallConv, System.Runtime.InteropServices.CharSet nativeCharSet) { throw new PlatformNotSupportedException(); }
public System.Resources.IResourceWriter DefineResource (string name, string description) => throw new PlatformNotSupportedException ();
public System.Resources.IResourceWriter DefineResource (string name, string description, System.Reflection.ResourceAttributes attribute) => throw new PlatformNotSupportedException ();
public void DefineUnmanagedResource (byte[] resource) => throw new PlatformNotSupportedException ();
public void DefineUnmanagedResource (string resourceFileName) => throw new PlatformNotSupportedException ();
public System.Reflection.Emit.TypeBuilder DefineType(string name) { throw new PlatformNotSupportedException(); }
public System.Reflection.Emit.TypeBuilder DefineType(string name, System.Reflection.TypeAttributes attr) { throw new PlatformNotSupportedException(); }
public System.Reflection.Emit.TypeBuilder DefineType(string name, System.Reflection.TypeAttributes attr, System.Type parent) { throw new PlatformNotSupportedException(); }
@@ -57,18 +66,38 @@ namespace System.Reflection.Emit
public System.Reflection.Emit.MethodToken GetArrayMethodToken(System.Type arrayClass, string methodName, System.Reflection.CallingConventions callingConvention, System.Type returnType, System.Type[] parameterTypes) { throw new PlatformNotSupportedException(); }
public System.Reflection.Emit.MethodToken GetConstructorToken(System.Reflection.ConstructorInfo con) { throw new PlatformNotSupportedException(); }
public System.Reflection.Emit.MethodToken GetConstructorToken(System.Reflection.ConstructorInfo constructor, System.Collections.Generic.IEnumerable<System.Type> optionalParameterTypes) { throw new PlatformNotSupportedException(); }
public override object[] GetCustomAttributes (bool inherit) { throw new PlatformNotSupportedException(); }
public override object[] GetCustomAttributes (System.Type attributeType, bool inherit) { throw new PlatformNotSupportedException(); }
public override System.Reflection.FieldInfo GetField (string name, System.Reflection.BindingFlags bindingAttr) { throw new PlatformNotSupportedException(); }
public override System.Reflection.FieldInfo[] GetFields (System.Reflection.BindingFlags bindingFlags) { throw new PlatformNotSupportedException(); }
public System.Reflection.Emit.FieldToken GetFieldToken(System.Reflection.FieldInfo field) { throw new PlatformNotSupportedException(); }
public override int GetHashCode() { throw new PlatformNotSupportedException(); }
protected override System.Reflection.MethodInfo GetMethodImpl (string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConvention, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) { throw new PlatformNotSupportedException(); }
public override System.Reflection.MethodInfo[] GetMethods (System.Reflection.BindingFlags bindingFlags) { throw new PlatformNotSupportedException(); }
public System.Reflection.Emit.MethodToken GetMethodToken(System.Reflection.MethodInfo method) { throw new PlatformNotSupportedException(); }
public System.Reflection.Emit.MethodToken GetMethodToken(System.Reflection.MethodInfo method, System.Collections.Generic.IEnumerable<System.Type> optionalParameterTypes) { throw new PlatformNotSupportedException(); }
public System.Reflection.Emit.SignatureToken GetSignatureToken(byte[] sigBytes, int sigLength) { throw new PlatformNotSupportedException(); }
public System.Reflection.Emit.SignatureToken GetSignatureToken(System.Reflection.Emit.SignatureHelper sigHelper) { throw new PlatformNotSupportedException(); }
public System.Reflection.Emit.StringToken GetStringConstant(string str) { throw new PlatformNotSupportedException(); }
public System.Diagnostics.SymbolStore.ISymbolWriter GetSymWriter () => throw new PlatformNotSupportedException ();
public override System.Type GetType (string className) { throw new PlatformNotSupportedException(); }
public override System.Type GetType (string className, bool ignoreCase) { throw new PlatformNotSupportedException(); }
public override System.Type GetType (string className, bool throwOnError, bool ignoreCase) { throw new PlatformNotSupportedException(); }
public override System.Type[] GetTypes () { throw new PlatformNotSupportedException(); }
public System.Reflection.Emit.TypeToken GetTypeToken(string name) { throw new PlatformNotSupportedException(); }
public System.Reflection.Emit.TypeToken GetTypeToken(System.Type type) { throw new PlatformNotSupportedException(); }
public override bool IsDefined (System.Type attributeType, bool inherit) { throw new PlatformNotSupportedException(); }
public override bool IsResource () { throw new PlatformNotSupportedException(); }
public bool IsTransient() { throw new PlatformNotSupportedException(); }
public override System.Reflection.FieldInfo ResolveField (int metadataToken, System.Type[] genericTypeArguments, System.Type[] genericMethodArguments) { throw new PlatformNotSupportedException(); }
public override System.Reflection.MemberInfo ResolveMember (int metadataToken, System.Type[] genericTypeArguments, System.Type[] genericMethodArguments) { throw new PlatformNotSupportedException(); }
public override System.Reflection.MethodBase ResolveMethod (int metadataToken, System.Type[] genericTypeArguments, System.Type[] genericMethodArguments) { throw new PlatformNotSupportedException(); }
public override byte[] ResolveSignature (int metadataToken) { throw new PlatformNotSupportedException(); }
public override string ResolveString (int metadataToken) { throw new PlatformNotSupportedException(); }
public override System.Type ResolveType (int metadataToken, System.Type[] genericTypeArguments, System.Type[] genericMethodArguments) { throw new PlatformNotSupportedException(); }
public void SetCustomAttribute(System.Reflection.ConstructorInfo con, byte[] binaryAttribute) => throw new PlatformNotSupportedException();
public void SetCustomAttribute(System.Reflection.Emit.CustomAttributeBuilder customBuilder) => throw new PlatformNotSupportedException();
public void SetSymCustomAttribute (string name, byte[] data) => throw new PlatformNotSupportedException ();
public void SetUserEntryPoint(System.Reflection.MethodInfo entryPoint) => throw new PlatformNotSupportedException();
}
@@ -36,7 +36,7 @@ namespace System.Reflection.Emit
{
}
public int Attributes {
public virtual int Attributes {
get {
throw new PlatformNotSupportedException ();
}
@@ -60,13 +60,13 @@ namespace System.Reflection.Emit
}
}
public string Name {
public virtual string Name {
get {
throw new PlatformNotSupportedException ();
}
}
public int Position {
public virtual int Position {
get {
throw new PlatformNotSupportedException ();
}
@@ -87,6 +87,9 @@ namespace System.Reflection.Emit
throw new PlatformNotSupportedException ();
}
[Obsolete ("An alternate API is available: Emit the MarshalAs custom attribute instead.")]
public virtual void SetMarshal (UnmanagedMarshal unmanagedMarshal) => throw new PlatformNotSupportedException ();
public virtual ParameterToken GetToken() => throw new PlatformNotSupportedException ();
}
}
@@ -32,7 +32,7 @@ using System.Runtime.InteropServices;
namespace System.Reflection.Emit
{
public class SignatureHelper
public class SignatureHelper : _SignatureHelper
{
SignatureHelper ()
{
@@ -118,6 +118,18 @@ namespace System.Reflection.Emit
public static SignatureHelper GetMethodSigHelper (CallingConvention unmanagedCallingConvention, Type returnType) =>
throw new PlatformNotSupportedException ();
public override bool Equals (object obj) => throw new PlatformNotSupportedException ();
public override int GetHashCode () => throw new PlatformNotSupportedException ();
public override string ToString () => throw new PlatformNotSupportedException ();
void _SignatureHelper.GetIDsOfNames ([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId) => throw new PlatformNotSupportedException ();
void _SignatureHelper.GetTypeInfo (uint iTInfo, uint lcid, IntPtr ppTInfo) => throw new PlatformNotSupportedException ();
void _SignatureHelper.GetTypeInfoCount (out uint pcTInfo) => throw new PlatformNotSupportedException ();
void _SignatureHelper.Invoke (uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr) => throw new PlatformNotSupportedException ();
}
}
@@ -39,23 +39,18 @@ namespace System.Reflection.Emit
public override System.Reflection.Assembly Assembly { get { throw new PlatformNotSupportedException (); } }
public override string AssemblyQualifiedName { get { throw new PlatformNotSupportedException (); } }
public override System.Type BaseType { get { throw new PlatformNotSupportedException (); } }
public override bool ContainsGenericParameters { get { throw new PlatformNotSupportedException (); } }
public override System.Reflection.MethodBase DeclaringMethod { get { throw new PlatformNotSupportedException (); } }
public override System.Type DeclaringType { get { throw new PlatformNotSupportedException (); } }
public override string FullName { get { throw new PlatformNotSupportedException (); } }
public override System.Reflection.GenericParameterAttributes GenericParameterAttributes { get { throw new PlatformNotSupportedException (); } }
public override int GenericParameterPosition { get { throw new PlatformNotSupportedException (); } }
public override System.Guid GUID { get { throw new PlatformNotSupportedException (); } }
public override bool IsByRefLike { get { throw new PlatformNotSupportedException (); } }
public override bool IsConstructedGenericType { get { throw new PlatformNotSupportedException (); } }
public override bool IsGenericParameter { get { throw new PlatformNotSupportedException (); } }
public override bool IsGenericType { get { throw new PlatformNotSupportedException (); } }
public override bool IsGenericTypeDefinition { get { throw new PlatformNotSupportedException (); } }
public override bool IsSecurityCritical { get { throw new PlatformNotSupportedException (); } }
public override bool IsSecuritySafeCritical { get { throw new PlatformNotSupportedException (); } }
public override bool IsSecurityTransparent { get { throw new PlatformNotSupportedException (); } }
public override bool IsSZArray { get { throw new PlatformNotSupportedException (); } }
public override bool IsTypeDefinition { get { throw new PlatformNotSupportedException (); } }
public override bool IsVariableBoundArray { get { throw new PlatformNotSupportedException (); } }
public override System.Reflection.Module Module { get { throw new PlatformNotSupportedException (); } }
public override string Name { get { throw new PlatformNotSupportedException (); } }
public override string Namespace { get { throw new PlatformNotSupportedException (); } }
@@ -65,6 +60,8 @@ namespace System.Reflection.Emit
public override System.RuntimeTypeHandle TypeHandle { get { throw new PlatformNotSupportedException (); } }
public System.Reflection.Emit.TypeToken TypeToken { get { throw new PlatformNotSupportedException (); } }
public override System.Type UnderlyingSystemType { get { throw new PlatformNotSupportedException (); } }
public void AddDeclarativeSecurity (System.Security.Permissions.SecurityAction action, System.Security.PermissionSet pset) { throw new PlatformNotSupportedException (); }
public void AddInterfaceImplementation(System.Type interfaceType) { throw new PlatformNotSupportedException (); }
public System.Type CreateType() { throw new PlatformNotSupportedException (); }
public System.Reflection.TypeInfo CreateTypeInfo() { throw new PlatformNotSupportedException (); }
@@ -128,7 +125,8 @@ namespace System.Reflection.Emit
protected override bool HasElementTypeImpl() { throw new PlatformNotSupportedException (); }
public override object InvokeMember(string name, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object target, object[] args, System.Reflection.ParameterModifier[] modifiers, System.Globalization.CultureInfo culture, string[] namedParameters) { throw new PlatformNotSupportedException (); }
protected override bool IsArrayImpl() { throw new PlatformNotSupportedException (); }
public override bool IsAssignableFrom(System.Type c) { throw new PlatformNotSupportedException (); }
public override bool IsAssignableFrom (System.Type c) { throw new PlatformNotSupportedException (); }
public override bool IsAssignableFrom (TypeInfo typeInfo) { throw new PlatformNotSupportedException (); }
protected override bool IsByRefImpl() { throw new PlatformNotSupportedException (); }
protected override bool IsCOMObjectImpl() { throw new PlatformNotSupportedException (); }
public bool IsCreated() { throw new PlatformNotSupportedException (); }
@@ -136,6 +134,7 @@ namespace System.Reflection.Emit
protected override bool IsPointerImpl() { throw new PlatformNotSupportedException (); }
protected override bool IsPrimitiveImpl() { throw new PlatformNotSupportedException (); }
public override bool IsSubclassOf(System.Type c) { throw new PlatformNotSupportedException (); }
protected override bool IsValueTypeImpl () { throw new PlatformNotSupportedException (); }
public override System.Type MakeArrayType() { throw new PlatformNotSupportedException (); }
public override System.Type MakeArrayType(int rank) { throw new PlatformNotSupportedException (); }
public override System.Type MakeByRefType() { throw new PlatformNotSupportedException (); }
@@ -0,0 +1,26 @@
#if !MONO_FEATURE_SRE
using System.Runtime.InteropServices;
namespace System.Reflection.Emit {
[Obsolete ("An alternate API is available: Emit the MarshalAs custom attribute instead.")]
[ComVisible (true)]
[Serializable]
[StructLayout (LayoutKind.Sequential)]
public sealed class UnmanagedMarshal {
private UnmanagedMarshal () {}
public UnmanagedType BaseType { get { throw new PlatformNotSupportedException (); } }
public int ElementCount { get { throw new PlatformNotSupportedException (); } }
public UnmanagedType GetUnmanagedType { get { throw new PlatformNotSupportedException (); } }
public System.Guid IIDGuid { get { throw new PlatformNotSupportedException (); } }
public static UnmanagedMarshal DefineByValArray (int elemCount) => throw new PlatformNotSupportedException ();
public static UnmanagedMarshal DefineByValTStr (int elemCount) => throw new PlatformNotSupportedException ();
public static UnmanagedMarshal DefineLPArray (UnmanagedType elemType) => throw new PlatformNotSupportedException ();
public static UnmanagedMarshal DefineUnmanagedMarshal (UnmanagedType unmanagedType) => throw new PlatformNotSupportedException ();
}
}
#endif
@@ -30,7 +30,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !FULL_AOT_RUNTIME
#if !FULL_AOT_RUNTIME && !MONOTOUCH
using System.Reflection;
using System.Reflection.Emit;
@@ -30,7 +30,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !FULL_AOT_RUNTIME
#if !FULL_AOT_RUNTIME && !MONOTOUCH
namespace System.Runtime.InteropServices {
[ComVisible (true)]
@@ -30,7 +30,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !FULL_AOT_RUNTIME
#if !FULL_AOT_RUNTIME && !MONOTOUCH
using System.Reflection;
namespace System.Runtime.InteropServices {
@@ -30,7 +30,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !FULL_AOT_RUNTIME
#if !FULL_AOT_RUNTIME && !MONOTOUCH
using System.Reflection;
namespace System.Runtime.InteropServices {
@@ -391,7 +391,7 @@ namespace System.Runtime.InteropServices
FreeHGlobal (s);
}
#if !FULL_AOT_RUNTIME
#if !FULL_AOT_RUNTIME && !MONOTOUCH
public static Guid GenerateGuidForType (Type type)
{
return type.GUID;
@@ -438,7 +438,7 @@ namespace System.Runtime.InteropServices
return GetCCW (o, T);
}
#endif
#endif // !FULL_AOT_RUNTIME
#endif // !FULL_AOT_RUNTIME && !MONOTOUCH
public static IntPtr GetComInterfaceForObject (object o, Type T)
{
@@ -463,7 +463,7 @@ namespace System.Runtime.InteropServices
return GetComInterfaceForObject ((object)o, typeof (T));
}
#if !FULL_AOT_RUNTIME && !NETCORE
#if !FULL_AOT_RUNTIME && !NETCORE && !MONOTOUCH
public static IntPtr GetComInterfaceForObjectInContext (object o, Type t)
{
@@ -518,7 +518,7 @@ namespace System.Runtime.InteropServices
return (IntPtr)(-1);
}
#else
#elif !MONOTOUCH
public static IntPtr GetHINSTANCE (Module m) => throw new PlatformNotSupportedException();
public static IntPtr GetIDispatchForObject (object o) => throw new PlatformNotSupportedException();
public static object GetTypedObjectForIUnknown (IntPtr pUnk, Type t) => throw new PlatformNotSupportedException();
@@ -556,7 +556,7 @@ namespace System.Runtime.InteropServices
#endif
}
#if !FULL_AOT_RUNTIME
#if !FULL_AOT_RUNTIME && !MONOTOUCH
[MethodImplAttribute (MethodImplOptions.InternalCall)]
private extern static IntPtr GetIDispatchForObjectInternal (object o);
@@ -606,7 +606,7 @@ namespace System.Runtime.InteropServices
public static IntPtr GetIUnknownForObject (object o)
{
#if FULL_AOT_RUNTIME
#if FULL_AOT_RUNTIME || MONOTOUCH
throw new PlatformNotSupportedException ();
#else
IntPtr pUnk = GetIUnknownForObjectInternal (o);
@@ -711,7 +711,7 @@ namespace System.Runtime.InteropServices
#endif
}
#if !FULL_AOT_RUNTIME
#if !FULL_AOT_RUNTIME && !MONOTOUCH
#if !NETCORE
@@ -1134,7 +1134,7 @@ namespace System.Runtime.InteropServices
#endif
}
#if !FULL_AOT_RUNTIME
#if !FULL_AOT_RUNTIME && !MONOTOUCH
[Obsolete]
public static void ReleaseThreadCache()
@@ -28,7 +28,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !FULL_AOT_RUNTIME
#if !FULL_AOT_RUNTIME && !MONOTOUCH
using System;
using System.Reflection;
using System.Reflection.Emit;
@@ -30,7 +30,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !FULL_AOT_RUNTIME
#if !FULL_AOT_RUNTIME && !MONOTOUCH
namespace System.Runtime.InteropServices
{
[ComVisible(true)]
@@ -28,7 +28,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !FULL_AOT_RUNTIME
#if !FULL_AOT_RUNTIME && !MONOTOUCH
using System;
namespace System.Runtime.InteropServices
@@ -28,7 +28,7 @@
//
// (C) 2002 Ximian, Inc.
#if !FULL_AOT_RUNTIME
#if !FULL_AOT_RUNTIME && !MONOTOUCH
namespace System.Runtime.InteropServices
{
[Obsolete]
@@ -28,7 +28,7 @@
//
// (C) 2002 Ximian, Inc.
#if !FULL_AOT_RUNTIME
#if !FULL_AOT_RUNTIME && !MONOTOUCH
namespace System.Runtime.InteropServices
{
[Obsolete]
@@ -27,7 +27,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !FULL_AOT_RUNTIME
#if !FULL_AOT_RUNTIME && !MONOTOUCH
using System.Reflection.Emit;
namespace System.Runtime.InteropServices {
@@ -27,7 +27,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !FULL_AOT_RUNTIME
#if !FULL_AOT_RUNTIME && !MONOTOUCH
using System.Reflection.Emit;
namespace System.Runtime.InteropServices {
@@ -27,7 +27,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !FULL_AOT_RUNTIME
#if !FULL_AOT_RUNTIME && !MONOTOUCH
using System.Reflection.Emit;
namespace System.Runtime.InteropServices {
@@ -27,7 +27,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !FULL_AOT_RUNTIME
#if !FULL_AOT_RUNTIME && !MONOTOUCH
using System.Reflection.Emit;
namespace System.Runtime.InteropServices {
@@ -27,7 +27,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !FULL_AOT_RUNTIME
#if !FULL_AOT_RUNTIME && !MONOTOUCH
using System.Reflection.Emit;
namespace System.Runtime.InteropServices {
@@ -27,7 +27,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !FULL_AOT_RUNTIME
#if !FULL_AOT_RUNTIME && !MONOTOUCH
using System.Reflection.Emit;
namespace System.Runtime.InteropServices {
@@ -27,7 +27,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !FULL_AOT_RUNTIME
#if !FULL_AOT_RUNTIME && !MONOTOUCH
using System.Reflection.Emit;
namespace System.Runtime.InteropServices {
@@ -27,7 +27,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !FULL_AOT_RUNTIME
#if !FULL_AOT_RUNTIME && !MONOTOUCH
using System.Reflection.Emit;
namespace System.Runtime.InteropServices {
@@ -27,7 +27,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !FULL_AOT_RUNTIME
#if !FULL_AOT_RUNTIME && !MONOTOUCH
using System.Reflection.Emit;
namespace System.Runtime.InteropServices {
@@ -27,7 +27,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !FULL_AOT_RUNTIME
#if !FULL_AOT_RUNTIME && !MONOTOUCH
using System.Reflection.Emit;
namespace System.Runtime.InteropServices {
@@ -27,7 +27,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !FULL_AOT_RUNTIME
#if !FULL_AOT_RUNTIME && !MONOTOUCH
using System.Reflection.Emit;
namespace System.Runtime.InteropServices {
@@ -27,7 +27,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !FULL_AOT_RUNTIME
#if !FULL_AOT_RUNTIME && !MONOTOUCH
using System.Reflection.Emit;
namespace System.Runtime.InteropServices {
@@ -27,7 +27,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !FULL_AOT_RUNTIME
#if !FULL_AOT_RUNTIME && !MONOTOUCH
using System.Reflection.Emit;
namespace System.Runtime.InteropServices {
+90
View File
@@ -0,0 +1,90 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Reflection.Emit;
using System.Security;
using System.Security.Policy;
#if !MONO_FEATURE_SRE
namespace System {
public partial class AppDomain {
public AssemblyBuilder DefineDynamicAssembly (AssemblyName name, AssemblyBuilderAccess access)
{
throw new PlatformNotSupportedException ();
}
public AssemblyBuilder DefineDynamicAssembly (AssemblyName name, AssemblyBuilderAccess access, IEnumerable<CustomAttributeBuilder> assemblyAttributes)
{
throw new PlatformNotSupportedException ();
}
[Obsolete ("Declarative security for assembly level is no longer enforced")]
public AssemblyBuilder DefineDynamicAssembly (AssemblyName name, AssemblyBuilderAccess access, Evidence evidence)
{
throw new PlatformNotSupportedException ();
}
public AssemblyBuilder DefineDynamicAssembly (AssemblyName name, AssemblyBuilderAccess access, string dir)
{
throw new PlatformNotSupportedException ();
}
public AssemblyBuilder DefineDynamicAssembly (AssemblyName name, AssemblyBuilderAccess access, IEnumerable<CustomAttributeBuilder> assemblyAttributes, SecurityContextSource securityContextSource)
{
throw new PlatformNotSupportedException ();
}
[Obsolete ("Declarative security for assembly level is no longer enforced")]
public AssemblyBuilder DefineDynamicAssembly (AssemblyName name, AssemblyBuilderAccess access, string dir, Evidence evidence)
{
throw new PlatformNotSupportedException ();
}
[Obsolete ("Declarative security for assembly level is no longer enforced")]
public AssemblyBuilder DefineDynamicAssembly (AssemblyName name, AssemblyBuilderAccess access, PermissionSet requiredPermissions, PermissionSet optionalPermissions, PermissionSet refusedPermissions)
{
throw new PlatformNotSupportedException ();
}
public AssemblyBuilder DefineDynamicAssembly (AssemblyName name, AssemblyBuilderAccess access, string dir, bool isSynchronized, IEnumerable<CustomAttributeBuilder> assemblyAttributes)
{
throw new PlatformNotSupportedException ();
}
[Obsolete ("Declarative security for assembly level is no longer enforced")]
public AssemblyBuilder DefineDynamicAssembly (AssemblyName name, AssemblyBuilderAccess access, Evidence evidence, PermissionSet requiredPermissions, PermissionSet optionalPermissions, PermissionSet refusedPermissions)
{
throw new PlatformNotSupportedException ();
}
[Obsolete ("Declarative security for assembly level is no longer enforced")]
public AssemblyBuilder DefineDynamicAssembly (AssemblyName name, AssemblyBuilderAccess access, string dir, PermissionSet requiredPermissions, PermissionSet optionalPermissions, PermissionSet refusedPermissions)
{
throw new PlatformNotSupportedException ();
}
[Obsolete ("Declarative security for assembly level is no longer enforced")]
public AssemblyBuilder DefineDynamicAssembly (AssemblyName name, AssemblyBuilderAccess access, string dir, Evidence evidence, PermissionSet requiredPermissions, PermissionSet optionalPermissions, PermissionSet refusedPermissions)
{
throw new PlatformNotSupportedException ();
}
[Obsolete ("Declarative security for assembly level is no longer enforced")]
public AssemblyBuilder DefineDynamicAssembly (AssemblyName name, AssemblyBuilderAccess access, string dir, Evidence evidence, PermissionSet requiredPermissions, PermissionSet optionalPermissions, PermissionSet refusedPermissions, bool isSynchronized)
{
throw new PlatformNotSupportedException ();
}
[Obsolete ("Declarative security for assembly level is no longer enforced")]
public AssemblyBuilder DefineDynamicAssembly (AssemblyName name, AssemblyBuilderAccess access, string dir, Evidence evidence, PermissionSet requiredPermissions, PermissionSet optionalPermissions, PermissionSet refusedPermissions, bool isSynchronized, IEnumerable<CustomAttributeBuilder> assemblyAttributes)
{
throw new PlatformNotSupportedException ();
}
}
}
#endif
+20 -19
View File
@@ -46,7 +46,11 @@ namespace System {
public override void Flush ()
{
string s = sb.ToString ();
string s;
lock (sb) {
s = sb.ToString ();
sb.Length = 0;
}
try {
xamarin_log (s);
}
@@ -56,14 +60,14 @@ namespace System {
direct_write_to_stdout (Environment.NewLine);
} catch (Exception){}
}
sb.Length = 0;
}
// minimum to override - see http://msdn.microsoft.com/en-us/library/system.io.textwriter.aspx
public override void Write (char value)
{
try {
sb.Append (value);
lock (sb)
sb.Append (value);
}
catch (Exception) {
}
@@ -73,9 +77,11 @@ namespace System {
public override void Write (string value)
{
try {
sb.Append (value);
if (value != null && value.Length >= CoreNewLine.Length && EndsWithNewLine (value))
Flush ();
lock (sb) {
sb.Append (value);
if (EndsWithNewLine (sb))
Flush ();
}
}
catch (Exception) {
}
@@ -84,26 +90,21 @@ namespace System {
/* Called from TextWriter:WriteLine(string) */
public override void Write(char[] buffer, int index, int count) {
try {
sb.Append (buffer);
if (buffer != null && buffer.Length >= CoreNewLine.Length && EndsWithNewLine (buffer))
Flush ();
lock (sb) {
sb.Append (buffer, index, count);
if (EndsWithNewLine (sb))
Flush ();
}
}
catch (Exception) {
}
}
bool EndsWithNewLine (string value)
bool EndsWithNewLine (StringBuilder value)
{
for (int i = 0, v = value.Length - CoreNewLine.Length; i < CoreNewLine.Length; ++i, ++v) {
if (value [v] != CoreNewLine [i])
return false;
}
return true;
}
if (value.Length < CoreNewLine.Length)
return false;
bool EndsWithNewLine (char[] value)
{
for (int i = 0, v = value.Length - CoreNewLine.Length; i < CoreNewLine.Length; ++i, ++v) {
if (value [v] != CoreNewLine [i])
return false;
@@ -776,5 +776,23 @@ namespace MonoTests.System.Globalization
Assert.IsTrue (f ().Wait (5 * 1000), "#1");
}
[Test]
public void SpanToUpperInvariantDoesntUseCurrentCulture ()
{
string testStr = "test";
var dst = new Span<char> (new char [testStr.Length]);
CultureInfo savedCulture = CultureInfo.CurrentCulture;
CultureInfo.CurrentCulture = new InterceptingLocale ();
testStr.AsSpan ().ToUpperInvariant (dst); // should not throw InvalidOperationException ("Shouldn't be called.")
CultureInfo.CurrentCulture = savedCulture;
Assert.AreEqual ("TEST", dst.ToString ());
}
private class InterceptingLocale : CultureInfo
{
public InterceptingLocale () : base (string.Empty) { }
public override TextInfo TextInfo => throw new InvalidOperationException ("Shouldn't be called.");
}
}
}
+4 -1
View File
@@ -2595,6 +2595,9 @@ namespace MonoTests.System.IO
public static extern int symlink (string oldpath, string newpath);
[Test]
#if MONOTOUCH_TV
[Ignore ("See bug #59239: https://bugzilla.xamarin.com/show_bug.cgi?id=59239")]
#endif
[Category ("NotWasm")]
public void SymLinkStats() {
if (!RunningOnUnix)
@@ -2652,7 +2655,7 @@ namespace MonoTests.System.IO
[Test]
#if MONOTOUCH_TV
[Ignore ("See bug #59239")]
[Ignore ("See bug #59239: https://bugzilla.xamarin.com/show_bug.cgi?id=59239")]
#endif
[Category ("NotWasm")]
public void SymLinkLoop ()
@@ -1906,6 +1906,17 @@ public class AssemblyBuilderTest
});
}
[Test]
public void GetReflectionOnly ()
{
// Regression test for 13028.
// Asserts ReflectionOnly is actually implemented.
AssemblyBuilder ab1 = genAssembly ();
AssemblyBuilder ab2 = genAssembly (AssemblyBuilderAccess.ReflectionOnly);
Assert.IsFalse (ab1.ReflectionOnly, "#1");
Assert.IsTrue (ab2.ReflectionOnly, "#2");
}
}
}
@@ -658,6 +658,15 @@ namespace MonoTests.System.Reflection
Assert.AreEqual (10, pi2.GetGetMethod ().Invoke (10, null));
}
[Test]
public void NullableTestsStatic ()
{
Nullable<Double> val = new Nullable<Double>(new Double());
MethodInfo mi = typeof (Nullable<Double>).GetMethod ("op_Implicit");
object obj = val;
mi.Invoke(null, new[] { obj });
}
public static void foo_generic<T> ()
{
}
@@ -11,7 +11,7 @@
using System;
using System.Threading;
using System.Reflection;
#if !FULL_AOT_RUNTIME
#if !MONOTOUCH && !FULL_AOT_RUNTIME
using System.Reflection.Emit;
#endif
using System.Runtime.InteropServices;
@@ -535,7 +535,7 @@ namespace MonoTests.System.Reflection
public sealed class C { }
public sealed class D { }
#if !FULL_AOT_RUNTIME
#if !MONOTOUCH && !FULL_AOT_RUNTIME
[Test]
// https://github.com/mono/mono/issues/11302
public void CustomModifiersOrder()
Loaded 100 of 185 files, more files were not shown because too many files have changed in this diff. Show more