mono.git
8 years agoMerge pull request #2446 from akoeplinger/remove-leftover-file
monojenkins [Fri, 15 Jan 2016 20:15:17 +0000 (20:15 +0000)]
Merge pull request #2446 from akoeplinger/remove-leftover-file

[corlib] Remove left-over files from long ago (System.PAL/Linux)

They are no longer in use and cause confusion as they show up in search results.

@monojenkins merge

8 years ago[corlib] Remove left-over files from long ago (System.PAL/Linux)
Alexander Köplinger [Fri, 15 Jan 2016 18:30:18 +0000 (19:30 +0100)]
[corlib] Remove left-over files from long ago (System.PAL/Linux)

They are no longer in use and cause confusion as they show up in search results.

8 years agoMerge pull request #2444 from xmcclure/randfixes
monojenkins [Fri, 15 Jan 2016 18:20:15 +0000 (18:20 +0000)]
Merge pull request #2444 from xmcclure/randfixes

Bugfixes in mono-rand.c

2 commits:

* Make mono-rand consistent (fixes threadpool on some UNIX systems)

  mono-rand.c defines a function interface and provides three implementations (Windows, modern UNIX, base C standard). The clients of this file (RNGCryptoServiceProvider.cs, threadpool-ms-io.c) appear to be consistent in how they use this interface, but the interface is not documented, and the C-only implementation deviates from it (the return value of init is different). The result is that threadpool-ms-io fails an assert when run on a system using the C-only implementation. I documented the interface and fixed the C-only quirk.

* Fix nonuniform distribution of mono_rand_try_get_uint32

  mono_rand_try_get_uint32 returns a value in a range min..max inclusive. Due to a math error the ‘max’ value will be returned only one out of every 2^32-1 calls to the function. This is currently harmless because the only current callers of this function (in threadpool-ms-io) will run fine even if their max value is never returned, but it could become a problem later.

8 years agoMerge pull request #2445 from nealef/master
Alexander Köplinger [Fri, 15 Jan 2016 17:52:22 +0000 (18:52 +0100)]
Merge pull request #2445 from nealef/master

Fix certmgr when a unicode encoded null is used as password

8 years agoFix certmgr when a unicode encoded null is used as password
Neale [Fri, 15 Jan 2016 16:30:56 +0000 (11:30 -0500)]
Fix certmgr when a unicode encoded null is used as password

8 years agoFix nonuniform distribution of mono_rand_try_get_uint32
Andi McClure [Fri, 15 Jan 2016 16:19:35 +0000 (11:19 -0500)]
Fix nonuniform distribution of mono_rand_try_get_uint32

mono_rand_try_get_uint32 returns a value in a range min..max
inclusive. Due to a math error the ‘max’ value will be returned only
one out of every 2^32-1 calls to the function. This is currently
harmless because the only current callers of this function (in
threadpool-ms-io) will run fine even if their max value is never
returned, but it could become a problem later.

8 years agoMake mono-rand consistent (fixes threadpool on some UNIX systems)
Andi McClure [Fri, 15 Jan 2016 16:01:31 +0000 (11:01 -0500)]
Make mono-rand consistent (fixes threadpool on some UNIX systems)

mono-rand.c defines a function interface and provides three
implementations (Windows, modern UNIX, base C standard). The clients
of this file (RNGCryptoServiceProvider.cs, threadpool-ms-io.c) appear
to be consistent in how they use this interface, but the interface is
not documented, and the C-only implementation deviates from it (the
return value of init is different). The result is that
threadpool-ms-io fails an assert when run on a system using the C-only
implementation. I documented the interface and fixed the C-only quirk.

8 years ago[getline] Improve the embedded sample
Miguel de Icaza [Fri, 15 Jan 2016 15:26:16 +0000 (10:26 -0500)]
[getline] Improve the embedded sample

8 years ago[getline] Fix the logic for advancing the top item
Miguel de Icaza [Fri, 15 Jan 2016 15:21:38 +0000 (10:21 -0500)]
[getline] Fix the logic for advancing the top item

8 years ago[Process] Fix monodroid build
Ludovic Henry [Fri, 15 Jan 2016 15:14:03 +0000 (15:14 +0000)]
[Process] Fix monodroid build

8 years ago[llvm] Split long bblocks instead of disabling llvm for methods with them.
Zoltan Varga [Fri, 15 Jan 2016 15:05:34 +0000 (10:05 -0500)]
[llvm] Split long bblocks instead of disabling llvm for methods with them.

8 years ago[llvm] Fix a type conversion problem when calling the same method with two different...
Zoltan Varga [Fri, 15 Jan 2016 14:47:44 +0000 (09:47 -0500)]
[llvm] Fix a type conversion problem when calling the same method with two different signatures.

8 years agoMerge pull request #2362 from ludovic-henry/fix-process-missedoutput
Ludovic Henry [Fri, 15 Jan 2016 14:32:32 +0000 (14:32 +0000)]
Merge pull request #2362 from ludovic-henry/fix-process-missedoutput

[Process] Use ReferenceSource process async output/error reader

8 years agoBump reference source for CancellationTokenSource fixes
Marek Safar [Fri, 15 Jan 2016 14:28:45 +0000 (15:28 +0100)]
Bump reference source for CancellationTokenSource fixes

8 years ago[mcs] Update project file
Marek Safar [Fri, 15 Jan 2016 08:59:39 +0000 (09:59 +0100)]
[mcs] Update project file

8 years ago[mcs] Use probing like aproach for member access completion
Marek Safar [Fri, 15 Jan 2016 08:58:31 +0000 (09:58 +0100)]
[mcs] Use probing like aproach for member access completion

8 years agoMerge pull request #2403 from BrzVlad/feature-emulation-delay
Vlad Brezae [Fri, 15 Jan 2016 02:00:17 +0000 (02:00 +0000)]
Merge pull request #2403 from BrzVlad/feature-emulation-delay

[jit] Delay opcode emulation to allow optimization passes to run on these opcodes

8 years ago[llvmonly] Fix mono_patch_info_equal () for MONO_PATCH_INFO_GSHAREDVT_IN_WRAPPER.
Zoltan Varga [Fri, 15 Jan 2016 00:54:54 +0000 (19:54 -0500)]
[llvmonly] Fix mono_patch_info_equal () for MONO_PATCH_INFO_GSHAREDVT_IN_WRAPPER.

8 years ago[llvmonly] Fix the addition of gsharedvt in wrappers around unbox wrappers.
Zoltan Varga [Thu, 14 Jan 2016 23:39:03 +0000 (18:39 -0500)]
[llvmonly] Fix the addition of gsharedvt in wrappers around unbox wrappers.

8 years ago[llvmonly] Fix the gsharedvt parameter passing code so it emits valid llvm il.
Zoltan Varga [Thu, 14 Jan 2016 23:00:47 +0000 (18:00 -0500)]
[llvmonly] Fix the gsharedvt parameter passing code so it emits valid llvm il.

8 years ago[llvmonly] Add unwind info for unbox wrappers, not the get_unbox_tramp () generated...
Zoltan Varga [Thu, 14 Jan 2016 22:04:54 +0000 (17:04 -0500)]
[llvmonly] Add unwind info for unbox wrappers, not the get_unbox_tramp () generated function.

8 years ago[llvmonly] Fix initialization of static gshared methods, they receive a vtable as...
Zoltan Varga [Thu, 14 Jan 2016 21:47:29 +0000 (16:47 -0500)]
[llvmonly] Fix initialization of static gshared methods, they receive a vtable as the rgctx argument, not a MonoMethodRuntimeGenericContext. Emit unwind info for unbox wrappers. Fix calls to gsharedvt methods from non-shared delegate invoke wrappers.

8 years agoMerge pull request #2438 from lambdageek/cherry-pick-coop-handle
Aleksey Kliger (λgeek) [Thu, 14 Jan 2016 20:15:51 +0000 (15:15 -0500)]
Merge pull request #2438 from lambdageek/cherry-pick-coop-handle

Cherry pick handles work

8 years agoMerge pull request #2439 from akoeplinger/fix-seqpoint-test
Zoltan Varga [Thu, 14 Jan 2016 19:42:17 +0000 (14:42 -0500)]
Merge pull request #2439 from akoeplinger/fix-seqpoint-test

[mono] test_op_il_seq_point test should use a temp file for NUnit results

8 years ago[mono] test_op_il_seq_point test should use a temp file for NUnit results
Alexander Köplinger [Thu, 14 Jan 2016 19:27:01 +0000 (20:27 +0100)]
[mono] test_op_il_seq_point test should use a temp file for NUnit results

We were seeing red builds on Jenkins because the NUnit xml was malformed when something bad happened
during the test_op_il_seq_point tests and Jenkins couldn't parse it.

To fix this, write the results into a temp file and only rename to .xml at the end when everything worked.

Additionally, fixed a small typo in cleaning the .so files.

8 years ago[runtime] Fixed ARM cross compiler builds.
João Matos [Thu, 14 Jan 2016 18:05:46 +0000 (18:05 +0000)]
[runtime] Fixed ARM cross compiler builds.

8 years ago[jit] Delay emulation to allow optimizations to happen on these ops
Vlad Brezae [Mon, 21 Dec 2015 12:36:44 +0000 (14:36 +0200)]
[jit] Delay emulation to allow optimizations to happen on these ops

Emulation used to happen at emitting time (method_to_ir). Now it is done after the copy propagation pass, where we propagate immediates and can do strength reduction on some of these ops. Because the call to the native function might imply an inlined wrapper which compiles more IL instructions, we need to run the decomposition pass again.

8 years ago[jit] Support decomposition of long imm ops to simple long ops
Vlad Brezae [Tue, 5 Jan 2016 21:43:36 +0000 (23:43 +0200)]
[jit] Support decomposition of long imm ops to simple long ops

8 years ago[jit] Don't crash in mono_op_imm_to_op if opcode is not handled
Vlad Brezae [Tue, 5 Jan 2016 20:32:50 +0000 (22:32 +0200)]
[jit] Don't crash in mono_op_imm_to_op if opcode is not handled

Mimic the behaviour of its counterpart, mono_op_to_op_imm, since crashing limits the usage of the function and it is the responsability of the upper layer.

8 years ago[jit] Don't decompose into unsupported instructions
Vlad Brezae [Tue, 5 Jan 2016 19:40:59 +0000 (21:40 +0200)]
[jit] Don't decompose into unsupported instructions

If we emulate these ops, it means we don't support the *_2 ops and we shouldn't decompose into them.

8 years ago[jit] Don't hardcode the long vreg components
Vlad Brezae [Fri, 11 Dec 2015 13:49:41 +0000 (05:49 -0800)]
[jit] Don't hardcode the long vreg components

8 years ago[handle] rename mono_handle_arena_(initialize|deinitialize)
Aleksey Kliger [Thu, 14 Jan 2016 17:17:57 +0000 (12:17 -0500)]
[handle] rename mono_handle_arena_(initialize|deinitialize)

to mono_handle_arena_init and mono_handle_arena_cleanup, respectively.

8 years ago[handle] Make MONO_HANDLE_ARENA_POP a function-like macro
Aleksey Kliger [Thu, 14 Jan 2016 17:13:29 +0000 (12:13 -0500)]
[handle] Make MONO_HANDLE_ARENA_POP a function-like macro

8 years ago[sgen] Remove DISABLE_CRITICAL_REGION as it's never defined
Ludovic Henry [Mon, 11 Jan 2016 16:16:04 +0000 (16:16 +0000)]
[sgen] Remove DISABLE_CRITICAL_REGION as it's never defined

8 years ago[checked-build] Add in GC critical region assertion
Ludovic Henry [Mon, 11 Jan 2016 14:00:48 +0000 (14:00 +0000)]
[checked-build] Add in GC critical region assertion

8 years ago[checked] Nest MONO_{PREPARE,FINISH}_GC_CRITICAL_REGION
Aleksey Kliger [Mon, 4 Jan 2016 16:26:55 +0000 (11:26 -0500)]
[checked] Nest MONO_{PREPARE,FINISH}_GC_CRITICAL_REGION

8 years ago[coop] store MonoHandleArena pointer in MonoThreadInfo
Aleksey Kliger [Mon, 28 Dec 2015 22:49:15 +0000 (17:49 -0500)]
[coop] store MonoHandleArena pointer in MonoThreadInfo

8 years ago[handle] Add _SETREF_NULL macros for MonoObjectHandle and MonoArrayHandle
Aleksey Kliger [Thu, 7 Jan 2016 23:21:15 +0000 (18:21 -0500)]
[handle] Add _SETREF_NULL macros for MonoObjectHandle and MonoArrayHandle

8 years ago[handle] Rename MonoHandleStorage->obj to MonoHandleStorage->__private_obj
Ludovic Henry [Wed, 6 Jan 2016 15:35:55 +0000 (15:35 +0000)]
[handle] Rename MonoHandleStorage->obj to MonoHandleStorage->__private_obj

8 years ago[handle] Add mono_handle_obj_is_null utility function
Ludovic Henry [Wed, 6 Jan 2016 14:24:35 +0000 (14:24 +0000)]
[handle] Add mono_handle_obj_is_null utility function

8 years ago[llvmonly] Implement Assembly.GetCallingAssembly () in llvmonly mode by saving the...
Zoltan Varga [Thu, 14 Jan 2016 16:26:22 +0000 (11:26 -0500)]
[llvmonly] Implement Assembly.GetCallingAssembly () in llvmonly mode by saving the current assembly in the calling method. Enable it for Activator.CreateInstance () for now.

8 years ago[Process] Use ReferenceSource process async output/error reader
Ludovic Henry [Thu, 17 Dec 2015 17:10:35 +0000 (17:10 +0000)]
[Process] Use ReferenceSource process async output/error reader

By using the referencesource one, we remove a buggy part of the Process class. It will now simply use Stream.{Begin/End}Read, and not a custom implementation that introduces its own bugs.

8 years ago[man/mono.1] Fix typo from 9115bf0a
Alexander Köplinger [Thu, 14 Jan 2016 15:27:46 +0000 (16:27 +0100)]
[man/mono.1] Fix typo from 9115bf0a

8 years ago[runtime] Make sure ptr-to-structure and structure-and-ptr wrappers are unique, this...
Zoltan Varga [Thu, 14 Jan 2016 15:11:55 +0000 (10:11 -0500)]
[runtime] Make sure ptr-to-structure and structure-and-ptr wrappers are unique, this is needed by full aot. Fixes #20186.

8 years ago[mono] Update predefined Hebrew negative sign. Fixes #37681
Marek Safar [Thu, 14 Jan 2016 14:12:59 +0000 (15:12 +0100)]
[mono] Update predefined Hebrew negative sign. Fixes #37681

8 years ago[corlib] Bump reference source for #37583
Marek Safar [Thu, 14 Jan 2016 13:40:00 +0000 (14:40 +0100)]
[corlib] Bump reference source for #37583

8 years agoMerge pull request #2427 from alexrp/socket-responder-dedup
monojenkins [Thu, 14 Jan 2016 13:10:19 +0000 (13:10 +0000)]
Merge pull request #2427 from alexrp/socket-responder-dedup

[bcl] Deduplicate the SocketResponder test helper class.

A number of fixes were made to the version in System but these fixes were never applied to the System.Web.Services version. Merge the two and place the class in the test-helpers directory to avoid this sort of maintenance problem.

8 years agoMerge pull request #2434 from knocte/bitmapattributes
Marek Safar [Thu, 14 Jan 2016 07:56:50 +0000 (08:56 +0100)]
Merge pull request #2434 from knocte/bitmapattributes

[System.Drawing] Include new .NET4.5 attributes (OWIN)

8 years ago[System.Drawing] Include new .NET4.5 attributes (OWIN)
Andrés G. Aragoneses [Thu, 14 Jan 2016 02:37:10 +0000 (10:37 +0800)]
[System.Drawing] Include new .NET4.5 attributes (OWIN)

These stubs should fix this OWIN issue brought up in StackOverflow:
http://stackoverflow.com/questions/34751771/system-drawing-bitmapsuffixinsameassemblyattribute-missing-in-mono

Docs:
* https://msdn.microsoft.com/en-us/library/system.drawing.bitmapsuffixinsameassemblyattribute%28v=vs.110%29.aspx
* https://msdn.microsoft.com/en-us/library/system.drawing.bitmapsuffixinsatelliteassemblyattribute%28v=vs.110%29.aspx

Patch contributed under the terms of the MIT/X11 licence.

8 years ago[bcl] Deduplicate the SocketResponder test helper class.
Alex Rønne Petersen [Wed, 13 Jan 2016 04:54:43 +0000 (05:54 +0100)]
[bcl] Deduplicate the SocketResponder test helper class.

A number of fixes were made to the version in System but these fixes were never
applied to the System.Web.Services version. Merge the two and place the class
in the test-helpers directory to avoid this sort of maintenance problem.

8 years agoMerge pull request #2426 from alexrp/http-test-remove-abort
Alex Rønne Petersen [Thu, 14 Jan 2016 02:11:41 +0000 (03:11 +0100)]
Merge pull request #2426 from alexrp/http-test-remove-abort

Revert "[bcl] Fix System.Net.HttpWebRequestTest.GetRequestStream hang"

8 years agoMerge pull request #2424 from alexrp/task-unobserved-exceptions
Alex Rønne Petersen [Thu, 14 Jan 2016 02:10:00 +0000 (03:10 +0100)]
Merge pull request #2424 from alexrp/task-unobserved-exceptions

[TPL] Add support for the <ThrowUnobservedTaskExceptions /> config element.

8 years ago[llvm] Add a missing r4 opcodes.
Zoltan Varga [Wed, 13 Jan 2016 21:47:31 +0000 (16:47 -0500)]
[llvm] Add a missing r4 opcodes.

8 years ago[llvmonly] Create empty stacktraces if backtraces are not supported by the platform.
Zoltan Varga [Wed, 13 Jan 2016 21:47:23 +0000 (16:47 -0500)]
[llvmonly] Create empty stacktraces if backtraces are not supported by the platform.

8 years ago[runtime] Disable a test which fails with bitcode.
Zoltan Varga [Wed, 13 Jan 2016 21:45:42 +0000 (16:45 -0500)]
[runtime] Disable a test which fails with bitcode.

8 years agoMerge pull request #2428 from akoeplinger/fix-ipv6-test
Alexander Köplinger [Wed, 13 Jan 2016 17:11:33 +0000 (18:11 +0100)]
Merge pull request #2428 from akoeplinger/fix-ipv6-test

[System] Ignore ReceiveIPv6() UdpClient test when IPv6 is not available

8 years ago[aot] Avoid overwriting entries in domain->seq_points if decode_exception_debug_info...
Zoltan Varga [Wed, 13 Jan 2016 17:10:08 +0000 (12:10 -0500)]
[aot] Avoid overwriting entries in domain->seq_points if decode_exception_debug_info () is called more than once. Fixes #37582.

8 years ago[System] Ignore ReceiveIPv6() UdpClient test when IPv6 is not available
Alexander Köplinger [Wed, 13 Jan 2016 15:48:47 +0000 (16:48 +0100)]
[System] Ignore ReceiveIPv6() UdpClient test when IPv6 is not available

The test hangs on Jenkins otherwise.

8 years ago[System] xamarin_start_wwan is not available for tvOS and watchOS.
Rolf Bjarne Kvinge [Wed, 13 Jan 2016 13:53:15 +0000 (14:53 +0100)]
[System] xamarin_start_wwan is not available for tvOS and watchOS.

8 years ago[handle] Add macro to push/pop arena
Ludovic Henry [Wed, 6 Jan 2016 13:57:08 +0000 (13:57 +0000)]
[handle] Add macro to push/pop arena

8 years ago[handle] Make handle.h use exclusively public headers and MONO_API functions
Ludovic Henry [Wed, 6 Jan 2016 13:50:56 +0000 (13:50 +0000)]
[handle] Make handle.h use exclusively public headers and MONO_API functions

8 years ago[handle] Remove SGen dependency
Ludovic Henry [Wed, 6 Jan 2016 13:42:01 +0000 (13:42 +0000)]
[handle] Remove SGen dependency

8 years ago[handle] Fix typo
Ludovic Henry [Wed, 6 Jan 2016 11:40:22 +0000 (11:40 +0000)]
[handle] Fix typo

8 years ago[handle] Implement mono_handle_(new|elevate) functions
Ludovic Henry [Wed, 6 Jan 2016 11:33:57 +0000 (11:33 +0000)]
[handle] Implement mono_handle_(new|elevate) functions

8 years ago[handle] Inline handle-private.h in handle.h
Ludovic Henry [Wed, 6 Jan 2016 11:23:05 +0000 (11:23 +0000)]
[handle] Inline handle-private.h in handle.h

MonoHandleArena functions need to be as public as MonoHandle functions, as we cannot have one without the other.

8 years agoMerge pull request #2274 from esdrubal/udpclientreceive
Marcos Henrich [Wed, 13 Jan 2016 10:17:38 +0000 (10:17 +0000)]
Merge pull request #2274 from esdrubal/udpclientreceive

Fixes UdpClient.Receive with IPv6 endpoint

8 years agoMerge pull request #2423 from radical/mcs-args
Marek Safar [Wed, 13 Jan 2016 07:37:24 +0000 (08:37 +0100)]
Merge pull request #2423 from radical/mcs-args

[mcs] Accept and ignore command line args supported by csc ..

8 years agoRevert "[System] Tweak tests to work with Thread.Interrupt as well."
Alex Rønne Petersen [Wed, 13 Jan 2016 04:48:04 +0000 (05:48 +0100)]
Revert "[System] Tweak tests to work with Thread.Interrupt as well."

This reverts commit bb50c3f3c943ea85d49df160d45f8edea0005d10.

8 years agoRevert "[bcl] Fix System.Net.HttpWebRequestTest.GetRequestStream hang"
Alex Rønne Petersen [Thu, 10 Dec 2015 17:23:22 +0000 (18:23 +0100)]
Revert "[bcl] Fix System.Net.HttpWebRequestTest.GetRequestStream hang"

This reverts commit b3fa096e5eceea1c3b289b3655244a42c2884274.

The Abort () call is problematic on many platforms and is no longer necessary
as we properly close the listening socket since 1103abf3830131ba2a1deabc133e8d27402302c7.

Conflicts:

mcs/class/System.Web.Services/Test/System.Web.Services.Protocols/SocketResponder.cs
mcs/class/System/Test/System.Net/SocketResponder.cs

8 years ago[TPL] Add support for the <ThrowUnobservedTaskExceptions /> config element.
Alex Rønne Petersen [Wed, 13 Jan 2016 03:52:36 +0000 (04:52 +0100)]
[TPL] Add support for the <ThrowUnobservedTaskExceptions /> config element.

Improves the situation wrt: https://bugzilla.xamarin.com/show_bug.cgi?id=36560

8 years agoMerge pull request #2422 from akoeplinger/environment-is64bitoperatingsystem
João Matos [Wed, 13 Jan 2016 01:55:01 +0000 (01:55 +0000)]
Merge pull request #2422 from akoeplinger/environment-is64bitoperatingsystem

[corlib] Properly implement Environment.Is64BitOperatingSystem

8 years ago[corlib] Properly implement Environment.Is64BitOperatingSystem
Alexander Köplinger [Tue, 12 Jan 2016 15:51:13 +0000 (16:51 +0100)]
[corlib] Properly implement Environment.Is64BitOperatingSystem

Before we only checked if IntPtr.Size == 8, but this returns false for a 32bit Mono running on a 64bit OS.
Added an icall that gets the correct value from the runtime instead.

Note: this currently only whitelists x86_64, aarch64 and ppc64 as 64-bit platforms.

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

8 years agoMerge pull request #2261 from BrzVlad/fix-arm-fast-tls-master
Vlad Brezae [Wed, 13 Jan 2016 01:31:33 +0000 (03:31 +0200)]
Merge pull request #2261 from BrzVlad/fix-arm-fast-tls-master

[arm] Fix arm fast tls

8 years ago[mcs] Accept and ignore command line args supported by csc ..
Ankit Jain [Fri, 8 Jan 2016 21:15:22 +0000 (16:15 -0500)]
[mcs] Accept and ignore command line args supported by csc ..

.. that we don't support:

/utf8output
/subsystemversion
/highentropyva
/highentropyva+
/highentropyva-

8 years ago[llvmonly] Avoid disabling llvm for the Selector.GetHandle () intrinsics.
Zoltan Varga [Tue, 12 Jan 2016 19:39:55 +0000 (14:39 -0500)]
[llvmonly] Avoid disabling llvm for the Selector.GetHandle () intrinsics.

8 years ago[llvmonly] Fix support for variant interface methods, they work similarly to generic...
Zoltan Varga [Tue, 12 Jan 2016 19:23:24 +0000 (14:23 -0500)]
[llvmonly] Fix support for variant interface methods, they work similarly to generic virtual methods.

8 years agoRevert "Apple has introduced the System Integrety Protection in OS X 10.11. This...
Joao Matos [Tue, 12 Jan 2016 17:40:46 +0000 (17:40 +0000)]
Revert "Apple has introduced the System Integrety Protection in OS X 10.11. This prevents writes to /usr amongst other paths. /usr/local is still writable though."

This reverts commit b723c89628187ab138334c108e16d62bc9530d6e.

@migueldeicaza thinks this is the wrong approach, reverting until we figure out the right way to go about this.

8 years ago[llvm] Ignore OP_IL_SEQ_POINT.
Zoltan Varga [Tue, 12 Jan 2016 17:26:30 +0000 (12:26 -0500)]
[llvm] Ignore OP_IL_SEQ_POINT.

8 years agoMerge pull request #2418 from lambdageek/dev/bug-12205
Aleksey Kliger (λgeek) [Tue, 12 Jan 2016 16:50:10 +0000 (11:50 -0500)]
Merge pull request #2418 from lambdageek/dev/bug-12205

[reflection] Correct ReflectedType for generic methods

8 years ago[aot] Add support for name mangling for more types.
Zoltan Varga [Tue, 12 Jan 2016 15:33:36 +0000 (10:33 -0500)]
[aot] Add support for name mangling for more types.

8 years ago[reflection] Test MethodInfo.ReflectedType property
Aleksey Kliger [Mon, 11 Jan 2016 17:10:23 +0000 (12:10 -0500)]
[reflection] Test MethodInfo.ReflectedType property

Test cases for [#12205](https://bugzilla.xamarin.com/show_bug.cgi?id=12205)

8 years ago[mscorlib] Add support for intercepting threadpool work, and use it for Xamarin.iOS...
Rolf Bjarne Kvinge [Fri, 8 Jan 2016 18:50:34 +0000 (19:50 +0100)]
[mscorlib] Add support for intercepting threadpool work, and use it for Xamarin.iOS/Mac.

This is used to Xamarin.iOS/Mac to wrap threadpool work in an NSAutoreleasePool.

Also open up corlib's internals to Xamarin.iOS/Mac so that the linker
doesn't have to be involved when accessing internal API.

8 years ago[reflection] remove override get ReflectedType for MonoGenericMethod and MonoGenricCM...
Aleksey Kliger [Mon, 11 Jan 2016 16:31:47 +0000 (11:31 -0500)]
[reflection] remove override get ReflectedType for MonoGenericMethod and MonoGenricCMethod

Should return the type that was queried, not the type where the method
is declared.

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

8 years ago[runtime] Bump version to 4.3.3.
Zoltan Varga [Mon, 11 Jan 2016 17:01:10 +0000 (12:01 -0500)]
[runtime] Bump version to 4.3.3.

8 years agoMerge pull request #2382 from akoeplinger/system-net-mime-referencesource
Alexander Köplinger [Mon, 11 Jan 2016 13:13:37 +0000 (14:13 +0100)]
Merge pull request #2382 from akoeplinger/system-net-mime-referencesource

[System] Port System.Net.Mime namespace from referencesources

8 years ago[mcs] Fixes inconsistent accessibility check for partial types. Fixes #37232
Marek Safar [Mon, 11 Jan 2016 12:30:53 +0000 (13:30 +0100)]
[mcs] Fixes inconsistent accessibility check for partial types. Fixes #37232

8 years ago[llvm] Allow support for emitting some methods using 'linkonce' linkage. This allows...
Zoltan Varga [Sun, 10 Jan 2016 12:57:28 +0000 (07:57 -0500)]
[llvm] Allow support for emitting some methods using 'linkonce' linkage. This allows the linker to get rid of duplicate copies. Enable it for gsharedvt wrappers.

8 years agoMerge pull request #2415 from razzfazz/fix_timespec
Alexander Köplinger [Sat, 9 Jan 2016 21:42:14 +0000 (22:42 +0100)]
Merge pull request #2415 from razzfazz/fix_timespec

fix struct timespec member name

8 years agoMerge pull request #2414 from akoeplinger/fix-threadpool-test-hang
Zoltan Varga [Sat, 9 Jan 2016 20:45:56 +0000 (15:45 -0500)]
Merge pull request #2414 from akoeplinger/fix-threadpool-test-hang

[corlib] Don't throw exception for null locale to fix threadpool-exceptions5.exe hang

8 years agofix struct timespec member name
Daniel Becker [Sat, 9 Jan 2016 19:43:08 +0000 (11:43 -0800)]
fix struct timespec member name

The second member of struct timespec is actually called tv_nsec
(nanoseconds), not tv_usec (microseconds); this was likely
confused with struct timeval, where the second member is in fact
called tv_usec.

8 years ago[corlib] Don't throw exception for null locale to fix threadpool-exceptions5.exe...
Alexander Köplinger [Sat, 9 Jan 2016 20:11:08 +0000 (21:11 +0100)]
[corlib] Don't throw exception for null locale to fix threadpool-exceptions5.exe hang

We were seeing persistent hangs in the threadpool-exceptions5.exe test on the Jenkins ARM machines.
Tracing the execution showed the following exceptions:

```
[0x7f65e3284700:] EXCEPTION handling: System.Threading.ThreadAbortException:
[0x7f65e3284700:] EXCEPTION handling: System.Exception: From OnCBFinished
[0x7f65e3284700:] EXCEPTION handling: System.ArgumentNullException: Value cannot be null.  <-- from CultureInfo.CreateSpecificCulture()
Parameter name: name
[0x7f65e3284700:] EXCEPTION handling: System.Threading.ThreadAbortException:
exception inside UnhandledException handler:

... program hangs here ...
```

It turns out that the machines don't have the LANG/LC_ALL env vars set, resulting in a null string returned
from get_current_locale_name(). The code then tries to construct a locale from that and throws an ANE which is
normally catched and turned into the InvariantCulture.

However, in the threadpool-exceptions5 test the first time a CultureInfo is created is in the OnUnhandledException
event handler when calling ToString(). This means that an exception is thrown while we are in the unhandled exception
handler and the runtime apparently just stops there (despite the exception actually being catched, probably because of
the thread abort) so we never get to signaling the monitor object -> we hang in Main().

The fix is to not rely on catching the ArgumentNullException when we get a null locale, which is a better approach anyway.

To easily reproduce the issue before the fix, use the following (on Linux only, we don't use LANG for locale on OSX):

```
~/dev/mono/mono/tests$ LANG=C MONO_PATH=../../mcs/class/lib/net_4_x/ ../mini/mono-sgen --trace=N:nothing threadpool-exceptions5.exe
```

Note: If you pass an invalid LANG=foo, the hang is still there as we throw a CultureNotFoundException and hit the same issue.
As the behavior looks like a runtime bug to me I filed https://bugzilla.xamarin.com/show_bug.cgi?id=37547

8 years ago[llvmonly] Avoid creating an empty output file for the JITted code.
Zoltan Varga [Sat, 9 Jan 2016 17:21:51 +0000 (12:21 -0500)]
[llvmonly] Avoid creating an empty output file for the JITted code.

8 years ago[llvmonly] Avoid emitting the 'globals' aot table, its not used in llvmonly mode.
Zoltan Varga [Sat, 9 Jan 2016 16:19:48 +0000 (11:19 -0500)]
[llvmonly] Avoid emitting the 'globals' aot table, its not used in llvmonly mode.

8 years agoMerge pull request #2412 from akoeplinger/disable-thread-test
Zoltan Varga [Sat, 9 Jan 2016 13:08:55 +0000 (08:08 -0500)]
Merge pull request #2412 from akoeplinger/disable-thread-test

[corlib] Disable Thread test that started failing after d5768a7f141e2a579cbca26f76c791c215f4aabf

8 years ago[corlib] Disable Thread test that started failing after d5768a7f141e2a579cbca26f76c79...
Alexander Köplinger [Sat, 9 Jan 2016 02:47:32 +0000 (03:47 +0100)]
[corlib] Disable Thread test that started failing after d5768a7f141e2a579cbca26f76c791c215f4aabf

Setting the priority before starting a Thread doesn't work right now as there's no handle to the native
thread at that point (the current implementation doesn't store the priority, it just tries setting it
on the native thread) so the test would remember the default 'Normal' priority instead of 'BelowNormal',
causing the test to fail later on.

Added an assert to verify that the thread priority can be set before starting and disable the test for now.

Note: variable names 'before' and 'after' were switched in the test, fixed those as well.

8 years ago[llvm] Error out when using --aot=llvmonly if the runtime is not compiled with -...
Zoltan Varga [Fri, 8 Jan 2016 21:22:09 +0000 (16:22 -0500)]
[llvm] Error out when using --aot=llvmonly if the runtime is not compiled with --enable-gsharedvt.

8 years ago[csharp/getline] Add support for completion popup windows
Miguel de Icaza [Fri, 8 Jan 2016 21:20:51 +0000 (16:20 -0500)]
[csharp/getline] Add support for completion popup windows

This adds supprot to the getline.cs library to provide popup windows with
completion results.   There is a new public string property surfaced,
HeuristicsMode, that if set to "csharp" will trigger the completion window
independently of the "tab" character, based on the user input.

This mode triggers completion after the "." character is entered, and will
continue to trigger it as long as you type, or you backspace and the completion
succeeds.   The heuristic also ignores scenarios like "1.2", so there is no
compeltion provided after entering numbers by default.

Perhaps we can later introduce a "OnKeyEntered" command that users could
use to provide their own heuristics to control whether to popup the window
or not.

8 years ago[linker] do not use System.IO.Path on assembly resource names
Radek Doulik [Fri, 8 Jan 2016 20:44:50 +0000 (21:44 +0100)]
[linker] do not use System.IO.Path on assembly resource names

  - fixes #37305

  - resource name can be general string and using it as path
    might throw

       System.ArgumentException: Illegal characters in path.

  - it would be possible to check for the path's invalid characters in
    the resource name. that would cause crossplatform issues
    though.

    various platforms have different invalid charactes sets for path
    names. for example using assembly built on mac with embedded
    linker blacklisting xml file, which's name contains characters in
    its filename which are invalid on windows. so the windows built
    app using that assembly would fail mysteriously, because the
    important parts wouldn't be preserved.

    thus we use just string comparison

8 years ago[io-layer] Revert 31f13881a483201933b16e75d47a6d103d959a64 and fix it in a simpler way
Alexander Köplinger [Fri, 8 Jan 2016 20:58:40 +0000 (21:58 +0100)]
[io-layer] Revert 31f13881a483201933b16e75d47a6d103d959a64 and fix it in a simpler way

We don't need the configure.ac check as we can just directly check if the macro is defined.

8 years ago[runtime] Bump AOT file format version.
Zoltan Varga [Fri, 8 Jan 2016 20:45:25 +0000 (15:45 -0500)]
[runtime] Bump AOT file format version.