mono.git
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 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[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.

8 years agoMerge pull request #2638 from gofman/fixprintsettings
monojenkins [Sat, 20 Feb 2016 03:40:28 +0000 (03:40 +0000)]
Merge pull request #2638 from gofman/fixprintsettings

[System.Drawing.Printing] CUPS default PageSize and InputSlot should …

[System.Drawing.Printing] CUPS default PageSize and InputSlot should override PPD defaults.

There is already a test case for that (PrintingServicesUnixTest.cs, Bug602934_PrinterSettingsReturnActualValues) which fails when user configured options are different from PPD settings. Patch also makes this test not to fail if "Resolution" option is not present in CUPS options.

8 years ago[llvm] Allow the llvm backend to work with a new version of the mono llvm fork based...
Zoltan Varga [Sat, 20 Feb 2016 01:41:26 +0000 (20:41 -0500)]
[llvm] Allow the llvm backend to work with a new version of the mono llvm fork based on llvm 3.9.
This version is at:
https://github.com/mono/llvm/tree/llvm-master
It has a mono api version starting from 100. Currently, using LLVM in JIT mode is not supported, only AOT.

8 years agoMerge pull request #2649 from kjuby8709gsome/master
Alexander Köplinger [Sat, 20 Feb 2016 00:30:29 +0000 (01:30 +0100)]
Merge pull request #2649 from kjuby8709gsome/master

[System]: System.TimeZoneInfo - implemented GetUtcOffset with DateTim…

8 years ago[System.IO.Compression] Fixed re-opening of disposed Zip entry streams.
Joao Matos [Fri, 19 Feb 2016 23:30:05 +0000 (23:30 +0000)]
[System.IO.Compression] Fixed re-opening of disposed Zip entry streams.

Fixes System.IO.Compression to work against Microsoft Office OpenXML SDK which depends on this behavior.

Also partial fix for https://bugzilla.xamarin.com/show_bug.cgi?id=33553.

8 years agoAdd placeholders for missing methods:
Frederik Carlier [Fri, 19 Feb 2016 15:18:42 +0000 (16:18 +0100)]
Add placeholders for missing methods:
* WSDualHttpBinding: Add additional constructor overloads to match .NET 4.5
* Dispatcher: Add support for the various InvokeAsync methods

8 years agoMerge pull request #2656 from lambdageek/dev/bug-38600
Alexis Christoforides [Fri, 19 Feb 2016 22:01:56 +0000 (17:01 -0500)]
Merge pull request #2656 from lambdageek/dev/bug-38600

[mkbundle] Support spaces, strange symbols in assembly names

8 years ago[mkbundle] Support spaces, strange symbols in assembly names
Aleksey Kliger [Fri, 19 Feb 2016 21:37:49 +0000 (16:37 -0500)]
[mkbundle] Support spaces, strange symbols in assembly names

In the asm stubs, replace everything that isn't a-zA-Z0-9_ by an underscore.

Sprinkle quotes in commandline args when running the linker.

Fixes [Bugzilla #38600](https://bugzilla.xamarin.com/show_bug.cgi?id=38600)

8 years agoMerge pull request #2652 from PAVBAN95/master
Alex Rønne Petersen [Fri, 19 Feb 2016 20:14:32 +0000 (21:14 +0100)]
Merge pull request #2652 from PAVBAN95/master

Fixed typo in README.md

8 years agoFixed typo in README.md
PAVAN BANSAL [Fri, 19 Feb 2016 19:52:33 +0000 (01:22 +0530)]
Fixed typo in README.md

slightly was misspelled as slighty.

8 years agoMerge pull request #2632 from kasthack/sysweb-import
Marek Safar [Fri, 19 Feb 2016 19:52:07 +0000 (20:52 +0100)]
Merge pull request #2632 from kasthack/sysweb-import

[System.Web.*] Reference source import

8 years ago[runtime] Wrap mono_jit_attach and mono_jit_detach in try { ... } finally { ... ...
Ludovic Henry [Wed, 17 Feb 2016 17:39:25 +0000 (17:39 +0000)]
[runtime] Wrap mono_jit_attach and mono_jit_detach in try { ... } finally { ... } clause

This is useful for coop mode only, as coop needs additionnal thread state transition from BLOCKING to RUNNING and vice versa, and if both these transitions are not done properly, we finish in a incorrect state.
In non-coop mode, the mono_jit_detach only sets the domain to NULL, to avoid scanning threads unnecessarily, so not actually detaching properly is not hurting anything.

8 years ago[coop] Fix native-to-managed wrapper thread attach
Ludovic Henry [Mon, 15 Feb 2016 16:39:09 +0000 (16:39 +0000)]
[coop] Fix native-to-managed wrapper thread attach

Previously, when we would invoke a native-to-managed wrapper from a thread that has not been attached to the runtime, we would simply ensure to attach this thread to the runtime. The issue arise when using coop and needing to switch a thread which is not executing runtime or managed code to BLOCKING state.

That would arise on iOS when using dispatch_async:
 - the user would enqueue a Delegate, triggering a call to mono_delegate_to_ftnptr, generating this native-to-managed wrapper
 - the wrapper would be called asynchronously on a thread managed by the OS/dispatch_async
 - the thread would attach to the runtime, switching its state from STARTING -> RUNNING
 - the thread would finish executing the delegate, thus 'detaching' from the runtime, but without switching its state from RUNNING -> BLOCKING
 - during the next garbage collection, the GC would try to suspend this thread as it is still in RUNNING state, but because it's neither executing runtime code, neither managed code, it will never hit a safepoint, leading to a timeouting suspend.

To fix that issue, we need to support the following state switches:
 - STARTING -> RUNNING -> BLOCKING: happens when it's the first time this thread calls a native-to-managed wrapper
 - BLOCKING -> RUNNING -> BLOCKING: happens when it's not the first time this thread is called from a facility like dispatch_async, or if it is, for example, called as a callback from an external library
 - RUNNING -> RUNNING -> RUNNING: if we call this wrapper from runtime or managed code, see for example System.Reflection.Emit.ILGeneratorTest.TestEmitCalliWithNullReturnType

This facility also need to take care of the current domain, to ensure that we switch properly between domains, and set it to the one that was used when creating this delegate, then restoring the original one.

8 years agoMerge pull request #2650 from radical/csc-args
Marek Safar [Fri, 19 Feb 2016 17:33:00 +0000 (18:33 +0100)]
Merge pull request #2650 from radical/csc-args

[mcs] Accept and ignore command line args supported by csc that we don't

8 years ago[mcs] Accept and ignore command line args supported by csc that we don't
Ankit Jain [Fri, 19 Feb 2016 17:13:35 +0000 (12:13 -0500)]
[mcs] Accept and ignore command line args supported by csc that we don't

support:

/win32manifest
/nowin32manifest

8 years ago[System]: System.TimeZoneInfo - implemented GetUtcOffset with DateTimeOffset
kchernyavskiy [Fri, 19 Feb 2016 17:03:15 +0000 (21:03 +0400)]
[System]: System.TimeZoneInfo - implemented GetUtcOffset with DateTimeOffset

8 years ago[System.Web.*] Reference source import: System.Web.Profile.(ProfileInfoCollection...
kasthack [Fri, 19 Feb 2016 15:04:06 +0000 (18:04 +0300)]
[System.Web.*] Reference source import: System.Web.Profile.(ProfileInfoCollection, ProfileInfo, ProfileAuthenticationOption, DefaultProfile), missing System.Web.ModelBinding and System.Web.UI types, System.Web.ApplicationServices.(...)

8 years ago[Microsoft.Build] Fix expected output newline from ProcessWrapper.OutputStreamChanged...
Ludovic Henry [Fri, 19 Feb 2016 14:40:02 +0000 (14:40 +0000)]
[Microsoft.Build] Fix expected output newline from ProcessWrapper.OutputStreamChanged and ProcessWrapper.ErrorStreamChanged

The previous implementation of ProcessWrapper OutputStreamChanged and ErrorStreamChanged would manually launch a background thread to read on the process StandardOutput and StandardError, then simply passing the output to the OutputStreamChanged and ErrorStreamChanged events. This mean that even the newline characters would be passed to these events, leaving these events callbacks deal with splitting the output line by line.
On the other hand, Process.OutputDataReceived and Process.ErrorDataReceived already split the data line by line, and discard the newline character. That implies that, to keep the old ProcessWrapper behaviour, we need to add these newlines character before calling OutputStreamChanged and ErrorStreamChanged events callbacks.

8 years ago[Microsoft.Build] Fix XS build error
Ludovic Henry [Fri, 19 Feb 2016 14:01:06 +0000 (14:01 +0000)]
[Microsoft.Build] Fix XS build error

We observe the following error when building XS:

"Threadpool worker" tid=0x0x7f011bfff700 this=0x0x7f01394bfb30 thread handle 0x432 state : not waiting owns ()
  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Threading.WaitHandle.WaitAll_internal (System.Threading.WaitHandle[],int,bool) <0x0005d>
  at System.Threading.WaitHandle.WaitAll (System.Threading.WaitHandle[]) <0x00026>
  at Microsoft.Build.Utilities.ProcessWrapper.<Start>m__0 (object,System.EventArgs) <0x0008f>
  at System.Diagnostics.Process.OnExited () <0x000ed>
  at System.Diagnostics.Process.RaiseOnExited () <0x0009f>
  at System.Diagnostics.Process.CompletionCallback (object,bool) <0x00017>
  at System.Threading.RegisteredWaitHandle.DoCallBack (object) <0x00088>
  at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context (object) <0x00058>
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) <0x001c6>
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) <0x00020>
  at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () <0x0004c>
  at System.Threading.ThreadPoolWorkQueue.Dispatch () <0x001d6>
  at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () <0x00008>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_bool (object,intptr,intptr,intptr) <0x0005a>

And the process output would contains a bunch of "_wapi_handle_ref: Attempting to ref unused handle 0x1234" and "_wapi_handle_unref_full: Attempting to unref unused handle 0x1234".

The expected behaviour is for WaitHandle.(WaitAll|WaitAny|WaitOne|SignalAndWait) and EventWaitHandle.Set to throw an ObjectDisposedException in case the WaitHandle (or one of them if calling WaitAll, WaitAny or SignalAndWait) have been disposed.

This error would be due to a race between ProcessWrapper.Dispose, which closes endEventOut and endEventErr, and the above Process.Wrapper.<Start>m__0 (the base.Exited) callback, which waits on endEventOut and endEventErr.

8 years ago[bcl] Add workaround for csc bug
Marek Safar [Fri, 19 Feb 2016 12:26:09 +0000 (13:26 +0100)]
[bcl] Add workaround for csc bug

8 years ago[System.Drawing.Printing] CUPS default PageSize and InputSlot should override PPD...
Paul Gofman [Thu, 18 Feb 2016 11:03:24 +0000 (14:03 +0300)]
[System.Drawing.Printing] CUPS default PageSize and InputSlot should override PPD defaults.

There is already a test case for that (PrintingServicesUnixTest.cs,
Bug602934_PrinterSettingsReturnActualValues) which fails when user
configured options are different from PPD settings. Patch also makes
this test not to fail if "Resolution" option is not present in CUPS
options.

*Update: removed leftover debug Console.WriteLine from patch

8 years ago[jit] Fix a regression introduced by c0b9be3e03ac5001dffd6dd13ca16ef361ee79ee.
Zoltan Varga [Fri, 19 Feb 2016 05:25:42 +0000 (00:25 -0500)]
[jit] Fix a regression introduced by c0b9be3e03ac5001dffd6dd13ca16ef361ee79ee.

8 years ago[runtime] Avoid a crash when trying to load a non-assembly file as an assembly. Fixes...
Zoltan Varga [Fri, 19 Feb 2016 04:33:32 +0000 (23:33 -0500)]
[runtime] Avoid a crash when trying to load a non-assembly file as an assembly. Fixes #38825.

8 years agoRevert accidental change to submodule from 40017f9
Alexander Köplinger [Fri, 19 Feb 2016 01:49:44 +0000 (02:49 +0100)]
Revert accidental change to submodule from 40017f9

8 years agoMerge pull request #2643 from xmcclure/disable-hw-traps
monojenkins [Fri, 19 Feb 2016 00:10:18 +0000 (00:10 +0000)]
Merge pull request #2643 from xmcclure/disable-hw-traps

DISABLE_HW_TRAPS flag to disable signal reliance

Single switch for both explicit null checks and explicit illegal-divide checks.

8 years ago[jit] Add missing div check to OP_IREM_IMM.
Zoltan Varga [Thu, 18 Feb 2016 23:36:05 +0000 (18:36 -0500)]
[jit] Add missing div check to OP_IREM_IMM.

8 years agoMerge pull request #2626 from lewurm/jit-time-track
monojenkins [Thu, 18 Feb 2016 23:08:36 +0000 (23:08 +0000)]
Merge pull request #2626 from lewurm/jit-time-track

[jit] add more detailed statistics for single phases

@vargaz: can I have a review on that please? :)

8 years ago[jit] Add div checks to OP_LDIV etc. opcodes.
Zoltan Varga [Thu, 18 Feb 2016 22:53:16 +0000 (17:53 -0500)]
[jit] Add div checks to OP_LDIV etc. opcodes.

8 years agoMerge pull request #2642 from kumpera/monodis_fix
monojenkins [Thu, 18 Feb 2016 22:40:24 +0000 (22:40 +0000)]
Merge pull request #2642 from kumpera/monodis_fix

[monodis] Improve error handling so it can survive the broken assembly from #37393.

8 years agoDISABLE_HW_TRAPS flag to disable signal reliance
Andi McClure [Thu, 18 Feb 2016 22:16:29 +0000 (17:16 -0500)]
DISABLE_HW_TRAPS flag to disable signal reliance

Single switch for both explicit null checks and explicit illegal-divide checks

8 years ago[mkbundle] Small fixes under Windows
Alexis Christoforides [Wed, 27 Jan 2016 20:26:58 +0000 (15:26 -0500)]
[mkbundle] Small fixes under Windows
* Quote source files before passing to cl.exe
* Use Windows subsystem instead of console but still use main() entry point and not WinMain()

8 years ago[jit] Add div checks to the OP_IDIV_IMM etc. opcodes if needed.
Zoltan Varga [Thu, 18 Feb 2016 20:56:09 +0000 (15:56 -0500)]
[jit] Add div checks to the OP_IDIV_IMM etc. opcodes if needed.

8 years ago[Mainsoft] Remove deprecated code: the Mainsoft code has not been maintained in years
Miguel de Icaza [Thu, 18 Feb 2016 19:49:40 +0000 (14:49 -0500)]
[Mainsoft] Remove deprecated code: the Mainsoft code has not been maintained in years

8 years ago[monodis] Improve error handling so it can survive the broken assembly from #37393.
Rodrigo Kumpera [Mon, 16 Nov 2015 05:22:56 +0000 (00:22 -0500)]
[monodis] Improve error handling so it can survive the broken assembly from #37393.

8 years agoMerge pull request #2609 from directhex/xambug-30902
Alexander Köplinger [Thu, 18 Feb 2016 11:45:52 +0000 (12:45 +0100)]
Merge pull request #2609 from directhex/xambug-30902

Use X509 serial number in Mono cert store filename

8 years agoMerge pull request #2624 from ludovic-henry/monoerror-appdomain
Ludovic Henry [Thu, 18 Feb 2016 11:11:41 +0000 (11:11 +0000)]
Merge pull request #2624 from ludovic-henry/monoerror-appdomain

[runtime] Use MonoError for appdomain.c functions

8 years agoMerge pull request #2630 from ludovic-henry/fix-registeredwaithandle-leak
Ludovic Henry [Thu, 18 Feb 2016 10:53:37 +0000 (10:53 +0000)]
Merge pull request #2630 from ludovic-henry/fix-registeredwaithandle-leak

[corlib] Fix potential RegisteredWaitHandle resource leak

8 years agoMerge pull request #2635 from xmcclure/timezoneinfo
Rodrigo Kumpera [Thu, 18 Feb 2016 04:12:15 +0000 (23:12 -0500)]
Merge pull request #2635 from xmcclure/timezoneinfo

Broaden readlink load failure check in TimeZoneInfo

8 years ago[jit] Get rid of the non-checked variant of mono_resolve_patch_target (), its not...
Zoltan Varga [Thu, 18 Feb 2016 03:23:25 +0000 (22:23 -0500)]
[jit] Get rid of the non-checked variant of mono_resolve_patch_target (), its not used any more.

8 years agoBump Makefile to trigger full build.
Martin Baulig [Thu, 18 Feb 2016 01:35:10 +0000 (20:35 -0500)]
Bump Makefile to trigger full build.

(cherry picked from commit 905088bb90a7b8c0e66767af41aa636bc180da30)

8 years ago[System]: 'ServicePointManager.CertificatePolicy': lazily initialize.
Martin Baulig [Thu, 18 Feb 2016 01:29:15 +0000 (20:29 -0500)]
[System]: 'ServicePointManager.CertificatePolicy': lazily initialize.

The internal GetLegacyCertificatePolicy() now returns null unless this
property has explicitly been assigned to, so the legacy handler will not
be used in ChainValidationHelper.

(cherry picked from commit e69e8784059f7635f91910af71f5a19bd1d0e392)

8 years ago[Mono.Security]: Make 'MonoTlsSettings.UseServicePointManagerCallback' a 'bool?'.
Martin Baulig [Thu, 18 Feb 2016 01:03:04 +0000 (20:03 -0500)]
[Mono.Security]: Make 'MonoTlsSettings.UseServicePointManagerCallback' a 'bool?'.

The default value is 'true' when using HttpWebRequest, but false when using SslStream
directly.

(cherry picked from commit c871ff63ff09e0472fe268373237373df9739837)

8 years ago[System]: 'HttpWebRequest.Proxy' - update ServicePoint on assignment.
Martin Baulig [Wed, 17 Feb 2016 23:11:31 +0000 (18:11 -0500)]
[System]: 'HttpWebRequest.Proxy' - update ServicePoint on assignment.

(cherry picked from commit 08e3a4120ca5dd315df1422c027228ee8729650c)

8 years ago[System]: Properly propage exceptions in HttpWebRequest.BeginGetResponse().
Martin Baulig [Wed, 17 Feb 2016 22:44:00 +0000 (17:44 -0500)]
[System]: Properly propage exceptions in HttpWebRequest.BeginGetResponse().

(cherry picked from commit acf6c4bd3718265bc62aafc6338d024db1a4e950)

8 years ago[System]: Disallow "https" proxies in ServicePointManager.FindServicePoint().
Martin Baulig [Wed, 17 Feb 2016 21:07:37 +0000 (16:07 -0500)]
[System]: Disallow "https" proxies in ServicePointManager.FindServicePoint().

(cherry picked from commit e734cd8b598a0c2d036db66c049f7b7c1f5fda2c)

8 years ago[System]: Use correct default value for `ServicePointManager.SecurityProtocol`.
Martin Baulig [Tue, 16 Feb 2016 20:50:56 +0000 (15:50 -0500)]
[System]: Use correct default value for `ServicePointManager.SecurityProtocol`.

(cherry picked from commit ddf47829d94db85f8b1fb7c391654e3329c132b9)

8 years ago[System]: Clone the X509Certificate instance that's stored in ServicePoint.
Martin Baulig [Fri, 12 Feb 2016 19:29:53 +0000 (14:29 -0500)]
[System]: Clone the X509Certificate instance that's stored in ServicePoint.

(cherry picked from commit 65afb9f6407b5b3e4864eb04ae81ed4732ffaa77)

8 years agoBroaden readlink load failure check in TimeZoneInfo
Andi McClure [Wed, 17 Feb 2016 21:49:15 +0000 (16:49 -0500)]
Broaden readlink load failure check in TimeZoneInfo

Previously this caught only cases where libc was absent, now it catches cases where libc is present but does not contain readlink

8 years agoMerge pull request #2633 from xmcclure/fixmobile
monojenkins [Wed, 17 Feb 2016 21:35:34 +0000 (21:35 +0000)]
Merge pull request #2633 from xmcclure/fixmobile

Fix mobile/AOT build following System.Diagnostics.Process import

System.Diagnostics.Process was recently added to Mono. This introduced two problems for mobile builds:

- Support classes were not added to the mobile profile .sources.
- The imported referencesource code did not build on fullaot.

This PR fixes both issues.

8 years agoPrepare XM for Http additions
Chris Hamons [Wed, 17 Feb 2016 20:19:44 +0000 (14:19 -0600)]
Prepare XM for Http additions

8 years ago[jit] Fix build on ppc
Alexander Köplinger [Wed, 17 Feb 2016 20:20:03 +0000 (21:20 +0100)]
[jit] Fix build on ppc

Declaration of the 'error' variable was missed in 3b438cfce3f8f63402ebeff68cc93944e8d54e38

8 years ago[jit] add timers for several phases
Bernhard Urban [Wed, 17 Feb 2016 18:53:13 +0000 (10:53 -0800)]
[jit] add timers for several phases

8 years ago[jit] refactor branch fixups between basic blocks into function
Bernhard Urban [Wed, 17 Feb 2016 00:53:36 +0000 (16:53 -0800)]
[jit] refactor branch fixups between basic blocks into function

8 years ago[jit] refactor basic block ordering in separate function
Bernhard Urban [Wed, 17 Feb 2016 00:53:29 +0000 (16:53 -0800)]
[jit] refactor basic block ordering in separate function

8 years ago[jit] update jit statistics during aot compilation
Bernhard Urban [Wed, 17 Feb 2016 18:40:01 +0000 (10:40 -0800)]
[jit] update jit statistics during aot compilation

8 years ago[jit] refactor out time tracking function
Bernhard Urban [Wed, 17 Feb 2016 18:34:37 +0000 (10:34 -0800)]
[jit] refactor out time tracking function

8 years ago[man] Updated Mono man page with AOT gen-seq-points-file option.
João Matos [Wed, 17 Feb 2016 17:41:48 +0000 (17:41 +0000)]
[man] Updated Mono man page with AOT gen-seq-points-file option.

8 years ago[aot] Remove debugging print.
João Matos [Wed, 17 Feb 2016 17:18:06 +0000 (17:18 +0000)]
[aot] Remove debugging print.

8 years agoMerge pull request #2631 from ludovic-henry/fix-microsoftbuild
monojenkins [Wed, 17 Feb 2016 17:25:30 +0000 (17:25 +0000)]
Merge pull request #2631 from ludovic-henry/fix-microsoftbuild

[Microsoft.Build] Fix Microsoft.Build.Execution.BuildManagerTest.BasicManualParallelBuilds

The previous implementation of ProcessWrapper would launch its own threads to read on the process stdout and stderr. We can more simply use OutputDataReceived and ErrorDataReceived which will do the same under the hood. We use as well the Exited event to track the end of the Process.

8 years agoUpdate referencesources (to fix full-aot build)
Andi McClure [Wed, 17 Feb 2016 16:25:19 +0000 (11:25 -0500)]
Update referencesources (to fix full-aot build)

8 years ago[aot] Reworked sequence points file AOT option to allow an explicit path passed.
João Matos [Wed, 17 Feb 2016 15:49:19 +0000 (15:49 +0000)]
[aot] Reworked sequence points file AOT option to allow an explicit path passed.

This will be used to fix msym files being overwritten per ABI compilation in AOT compilation driven by Monodroid.

8 years ago[tests] List files from the repo intead of / for process-stress-3.cs
Ludovic Henry [Wed, 17 Feb 2016 15:46:21 +0000 (15:46 +0000)]
[tests] List files from the repo intead of / for process-stress-3.cs

On some machines, slow remote devices can be attached, leading to very slow find commands, leading to timeouts.

8 years agoMerge pull request #2628 from kumpera/misc-loader-error
monojenkins [Wed, 17 Feb 2016 15:38:52 +0000 (15:38 +0000)]
Merge pull request #2628 from kumpera/misc-loader-error

[runtime] Small set of cleanups to the loader code.

8 years ago[Microsoft.Build] Fix Microsoft.Build.Execution.BuildManagerTest.BasicManualParallelB...
Ludovic Henry [Wed, 17 Feb 2016 12:48:37 +0000 (12:48 +0000)]
[Microsoft.Build] Fix Microsoft.Build.Execution.BuildManagerTest.BasicManualParallelBuilds

The previous implementation of ProcessWrapper would launch its own threads to read on the process stdout and stderr. We can more simply use OutputDataReceived and ErrorDataReceived which will do the same under the hood. We use as well the Exited event to track the end of the Process.

8 years ago[runtime] Use MonoError for mono_context_init
Ludovic Henry [Tue, 16 Feb 2016 11:46:15 +0000 (11:46 +0000)]
[runtime] Use MonoError for mono_context_init

8 years ago[runtime] Use MonoError for mono_runtime_init
Ludovic Henry [Tue, 16 Feb 2016 11:42:47 +0000 (11:42 +0000)]
[runtime] Use MonoError for mono_runtime_init

8 years ago[runtime] Use MonoError for mono_domain_try_type_resolve
Ludovic Henry [Tue, 16 Feb 2016 11:37:59 +0000 (11:37 +0000)]
[runtime] Use MonoError for mono_domain_try_type_resolve

8 years ago[runtime] Mark mono_domain_create_appdomain as MONO_RT_EXTERNAL_ONLY
Ludovic Henry [Tue, 16 Feb 2016 11:22:08 +0000 (11:22 +0000)]
[runtime] Mark mono_domain_create_appdomain as MONO_RT_EXTERNAL_ONLY

8 years ago[runtime] Use MonoError for mono_try_assembly_resolve
Ludovic Henry [Tue, 16 Feb 2016 11:04:23 +0000 (11:04 +0000)]
[runtime] Use MonoError for mono_try_assembly_resolve

8 years ago[runtime] Use MonoError for copy_app_domain_setup
Ludovic Henry [Tue, 16 Feb 2016 10:55:03 +0000 (10:55 +0000)]
[runtime] Use MonoError for copy_app_domain_setup