mono.git
7 years agoMerge pull request #3809 from lateralusX/jlorenss/win-api-family-support-cleanup
Johan Lorensson [Fri, 11 Nov 2016 10:43:49 +0000 (11:43 +0100)]
Merge pull request #3809 from lateralusX/jlorenss/win-api-family-support-cleanup

Build mono runtime under none desktop Windows API family, adjustments and cleanup.

7 years agoMerge pull request #3930 from ntherning/fix-System.ServiceProcess
Niklas Therning [Fri, 11 Nov 2016 08:59:05 +0000 (09:59 +0100)]
Merge pull request #3930 from ntherning/fix-System.ServiceProcess

Fixes bugs in System.ServiceProcess on Windows

7 years agoFixes bugs in System.ServiceProcess on Windows
Niklas Therning [Thu, 10 Nov 2016 15:08:40 +0000 (16:08 +0100)]
Fixes bugs in System.ServiceProcess on Windows

There was a crash on Windows x64 in Win32ServiceController when enumerating
devices and services. Also fixed the ServiceControllerTest to succeed on .NET
as well Mono on Windows. Had to replace the services used by the test since
most of them have been removed from recent Windows versions.

This PR also enables the System.ServiceProcess tests in Windows PR builds.

7 years ago[eglib/mono] Aleksey caught a discrepancy between the semantics of Unix and Windows...
Miguel de Icaza [Fri, 11 Nov 2016 04:14:03 +0000 (23:14 -0500)]
[eglib/mono] Aleksey caught a discrepancy between the semantics of Unix and Windows, our eglib version should always strdup (#3899)

7 years ago[xbuild] Don't reevaluate project when setting metadata in a dynamic ..
Ankit Jain [Thu, 10 Nov 2016 18:26:27 +0000 (13:26 -0500)]
[xbuild] Don't reevaluate project when setting metadata in a dynamic ..

.. item.

If we have a project, that sets some properties or items at runtime,
like in a target:

```
        <Target Name="Build">
                <PropertyGroup>
                        <Bar>Bar01</Bar>
                </PropertyGroup>
```

.. such a property can be accessed as `$(Bar)` subsequently.

Then at later point, a target tries to update metadata on an item group
with existing items, like:

```
<ItemGroup>
<FooItem Include="xyz" />
</ItemGroup>

<Target Name="Foo">
                <ItemGroup>
                        <FooItem>
                                <SomeMetadata>MetadataValue</SomeMetadata>
                        </FooItem>
                </ItemGroup>
```

.. then it is seen that the value for the earlier created `$(Bar)` disappears!
So, if we try to print the value of `$(Bar)` right after that item
group, it would appear as `''`!

The issue is that the metadata update in target `Foo` caused the project
to get re-evaluated, which meant that items/properites created after the
project load were lost! We should not be reevaluating the project when
setting metadata on the basis of dynamic items, like in the target
`Foo`.

These dynamic item groups in a target are represented as
`BuildItemTask`, and these create BuildItems which have their
`IsDynamic` property set. And this is used to avoid re-evaluating the
project in `BuildItem.SetMetadata`.

But when updating metadata (`BuildItem.UpdateMetadata`), we need to
update metadata on the *existing* items, which might not have been
created from such dynamic item groups! So, their `IsDynamic==false`.
Hence, trying to `SetMetadata` on such items would cause the project to
be reevaluated, and thus properties/items like `$(Bar)` would be lost!

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

In this particular case, `Bar` was the `DesignTimeBuild` property, which
was losing it's value when `ProjectReference`'s `AdditionalProperties`
metadata was set in:

```
 <Target Name="BclBuildAddProjectReferenceProperties"
    <ItemGroup>
      <ProjectReference>
         <AdditionalProperties>$(_BclBuildProjectReferenceProperties);%(ProjectReference.AdditionalProperties)</AdditionalProperties>
     </ProjectReference>
    </ItemGroup>
```

7 years ago[arm64] always assume a cache line size of 4
Bernhard Urban [Thu, 10 Nov 2016 16:34:12 +0000 (17:34 +0100)]
[arm64] always assume a cache line size of 4

otherwise we still have the theoretical chance of a race.

7 years agoMerge pull request #3931 from ntherning/enable-System.Core-tests-on-windows-pr-builds
Niklas Therning [Thu, 10 Nov 2016 20:28:23 +0000 (21:28 +0100)]
Merge pull request #3931 from ntherning/enable-System.Core-tests-on-windows-pr-builds

Enable System.Core tests on Windows PR builds

7 years agoMerge pull request #3927 from tritao/updated_offsets_tool
João Matos [Thu, 10 Nov 2016 18:55:51 +0000 (18:55 +0000)]
Merge pull request #3927 from tritao/updated_offsets_tool

Updated offsets tool to latest CppSharp.

7 years ago[System.Xml] Add XElement array handling to serialization interpreter. Fixes #12571
Marek Safar [Thu, 10 Nov 2016 17:41:15 +0000 (18:41 +0100)]
[System.Xml] Add XElement array handling to serialization interpreter. Fixes #12571

7 years ago[system.xml] Enable more tests
Marek Safar [Thu, 10 Nov 2016 17:30:19 +0000 (18:30 +0100)]
[system.xml] Enable more tests

7 years ago[offsets-tool] Updated build scripts to handle multiple platforms.
Joao Matos [Thu, 10 Nov 2016 16:40:38 +0000 (16:40 +0000)]
[offsets-tool] Updated build scripts to handle multiple platforms.

7 years ago[offsets-tool] Fixed whitespace inconsistency.
Joao Matos [Thu, 10 Nov 2016 16:39:18 +0000 (16:39 +0000)]
[offsets-tool] Fixed whitespace inconsistency.

7 years agoUpdated offsets tool to latest CppSharp.
Joao Matos [Thu, 10 Nov 2016 12:09:21 +0000 (12:09 +0000)]
Updated offsets tool to latest CppSharp.

7 years agoEnable System.Core tests on Windows PR builds
Niklas Therning [Thu, 10 Nov 2016 15:15:21 +0000 (16:15 +0100)]
Enable System.Core tests on Windows PR builds

System.Core is expected to be green now on Windows.

7 years ago[ppc] clobber r0 in MONO_CONTEXT_GET_CURRENT
Bernhard Urban [Wed, 9 Nov 2016 15:03:52 +0000 (16:03 +0100)]
[ppc] clobber r0 in MONO_CONTEXT_GET_CURRENT

r0 can't be the base for a memory acces.

7 years ago[ppc] some 32bit CPUs trap on std, use stw instead
Bernhard Urban [Wed, 9 Nov 2016 14:40:41 +0000 (15:40 +0100)]
[ppc] some 32bit CPUs trap on std, use stw instead

7 years ago[ppc] enable MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX on every PowerPC configuration on Linux
Bernhard Urban [Wed, 9 Nov 2016 14:39:16 +0000 (15:39 +0100)]
[ppc] enable MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX on every PowerPC configuration on Linux

7 years ago[ppc] use proper calling convention when coming from a signal handler
Bernhard Urban [Wed, 9 Nov 2016 11:38:01 +0000 (12:38 +0100)]
[ppc] use proper calling convention when coming from a signal handler

ELF v2 ABI (aka. ppc64le) defines two entry points per function.
The global entry point (offset 0) sets up the TOC (r2) itself, while the
local entry point (offset 8) is a fast entry point if the TOC is
already set up properly.

When the global entry point is used, the address of the global entry
point is required in r12 according to the ABI.

7 years ago[ppc] disable MONO_ARCH_HAVE_TLS_GET
Bernhard Urban [Wed, 9 Nov 2016 11:36:23 +0000 (12:36 +0100)]
[ppc] disable MONO_ARCH_HAVE_TLS_GET

`--with-tls=__thread` is broken on PowerPC.
`--with-tls=pthread` didn't work on PowerPC, but disabling
MONO_ARCH_HAVE_TLS_GET fixes it.

Instead of guarding the define with `HAVE_KW_THREAD`, let's just
disable it.  We want to get rid of `--with-tls=__thread` anyway.

7 years agoMerge pull request #3854 from lateralusX/jlorenss/win-clang-toolchain
Johan Lorensson [Thu, 10 Nov 2016 08:37:55 +0000 (09:37 +0100)]
Merge pull request #3854 from lateralusX/jlorenss/win-clang-toolchain

Switch to Microsoft VS2015 MSVC toolchain for Windows x64 AOT compiler.

7 years agoMethod field count (#3907)
Zoltan Varga [Thu, 10 Nov 2016 03:54:29 +0000 (22:54 -0500)]
Method field count (#3907)

* [runtime] Add accessors for method.count and field.count.

* [runtime] Move method/field count to MonoClassDef.

7 years ago[sdb] Avoid asserting when trying to single step on a thread with no managed frames...
Zoltan Varga [Thu, 10 Nov 2016 02:53:48 +0000 (21:53 -0500)]
[sdb] Avoid asserting when trying to single step on a thread with no managed frames. Fixes #34802.

7 years ago[runtime] Fix another race in mono_class_setup_supertypes ().
Zoltan Varga [Wed, 9 Nov 2016 23:13:33 +0000 (18:13 -0500)]
[runtime] Fix another race in mono_class_setup_supertypes ().

7 years ago[threads] Always use the `suspended` MonoOSEvent for self-suspend (#3915)
Ludovic Henry [Wed, 9 Nov 2016 20:59:36 +0000 (15:59 -0500)]
[threads] Always use the `suspended` MonoOSEvent for self-suspend (#3915)

* [stw] Refactor to treat error/success cases first

* [threads] Always use the `suspended` MonoOSEvent for self-suspend

The previous self-suspend mechanism was inherently racy:
 - T1 self suspend:
  - T1 calls mono_thread_info_begin_self_suspend, but doesn't call mono_thread_info_end_self_suspend yet
 - T2 suspends T1 <-- the suspend_count is > 0, trigerring the assertion at mono-threads.c:184

7 years ago[threads] Destroy suspend MonoOSEvent when detaching (#3923)
Ludovic Henry [Wed, 9 Nov 2016 20:59:24 +0000 (15:59 -0500)]
[threads] Destroy suspend MonoOSEvent when detaching (#3923)

* [threads] Destroy suspend MonoOSEvent when detaching

It could happen that we destroy the managed InternalThread object, before we actually detach the thread (in mono/tests/threadpool-exceptions1.exe for example).

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

* [threads] Close thread handle once done with it

7 years ago[runtime] Simplify the wait_for_tids () code. (#3920)
Zoltan Varga [Wed, 9 Nov 2016 19:51:11 +0000 (14:51 -0500)]
[runtime] Simplify the wait_for_tids () code. (#3920)

7 years ago[os-event] Make them manual only (#3921)
Ludovic Henry [Wed, 9 Nov 2016 19:44:29 +0000 (14:44 -0500)]
[os-event] Make them manual only (#3921)

We only use them as manual reset event in the runtime, and that greatly simplifies the code as well as the way they should be used.

7 years ago[sdb] Avoid asserting when trying to single step on a thread with no managed frames...
Zoltan Varga [Wed, 9 Nov 2016 19:42:21 +0000 (14:42 -0500)]
[sdb] Avoid asserting when trying to single step on a thread with no managed frames. Fixes #34802.

7 years ago[io-layer] Remove dead code
Ludovic Henry [Mon, 31 Oct 2016 20:31:29 +0000 (16:31 -0400)]
[io-layer] Remove dead code

7 years ago[System] Fix a few type members on WatchOS
Alexander Köplinger [Wed, 9 Nov 2016 19:20:27 +0000 (20:20 +0100)]
[System] Fix a few type members on WatchOS

The .platformnotsupported.cs versions of some classes were
inconsistent with their "real" counterparts.

7 years ago[process] Allocate a handle even for non-child processes (#3905)
Ludovic Henry [Wed, 9 Nov 2016 13:00:11 +0000 (08:00 -0500)]
[process] Allocate a handle even for non-child processes (#3905)

* [w32handle] Inline only use of mono_w32handle_search

* [w32handle] Make special_wait return MonoW32HandleWaitRet

This is to avoid a unnecessary translation from WAIT_* to MonoW32HandleWaitRet

* [process] Use some more referencesource

* [process] Rename mono_processes to processes

* [process] Allocate a handle even for non-child processes

* [process] Create the handle only once the process has started

7 years ago[os-event] Make unix version alertable (#3909)
Ludovic Henry [Wed, 9 Nov 2016 12:50:12 +0000 (07:50 -0500)]
[os-event] Make unix version alertable (#3909)

This fixes `appdomain_unload.exe` test timeout. The following would happen:
 - T1 unload the current domain
  - T1 launch T2 to unload domain
  - T1 waits on T2 to finish
 - T2 tries to abort T1 <-- because the wait on T2 is not alertable, T1 is not going to be aborted

7 years ago[runtime] Add locking to mono_class_setup_supertypes () since the 16 bit idepth field...
Zoltan Varga [Wed, 9 Nov 2016 07:00:09 +0000 (02:00 -0500)]
[runtime] Add locking to mono_class_setup_supertypes () since the 16 bit idepth field cannot be set atomically. Fix a race if mono_field_resolve_type () was called without locking. (#3919)

7 years ago[x86] Fix max code size of throw trampoline.
Zoltan Varga [Tue, 8 Nov 2016 23:55:51 +0000 (18:55 -0500)]
[x86] Fix max code size of throw trampoline.

7 years agoBump nunitlite for display fixes
Alexander Köplinger [Tue, 8 Nov 2016 20:24:39 +0000 (21:24 +0100)]
Bump nunitlite for display fixes

7 years agoBump bockbuild
Alexis Christoforides [Tue, 8 Nov 2016 20:19:25 +0000 (15:19 -0500)]
Bump bockbuild

7 years ago[io-layer] Include sys/types.h header file in wapi.h
Alexander Köplinger [Tue, 8 Nov 2016 18:59:37 +0000 (19:59 +0100)]
[io-layer] Include sys/types.h header file in wapi.h

Fixes "error: unknown type name 'pid_t'" on Alpine/musl libc.

7 years ago[btls] Include stdint.h header file in btls-time64.c
Alexander Köplinger [Tue, 8 Nov 2016 18:30:35 +0000 (19:30 +0100)]
[btls] Include stdint.h header file in btls-time64.c

Fixes "error: unknown type name 'int64_t'" on Alpine/musl libc.

7 years agoMerge pull request #3914 from ntherning/mono_context_get_current-on-windows-does...
Niklas Therning [Tue, 8 Nov 2016 17:52:55 +0000 (18:52 +0100)]
Merge pull request #3914 from ntherning/mono_context_get_current-on-windows-does-not-save-rsp-properly

mono_context_get_current() on Windows stores registers at incorrect indexes

7 years agoMerge pull request #3773 from mono/bockbuild-integration
Alexis Christoforides [Tue, 8 Nov 2016 16:10:26 +0000 (11:10 -0500)]
Merge pull request #3773 from mono/bockbuild-integration

Integration of Bockbuild's Mac SDK profile

7 years agoBump bockbuild
Alexis Christoforides [Tue, 8 Nov 2016 16:10:05 +0000 (11:10 -0500)]
Bump bockbuild

7 years agoMove some more files back to bockbuild repo
Alexis Christoforides [Tue, 8 Nov 2016 16:09:38 +0000 (11:09 -0500)]
Move some more files back to bockbuild repo

7 years agomono_context_get_current() on Windows stores registers at incorrect indexes
Niklas Therning [Tue, 8 Nov 2016 14:21:36 +0000 (15:21 +0100)]
mono_context_get_current() on Windows stores registers at incorrect indexes

The indexes must correspond to the values in the AMD64_Reg_No enum in
amd64-codegen.h.

7 years agoMerge pull request #3913 from omwok/master
Alexander Köplinger [Tue, 8 Nov 2016 12:57:16 +0000 (13:57 +0100)]
Merge pull request #3913 from omwok/master

column name and ordinal fix.

7 years agoSwitch to Microsoft VS2015 MSVC toolchain for Windows x64 AOT compiler.
lateralusX [Mon, 31 Oct 2016 08:45:30 +0000 (09:45 +0100)]
Switch to Microsoft VS2015 MSVC toolchain for Windows x64 AOT compiler.

In order to reduce dependencies on external toolchains when doing full AOT on Windows
targeting x64 Windows platforms we would like to use what's available in
VS 2015 MSVC toolchain. Mono's full AOT compiler need an assembler and a linker from
available toolchain in order to do different full AOT scenarios, emitting assembler, compile
objects or link complete shared library.

Since the current emitter emits GNU assembler it is beneficial to reuse that assembler
syntax without the need to adopt to a different syntax. In VS2015 Update 1 a new toolchain
option has been released utilizing the Clang parser combined with MSVC code gen. This will
produce object files fully compatible with MSVC linker. It turns out that VS2015 Clang version
also supports GNU assembler and since Mono just uses simple constructs in the assembler
(all code is already compiled and emitted as byte streams in assembler) it is possible to use Clang
for VS to compile our emitted assembler files.

This PR switches to Clang for Microsoft VS2015 and MSVC linker when doing full AOT targeting Windows x64
platforms hosted on a Windows platform. It requires an installation of at least Microsoft VS2015 Update 1
with Clang component selected. NOTE all other scenarios is currently left as is.

This PR also makes adjustments to AOT compiler in order for above scenario to work, supporting asm only output, static output
and regular shared libraries using MSVC linker.

7 years agoMerge pull request #3911 from akoeplinger/marshal-cleanuprcw
Alexander Köplinger [Tue, 8 Nov 2016 11:46:44 +0000 (12:46 +0100)]
Merge pull request #3911 from akoeplinger/marshal-cleanuprcw

[corlib] Add Marshal.CleanupUnusedObjectsInCurrentContext() stub

7 years agoAdditional none desktop API families triggered by changes.
lateralusX [Mon, 7 Nov 2016 15:58:07 +0000 (16:58 +0100)]
Additional none desktop API families triggered by changes.

* Changes to process.c triggered errors on none desktop API builds.
* Implementation of memory mapped files caused build errors on none desktop API builds.
* Adjustments to disable JIT caused build errors on none JIT builds.

7 years agoBuild mono runtime under none desktop Windows API family, adjustments and cleanup.
lateralusX [Fri, 28 Oct 2016 13:24:53 +0000 (15:24 +0200)]
Build mono runtime under none desktop Windows API family, adjustments and cleanup.

Continuation work on previous none desktop Windows API family PR's adjusting all
changes to similar patterns used over previous PR's. This PR also move the logic
to silence a MS VS linker warning on empty source files into a macro. It also includes
the use of the macro in a couple of more source files causing linker warnings when build
on none desktop API families excluding JIT support.

Since other Windows API family work is still in progress it also disables build capabilities
for none desktop API families.

7 years agoMerge pull request #3912 from akoeplinger/marshal-ptrtostrbstr
Marek Safar [Tue, 8 Nov 2016 07:55:14 +0000 (08:55 +0100)]
Merge pull request #3912 from akoeplinger/marshal-ptrtostrbstr

[corlib] Expose Marshal.PtrToStringBSTR on mobile

7 years agoMerge pull request #3902 from henricm/fix-rename-lpstr-utf8
Marek Safar [Tue, 8 Nov 2016 07:50:50 +0000 (08:50 +0100)]
Merge pull request #3902 from henricm/fix-rename-lpstr-utf8

Rename fix for lpstr to utf8str on Windows

7 years ago[corlib] Expose Marshal.PtrToStringBSTR on mobile
Alexander Köplinger [Tue, 8 Nov 2016 00:31:30 +0000 (01:31 +0100)]
[corlib] Expose Marshal.PtrToStringBSTR on mobile

The SecureStringHelper from referencesource I added in https://github.com/mono/mono/pull/3887
relies on this to convert from SecureString to plaintext.

It failed on mobile because we always throw a NotImplementedException there,
but we actually have an implementation on the runtime side (even in the DISABLE_COM case).

7 years ago[corlib] Add Marshal.CleanupUnusedObjectsInCurrentContext() stub
Alexander Köplinger [Mon, 7 Nov 2016 23:04:47 +0000 (00:04 +0100)]
[corlib] Add Marshal.CleanupUnusedObjectsInCurrentContext() stub

https://github.com/dotnet/standard/issues/94

7 years ago[runtime] Fix the ios build.
Zoltan Varga [Mon, 7 Nov 2016 22:37:50 +0000 (17:37 -0500)]
[runtime] Fix the ios build.

7 years ago[jit] Really fix the DISABLE_JIT build.
Zoltan Varga [Mon, 7 Nov 2016 20:48:05 +0000 (15:48 -0500)]
[jit] Really fix the DISABLE_JIT build.

7 years agoMerge pull request #3896 from lambdageek/bug-46250
Aleksey Kliger (λgeek) [Mon, 7 Nov 2016 20:18:08 +0000 (15:18 -0500)]
Merge pull request #3896 from lambdageek/bug-46250

[runtime] Ensure generic type definition arity matches generic context arity

7 years ago[threadpool] Fix hang on domain unloading (#3904)
Ludovic Henry [Mon, 7 Nov 2016 20:11:22 +0000 (15:11 -0500)]
[threadpool] Fix hang on domain unloading (#3904)

Because we wouldn't return the correct ThreadPoolDomain for the requested domain, we would simply wait on the last inserted MonoDomain. This would lead to a hang when unloading the domain, as we wouldn't wait on the correct domain.

7 years agoFix tarball build
Alexander Köplinger [Mon, 7 Nov 2016 19:36:24 +0000 (20:36 +0100)]
Fix tarball build

7 years ago[BTLS]: Use `int64_t` instead of `long` in the native API. (#3857)
Martin Baulig [Mon, 7 Nov 2016 17:23:42 +0000 (18:23 +0100)]
[BTLS]: Use `int64_t` instead of `long` in the native API. (#3857)

* [BTLS]: Use `int64_t` instead of `long` in the native API.

* Copy time64.c from Android's source code to get a 64-bit timegm64().

* Rename into btls_timegm64() and remove everything we don't need.

(cherry picked from commit 2365067bdae39f75979df30b65ae08f095cbd176)

7 years agoMerge pull request #3894 from akoeplinger/fix-actor
Alexander Köplinger [Mon, 7 Nov 2016 17:24:14 +0000 (18:24 +0100)]
Merge pull request #3894 from akoeplinger/fix-actor

[System.ServiceModel] Recognize 'faultactor' in SOAP fault message

7 years ago[jit] Fix the DISABLE_JIT build.
Zoltan Varga [Mon, 7 Nov 2016 16:37:59 +0000 (11:37 -0500)]
[jit] Fix the DISABLE_JIT build.

7 years agoMerge pull request #2408 from tastywheattasteslikechicken/MoreInterfaceSupport
Rodrigo Kumpera [Mon, 7 Nov 2016 16:04:29 +0000 (08:04 -0800)]
Merge pull request #2408 from tastywheattasteslikechicken/MoreInterfaceSupport

Enhance maximum number of supported interfaces from 2^16.

7 years agoMerge pull request #3903 from ntherning/fix-NRE-in-Win32-IpcChannel.StopListening...
Niklas Therning [Mon, 7 Nov 2016 14:04:54 +0000 (15:04 +0100)]
Merge pull request #3903 from ntherning/fix-NRE-in-Win32-IpcChannel.StopListening-when-no-server-started

Fix NRE in Win32 IpcChannel.StopListening() when no server started

7 years agoMerge pull request #3901 from ntherning/Process_GetModules_internal-crash-on-windows
Niklas Therning [Mon, 7 Nov 2016 14:01:39 +0000 (15:01 +0100)]
Merge pull request #3901 from ntherning/Process_GetModules_internal-crash-on-windows

Fix crash in Process.GetModules_internal() on Windows after refactorings

7 years agoFix NRE in Win32 IpcChannel.StopListening() when no server started
Niklas Therning [Mon, 7 Nov 2016 14:00:05 +0000 (15:00 +0100)]
Fix NRE in Win32 IpcChannel.StopListening() when no server started

This makes the System.Runtime.Remoting test suite fail in various places on
Windows due to the TestFixtureTearDown method in BaseCalls throwing an NRE.

7 years agoRename fix for lpstr to utf8str on Windows
Henric Müller [Mon, 7 Nov 2016 13:46:21 +0000 (14:46 +0100)]
Rename fix for lpstr to utf8str on Windows

PR https://github.com/mono/mono/pull/3776 renamed `mono_string_to_lpstr`
to `mono_string_to_utf8str` without updating the Windows version.
This fix renames `mono_string_to_lpstr` to `mono_string_to_utf8str` to
make sure the string is allocated using `CoTaskMemAlloc` on Windows
since it will be freed using `CoTaskMemFree`.

7 years agoFix crash in Process.GetModules_internal() on Windows after refactorings
Niklas Therning [Mon, 7 Nov 2016 11:01:43 +0000 (12:01 +0100)]
Fix crash in Process.GetModules_internal() on Windows after refactorings

EnumProcessModules() is called incorrectly. Also fixes a missing curly braces
pair.

7 years agoMerge pull request #3900 from monojenkins/update-csprojs
Alexander Köplinger [Mon, 7 Nov 2016 01:29:55 +0000 (02:29 +0100)]
Merge pull request #3900 from monojenkins/update-csprojs

[msvc] Update csproj files

7 years ago[runtime] Move field.first and method.first to MonoClassDef. Add accessor functions...
Zoltan Varga [Sun, 6 Nov 2016 17:34:45 +0000 (12:34 -0500)]
[runtime] Move field.first and method.first to MonoClassDef. Add accessor functions for them. (#3898)

7 years ago[msvc] Update csproj files
monojenkins [Sun, 6 Nov 2016 04:20:14 +0000 (04:20 +0000)]
[msvc] Update csproj files

7 years ago[arm64] Set a flag in MonoContext if the fp regs are saved, and only restore them...
Zoltan Varga [Sat, 5 Nov 2016 02:19:25 +0000 (22:19 -0400)]
[arm64] Set a flag in MonoContext if the fp regs are saved, and only restore them if they are. These registers are not saved when the context is created from a ucontext. (#3890)

7 years ago[mkbundle] Don't free bundled dylibrary directory (#3897)
Aleksey Kliger (λgeek) [Sat, 5 Nov 2016 01:02:23 +0000 (21:02 -0400)]
[mkbundle] Don't free bundled dylibrary directory (#3897)

mkdtemp modifies the template in-place, don't free it.

7 years agoMerge pull request #3796 from ntherning/windows-backend-for-MemoryMappedFile
Rodrigo Kumpera [Fri, 4 Nov 2016 21:59:47 +0000 (14:59 -0700)]
Merge pull request #3796 from ntherning/windows-backend-for-MemoryMappedFile

MemoryMappedFile support on Windows

7 years ago[mcs] Consider method candidates with misplaced named arguments not applicable. Fixes...
Marek Safar [Fri, 4 Nov 2016 17:34:24 +0000 (18:34 +0100)]
[mcs] Consider method candidates with misplaced named arguments not applicable. Fixes #46190

7 years ago[mcs] Remove debug check
Marek Safar [Fri, 4 Nov 2016 17:33:44 +0000 (18:33 +0100)]
[mcs] Remove debug check

7 years agoProperly configure the bockbuild submodule
Alexis Christoforides [Fri, 4 Nov 2016 17:34:04 +0000 (13:34 -0400)]
Properly configure the bockbuild submodule

7 years ago[runtime] Add a few mono mono_class_is_... accessors. (#3891)
Zoltan Varga [Fri, 4 Nov 2016 16:34:13 +0000 (12:34 -0400)]
[runtime] Add a few mono mono_class_is_... accessors. (#3891)

7 years agoFix setting the min. macOS version in the Xamarin profile
Alexis Christoforides [Fri, 4 Nov 2016 15:31:07 +0000 (11:31 -0400)]
Fix setting the min. macOS version in the Xamarin profile

7 years agoRename 'bockbuild' to 'packaging' so that it can be home to other packaging code
Alexis Christoforides [Fri, 4 Nov 2016 14:55:13 +0000 (10:55 -0400)]
Rename 'bockbuild' to 'packaging' so that it can be home to  other packaging code

7 years agoMove the maintained common-use packages back to the bockbuild repo
Alexis Christoforides [Fri, 4 Nov 2016 14:46:01 +0000 (10:46 -0400)]
Move the maintained common-use packages back to the bockbuild repo

7 years ago[System.ServiceModel] Recognize 'faultactor' in SOAP fault message
Alexander Köplinger [Fri, 4 Nov 2016 14:59:18 +0000 (15:59 +0100)]
[System.ServiceModel] Recognize 'faultactor' in SOAP fault message

It's an optional element according to [1] and we were simply
throwing a NotImplementedException when encountering it.

Fixed by reading the element value instead. I noticed that we
had a 'details' variable that was never assigned, so the check
for `details == null` was always true and can be removed.
This makes inlining the body of the CreateFault() call easier
since we no longer need to choose different overloads and makes
the code consistent with the CreateFault12 method.
Also added a better exception in case of an unrecognized element.

The CreateFault12 method (handles SOAP 1.2) does not need a similar
fix since actor is not an element in that version [2].

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

[1] https://www.w3.org/TR/soap11/#_Toc478383507
[2] https://www.w3.org/TR/soap12/#soapfault

7 years ago[runtime] Ensure generic type definition arity matches generic context arity
Aleksey Kliger [Thu, 3 Nov 2016 21:07:19 +0000 (17:07 -0400)]
[runtime] Ensure generic type definition arity matches generic context arity

Don't instantiate generic type definitions (like Dictionary`2) with too few or too many
type arguments.

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

7 years ago[tests] Test System.Type.GetType() on generics with wrong arity.
Aleksey Kliger [Thu, 3 Nov 2016 21:05:53 +0000 (17:05 -0400)]
[tests] Test System.Type.GetType() on generics with wrong arity.

7 years ago[mcs] More work on debug scopes declared out of order. Fixes #45774
Marek Safar [Fri, 4 Nov 2016 15:03:52 +0000 (16:03 +0100)]
[mcs] More work on debug scopes declared out of order. Fixes #45774

7 years ago[os-event] Fix set operation
Ludovic Henry [Fri, 4 Nov 2016 14:43:44 +0000 (10:43 -0400)]
[os-event] Fix set operation

This is a logic bug where we would only wake up one of the threads that are waiting for the manual MonoOSEvent to be set. This would be a problem only if more than one thread is waiting.

7 years ago[threads] Use MonoOSEvent for Thread.Suspend/Resume (#3881)
Ludovic Henry [Fri, 4 Nov 2016 13:41:52 +0000 (09:41 -0400)]
[threads] Use MonoOSEvent for Thread.Suspend/Resume (#3881)

* [threads] Refactor how we create Thread and InternalThread in native

* [threads] Add coop support for async call

* [threads] Use MonoOSEvent for Thread.Suspend/Resume

By using a MonoOSEvent we avoid relying on the utils/threads suspend mechanism to suspend a metadata/threads. This reduce coupling between both mechanism, and that would allow us to remove a bunch of code from utils/threads when switching to coop.

This only works with coop suspend, as we need the ability to return from an async call, and that's not possible with preemptive suspend.

7 years ago[tests] Remove # to enable tests
Ludovic Henry [Fri, 4 Nov 2016 13:20:39 +0000 (09:20 -0400)]
[tests] Remove # to enable tests

Make would consider the files following the first # to be comments, leading to not passing it to the test-runner.

7 years agoMerge pull request #3893 from henricm/fix-class-accessor-vsproj
Alexander Köplinger [Fri, 4 Nov 2016 13:04:43 +0000 (14:04 +0100)]
Merge pull request #3893 from henricm/fix-class-accessor-vsproj

Adding class-accessors.c to VS project

7 years agoMerge pull request #3887 from akoeplinger/networkcredential-securestring
Alexander Köplinger [Fri, 4 Nov 2016 12:53:06 +0000 (13:53 +0100)]
Merge pull request #3887 from akoeplinger/networkcredential-securestring

[System] Replace NetworkCredential with referencesource

7 years agoAdding class-accessors.c to VS project
Henric Müller [Fri, 4 Nov 2016 12:50:41 +0000 (13:50 +0100)]
Adding class-accessors.c to VS project

7 years agoMerge pull request #3892 from monojenkins/update-csprojs
Marek Safar [Fri, 4 Nov 2016 08:04:21 +0000 (09:04 +0100)]
Merge pull request #3892 from monojenkins/update-csprojs

[msvc] Update csproj files

7 years ago[msvc] Update csproj files
monojenkins [Fri, 4 Nov 2016 04:31:11 +0000 (04:31 +0000)]
[msvc] Update csproj files

7 years agocolumn name and ordinal fix...tested on 10.1
Legowo Budianto [Fri, 4 Nov 2016 02:31:56 +0000 (09:31 +0700)]
column name and ordinal fix...tested on 10.1

7 years ago[jit] Cleanup the usage of DISABLE_JIT a bit so it encompasses the whole mini-codegen...
Zoltan Varga [Fri, 4 Nov 2016 01:43:15 +0000 (21:43 -0400)]
[jit] Cleanup the usage of DISABLE_JIT a bit so it encompasses the whole mini-codegen.c file, add DISABLE_JIT to mini-llvm.c. (#3888)

7 years ago[runtime] Revert parts of 016709fe52e921416322982f8185925f83de5866 which seems to...
Zoltan Varga [Fri, 4 Nov 2016 01:30:28 +0000 (21:30 -0400)]
[runtime] Revert parts of 016709fe52e921416322982f8185925f83de5866 which seems to cause races until they can be fixed. (#3889)

7 years ago[System] Replace NetworkCredential with referencesource
Alexander Köplinger [Thu, 3 Nov 2016 21:57:20 +0000 (22:57 +0100)]
[System] Replace NetworkCredential with referencesource

Fixes an issue where the Mono implementation wasn't converting
between the SecureString and the plaintext version of the password.

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

7 years agoAdded 'mac-sdk-package' Make target
Alexis Christoforides [Thu, 3 Nov 2016 23:16:44 +0000 (19:16 -0400)]
Added 'mac-sdk-package' Make target

7 years agoFix a warning.
Zoltan Varga [Thu, 3 Nov 2016 21:50:40 +0000 (17:50 -0400)]
Fix a warning.

7 years ago[arm64] Save+restore fp regs from the context in the call filter trampoline, the...
Zoltan Varga [Thu, 3 Nov 2016 21:13:35 +0000 (17:13 -0400)]
[arm64] Save+restore fp regs from the context in the call filter trampoline, the JITted code doesn't use them, but if the called code throws an exception, the throw context for the inner throw needs to contain the same values as the original throw context. (#3877)

7 years agoMerge pull request #3871 from akoeplinger/mono.posix-windows
Alexander Köplinger [Thu, 3 Nov 2016 19:48:54 +0000 (20:48 +0100)]
Merge pull request #3871 from akoeplinger/mono.posix-windows

[Mono.Posix] Disable Unix-specific tests on Windows

7 years ago[corcompare] Update custom XI project file to embed cecil sources
Marek Safar [Thu, 3 Nov 2016 15:11:54 +0000 (16:11 +0100)]
[corcompare] Update custom XI project file to embed cecil sources