mono.git
8 years ago[corlib] Fix tests to compile when Thread.Suspend/Resume is not supported.
Rolf Bjarne Kvinge [Mon, 29 Feb 2016 18:02:33 +0000 (19:02 +0100)]
[corlib] Fix tests to compile when Thread.Suspend/Resume is not supported.

8 years ago[runtime] Fix compilation warning
Ludovic Henry [Mon, 29 Feb 2016 15:59:09 +0000 (15:59 +0000)]
[runtime] Fix compilation warning

8 years agoMerge pull request #2693 from dellis1972/master
monojenkins [Mon, 29 Feb 2016 13:30:19 +0000 (13:30 +0000)]
Merge pull request #2693 from dellis1972/master

[msbuild] Getting build error "Error initializing task XmlPeek: Not registered task XmlPeek".

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=38638

Removes the uses of LogXXXFromResources from XmlPeek because
we do not use string resources in xbuild.

8 years ago[msbuild] Getting build error "Error initializing task XmlPeek: Not registered task...
Dean Ellis [Mon, 29 Feb 2016 11:55:15 +0000 (11:55 +0000)]
[msbuild] Getting build error "Error initializing task XmlPeek: Not registered task XmlPeek".

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=38638

Removes the uses of LogXXXFromResources from XmlPeek because
we do not use string resources in xbuild.

8 years agoMerge pull request #2692 from vargaz/process-coding-conv
monojenkins [Mon, 29 Feb 2016 04:00:17 +0000 (04:00 +0000)]
Merge pull request #2692 from vargaz/process-coding-conv

[runtime] Use mono coding conventions in process.c.

8 years ago[runtime] Use mono coding conventions in process.c.
Zoltan Varga [Mon, 29 Feb 2016 02:35:15 +0000 (03:35 +0100)]
[runtime] Use mono coding conventions in process.c.

8 years agoMerge pull request #2690 from steffen-kiess/json-operator-uint
Alexander Köplinger [Sun, 28 Feb 2016 23:06:51 +0000 (00:06 +0100)]
Merge pull request #2690 from steffen-kiess/json-operator-uint

Fix typo in JsonValue which broke the conversion to uint and add test case

8 years agoFix typo in JsonValue which broke the conversion to uint and add test case
Steffen Kieß [Sun, 28 Feb 2016 17:40:22 +0000 (18:40 +0100)]
Fix typo in JsonValue which broke the conversion to uint and add test case

8 years agoBring new IKVM
Miguel de Icaza [Sat, 27 Feb 2016 20:27:46 +0000 (15:27 -0500)]
Bring new IKVM

8 years agoMerge pull request #2580 from ItsVeryWindy/master
João Matos [Sat, 27 Feb 2016 12:37:39 +0000 (12:37 +0000)]
Merge pull request #2580 from ItsVeryWindy/master

Updates to WebRequestHandler

8 years agoMerge pull request #2672 from Numpsy/sgenexception
João Matos [Sat, 27 Feb 2016 12:36:36 +0000 (12:36 +0000)]
Merge pull request #2672 from Numpsy/sgenexception

[sgen] catch NotSupportedException from system.xml.serialization

8 years agoMerge pull request #2689 from vargaz/socket-io-cleanup
Zoltan Varga [Sat, 27 Feb 2016 11:46:01 +0000 (06:46 -0500)]
Merge pull request #2689 from vargaz/socket-io-cleanup

[runtime] Clean up the socket-io.c file to use the mono coding conven…

8 years ago[runtime] Clean up the socket-io.c file to use the mono coding conventions. Rename...
Zoltan Varga [Sat, 27 Feb 2016 06:48:10 +0000 (01:48 -0500)]
[runtime] Clean up the socket-io.c file to use the mono coding conventions. Rename 'error' to 'werror' so 'error' can be used to refer to MonoError as everywhere else. NFC.

8 years agoMerge pull request #2688 from vargaz/marshal-set-pending
monojenkins [Sat, 27 Feb 2016 05:55:17 +0000 (05:55 +0000)]
Merge pull request #2688 from vargaz/marshal-set-pending

[runtime] Use pending exceptions instead of mono_raise_exception () i…

…n Marshal icalls.

8 years ago[runtime] Use pending exceptions instead of mono_raise_exception () in Marshal icalls.
Zoltan Varga [Sat, 27 Feb 2016 04:19:10 +0000 (23:19 -0500)]
[runtime] Use pending exceptions instead of mono_raise_exception () in Marshal icalls.

8 years ago[aot] Fix the usage of MonoError in init-llvm_method ().
Zoltan Varga [Sat, 27 Feb 2016 03:40:29 +0000 (22:40 -0500)]
[aot] Fix the usage of MonoError in init-llvm_method ().

8 years agoMerge pull request #2678 from esdrubal/filestream
Marek Safar [Fri, 26 Feb 2016 23:12:18 +0000 (15:12 -0800)]
Merge pull request #2678 from esdrubal/filestream

[corlib] Fixed FileStream Write after Read issue

8 years agoMerge pull request #2685 from ludovic-henry/monoerror-mono_object_register_finalizer
Aleksey Kliger (λgeek) [Fri, 26 Feb 2016 20:28:08 +0000 (15:28 -0500)]
Merge pull request #2685 from ludovic-henry/monoerror-mono_object_register_finalizer

[runtime] Use MonoError for mono_object_register_finalizer

8 years agoMerge pull request #2671 from lambdageek/dev/monoerror-mono_runtime_class_init
monojenkins [Fri, 26 Feb 2016 18:00:20 +0000 (18:00 +0000)]
Merge pull request #2671 from lambdageek/dev/monoerror-mono_runtime_class_init

[runtime] Use MonoError for mono_class_vtable_full and mono_runtime_class_init_full

Switch from a boolean `raise_on_error` arg to a MonoError outarg and let
callers decide what to do with the error.

Also mark mono_runtime_class_init external only.  Runtime should use
mono_runtime_class_init_full.

8 years ago[runtime] Use MonoError for mono_class_vtable_full and mono_runtime_class_init_full.
Aleksey Kliger [Tue, 23 Feb 2016 22:16:43 +0000 (17:16 -0500)]
[runtime] Use MonoError for mono_class_vtable_full and mono_runtime_class_init_full.

Switch from a boolean raise_on_error arg to a MonoError outarg and let
callers decide what to do with the error.

Also mark mono_runtime_class_init external only.  Runtime should use
mono_runtime_class_init_full.

8 years ago[scripts] Point scripts like nunit-console2/mono-service2 to the 4.5 directory
Alexander Köplinger [Fri, 26 Feb 2016 14:25:16 +0000 (15:25 +0100)]
[scripts] Point scripts like nunit-console2/mono-service2 to the 4.5 directory

The 2.0 profile doesn't ship with Mono anymore. To avoid breaking existing scripts we just point to the 4.5 version instead.

8 years ago[System.ServiceModel] Fix a hardcoded port in a test
Alexander Köplinger [Fri, 26 Feb 2016 14:28:45 +0000 (15:28 +0100)]
[System.ServiceModel] Fix a hardcoded port in a test

This failed with an "address already in use" error on Jenkins yesterday.

8 years ago[runtime] Use MonoError for mono_object_register_finalizer
Ludovic Henry [Fri, 26 Feb 2016 13:49:28 +0000 (13:49 +0000)]
[runtime] Use MonoError for mono_object_register_finalizer

8 years agoMerge pull request #2679 from lambdageek/dev/monoerror-reflection
Rodrigo Kumpera [Fri, 26 Feb 2016 01:42:39 +0000 (17:42 -0800)]
Merge pull request #2679 from lambdageek/dev/monoerror-reflection

[reflection] MonoError cleanups

8 years ago[runtime] Remove some declarations from marshal.h which are not used outside of marsh...
Zoltan Varga [Fri, 26 Feb 2016 01:09:56 +0000 (17:09 -0800)]
[runtime] Remove some declarations from marshal.h which are not used outside of marshal.c.

8 years agoMerge pull request #2683 from mfilippov/master
Alexander Köplinger [Fri, 26 Feb 2016 00:23:19 +0000 (01:23 +0100)]
Merge pull request #2683 from mfilippov/master

Add generation WepApplication.targets for v12.0 and v14.0 xbuild.

8 years agoAdd generation WepApplication.targets for v12.0 and v14.0 xbuild.
Mikhail Filippov [Fri, 26 Feb 2016 00:18:08 +0000 (03:18 +0300)]
Add generation WepApplication.targets for v12.0 and v14.0 xbuild.

8 years agoMerge pull request #2681 from kumpera/pedump_fix
monojenkins [Fri, 26 Feb 2016 00:05:22 +0000 (00:05 +0000)]
Merge pull request #2681 from kumpera/pedump_fix

[pedump] Fix init crash on pedump when using --verify.

@marek-safar  here's your fix

@monojenkins merge

8 years ago[aot] Move a mono_error_raise_exception () call higher up the call chain.
Zoltan Varga [Thu, 25 Feb 2016 21:53:53 +0000 (13:53 -0800)]
[aot] Move a mono_error_raise_exception () call higher up the call chain.

8 years ago[pedump] Fix init crash on pedump when using --verify.
Rodrigo Kumpera [Thu, 25 Feb 2016 21:40:10 +0000 (13:40 -0800)]
[pedump] Fix init crash on pedump when using --verify.

8 years ago[sdb] Remove some mono_error_raise_exception () calls.
Zoltan Varga [Thu, 25 Feb 2016 21:30:13 +0000 (13:30 -0800)]
[sdb] Remove some mono_error_raise_exception () calls.

8 years ago[jit]: Correctly restore callee saved registers in mono_arch_get_call_filter() on...
Martin Baulig [Thu, 25 Feb 2016 20:45:38 +0000 (15:45 -0500)]
[jit]: Correctly restore callee saved registers in mono_arch_get_call_filter() on amd64.

(cherry picked from commit 8c1ffe78ccf68fab9acad53eebc01b5c84fc81ec)

8 years ago[corlib] Fixed MonoIO.Write loop.
Marcos Henrich [Thu, 25 Feb 2016 18:44:08 +0000 (18:44 +0000)]
[corlib] Fixed MonoIO.Write loop.

8 years ago[corlib] Fixed FileStream Write after Read issue
Marcos Henrich [Thu, 25 Feb 2016 18:39:30 +0000 (18:39 +0000)]
[corlib] Fixed FileStream Write after Read issue

FileStream was writing to the wrong position When a value longer than
the FileStream buffer was written after a read.

This was fixed by doing a seek before doing the problematic write.

Fixes #11699

8 years ago[corlib] Test FileStream with Read and Writes
Marcos Henrich [Thu, 25 Feb 2016 18:38:05 +0000 (18:38 +0000)]
[corlib] Test FileStream with Read and Writes

Covers #11699

8 years agoFixed the build.
João Matos [Thu, 25 Feb 2016 18:29:21 +0000 (18:29 +0000)]
Fixed the build.

8 years ago[support/zlib] Added API exports to exported calls from zlib-helper.c.
João Matos [Thu, 25 Feb 2016 17:37:00 +0000 (17:37 +0000)]
[support/zlib] Added API exports to exported calls from zlib-helper.c.

This is so we can re-use this code from libmonodroid, which currently has its own duplicated copy.

8 years ago[support/zlib] Remove eglib link dependencies from zlib-helper.c.
João Matos [Thu, 25 Feb 2016 17:36:05 +0000 (17:36 +0000)]
[support/zlib] Remove eglib link dependencies from zlib-helper.c.

This is so we can re-use this code from libmonodroid, which currently has its own duplicated copy.

8 years ago[reflection] MonoError in mono_reflection_get_custom_attrs_info
Aleksey Kliger [Thu, 25 Feb 2016 17:20:30 +0000 (12:20 -0500)]
[reflection] MonoError in mono_reflection_get_custom_attrs_info

Also mark that function external only.  Runtime should use
mono_reflection_get_custom_attrs_info_checked

8 years ago[reflection] MonoError for mono_reflection_type_get_underlying_system_type
Aleksey Kliger [Thu, 25 Feb 2016 16:30:12 +0000 (11:30 -0500)]
[reflection] MonoError for mono_reflection_type_get_underlying_system_type

8 years agoMerge pull request #2655 from ludovic-henry/fix-wait-timeout
Ludovic Henry [Thu, 25 Feb 2016 16:28:20 +0000 (16:28 +0000)]
Merge pull request #2655 from ludovic-henry/fix-wait-timeout

[WaitHandle] Fix Wait(One|Any|All) and SignalAndWait with timeout

8 years ago[reflection] MonoError for mono_custom_attrs_data_construct
Aleksey Kliger [Thu, 25 Feb 2016 16:12:14 +0000 (11:12 -0500)]
[reflection] MonoError for mono_custom_attrs_data_construct

8 years ago[reflection] MonoError for create_cattr_{typed,named}_arg
Aleksey Kliger [Thu, 25 Feb 2016 15:52:52 +0000 (10:52 -0500)]
[reflection] MonoError for create_cattr_{typed,named}_arg

8 years ago[reflection] MonoError for mono_reflection_method_on_tb_inst_get_handle
Aleksey Kliger [Thu, 25 Feb 2016 15:51:58 +0000 (10:51 -0500)]
[reflection] MonoError for mono_reflection_method_on_tb_inst_get_handle

8 years ago[jit] Remove a few mono_error_raise_exception () calls.
Zoltan Varga [Thu, 25 Feb 2016 08:36:57 +0000 (00:36 -0800)]
[jit] Remove a few mono_error_raise_exception () calls.

8 years agoFix the build.
Zoltan Varga [Thu, 25 Feb 2016 07:30:33 +0000 (23:30 -0800)]
Fix the build.

8 years ago[jit] Add a MonoError argument to mono_create_jit_trampoline (), get rid of the mono_...
Zoltan Varga [Thu, 25 Feb 2016 07:28:44 +0000 (23:28 -0800)]
[jit] Add a MonoError argument to mono_create_jit_trampoline (), get rid of the mono_create_jit_trampoline_in_domain () variant.

8 years ago[jit] Add a MonoError argument to mono_create_jump_trampoline ().
Zoltan Varga [Thu, 25 Feb 2016 07:15:22 +0000 (23:15 -0800)]
[jit] Add a MonoError argument to mono_create_jump_trampoline ().

8 years ago[llvm] Remove some unused argument passing conventions.
Zoltan Varga [Wed, 24 Feb 2016 21:50:09 +0000 (13:50 -0800)]
[llvm] Remove some unused argument passing conventions.

8 years agoMerge pull request #2673 from serpentblade/master
Marek Safar [Wed, 24 Feb 2016 20:21:16 +0000 (12:21 -0800)]
Merge pull request #2673 from serpentblade/master

[System.Data.SqlClient] Fix for bulk copy inserts via IDataReader

8 years ago[System.Data.SqlClient] Fix for bulk copy inserts via IDataReader
Dan Krieger [Wed, 24 Feb 2016 19:57:20 +0000 (11:57 -0800)]
[System.Data.SqlClient] Fix for bulk copy inserts via IDataReader

Resolve same with DataTable requiring name problem fixed in 1858ce4a94ab07f615a0e5ded37f8caa18473700

8 years ago[sgen] catch NotSupportedException from system.xml.serialization
Richard Webb [Wed, 24 Feb 2016 13:18:12 +0000 (13:18 +0000)]
[sgen] catch NotSupportedException from system.xml.serialization

System.Xml.Serialization.TypeDesc.CheckSupported might throw a
NotSupportedException, so catch it and ignore the current type

8 years ago[llvm] Fix the loaded llvm build.
Zoltan Varga [Wed, 24 Feb 2016 09:23:58 +0000 (01:23 -0800)]
[llvm] Fix the loaded llvm build.

8 years agoFix the build.
Zoltan Varga [Wed, 24 Feb 2016 09:22:18 +0000 (01:22 -0800)]
Fix the build.

8 years ago[llvm] Emit dwarf debug info when running with llvm 3.9. This is not enabled yet...
Zoltan Varga [Wed, 24 Feb 2016 08:23:25 +0000 (00:23 -0800)]
[llvm] Emit dwarf debug info when running with llvm 3.9. This is not enabled yet, since it doesn't seem to work, the dwarf info is in the object file emitted by llc, but disappears during linking.

8 years ago[mcs] escaped quoted interpolated format specifier has no restrictions. Fixes #38992
Marek Safar [Tue, 23 Feb 2016 21:46:23 +0000 (13:46 -0800)]
[mcs] escaped quoted interpolated format specifier has no restrictions. Fixes #38992

8 years agoMerge pull request #2664 from lambdageek/dev/monoerror-mono_rand
monojenkins [Tue, 23 Feb 2016 17:30:20 +0000 (17:30 +0000)]
Merge pull request #2664 from lambdageek/dev/monoerror-mono_rand

[runtime] Use MonoError in mono_rand_try_get_bytes

8 years ago[System.IO.Compression.DeflateStream] Fixed end condition in decompression loop.
João Matos [Tue, 23 Feb 2016 16:09:26 +0000 (16:09 +0000)]
[System.IO.Compression.DeflateStream] Fixed end condition in decompression loop.

Keep track of total bytes read from input stream and break from the loop if it matches the number of bytes inflated by zlib.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=34916.

8 years ago[msvc] %PATH% is sometimes empty in Jenkins, so "powershell" doesn't run
Alexander Köplinger [Tue, 23 Feb 2016 16:03:11 +0000 (17:03 +0100)]
[msvc] %PATH% is sometimes empty in Jenkins, so "powershell" doesn't run

Try using a system-standard default variable which points to the required folder instead.

8 years agoMerge pull request #2666 from lambdageek/dev/kill-InternalReplaceStrComp
monojenkins [Tue, 23 Feb 2016 15:55:17 +0000 (15:55 +0000)]
Merge pull request #2666 from lambdageek/dev/kill-InternalReplaceStrComp

[runtime] Remove ves_icall_System_String_InternalReplace_Str_Comp

It appears to be dead code.

8 years ago[runtime] Use MonoError in mono_rand_try_get_bytes
Aleksey Kliger [Mon, 22 Feb 2016 19:41:26 +0000 (14:41 -0500)]
[runtime] Use MonoError in mono_rand_try_get_bytes

8 years agoBump Mono version -> 4.5.0
Alexis Christoforides [Tue, 23 Feb 2016 14:25:09 +0000 (09:25 -0500)]
Bump Mono version -> 4.5.0

8 years ago[runtime] Remove ves_icall_System_String_InternalReplace_Str_Comp
Aleksey Kliger [Mon, 22 Feb 2016 23:45:16 +0000 (18:45 -0500)]
[runtime] Remove ves_icall_System_String_InternalReplace_Str_Comp

It appears to be dead code.

8 years agoMerge pull request #2661 from ludovic-henry/fix-safehandle-abort
monojenkins [Mon, 22 Feb 2016 22:25:34 +0000 (22:25 +0000)]
Merge pull request #2661 from ludovic-henry/fix-safehandle-abort

[SafeHandle] Avoid handle leakage in case of ThreadAbortException

If we get a ThreadAbortException while at SafeHandle.cs:124 (before this commit), we would not set release to true, even after incrementing the internal reference count of the SafeHandle. That could lead to potential leak, as the caller (following the common following pattern) would never call DangerousRelase, thus never calling PerformRelease. The finalizer or Dispose would not lead to the call of PerformRelease either, as the DangerousAddRef / DangerousRelase calls are unbalanced.

The common pattern for DangerousAddRef / DangerousRelease is the following:

bool release = false;
try {
  safeHandle.DangerousAddRef (ref release);
  /* do something with safeHandle.DangerousGetHandle () */
} finally {
  if (release)
    safeHandle.DangerousRelease ();
}

@monojenkins merge

8 years agoMerge pull request #2657 from xmcclure/little-embed-fixes
monojenkins [Mon, 22 Feb 2016 19:45:29 +0000 (19:45 +0000)]
Merge pull request #2657 from xmcclure/little-embed-fixes

Minor platform-support fixes

* Fix error in DISABLE_HW_TRAPS implementation
* Rename class in mono/tests/threadpool.cs to allow embedding

8 years agoMerge pull request #2653 from lambdageek/dev/exception_type-1
monojenkins [Mon, 22 Feb 2016 19:30:33 +0000 (19:30 +0000)]
Merge pull request #2653 from lambdageek/dev/exception_type-1

[runtime] Don't access MonoClass::exception_type directly.

Use `mono_class_get_failure ()` and `mono_class_has_failed ()`

This is mostly just cleanup refactoring at this point that will make it easier to change how exception_type is used.

Also from this exercise we've learned that most of the class handling code just cares whether the class has an error or not, not what sort of error it was.

8 years agoMerge pull request #2646 from ludovic-henry/fix-processwatch-dispose
Ankit Jain [Mon, 22 Feb 2016 18:26:24 +0000 (13:26 -0500)]
Merge pull request #2646 from ludovic-henry/fix-processwatch-dispose

[Microsoft.Build] Fix XS build error + Fix expected output newline from ProcessWrapper.OutputStreamChanged and ProcessWrapper.ErrorStreamChanged

8 years ago[SafeHandle] Avoid handle leakage in case of ThreadAbortException
Ludovic Henry [Mon, 22 Feb 2016 12:56:23 +0000 (12:56 +0000)]
[SafeHandle] Avoid handle leakage in case of ThreadAbortException

If we get a ThreadAbortException while at SafeHandle.cs:124 (before this commit), we would not set release to true, even after incrementing the internal reference count of the SafeHandle. That could lead to potential leak, as the caller (following the common following pattern) would never call DangerousRelase, thus never calling PerformRelease. The finalizer or Dispose would not lead to the call of PerformRelease either, as the DangerousAddRef / DangerousRelase calls are unbalanced.

The common pattern for DangerousAddRef / DangerousRelease is the following:

bool release = false;
try {
  safeHandle.DangerousAddRef (ref release);
  /* do something with safeHandle.DangerousGetHandle () */
} finally {
  if (release)
    safeHandle.DangerousRelease ();
}

8 years ago[WaitHandle] Fix Wait(One|Any|All) and SignalAndWait with timeout
Ludovic Henry [Fri, 19 Feb 2016 21:07:22 +0000 (21:07 +0000)]
[WaitHandle] Fix Wait(One|Any|All) and SignalAndWait with timeout

In the case where we would call for example WaitHandle.WaitOne with a timeout, we could run in the case where we would wait way longer than the timeout would allow it (240s instead of 90s for example). This would be due to spurious wake, which would not be considered to be an error, but which would lead calling the `mono_os_cond_timedwait` function with the same timeout every time. That would mean that `mono_os_cond_timedwait` would return that it timedout, if and only if, it would timed out after N milliseconds, with N the millisecondsTimeout parameter to WaitOne in this example. That mean that any spurious wake would effectively lead to rewaiting with a full timeout every time.

That could lead to the following scenario:
 - T1 calls waitHandle.WaitOne(timeout = 1000ms) at T=0ms
 - T1 calls mono_os_cond_timedwait(timeout = 1000) at T=0ms
 - GC suspend T1 at T=500ms <- here it's not necessarily the GC, it can be anything suspending/signaling the thread
 - T1 spurious wake, and call mono_os_cond_timedwait(timeout = 1000) at T=500ms
 - GC interrupt T1 at T=1250ms
 - T1 spurious wake, and call mono_os_cond_timedwait(timeout = 1000) at T=1250ms
 - etc.

As you can see, T1 should have returned from waitHandle.WaitOne before the second spurious wake, but as it recalled mono_os_cond_timedwait with a timeout of 1000ms again, it didn't.

The fix consists in keeping track of when the call is supposed to finish, and pass an adaptable timeout to mono_os_cond_timedwait, which decreases as time goes on, to enventually reach 0, and return in a timely manner.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=38382

8 years agoMerge pull request #2620 from ludovic-henry/referencesource-waithandle
Ludovic Henry [Mon, 22 Feb 2016 16:04:36 +0000 (16:04 +0000)]
Merge pull request #2620 from ludovic-henry/referencesource-waithandle

[corlib] Import System.Threading.WaitHandle

8 years agoMerge pull request #2651 from akoeplinger/dmcs-warning
Alexander Köplinger [Mon, 22 Feb 2016 15:43:44 +0000 (16:43 +0100)]
Merge pull request #2651 from akoeplinger/dmcs-warning

[scripts] Add deprecation warning to dmcs

8 years ago[runtime] Don't access MonoClass::exception_type directly.
Aleksey Kliger [Tue, 16 Feb 2016 23:59:55 +0000 (18:59 -0500)]
[runtime] Don't access MonoClass::exception_type directly.

Use mono_class_has_failure () or mono_class_get_failure ()

8 years ago[System.IO.Compression] Lower minimum version in ZIP headers for compatibility.
Joao Matos [Mon, 22 Feb 2016 14:53:09 +0000 (14:53 +0000)]
[System.IO.Compression] Lower minimum version in ZIP headers for compatibility.

This fixes compatibility with tools like MS Excel, file tool, and others that do not know how to recognize newer ZIP version formats.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=33553.

8 years agoMerge pull request #2593 from ludovic-henry/coop-fix-native-to-managed
Ludovic Henry [Mon, 22 Feb 2016 11:23:34 +0000 (11:23 +0000)]
Merge pull request #2593 from ludovic-henry/coop-fix-native-to-managed

[coop] Fix native-to-managed wrapper

8 years ago[WaitHandle] Call SafeWaitHandle DangerousAddRef / DangerousRelease around native...
Ludovic Henry [Thu, 18 Feb 2016 12:06:25 +0000 (12:06 +0000)]
[WaitHandle] Call SafeWaitHandle DangerousAddRef / DangerousRelease around native calls

We do not want to wait on a handle that have been cleaned up, as that will lead to a warning message from the io-layer, without any error in managed code. That mean we could not detect this error case and recover from it.

By doing this DangerousAddRef / DangerousRelease before going to native, we ensure that the WaitHandle is and will stay alive while waiting on it. This same is done in CoreCLR, but in the marshalling code.

8 years ago[corlib] Import System.Threading.WaitHandle
Ludovic Henry [Mon, 15 Feb 2016 19:27:34 +0000 (19:27 +0000)]
[corlib] Import System.Threading.WaitHandle

8 years ago[io-layer] Fix process_wait return value for current process
Ludovic Henry [Mon, 22 Feb 2016 11:15:11 +0000 (11:15 +0000)]
[io-layer] Fix process_wait return value for current process

When waiting on the current process, we would return WAIT_FAILED, as waitpid would return -1, with errno set to ECHILD.
But the semantic of WaitForSingleObjectEx and WaitForMultipleObjectsEx when waiting on current process is to return WAIT_TIMEOUT. This is then a special case that we need to add to this code.

8 years ago[scripts] Add deprecation warning to dmcs
Alexander Köplinger [Fri, 19 Feb 2016 19:19:58 +0000 (20:19 +0100)]
[scripts] Add deprecation warning to dmcs

dmcs was deprecated in favor of mcs a while back, yet people are still creating new scripts with it.
Adding a message that shows up on each dmcs invocation should hopefully make this more obvious.

8 years agoMerge pull request #2648 from BrzVlad/fix-cprop-vregs
Vlad Brezae [Mon, 22 Feb 2016 10:49:35 +0000 (17:49 +0700)]
Merge pull request #2648 from BrzVlad/fix-cprop-vregs

[jit] Fix init of cprop defs for vregs

8 years ago[llvm] Avoid setting the mono.nofail.load flag with the new llvm branch, its not...
Zoltan Varga [Mon, 22 Feb 2016 07:43:36 +0000 (02:43 -0500)]
[llvm] Avoid setting the mono.nofail.load flag with the new llvm branch, its not supported there.

8 years agoMerge pull request #2660 from kumpera/loader-error-cleanup6
Rodrigo Kumpera [Sun, 21 Feb 2016 22:46:35 +0000 (17:46 -0500)]
Merge pull request #2660 from kumpera/loader-error-cleanup6

[mono-error] This PR eliminates mono_class_from_name and a couple of assorted fixes.

8 years ago[runtime] Ban mono_class_from_name mono_class_from_name_case.
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[runtime] Ban mono_class_from_name mono_class_from_name_case.

They are no longer in use by the runtime. Begone!

8 years ago[tests] Pass cli args to test runner so we can pick which test to run
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[tests] Pass cli args to test runner so we can pick which test to run

8 years ago[util] When creating the TLE exception only provide aditional data if both type and...
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[util] When creating the TLE exception only provide aditional data if both type and assembly names are provided. Otherwise one would fail and we'd get an OOM instead.

8 years ago[runtime][jit] Replace usage of mono_class_from_name with mono_class_load_from_name...
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[runtime][jit] Replace usage of mono_class_from_name with mono_class_load_from_name for variable type lookups.

8 years ago[runtime] Switch probing usage of mono_class_from_name to mono_class_try_load_from_name.
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[runtime] Switch probing usage of mono_class_from_name to mono_class_try_load_from_name.

Those are call sites that can handle missing types correctly.

8 years ago[runtime] Add MonoError to search_modules. Fix signature of mono_class_from_name_chec...
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[runtime] Add MonoError to search_modules. Fix signature of mono_class_from_name_checked_aux (MonoError MUST be last arg).

8 years ago[runtime] Switch GENERATE_GET_CLASS_WITH_CACHE to use mono_class_load_from_name....
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[runtime] Switch GENERATE_GET_CLASS_WITH_CACHE to use mono_class_load_from_name. Kill dead macro.

8 years ago[runtime] Add manually coded version of GENERATE_GET_CLASS_WITH_CACHE that uses Syste...
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[runtime] Add manually coded version of GENERATE_GET_CLASS_WITH_CACHE that uses System.dll

8 years ago[runtime] Replace mono_class_from_name with mono_class_load_from_name for explicit...
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[runtime] Replace mono_class_from_name with mono_class_load_from_name for explicit loads that must not fail.

8 years ago[runtime] Add type load caching to one missing thing appdomain.c
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[runtime] Add type load caching to one missing thing appdomain.c

8 years ago[runtime] Use mono_class_load_from_name to load types in mono_defaults.
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[runtime] Use mono_class_load_from_name to load types in mono_defaults.

We can use mono_class_load_from_name in all cases that we previously used to assert after loading.

All optional types have being moved over to use GENERATE_TRY_GET_CLASS_WITH_CACHE.

All but System.Runtime.ConstrainedExecution.CriticalFinalizerObject which is used within
sgen and we must ensure we don't try to lazy load it there.

I'm not 100% sure whether it should be optional, maybe it's a leftover from the 1.0 -> 2.0 timeframe?

The problem is that marking more types as required would be a burden on linkers as they might not force
it to be preserved.

I'm not particularly happy with the current large set of types that are loaded upfront. A significant
number of them could be lazy loaded.

8 years ago[runtime] Replace explicit lookup with GENERATE_GET_CLASS_WITH_CACHE in cominterop.c
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[runtime] Replace explicit lookup with GENERATE_GET_CLASS_WITH_CACHE in cominterop.c

Last place with adhoc lookup & caching.

8 years ago[runtime] Add GENERATE_TRY_GET_CLASS_WITH_CACHE macro that generates a probing function.
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[runtime] Add GENERATE_TRY_GET_CLASS_WITH_CACHE macro that generates a probing function.

This function generates probing functions that rely on mono_class_try_load_from_name.

In addition replace usage of hand crafted loading code from all around.

8 years ago[runtime] Add mono_class_load_from_name and mono_class_try_load_from_name.
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[runtime] Add mono_class_load_from_name and mono_class_try_load_from_name.

Those are variants of mono_class_from_name_checked that implement two common type loading scenarios in the rutime.

The first is mono_class_load_from_name, that loads critical types that the runtime cannot function without.
This means we abort if the type is missing or broken. We should use it in places where today we crash when
either of those would happen.

The other is mono_class_try_load_from_name, which is ok if the type is not found, but will abort if the type is broken.
The reasoning for aborting on a broken type is that it's unclear on whether the runtime should be using the type or not,
specially given most of those optional types change behavior of the application. This, in practice, forces the linker to
not produce a broken corlib.

8 years agoMerge pull request #2647 from qmfrederik/fixes/eventsources
Alexander Köplinger [Sat, 20 Feb 2016 15:42:23 +0000 (16:42 +0100)]
Merge pull request #2647 from qmfrederik/fixes/eventsources

WSDualHttpBinding: Additional constructor overloads to match .NET 4.5

8 years agoMerge pull request #2659 from tritao/system_io_compression_reopen
Marek Safar [Sat, 20 Feb 2016 08:41:08 +0000 (09:41 +0100)]
Merge pull request #2659 from tritao/system_io_compression_reopen

[System.IO.Compression] Fixed re-opening of disposed Zip entry streams.

8 years agoRevert "Revert "[jit] Don't allocate memory for unused vreg""
Vlad Brezae [Wed, 17 Feb 2016 22:26:20 +0000 (14:26 -0800)]
Revert "Revert "[jit] Don't allocate memory for unused vreg""

This reverts commit c4037092ac415665b4b2aa639b389deb5bcfc12d.

8 years ago[jit] Clear defs only for valid vregs used by the bblock's instructions
Vlad Brezae [Wed, 17 Feb 2016 22:11:11 +0000 (00:11 +0200)]
[jit] Clear defs only for valid vregs used by the bblock's instructions

Also clean the most significant part of long vregs.

8 years ago[System.Web.ApplicationServices] Add new file to EXTRA_DISTFILES
Alexander Köplinger [Sat, 20 Feb 2016 04:21:21 +0000 (05:21 +0100)]
[System.Web.ApplicationServices] Add new file to EXTRA_DISTFILES

It was added in 383d80a7850c2737e931a6d9ca8b26c98eefd79c. Fixes tarball.