mono.git
6 years ago@jonpryor reviews Mono.Options (#5204)
Jonathan Pryor [Thu, 13 Jul 2017 19:51:19 +0000 (12:51 -0700)]
@jonpryor reviews Mono.Options (#5204)

6 years agoMerge pull request #5201 from alexrp/code-owners
Alex Rønne Petersen [Thu, 13 Jul 2017 19:39:02 +0000 (21:39 +0200)]
Merge pull request #5201 from alexrp/code-owners

Add initial CODEOWNERS file.

6 years agoAdd initial CODEOWNERS file.
Alex Rønne Petersen [Thu, 13 Jul 2017 16:30:39 +0000 (18:30 +0200)]
Add initial CODEOWNERS file.

6 years ago[amd64] Mark RBP as 'same value' in the unwind info for the epilog so the unwind...
Zoltan Varga [Tue, 11 Jul 2017 21:32:46 +0000 (17:32 -0400)]
[amd64] Mark RBP as 'same value' in the unwind info for the epilog so the unwind info is correct if the method is interrupted after cleaning up its frame. (#5197)

6 years agoIncorrect parameters passed to GetDiskFreeSpaceEx causing random memory corruption...
Johan Lorensson [Tue, 11 Jul 2017 21:23:54 +0000 (23:23 +0200)]
Incorrect parameters passed to GetDiskFreeSpaceEx causing random memory corruption. (#5196)

The call to GetDiskFreeSpaceEx passes uninitialized pointers to GetDiskFreeSpaceEx
instead of pointers to stack variables. This will cause random memory corruption and random
crashes on Windows builds.

This is a regression caused by the refactoring work done in this PR:

https://github.com/mono/mono/pull/4255

6 years agoMerge pull request #5190 from alexrp/profiler-roots-deprecation
Alex Rønne Petersen [Tue, 11 Jul 2017 16:52:59 +0000 (18:52 +0200)]
Merge pull request #5190 from alexrp/profiler-roots-deprecation

[profiler] Hide the GC roots callback behind a macro and mark it obsolete.

6 years agoRemove partial path for ml.exe and ml64.exe in mono VS runtime builds. (#5195)
Johan Lorensson [Tue, 11 Jul 2017 13:21:04 +0000 (15:21 +0200)]
Remove partial path for ml.exe and ml64.exe in mono VS runtime builds. (#5195)

Location of ml.exe and ml64.exe is different in VS2017 compared to VS2015.
By removing the partial path from the command, the VS environment will locate
the tool depending on selected build configuration and VS version.

This should work for both VS2015 and VS2017.

6 years ago[System.Drawing] Remove tab from .sources
Alexander Köplinger [Tue, 11 Jul 2017 00:14:45 +0000 (02:14 +0200)]
[System.Drawing] Remove tab from .sources

6 years agoCheck return value of asn1_generalizedtime_to_tm ()
cherusker [Sat, 24 Jun 2017 13:03:01 +0000 (15:03 +0200)]
Check return value of asn1_generalizedtime_to_tm ()

6 years ago[bitcode] Disable tests which use filter clauses when running with bitcode.
Zoltan Varga [Mon, 10 Jul 2017 16:57:52 +0000 (12:57 -0400)]
[bitcode] Disable tests which use filter clauses when running with bitcode.

6 years agoMerge pull request #5189 from alexrp/profiler-sample-type-field
Alex Rønne Petersen [Mon, 10 Jul 2017 15:27:03 +0000 (17:27 +0200)]
Merge pull request #5189 from alexrp/profiler-sample-type-field

[profiler] Remove the type field from TYPE_SAMPLE_HIT.

6 years ago[profiler] Remove the type field from TYPE_SAMPLE_HIT.
Alex Rønne Petersen [Sat, 8 Jul 2017 03:53:16 +0000 (05:53 +0200)]
[profiler] Remove the type field from TYPE_SAMPLE_HIT.

It's unlikely that we'll add support for other kinds of sampling in the future
as we've dropped support for perf on Linux.

6 years ago[profiler] Hide the GC roots callback behind a macro and mark it obsolete.
Alex Rønne Petersen [Sat, 8 Jul 2017 04:41:38 +0000 (06:41 +0200)]
[profiler] Hide the GC roots callback behind a macro and mark it obsolete.

6 years agoAdd new version of SocketTest.ConnectedProperty that works on all platforms. The...
Katelyn Gadd [Thu, 29 Jun 2017 19:30:29 +0000 (12:30 -0700)]
Add new version of SocketTest.ConnectedProperty that works on all platforms. The current version is broken on Linux FullAOT and on Mac, so this adds a new version tuned to work reliably on Windows, Linux and Mac (including FullAOT). This addresses https://bugzilla.xamarin.com/show_bug.cgi?id=52157.

Revise new ConnectedProperty test

6 years agoMerge pull request #5187 from alexrp/debugger-fix-callback-signature
Alex Rønne Petersen [Fri, 7 Jul 2017 23:28:58 +0000 (01:28 +0200)]
Merge pull request #5187 from alexrp/debugger-fix-callback-signature

[sdb] Fix signatures of thread-related profiler callbacks.

6 years ago[sdb] Fix signatures of thread-related profiler callbacks.
Alex Rønne Petersen [Fri, 7 Jul 2017 19:13:21 +0000 (21:13 +0200)]
[sdb] Fix signatures of thread-related profiler callbacks.

This was an unintended change in the profiler API overhaul.

6 years agoBump api-snapshot
Alexander Köplinger [Fri, 7 Jul 2017 19:12:26 +0000 (21:12 +0200)]
Bump api-snapshot

6 years agoMerge pull request #5180 from alexrp/profiler-zero-freq
Alex Rønne Petersen [Fri, 7 Jul 2017 18:48:40 +0000 (20:48 +0200)]
Merge pull request #5180 from alexrp/profiler-zero-freq

[profiler] Don't enable sampling if frequency is zero.

6 years agoMerge pull request #5179 from alexrp/profiler-thread-name
Alex Rønne Petersen [Fri, 7 Jul 2017 18:45:58 +0000 (20:45 +0200)]
Merge pull request #5179 from alexrp/profiler-thread-name

[profiler] Report main thread name after attaching.

6 years ago[System]: minor cleanups. (#5186)
Martin Baulig [Fri, 7 Jul 2017 18:12:14 +0000 (14:12 -0400)]
[System]: minor cleanups. (#5186)

* [Mono.Security]: Add missing IMonoSslStream.WriteAsync() method.

* Cosmetic.

* [System]: MonoTlsStream: put implementation inside #SECURITY_DEP, not the entire class.

6 years ago[System.ServiceProcess] Remove "browser" service from dependencies in test (#5183)
Alexander Köplinger [Fri, 7 Jul 2017 17:36:22 +0000 (19:36 +0200)]
[System.ServiceProcess] Remove "browser" service from dependencies in test (#5183)

LanmanWorkstation and SamSs services don't depend on the Browser
service anymore, at least in the Windows Server build that our
Azure VM agents on Jenkins are using now. This started failing a
few days ago so I assume a new build was rolled out.

6 years agoMerge pull request #5184 from mono/gtk-bump
Marius Ungureanu [Fri, 7 Jul 2017 16:50:14 +0000 (19:50 +0300)]
Merge pull request #5184 from mono/gtk-bump

Bump bockbuild for gtk# API compat fixes.

6 years agoBump bockbuild for gtk# API compat fixes.
Marius Ungureanu [Fri, 7 Jul 2017 16:48:52 +0000 (19:48 +0300)]
Bump bockbuild for gtk# API compat fixes.

6 years ago[corlib] Add test for deleting non-existing file
Alexander Köplinger [Wed, 5 Jul 2017 15:54:47 +0000 (17:54 +0200)]
[corlib] Add test for deleting non-existing file

It shouldn't throw in that case.

Helps cover https://bugzilla.xamarin.com/show_bug.cgi?id=57629
(note that we don't explicitly test on a readonly FS as that is hard
to do in a unit test, but running this test on Android should suffice).

6 years ago[metadata/corlib] Add apfs to list of fixed drive types
Alexander Köplinger [Wed, 5 Jul 2017 15:39:52 +0000 (17:39 +0200)]
[metadata/corlib] Add apfs to list of fixed drive types

Also added some tests for DriveInfo since we didn't have any.

6 years ago[profiler] Don't enable sampling if frequency is zero.
Alex Rønne Petersen [Fri, 7 Jul 2017 00:47:22 +0000 (02:47 +0200)]
[profiler] Don't enable sampling if frequency is zero.

Otherwise we would get a SIGFPE at runtime.

6 years agoMerge pull request #5181 from alexrp/master
Alex Rønne Petersen [Fri, 7 Jul 2017 02:33:57 +0000 (04:33 +0200)]
Merge pull request #5181 from alexrp/master

[profiler] Fix a type name conflict.

6 years ago[profiler] Fix a type name conflict.
Alex Rønne Petersen [Fri, 7 Jul 2017 01:08:33 +0000 (03:08 +0200)]
[profiler] Fix a type name conflict.

6 years ago[arm64] Really fix handler block trampolines.
Zoltan Varga [Fri, 7 Jul 2017 01:00:01 +0000 (21:00 -0400)]
[arm64] Really fix handler block trampolines.

6 years ago[profiler] Report main thread name after attaching.
Alex Rønne Petersen [Fri, 7 Jul 2017 00:41:57 +0000 (02:41 +0200)]
[profiler] Report main thread name after attaching.

6 years agoMerge pull request #5088 from alexrp/profiler-lightweight-coverage
Alex Rønne Petersen [Thu, 6 Jul 2017 23:09:15 +0000 (01:09 +0200)]
Merge pull request #5088 from alexrp/profiler-lightweight-coverage

[profiler] No longer use enter/leave instrumentation for code coverage.

6 years ago[profiler] Don't enable GC and thread events for code coverage.
Alex Rønne Petersen [Thu, 22 Jun 2017 08:02:05 +0000 (10:02 +0200)]
[profiler] Don't enable GC and thread events for code coverage.

6 years ago[profiler] No longer use enter/leave instrumentation for code coverage.
Alex Rønne Petersen [Thu, 22 Jun 2017 07:59:47 +0000 (09:59 +0200)]
[profiler] No longer use enter/leave instrumentation for code coverage.

This was only enabled to populate a hash table that wasn't actually used.

6 years agoMerge pull request #5101 from alexrp/profiler-api
Alex Rønne Petersen [Thu, 6 Jul 2017 22:57:16 +0000 (00:57 +0200)]
Merge pull request #5101 from alexrp/profiler-api

[runtime] New profiler API.

6 years ago[msvc] Update def files after profiler API changes.
Alex Rønne Petersen [Thu, 6 Jul 2017 22:23:30 +0000 (00:23 +0200)]
[msvc] Update def files after profiler API changes.

6 years ago[utils] Mark mono_dl_open () as MONO_API.
Alex Rønne Petersen [Thu, 6 Jul 2017 22:23:03 +0000 (00:23 +0200)]
[utils] Mark mono_dl_open () as MONO_API.

This is needed on Windows.

6 years ago[metadata] Mark mono_loader_register_module () as MONO_API.
Alex Rønne Petersen [Thu, 6 Jul 2017 22:22:43 +0000 (00:22 +0200)]
[metadata] Mark mono_loader_register_module () as MONO_API.

This is needed on Windows.

6 years ago[runtime] Rework process waiting. (#5175)
Zoltan Varga [Thu, 6 Jul 2017 20:23:35 +0000 (16:23 -0400)]
[runtime] Rework process waiting. (#5175)

Instead of using fragile lockless code in the sigchld signal handler, wake up the finalizer thread and make it call back
into the process code to signal finished processes.

6 years ago[arm] Fix the handler block trampoline, it didn't actually call the helper function.
Zoltan Varga [Thu, 6 Jul 2017 19:06:51 +0000 (15:06 -0400)]
[arm] Fix the handler block trampoline, it didn't actually call the helper function.

6 years agoRevert "[arm] Fix the handler block trampoline, it didn't actually call the helper...
Zoltan Varga [Thu, 6 Jul 2017 18:45:35 +0000 (14:45 -0400)]
Revert "[arm] Fix the handler block trampoline, it didn't actually call the helper function."

This reverts commit 745a6bec4a1fab5a5f56e00fc8efda84341b0634.
Revert this as it wasn't tested properly.

6 years ago[arm] Fix the handler block trampoline, it didn't actually call the helper function.
Zoltan Varga [Thu, 6 Jul 2017 18:30:13 +0000 (14:30 -0400)]
[arm] Fix the handler block trampoline, it didn't actually call the helper function.

6 years ago[arm64] Fix the handler block trampoline, it didn't actually call the helper function.
Zoltan Varga [Thu, 6 Jul 2017 18:27:08 +0000 (14:27 -0400)]
[arm64] Fix the handler block trampoline, it didn't actually call the helper function.

6 years ago[profiler] Add MONO_PROFILER_API_VERSION macro.
Alex Rønne Petersen [Thu, 29 Jun 2017 21:49:14 +0000 (23:49 +0200)]
[profiler] Add MONO_PROFILER_API_VERSION macro.

6 years ago[profiler] Split shutdown callback into early/late callbacks.
Alex Rønne Petersen [Sat, 24 Jun 2017 02:53:43 +0000 (04:53 +0200)]
[profiler] Split shutdown callback into early/late callbacks.

6 years ago[runtime] New profiler API.
Alex Rønne Petersen [Thu, 22 Jun 2017 15:15:35 +0000 (17:15 +0200)]
[runtime] New profiler API.

* Profiler callbacks can now be changed and disabled at any point.
* API users no longer have to set event flags. The API instead uses a counter
  internally for each type of callback.
* Filter functions for enter/leave instrumentation can be installed, and they
  can choose whether to instrument the prologue, epilogue, or both.
* Managed allocators can now be instrumented for allocation profiling.
* A profiler must now declare that it wishes to use allocation profiling and/or
  sampling in its init function.
* Sampling parameters can now be changed at any point, and the sampling thread
  can be put into an idle mode when no sampling is needed.
* Only one profiler can have control over the sampling parameters. Whichever
  profiler enables sampling first gets control.
* Adding new events is now very easy: One line in profiler-events.h and one
  line wherever the event should be raised.
* Lifted the restriction that enter/leave instrumentation would cause an abort
  in full AOT mode.
* Support for call chain sampling has been removed.
* Support for the old, platform-specific code coverage mode has been removed.
* The new profiler module entry point is mono_profiler_init. If a module has
  a mono_profiler_startup symbol (the old entry point), a warning will be
  printed and the module won't be loaded.
* Updated the profiler test suite to work with instrumented managed allocators.

6 years agoMerge pull request #5172 from kumpera/proc-handles-pt2
Rodrigo Kumpera [Wed, 5 Jul 2017 22:25:10 +0000 (18:25 -0400)]
Merge pull request #5172 from kumpera/proc-handles-pt2

[System] Fix handle leak in Process::GetProcess.

6 years ago[System] Fix handle leak in Process::GetProcess.
Rodrigo Kumpera [Tue, 4 Jul 2017 02:59:49 +0000 (19:59 -0700)]
[System] Fix handle leak in Process::GetProcess.

The runtime returns a inc'd handle to managed, so the SafeHandle should decrement on dispose.

6 years ago[sgen] Use an OS mutex for memory governor log entries
Aleksey Kliger [Wed, 5 Jul 2017 14:33:26 +0000 (10:33 -0400)]
[sgen] Use an OS mutex for memory governor log entries

The mutex is used by sgen worker threads that are not attached to the mono
runtime - they cannot use a coop mutex.

6 years ago[tools] Fixup 098de0b8, inadvertently deleted the wrong csproj
Alexander Köplinger [Wed, 5 Jul 2017 16:02:54 +0000 (18:02 +0200)]
[tools] Fixup 098de0b8, inadvertently deleted the wrong csproj

6 years ago[msvc] Update csproj files (#5170)
monojenkins [Wed, 5 Jul 2017 14:10:14 +0000 (16:10 +0200)]
[msvc] Update csproj files (#5170)

6 years ago[packaging] Fixup mistake from f7c9be
Alexander Köplinger [Wed, 5 Jul 2017 14:10:06 +0000 (16:10 +0200)]
[packaging] Fixup mistake from f7c9be

6 years ago[tools] Cleanup unused files in mdoc
Alexander Köplinger [Wed, 5 Jul 2017 14:01:14 +0000 (16:01 +0200)]
[tools] Cleanup unused files in mdoc

mdoc now lives in https://github.com/mono/api-doc-tools

6 years ago[offsets-tool] allow to set targetdir for iOS targets, so it's possible to dump offse...
Bernhard Urban [Tue, 4 Jul 2017 09:34:30 +0000 (11:34 +0200)]
[offsets-tool] allow to set targetdir for iOS targets, so it's possible to dump offsets without maccore

6 years ago[jit] Optimize ldloc+ldfld operations for valuetypes, so they don't require making...
Zoltan Varga [Tue, 4 Jul 2017 17:02:05 +0000 (13:02 -0400)]
[jit] Optimize ldloc+ldfld operations for valuetypes, so they don't require making a copy of the valuetype. Hopefully fixes #56452. (#5166)

6 years agoRevert "[jit] Optimize ldloc+ldfld operations for valuetypes, so they don't require...
Zoltan Varga [Tue, 4 Jul 2017 14:08:27 +0000 (10:08 -0400)]
Revert "[jit] Optimize ldloc+ldfld operations for valuetypes, so they don't require making a copy of the valuetype. Hopefully fixes #56452. (#5166)"

This reverts commit 025ee6399bfa229fedee3c2b8527cd9d1b9886e7.

Revert this as it seems to break the f# build.

6 years ago[packaging] Add Windows hostfxr.dll to MSBuild in MSI
Alexander Köplinger [Tue, 4 Jul 2017 12:57:55 +0000 (14:57 +0200)]
[packaging] Add Windows hostfxr.dll to MSBuild in MSI

Part of https://bugzilla.xamarin.com/show_bug.cgi?id=57930

6 years agoRevert "[packaging/msbuild] Bump to get new changes on xplat-master (#5145)"
Ankit Jain [Tue, 4 Jul 2017 01:47:26 +0000 (21:47 -0400)]
Revert "[packaging/msbuild] Bump to get new changes on xplat-master (#5145)"

This reverts commit 94dcde72917979d9b25b3786e214f08cbc4d2299.

6 years agoBump corefx (#5167)
Alexander Köplinger [Mon, 3 Jul 2017 21:35:53 +0000 (23:35 +0200)]
Bump corefx (#5167)

* Bump corefx

* Bump API snapshot submodule

6 years ago[jit] Optimize ldloc+ldfld operations for valuetypes, so they don't require making...
Zoltan Varga [Mon, 3 Jul 2017 20:53:56 +0000 (16:53 -0400)]
[jit] Optimize ldloc+ldfld operations for valuetypes, so they don't require making a copy of the valuetype. Hopefully fixes #56452. (#5166)

6 years ago[ci] Tell babysitter where profiler stress result XML lives
Alexander Köplinger [Mon, 3 Jul 2017 19:09:11 +0000 (21:09 +0200)]
[ci] Tell babysitter where profiler stress result XML lives

This allows it to parse the XML and provide better results
about which tests failed.

6 years ago[Microsoft.Build] Improve assert in BuildSubmissionTest.EndBuildWaitsForSubmissionCom...
Alexander Köplinger [Sun, 2 Jul 2017 22:43:55 +0000 (00:43 +0200)]
[Microsoft.Build] Improve assert in BuildSubmissionTest.EndBuildWaitsForSubmissionCompletion

It started failing more frequently, let's see if we can get better data.
Also did the same change to a similar test.

6 years ago[jit] Fix mono_debug_count () so it doesn't confuse COUNT=0 with COUNT not being...
Zoltan Varga [Sun, 2 Jul 2017 22:05:18 +0000 (18:05 -0400)]
[jit] Fix mono_debug_count () so it doesn't confuse COUNT=0 with COUNT not being used.

6 years ago[System.ServiceModel] Don't use DateTime.Now for measuring elapsed time
Alexander Köplinger [Sun, 2 Jul 2017 16:35:51 +0000 (18:35 +0200)]
[System.ServiceModel] Don't use DateTime.Now for measuring elapsed time

Use Stopwatch or DateTime.UtcNow instead which aren't affected
by things like daylight-saving time

6 years ago[Mono.Posix] Don't use DateTime.Now for measuring elapsed time
Alexander Köplinger [Sun, 2 Jul 2017 11:28:40 +0000 (13:28 +0200)]
[Mono.Posix] Don't use DateTime.Now for measuring elapsed time

Use Stopwatch or DateTime.UtcNow instead which aren't affected
by things like daylight-saving time

6 years ago[System] Don't use DateTime.Now for measuring elapsed time
Alexander Köplinger [Sun, 2 Jul 2017 11:16:30 +0000 (13:16 +0200)]
[System] Don't use DateTime.Now for measuring elapsed time

Use Stopwatch or DateTime.UtcNow instead which aren't affected
by things like daylight-saving time

6 years ago[corlib] Don't use DateTime.Now for measuring elapsed time
Alexander Köplinger [Sun, 2 Jul 2017 11:02:31 +0000 (13:02 +0200)]
[corlib] Don't use DateTime.Now for measuring elapsed time

Use Stopwatch or DateTime.UtcNow instead which aren't affected
by things like daylight saving time

6 years ago[jit] Use the right type when handling shared versions of RuntimeHelpers.IsReferenceO...
Zoltan Varga [Sun, 2 Jul 2017 06:08:44 +0000 (02:08 -0400)]
[jit] Use the right type when handling shared versions of RuntimeHelpers.IsReferenceOrContainsReferences (). The previous version only worked by accident. (#5160)

6 years ago[utils] Fix CppCheck warning in mono-threads-posix.c (#5161)
Alexander Köplinger [Sat, 1 Jul 2017 19:06:24 +0000 (21:06 +0200)]
[utils] Fix CppCheck warning in mono-threads-posix.c (#5161)

After the refactoring in 9aaa0083d0def5b940372dbd9375336b036249fd
CppCheck complained about using 'result' uninitialized (looks like
it can't deduce that g_error will abort the process anyway).

6 years ago[msvc] Update csproj files (#5162)
monojenkins [Sat, 1 Jul 2017 16:53:58 +0000 (18:53 +0200)]
[msvc] Update csproj files (#5162)

6 years ago[mcs] C#7 tuples var deconstruct
Marek Safar [Fri, 30 Jun 2017 22:34:37 +0000 (00:34 +0200)]
[mcs] C#7 tuples var deconstruct

6 years ago[mcs] Adds missing file
Marek Safar [Fri, 30 Jun 2017 18:22:27 +0000 (20:22 +0200)]
[mcs] Adds missing file

6 years ago[mcs] C# 7 tuple (foundation only).
Marek Safar [Fri, 30 Jun 2017 17:44:41 +0000 (19:44 +0200)]
[mcs] C# 7 tuple (foundation only).

Still couple of advanced features not implemented and parser cannot
deal with unnamed tuple type at type declaration level.

6 years agoMerge pull request #5159 from MaurGi/patch-1
Rodrigo Kumpera [Fri, 30 Jun 2017 16:18:20 +0000 (12:18 -0400)]
Merge pull request #5159 from MaurGi/patch-1

Console.Error.WriteLine in System.Net.NetworkInformation

6 years agoConsole.Error.WriteLine in System.Net.NetworkInformation
Mauro Giusti [Fri, 30 Jun 2017 16:13:31 +0000 (09:13 -0700)]
Console.Error.WriteLine in System.Net.NetworkInformation

Console.Error.WriteLine ("Got a bad hardware address length for an AF_PACKET {0} {1}",...

This Console.WriteLine interferes with Apache Storm that reads from the console I/O.

See bug: https://bugzilla.xamarin.com/show_bug.cgi?id=57887

6 years agoMerge pull request #5144 from kumpera/handle-fixes-part1
Rodrigo Kumpera [Fri, 30 Jun 2017 14:56:08 +0000 (10:56 -0400)]
Merge pull request #5144 from kumpera/handle-fixes-part1

[io-layer] Fix two race conditions, one on FD handle creation and one on interrupt install.

6 years agoMerge branch 'master' into handle-fixes-part1
Rodrigo Kumpera [Fri, 30 Jun 2017 14:55:20 +0000 (10:55 -0400)]
Merge branch 'master' into handle-fixes-part1

6 years agoMerge pull request #5156 from lambdageek/bug-57850+57851
Aleksey Kliger (λgeek) [Fri, 30 Jun 2017 14:24:57 +0000 (10:24 -0400)]
Merge pull request #5156 from lambdageek/bug-57850+57851

[sre] Deal with ResolveEventHandler returning an AssemblyBuilder (Fixes #57850, #57851)

Fix a couple of bugs in the situation where a `ResolveEventHandler` happens to return an `AssemblyBuilder`.

* [#57850](https://bugzilla.xamarin.com/show_bug.cgi?id=57850) - if the `ResolveEventHandler` returns a reflection only assembly, throw a `FileNotFoundException`
* [#57851](https://bugzilla.xamarin.com/show_bug.cgi?id=57851) - don't look for a `ReferenceAssemblyAttribute` on assemblies returned by a `ResolveEventHandler` if they happen to be an `AssemblyBuilder`. (the native code path to get there is to try and instantiate a custom attribute in some other assembly, hence the fairly convoluted test in `assemblyresolve_event5` and its helper files)

6 years ago[loader] Don't try to look for ReferenceAssemblyAttribute on dynamic assemblies ...
Aleksey Kliger [Thu, 29 Jun 2017 22:12:34 +0000 (18:12 -0400)]
[loader] Don't try to look for ReferenceAssemblyAttribute on dynamic assemblies (Fixes #57851)

.NETFramework seems to ignore this custom attribute and allows instantiating
types from on assembly builders.

6 years ago[loader] Throw exn if ResolveEventHandler returns a refonly assembly (Fixes #57850)
Aleksey Kliger [Thu, 29 Jun 2017 16:52:52 +0000 (12:52 -0400)]
[loader] Throw exn if ResolveEventHandler returns a refonly assembly (Fixes #57850)

(Also depends on previous commit to ensure that MonoAssembly:refonly is set
correctly for dynamic assemblies)

6 years ago[sre] Mark AssemblyBuilderAccess.ReflectionOnly assemblies as refonly
Aleksey Kliger [Thu, 29 Jun 2017 19:06:01 +0000 (15:06 -0400)]
[sre] Mark AssemblyBuilderAccess.ReflectionOnly assemblies as refonly

This will ensure they show up in AppDomain.ReflectionOnlyGetAssemblies(), and
won't be allowed to execute

6 years ago[sre] use AssemblyBuilderAccess bitmask to set MonoDynamicImage flags
Aleksey Kliger [Thu, 29 Jun 2017 19:01:41 +0000 (15:01 -0400)]
[sre] use AssemblyBuilderAccess bitmask to set MonoDynamicImage flags

In particular this makes sure that AssemblyBuilderAccess.ReflectionOnly aren't
allowed to run.  And AssemblyBuilderAccess.CollectAndRun aren't allowed to save.

6 years ago[sre] Add MonoAssemblyBuilderAccess enum in native code
Aleksey Kliger [Thu, 29 Jun 2017 18:58:20 +0000 (14:58 -0400)]
[sre] Add MonoAssemblyBuilderAccess enum in native code

in sync with System.Reflection.Emit.AssemblyBuilderAccess

6 years ago[mono-error] Add mono_error_set_file_not_found
Aleksey Kliger [Thu, 29 Jun 2017 16:52:15 +0000 (12:52 -0400)]
[mono-error] Add mono_error_set_file_not_found

To throw System.IO.FileNotFoundException

6 years ago[tests] ResolveEventHandler that returns an AssemblyBuilder shouldn't crash mono
Aleksey Kliger [Thu, 29 Jun 2017 23:23:44 +0000 (19:23 -0400)]
[tests] ResolveEventHandler that returns an AssemblyBuilder shouldn't crash mono

Regression test for https://bugzilla.xamarin.com/show_bug.cgi?id=57851

6 years ago[runtime] Use pthread_cond_timedwait_relative_np () function on osx if available...
Zoltan Varga [Fri, 30 Jun 2017 03:05:00 +0000 (23:05 -0400)]
[runtime] Use pthread_cond_timedwait_relative_np () function on osx if available. (#5147)

6 years ago[aot] Load aot images only in the root domain. (#5151)
Zoltan Varga [Fri, 30 Jun 2017 02:02:08 +0000 (22:02 -0400)]
[aot] Load aot images only in the root domain. (#5151)

6 years ago[tests] Throw an error if ResolveEventHandler returns a reflection only AssemblyBuilder
Aleksey Kliger [Thu, 29 Jun 2017 22:42:12 +0000 (18:42 -0400)]
[tests] Throw an error if ResolveEventHandler returns a reflection only AssemblyBuilder

Regression test for https://bugzilla.xamarin.com/show_bug.cgi?id=57850

6 years ago[tests] Add some missing files to EXTRA_DIST
Aleksey Kliger [Thu, 29 Jun 2017 23:22:51 +0000 (19:22 -0400)]
[tests] Add some missing files to EXTRA_DIST

6 years ago[runtime] Make runtime invoke wrappers for dynamic methods non-shareable, so they...
Zoltan Varga [Thu, 29 Jun 2017 22:10:34 +0000 (18:10 -0400)]
[runtime] Make runtime invoke wrappers for dynamic methods non-shareable, so they can be freed when the dynamic method is freed. (#5152)

6 years ago[System] Request 32-bit capabilities
Eberhard Beilharz [Thu, 29 Jun 2017 16:50:25 +0000 (18:50 +0200)]
[System] Request 32-bit capabilities

This fixes a crash that happened when running in the debugger.
This fixes Xamarin-21261.

Change-Id: I0ccda9f3c11ec02457a932073665721be5e4e83e

6 years agoMerge pull request #5140 from alexrp/profiler-stress-fpe-fix
Alex Rønne Petersen [Thu, 29 Jun 2017 16:52:20 +0000 (18:52 +0200)]
Merge pull request #5140 from alexrp/profiler-stress-fpe-fix

[acceptance-tests] Don't pass a zero sampling/heapshot frequency in the profiler stress runner.

6 years ago[msvc] Update csproj files (#5149)
monojenkins [Thu, 29 Jun 2017 16:21:43 +0000 (18:21 +0200)]
[msvc] Update csproj files (#5149)

6 years ago[packaging/msbuild] Bump to get new changes on xplat-master (#5145)
Ankit Jain [Thu, 29 Jun 2017 12:41:29 +0000 (08:41 -0400)]
[packaging/msbuild] Bump to get new changes on xplat-master (#5145)

6 years ago[bcl] Drop a bunch of unused _2_1.cs files (#5112)
Alexander Köplinger [Thu, 29 Jun 2017 11:21:49 +0000 (13:21 +0200)]
[bcl] Drop a bunch of unused _2_1.cs files (#5112)

* [bcl] Drop a bunch of unused _2_1.cs files

They weren't used anywhere, not even mobile, so we can remove them.

6 years agoRevert "[runtime] Use pthread_cond_timedwait_relative_np () function on osx if availa...
Zoltan Varga [Thu, 29 Jun 2017 06:20:50 +0000 (02:20 -0400)]
Revert "[runtime] Use pthread_cond_timedwait_relative_np () function on osx if available. (#5143)"

This reverts commit 616ea50718aba3af237637f77d9c58acdca9a61f.

Revert this as it fails to build on wrench.

6 years ago[runtime] Use pthread_cond_timedwait_relative_np () function on osx if available...
Zoltan Varga [Thu, 29 Jun 2017 05:02:53 +0000 (01:02 -0400)]
[runtime] Use pthread_cond_timedwait_relative_np () function on osx if available. (#5143)

6 years ago[io-layer] Fix two race conditions, one on FD handle creation and one on interrupt...
Rodrigo Kumpera [Wed, 28 Jun 2017 22:48:28 +0000 (15:48 -0700)]
[io-layer] Fix two race conditions, one on FD handle creation and one on interrupt install.

mono_w32handle_new_fd: We must hold scan_mutex while initializing an unallocated handle otherwise
mono_w32handle_foreach might think it's a valid handle.

mono_w32handle_timedwait_signal_handle: We must increment the refcount before installing the interrupt handle
as the other end can be called right after we finish installing and would trigger a failure.

6 years ago[w32handle] Replace mono_w32handle_{ref,unref} by mono_w32handle_{duplicate, close...
Ludovic Henry [Wed, 28 Jun 2017 22:42:35 +0000 (18:42 -0400)]
[w32handle] Replace mono_w32handle_{ref,unref} by mono_w32handle_{duplicate, close} (#5106)

* [w32handle] Fix handle dumped ref

* [w32handle] Replace exposing mono_w32handle_{ref,unref} by mono_w32handle_{duplicate,close}, it is closer to what the win32 API exposes.

* [w32handle] Remove unrefing of handles on shutdown

If one of the handle is a file handle for example, then w32file has already be cleaned up, so we cannot guarantee that the handle we are going to close is not going to call into w32file code.

6 years agoImplement GC roots ourselves in Boehm rather than relying on their concept of roots...
Jonathan Chambers [Tue, 27 Jun 2017 04:45:26 +0000 (00:45 -0400)]
Implement GC roots ourselves in Boehm rather than relying on their concept of roots which is mainly for static data segments in binaries and not implemented on all platforms (cannot remove roots on Windows) (#564)

6 years ago[packaging] Remove git_branch from msbuild and mono-extensions (#5141)
Alexander Köplinger [Wed, 28 Jun 2017 17:42:46 +0000 (19:42 +0200)]
[packaging] Remove git_branch from msbuild and mono-extensions (#5141)

We're checking out a specific commit for both now so the git branch
is no longer required.

Also fixes warnings that a 2017-06 branch doesn't exist in mono-extensions.