Compare commits

...
478 Commits
Author SHA1 Message Date
Katelyn Gadd 57239e923f 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
2017-07-07 17:15:56 -07:00
Alex Rønne Petersen 1fb43ec60d Merge pull request #5187 from alexrp/debugger-fix-callback-signature
[sdb] Fix signatures of thread-related profiler callbacks.
2017-07-08 01:28:58 +02:00
Alex Rønne Petersen e7d4a0e1f7 [sdb] Fix signatures of thread-related profiler callbacks.
This was an unintended change in the profiler API overhaul.
2017-07-07 21:13:46 +02:00
Alexander Köplinger d90075ff7c Bump api-snapshot 2017-07-07 21:12:26 +02:00
Alex Rønne Petersen e5de7dacf9 Merge pull request #5180 from alexrp/profiler-zero-freq
[profiler] Don't enable sampling if frequency is zero.
2017-07-07 20:48:40 +02:00
Alex Rønne Petersen abd2d39d6b Merge pull request #5179 from alexrp/profiler-thread-name
[profiler] Report main thread name after attaching.
2017-07-07 20:45:58 +02:00
Martin Baulig f1a9bc25a1 [System]: minor cleanups. (#5186)
* [Mono.Security]: Add missing IMonoSslStream.WriteAsync() method.

* Cosmetic.

* [System]: MonoTlsStream: put implementation inside #SECURITY_DEP, not the entire class.
2017-07-07 14:12:14 -04:00
Alexander Köplinger 1418f0d58b [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.
2017-07-07 19:36:22 +02:00
Marius Ungureanu aaf9d40318 Merge pull request #5184 from mono/gtk-bump
Bump bockbuild for gtk# API compat fixes.
2017-07-07 19:50:14 +03:00
Marius Ungureanu 37ff0bcb9d Bump bockbuild for gtk# API compat fixes. 2017-07-07 19:48:52 +03:00
Alexander Köplinger 167d1a6c19 [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).
2017-07-07 16:17:56 +02:00
Alexander Köplinger 4de1501831 [metadata/corlib] Add apfs to list of fixed drive types
Also added some tests for DriveInfo since we didn't have any.
2017-07-07 16:17:56 +02:00
Alex Rønne Petersen 1025d82b3e [profiler] Don't enable sampling if frequency is zero.
Otherwise we would get a SIGFPE at runtime.
2017-07-07 06:21:48 +02:00
Alex Rønne Petersen ed0cefd19a Merge pull request #5181 from alexrp/master
[profiler] Fix a type name conflict.
2017-07-07 04:33:57 +02:00
Alex Rønne Petersen 70c7f2ef1d [profiler] Fix a type name conflict. 2017-07-07 03:08:33 +02:00
Zoltan Varga fd5843e964 [arm64] Really fix handler block trampolines. 2017-07-06 21:00:22 -04:00
Alex Rønne Petersen 4d35043211 [profiler] Report main thread name after attaching. 2017-07-07 02:41:57 +02:00
Alex Rønne Petersen b0057f2259 Merge pull request #5088 from alexrp/profiler-lightweight-coverage
[profiler] No longer use enter/leave instrumentation for code coverage.
2017-07-07 01:09:15 +02:00
Alex Rønne Petersen 3a7874cd61 [profiler] Don't enable GC and thread events for code coverage. 2017-07-07 01:00:27 +02:00
Alex Rønne Petersen 57962479d7 [profiler] No longer use enter/leave instrumentation for code coverage.
This was only enabled to populate a hash table that wasn't actually used.
2017-07-07 01:00:27 +02:00
Alex Rønne Petersen 076e44ac27 Merge pull request #5101 from alexrp/profiler-api
[runtime] New profiler API.
2017-07-07 00:57:16 +02:00
Alex Rønne Petersen f84179d397 [msvc] Update def files after profiler API changes. 2017-07-07 00:24:49 +02:00
Alex Rønne Petersen beabfddefb [utils] Mark mono_dl_open () as MONO_API.
This is needed on Windows.
2017-07-07 00:24:47 +02:00
Alex Rønne Petersen 8417f42847 [metadata] Mark mono_loader_register_module () as MONO_API.
This is needed on Windows.
2017-07-07 00:24:09 +02:00
Zoltan Varga 4ceda0772d [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.
2017-07-06 16:23:35 -04:00
Zoltan Varga 75d5e92311 [arm] Fix the handler block trampoline, it didn't actually call the helper function. 2017-07-06 15:06:51 -04:00
Zoltan Varga 936697aa97 Revert "[arm] Fix the handler block trampoline, it didn't actually call the helper function."
This reverts commit 745a6bec4a.
Revert this as it wasn't tested properly.
2017-07-06 14:45:35 -04:00
Zoltan Varga 745a6bec4a [arm] Fix the handler block trampoline, it didn't actually call the helper function. 2017-07-06 14:30:13 -04:00
Zoltan Varga 8aaf80d011 [arm64] Fix the handler block trampoline, it didn't actually call the helper function. 2017-07-06 14:27:27 -04:00
Alex Rønne Petersen 21fb262df5 [profiler] Add MONO_PROFILER_API_VERSION macro. 2017-07-06 11:32:42 +02:00
Alex Rønne Petersen 5abf30d893 [profiler] Split shutdown callback into early/late callbacks. 2017-07-06 11:32:41 +02:00
Alex Rønne Petersen ea4e4a9ef6 [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.
2017-07-06 11:32:29 +02:00
Rodrigo Kumpera dc2e330a9f Merge pull request #5172 from kumpera/proc-handles-pt2
[System] Fix handle leak in Process::GetProcess.
2017-07-05 18:25:10 -04:00
Rodrigo Kumpera cfc5d4fb3d [System] Fix handle leak in Process::GetProcess.
The runtime returns a inc'd handle to managed, so the SafeHandle should decrement on dispose.
2017-07-05 15:24:36 -07:00
Aleksey Kliger 1f93e5326c [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.
2017-07-05 13:38:48 -04:00
Alexander Köplinger ee6c6efcfc [tools] Fixup 098de0b8, inadvertently deleted the wrong csproj 2017-07-05 18:02:54 +02:00
monojenkins 178bb86b7e [msvc] Update csproj files (#5170) 2017-07-05 16:10:14 +02:00
Alexander Köplinger 727cf39986 [packaging] Fixup mistake from f7c9be 2017-07-05 16:10:06 +02:00
Alexander Köplinger 098de0b8e8 [tools] Cleanup unused files in mdoc
mdoc now lives in https://github.com/mono/api-doc-tools
2017-07-05 16:02:21 +02:00
Bernhard Urban 92a45afd7b [offsets-tool] allow to set targetdir for iOS targets, so it's possible to dump offsets without maccore 2017-07-05 12:01:10 +02:00
Zoltan Varga 0c6932a985 [jit] Optimize ldloc+ldfld operations for valuetypes, so they don't require making a copy of the valuetype. Hopefully fixes #56452. (#5166) 2017-07-04 13:02:05 -04:00
Zoltan Varga ddb061f776 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 025ee6399b.

Revert this as it seems to break the f# build.
2017-07-04 10:08:27 -04:00
Alexander Köplinger f7c9be4890 [packaging] Add Windows hostfxr.dll to MSBuild in MSI
Part of https://bugzilla.xamarin.com/show_bug.cgi?id=57930
2017-07-04 15:01:55 +02:00
Ankit Jain 13aeb8836a Revert "[packaging/msbuild] Bump to get new changes on xplat-master (#5145)"
This reverts commit 94dcde7291.
2017-07-03 21:47:26 -04:00
Alexander Köplinger 6295559e04 Bump corefx (#5167)
* Bump corefx

* Bump API snapshot submodule
2017-07-03 23:35:53 +02:00
Zoltan Varga 025ee6399b [jit] Optimize ldloc+ldfld operations for valuetypes, so they don't require making a copy of the valuetype. Hopefully fixes #56452. (#5166) 2017-07-03 16:53:56 -04:00
Alexander Köplinger 8e88de76bb [ci] Tell babysitter where profiler stress result XML lives
This allows it to parse the XML and provide better results
about which tests failed.
2017-07-03 21:09:11 +02:00
Alexander Köplinger cbc43ad527 [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.
2017-07-03 00:43:55 +02:00
Zoltan Varga 2efd64587f [jit] Fix mono_debug_count () so it doesn't confuse COUNT=0 with COUNT not being used. 2017-07-02 18:05:38 -04:00
Alexander Köplinger 9e91b6687e [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
2017-07-02 23:31:34 +02:00
Alexander Köplinger ca55ce871f [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
2017-07-02 23:31:34 +02:00
Alexander Köplinger b3e3e4cc40 [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
2017-07-02 23:31:34 +02:00
Alexander Köplinger 2d9f497748 [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
2017-07-02 23:31:34 +02:00
Zoltan Varga 86ccab6997 [jit] Use the right type when handling shared versions of RuntimeHelpers.IsReferenceOrContainsReferences (). The previous version only worked by accident. (#5160) 2017-07-02 02:08:44 -04:00
Alexander Köplinger 5ad055154b [utils] Fix CppCheck warning in mono-threads-posix.c (#5161)
After the refactoring in 9aaa0083d0
CppCheck complained about using 'result' uninitialized (looks like
it can't deduce that g_error will abort the process anyway).
2017-07-01 21:06:24 +02:00
monojenkins 2247603bd8 [msvc] Update csproj files (#5162) 2017-07-01 18:53:58 +02:00
Marek Safar 18dc4ebcd0 [mcs] C#7 tuples var deconstruct 2017-07-01 00:34:37 +02:00
Marek Safar 2ceb6e9402 [mcs] Adds missing file 2017-06-30 20:22:27 +02:00
Marek Safar d2a26c9595 [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.
2017-06-30 19:47:06 +02:00
Rodrigo Kumpera bb99b3ef99 Merge pull request #5159 from MaurGi/patch-1
Console.Error.WriteLine in System.Net.NetworkInformation
2017-06-30 12:18:20 -04:00
Mauro Giusti 39af47841f 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
2017-06-30 09:13:31 -07:00
Rodrigo Kumpera bb0e787f60 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.
2017-06-30 10:56:08 -04:00
Rodrigo Kumpera 83832615fa Merge branch 'master' into handle-fixes-part1 2017-06-30 10:55:20 -04:00
Aleksey Kliger (λgeek) 6559b16c14 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)
2017-06-30 10:24:57 -04:00
Aleksey Kliger 225848bd65 [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.
2017-06-30 00:36:28 -04:00
Aleksey Kliger fa6194cc19 [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)
2017-06-30 00:36:27 -04:00
Aleksey Kliger a1eb52aa13 [sre] Mark AssemblyBuilderAccess.ReflectionOnly assemblies as refonly
This will ensure they show up in AppDomain.ReflectionOnlyGetAssemblies(), and
won't be allowed to execute
2017-06-30 00:36:27 -04:00
Aleksey Kliger a2ee7059d0 [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.
2017-06-30 00:36:26 -04:00
Aleksey Kliger 572f79d0f3 [sre] Add MonoAssemblyBuilderAccess enum in native code
in sync with System.Reflection.Emit.AssemblyBuilderAccess
2017-06-30 00:36:25 -04:00
Aleksey Kliger 30223ad01d [mono-error] Add mono_error_set_file_not_found
To throw System.IO.FileNotFoundException
2017-06-30 00:36:25 -04:00
Aleksey Kliger 6221c90f95 [tests] ResolveEventHandler that returns an AssemblyBuilder shouldn't crash mono
Regression test for https://bugzilla.xamarin.com/show_bug.cgi?id=57851
2017-06-30 00:36:24 -04:00
Zoltan Varga 27ce756030 [runtime] Use pthread_cond_timedwait_relative_np () function on osx if available. (#5147) 2017-06-29 23:05:00 -04:00
Zoltan Varga 51d1c47c8b [aot] Load aot images only in the root domain. (#5151) 2017-06-29 22:02:08 -04:00
Aleksey Kliger 57ae95d7aa [tests] Throw an error if ResolveEventHandler returns a reflection only AssemblyBuilder
Regression test for https://bugzilla.xamarin.com/show_bug.cgi?id=57850
2017-06-29 19:28:13 -04:00
Aleksey Kliger 810e4a15dd [tests] Add some missing files to EXTRA_DIST 2017-06-29 19:28:11 -04:00
Zoltan Varga ed6183c2b9 [runtime] Make runtime invoke wrappers for dynamic methods non-shareable, so they can be freed when the dynamic method is freed. (#5152) 2017-06-29 18:10:34 -04:00
Eberhard Beilharz cd39375a39 [System] Request 32-bit capabilities
This fixes a crash that happened when running in the debugger.
This fixes Xamarin-21261.

Change-Id: I0ccda9f3c11ec02457a932073665721be5e4e83e
2017-06-29 23:16:46 +02:00
Alex Rønne Petersen 87c125c435 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.
2017-06-29 18:52:20 +02:00
monojenkins 07959b40bb [msvc] Update csproj files (#5149) 2017-06-29 18:21:43 +02:00
Ankit Jain 94dcde7291 [packaging/msbuild] Bump to get new changes on xplat-master (#5145) 2017-06-29 08:41:29 -04:00
Alexander Köplinger b59125ca81 [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.
2017-06-29 13:21:49 +02:00
Zoltan Varga 6c37483822 Revert "[runtime] Use pthread_cond_timedwait_relative_np () function on osx if available. (#5143)"
This reverts commit 616ea50718.

Revert this as it fails to build on wrench.
2017-06-29 02:20:50 -04:00
Zoltan Varga 616ea50718 [runtime] Use pthread_cond_timedwait_relative_np () function on osx if available. (#5143) 2017-06-29 01:02:53 -04:00
Rodrigo Kumpera 1a8bdd5aff [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.
2017-06-28 15:48:28 -07:00
Ludovic Henry 6d88df8d82 [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.
2017-06-28 18:42:35 -04:00
Jonathan Chambers 6ca11b76d6 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) 2017-06-28 14:43:38 -04:00
Alexander Köplinger 6400a71595 [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.
2017-06-28 19:42:46 +02:00
Jo Shields a12daa47e0 Manually invoke Xvfb, don't depend on the xvfb plugin (#5132) 2017-06-28 19:41:25 +02:00
Marek Safar 90ca313240 [build] Add a new profile 2017-06-28 18:51:26 +02:00
Aleksey Kliger 505695fcd1 [nullgc] When building nullgc, don't try to link Boehm libs
Previous nullgc commit (52d9a55a86) didn't actually work in a clean tree.
2017-06-28 10:20:05 -04:00
Alex Rønne Petersen 3298fe7f21 [acceptance-tests] Don't pass a zero sampling/heapshot frequency in the profiler stress runner.
Also change the code to make it more likely that we actually do some runs
without sampling or heapshot enabled.
2017-06-28 14:07:39 +02:00
Zoltan Varga 17d4227002 [w32handle] Add some debugging code to help track down handle wait problems. (#5136) 2017-06-27 19:44:58 -04:00
Zoltan Varga 85a3e77247 [w32handle] Zero out the handle specific data in the handle dtor to help debugging. (#5135) 2017-06-27 18:05:34 -04:00
monojenkins 71c58f8fb0 [msvc] Update csproj files (#5131) 2017-06-27 18:32:41 +02:00
Alexander Köplinger 08559f8a29 [man] Fix AOT temp path option description
It's `temp-path` in the code, not `temp_path`
2017-06-27 16:58:46 +02:00
Aleksey Kliger (λgeek) af2b3eb197 Merge pull request #5120 from lambdageek/bug-57744
[reflection] Convert correct MonoError to an exn in Assembly.GetTypes ()
2017-06-27 10:44:30 -04:00
cherusker 4aa28ede12 Fix various compiler warnings (#5064)
* Fix compiler warnings (w32)

- add explicit (long long (unsigned)) type casts

- change %ld to %lld once, to match the general style of these logging messages

* Fix compiler warnings (threadpool)

- add explicit (void *) type casts

* Fix compiler warnings (boehm)

- add an explicit (long) type cast; the values are defined as gint64, an upgrade to at least "%ld" seems like a good idea

- about dropping const: const does not seem to be necessary as g_getenv() returns pointers to freshly allocated buffers whenever called. const might have been used to protect the return value of g_getenv() on unix systems with earlier versions of Mono (as a comment in gmisc-unix.c suggests). keeping const here causes a compiler warning, as the const qualifier gets dropped when *env is being used with g_free(). that led to the decision to drop the qualifier altogether.

* Fix compiler warnings (sgen)

- specify the arguments (void) to avoid -Wstrict-prototypes warnings

* Fix compiler warnings (misc - metadata)

- specify the arguments (void) to avoid -Wstrict-prototypes warnings

* Fix compiler warnings (misc)

- specify the arguments (void) to avoid -Wstrict-prototypes warnings

- add an explicit (void *) type cast; changing the return type to char* might be more usable and could be discussed

- ret is not being used and can be removed; fixes a -Wunused-but-set-variable warning

* Fix compiler warnings (mini)

- specify the arguments (void) to avoid -Wstrict-prototypes warnings

* [fixup!] Correct indentation

* [fixup!] Correct (void *)
- use GUINT_TO_POINTER and MONO_NATIVE_THREAD_ID_TO_UINT instead of (void *) to cast mono_native_thread_id_get () to %p

* [fixup!] Correct indentation of boehm-gc.c and add FIXME

* include <inttypes.h> and test the G_GINT64_FORMAT macro

* [fixup!] Use G_G*_FORMAT and PRIx32 macros instead of type casts wherever possible
2017-06-27 16:21:34 +02:00
Ankit Jain 67f753a893 [packaging/msbuild] Bump to get new changes on xplat-master (#5127) 2017-06-27 00:57:07 -04:00
Zoltan Varga 492438a431 [jit] Avoid emitting op_load_got_addr opcodes on x86 when using llvmonly, its not needed. (#5125) 2017-06-26 23:19:07 -04:00
Aleksey Kliger bebd8dc438 [reflection] Convert correct MonoError to an exn in Assembly.GetTypes () (Fixes #57744)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=57744
2017-06-26 16:09:34 -04:00
Aleksey Kliger 13d0bab910 [bcl] Delete our ReflectionTypeLoadException
We use the referencesource version
2017-06-26 16:07:11 -04:00
Alexander Köplinger f892c7c574 [cil-strip] Move comment out of .sources file
I forgot that we only run gensources.sh on libraries but not
tools so the comments don't get stripped out...
2017-06-26 19:19:10 +02:00
Zoltan Varga 5e6e6df993 [runtime] Add more logging in case mono_os_cond_timedwait () fails. 2017-06-26 13:04:45 -04:00
Alexander Köplinger 5d69157964 Bump API snapshot 2017-06-26 17:13:11 +02:00
Marius Ungureanu fd185fb454 [System.Core] Implement MemoryMappedFile.OpenExisting
Reuse the existing icall infrastructure to give the same handle back.

This PR implements all OpenExisting methods (with the access rights parameter discarded) and the SafeHandle property.
In the runtime, we don't check the capacity parameter if we try to open a mmap file, and we fallthrough the handle refcount case.
2017-06-26 16:57:31 +02:00
Alexander Köplinger a8c53ebf16 Revert "[cil-strip] Remove old private copy of Mono.Cecil"
(reverted from commit 4ea3122758)
2017-06-26 12:35:56 +02:00
Alexander Köplinger f068fb6b66 Revert "[cil-strip] Upgrade to latest Mono.Cecil API"
(reverted from commit 0c9eb70a46)

Using newer Cecil means metadata tokens will be different which
breaks AOT compilation: https://github.com/mono/mono/pull/5102#issuecomment-310801767
2017-06-26 12:33:36 +02:00
monojenkins 1db2001526 [msvc] Update csproj files 2017-06-26 08:55:42 +02:00
Zoltan Varga 7ccddf9832 [llvm] Align aot variables to 8 bytes, parts of the aot code depend on it. 2017-06-24 15:12:47 -04:00
Aleksey Kliger 52d9a55a86 [null_gc] Get null GC building again.
- Had to borrow a gchandles implementation from mono/metadata/boehm-gc.c
- Added coop handles support for NULL GC
- Fixed typos in configure.ac
- To use: `./configure --with-libgc=none --without-sgen --enable-boehm`
  You get a mono-boehm which actually is not collecting anything.
2017-06-24 11:29:16 -04:00
Ankit Jain 80165d2117 [packaging/msbuild] Bump to get new changes on xplat-master (#5113) (#5114) 2017-06-23 23:35:53 -04:00
Ludovic Henry 8724ace98a [System] Fix compilation on watchos (#5108) 2017-06-23 19:32:35 -04:00
Alexander Köplinger 4ea3122758 [cil-strip] Remove old private copy of Mono.Cecil
No longer needed now that we're using the new Cecil.
2017-06-24 01:25:03 +02:00
Alexander Köplinger 0c9eb70a46 [cil-strip] Upgrade to latest Mono.Cecil API
This greatly simplifies the code and as a bonus also shaves off
about 300ms when stripping mscorlib.dll.
2017-06-24 01:25:03 +02:00
Rodrigo Kumpera ff285585d4 Merge pull request #5103 from alexrp/profiler-signal-ack-fix
[profiler] Do the signal ack after checking that the thread is detached.
2017-06-23 15:30:14 -07:00
Zoltan Varga 14867dbabe [aot] Fix aot image loading messages in static mode. 2017-06-23 16:17:34 -04:00
Vlad Brezae 27b67e3586 Merge pull request #5084 from BrzVlad/feature-worker-context
[sgen] Implement sgen worker context
2017-06-23 21:10:18 +03:00
Vlad Brezae e693ce5077 [sgen] Use concurrent mark concurrently with parallel minors 2017-06-23 20:47:49 +03:00
Vlad Brezae 606677431a [sgen] Implement work context for thread pool threads
We need to run jobs on the thread pool threads for parallel minor, parallel major, concurrent mark and concurrent sweep, some of which can run simultaneously. Instead of making separate threads reserved for each type of work, we create a work context abstraction (this contains a set of pending jobs to run and the sgen-worker callbacks). When a thread pool thread looks for work, it searches for work (jobs and idle work) through all contexts and finishes work from each one of them, from the highest to the lowest priority.

This is implemented by having different thread pool contexts (which contain the job list, work callbacks that indicate whether it should work and its ineherent priority), overall unrelated to the GC. The sgen worker infrastructure also creates separate worker contexts (which contain the object ops to be used and information about each worker, like the state and the private gray queue). We use at most two worker contexts (for minor and for major) and each worker context makes use of a sgen thread pool context.
2017-06-23 20:47:49 +03:00
Vlad Brezae 271c88f8a8 [sgen] Remove redundant code
We always init worker distribute gray queue when initialising worker infrastructure.
2017-06-23 20:46:09 +03:00
Vlad Brezae 506d5d4049 [sgen] Include split count in the parallel job
We were getting the split_count at job run time which makes little sense. Include it in the job, alongside the job index.
2017-06-23 20:46:09 +03:00
Vlad Brezae 6bb78cace3 [sgen] Run the scan pinned object job concurrently with minors
Concurrent mark doesn't normally scan objects in the nursery since they can be moved. At the end of the concurrent mark, we were locking over the entire gc pause in order to make sure that the we can scan the latest pinned object list (aka none of those objects can be moved). Lock only over the pinning phase of the collection, since it is enough.
2017-06-23 20:46:09 +03:00
Vlad Brezae 5348325a64 Merge pull request #5098 from BrzVlad/fix-sgen-pagesize
[sgen] Fix sgen pagesize
2017-06-23 20:06:51 +03:00
Marius Ungureanu d181fe7194 Merge pull request #5104 from mono/bump-bockbuild
Bump bockbuild
2017-06-23 19:08:23 +03:00
Marius Ungureanu 26eacdc3dc Bump bockbuild 2017-06-23 19:05:48 +03:00
Alex Rønne Petersen 87d8bdef08 [profiler] Do the signal ack after checking that the thread is detached.
Otherwise we could crash in mono_thread_info_current ().
2017-06-23 16:52:24 +02:00
Chris Lapa 04b6339bd1 [aot] fixes temp-path argument only working when using LLVM compiler. (#5099)
Signed-off-by: Chris Lapa <[email protected]>
2017-06-23 09:30:23 -04:00
Ankit Jain c7b19b52fd [packaging/msbuild] Bump to get new changes on xplat-master 2017-06-23 02:16:31 -04:00
Ankit Jain 5b2437d62f [packaging/msbuild] Update commit hash to point to xplat-master HEAD (#5100) 2017-06-22 21:35:09 -04:00
Vlad Brezae 3ea09f9c8f [sgen] Performance improvement for ms_block_size computations
This reduces regressions for switching from MS_BLOCK_SIZE compile time constant
to ms_block_size variable by 85% on the tests where this was showing up. In the
future we should implement a block allocator, which would, amongst other benefits,
enable us to remove the block-size/page-size dependency.
2017-06-23 01:14:27 +03:00
Vlad Brezae abd1bd5d8f [sgen] Fix MS block size calculation.
The block size must be a multiple of the system page size. Page size simply
cannot be determined reliably at compile time, so we must obtain the page size
through a system call on startup and use it as the block size. We still enforce
a minimum block size of 16kb on systems where the page size is smaller than
that.

The old code hardcoded page sizes for certain architectures with large pages.
THe problem is that those architectures don't necessarily have to have large
pages and on systems where this wasn't the case, we'd end up with a block size
much larger than needed.

Rebase of @alexrp's work.
2017-06-23 01:06:49 +03:00
Rodrigo Kumpera 86968831ec Merge pull request #5095 from kumpera/fix_fullaot
[aot] Fix the name of the mono_gc_wbarrier_range_copy icall. FullAOT with direct calls requires it.
2017-06-22 14:55:52 -07:00
Zoltan Varga af835fc6de [arm] Handle large offsets in OP_SEQ_POINT. Fixes #57476. (#5094) 2017-06-22 17:15:27 -04:00
Alex Rønne Petersen ab5220be93 Merge pull request #5090 from alexrp/profiler-class-unload-removal
[profiler] Remove class unload events.
2017-06-22 21:03:01 +02:00
Alex Rønne Petersen 32801300d1 [profiler] Remove class unload events.
These are never actually emitted by the profiler API because they make no sense
in the context of Mono's metadata layer.
2017-06-22 21:02:18 +02:00
Alex Rønne Petersen 1ec9117f63 Merge pull request #5089 from alexrp/profiler-deadlock-fix
[profiler] Fix a deadlock due to recursive use of the buffer lock.
2017-06-22 20:56:48 +02:00
Rodrigo Kumpera adc4d3c471 [aot] Fix the name of the mono_gc_wbarrier_range_copy icall. FullAOT with direct calls requires it. 2017-06-22 11:48:13 -07:00
Alex Rønne Petersen 0279b08ccb Merge pull request #5092 from alexrp/mini-coverage-increment
[mini] Use an atomic add for the code coverage counter when possible.
2017-06-22 20:39:37 +02:00
Eddie Hedges 2602f25eb7 Docs: added missing ) to RelaxngPattern snippet (#5093) 2017-06-22 18:48:40 +02:00
Alex Rønne Petersen de3fa74e12 [mini] Use an atomic add for the code coverage counter when possible. 2017-06-22 17:32:10 +02:00
Zoltan Varga 522c8b69f5 [runtime] Add a few missing error_init () calls to the mono_custom_attrs_from_... functions. Fixes #57488. (#5076) 2017-06-22 10:27:07 -04:00
Zoltan Varga f8a1ab5d75 [sre] Fix the signature of the create_dynamic_method () icall, make it static since the C implementation only takes two parameters, this only caused problems if the icall set the error, since it overwrite the DynamicMethod object instead. Fixes #57301. (#5081) 2017-06-22 10:26:46 -04:00
Alex Rønne Petersen 6f43750475 Merge pull request #5091 from alexrp/mini-enter-leave-cleanup
[mini] Remove codegen special cases around MONO_PROFILE_ENTER_LEAVE.
2017-06-22 15:55:26 +02:00
Alex Rønne Petersen e0e341c7d1 [mini] Remove codegen special cases around MONO_PROFILE_ENTER_LEAVE.
Enter/leave instrumentation is now done with icalls at the IR level, so these
special cases are no longer needed.
2017-06-22 12:02:14 +02:00
Alex Rønne Petersen b0be338837 [profiler] Fix a deadlock due to recursive use of the buffer lock.
The lock no longer supports recursion as of 10ba222234.
Not that it ever really did, since the old implementation was buggy.
2017-06-22 10:30:29 +02:00
Ludovic Henry 9df453295e [threads] Enable blocking transition with MONO_ENABLE_BLOCKING_TRANSITION env variable (#5087) 2017-06-21 20:46:18 -04:00
Alex Rønne Petersen e40724e169 [utils/mmap] Prefer sysconf () over getpagesize () in mono_pagesize ().
The former is async-signal-safe, while the latter makes no guarantees and also
isn't actually portable.
2017-06-21 22:40:12 +03:00
Aleksey Kliger (λgeek) 310be7a2fb Merge pull request #5079 from lambdageek/dev-setvalue
[coop handles] Implement various SetValue methods
2017-06-21 15:32:29 -04:00
Rodrigo Kumpera 824b01d4fc Merge pull request #5082 from kumpera/fix-ro-fs-file-delete
[io-layer] When deleting a file, check for EROFS and verify if the file exists. Fixes #57629.
2017-06-21 10:34:01 -07:00
Rodrigo Kumpera fec0e65560 [runtime] Update comment with link to Linux Kernel fix. 2017-06-21 09:56:58 -07:00
Bernhard Urban 55293097e1 [interp] disable context-static.exe on CI as it suffers from stack usage issue 2017-06-21 17:26:25 +02:00
Bernhard Urban d1aa491294 [interp] fix BARRIER_IF_VOLATILE usage 2017-06-21 17:26:25 +02:00
Alex Rønne Petersen 32a5d1fc3b [interp] Handle the no. prefix instruction as a no-op. 2017-06-21 17:26:25 +02:00
Alex Rønne Petersen 18f2255ecd [interp] Add support for the volatile. prefix instruction. 2017-06-21 17:26:25 +02:00
Alex Rønne Petersen f44ff23078 [interp] Add MINT_MONO_MEMORY_BARRIER. 2017-06-21 17:26:25 +02:00
Alex Rønne Petersen c738a606d2 [interp] Fix oplength of MINT_MONO_TLS. 2017-06-21 17:26:25 +02:00
Alex Rønne Petersen 983b5a8cbe [interp] Update comment to clarify meaning of oplength. 2017-06-21 17:26:25 +02:00
Marek Safar 21192c8424 [mcs] Add missing vector cloning of definite assignment on-true. Fixes #57505 2017-06-21 15:13:31 +02:00
Alex Rønne Petersen 7ed46ff6e1 Merge pull request #5072 from alexrp/profiler-stability
[profiler] A bunch of profiler bug/stability fixes.
2017-06-21 02:06:28 +02:00
Marek Safar d2b64bb5cf [mcs] Fixes regression introduced by a0fc3f4dcf to consider user set values. Fixes #57242 2017-06-21 00:14:05 +02:00
Rodrigo Kumpera 3454feb426 [io-layer] When deleting a file, check for EROFS and verify if the file exists. Fixes #57629.
Linux has this particular behavior of returning ENOFS when unlinking from an read only FS.
Even if the file doesn't exists! Darwin does the sane thing and return ENOENT in this case.

To workaround this, if unlink returns EROFS, we stat the file and deal with that.
2017-06-20 14:59:09 -07:00
Marek Safar 5acc6be700 Bump roslyn to 2.3 beta 2 2017-06-20 23:18:07 +02:00
Aleksey Kliger 3e514ce907 [runtime] Use coop handles for System.Array.SetValue 2017-06-20 15:00:04 -04:00
Aleksey Kliger 1f85a462e9 [runtime] Use coop handles for System.Array.SetValueImpl 2017-06-20 15:00:02 -04:00
Aleksey Kliger 51c97ade65 [runtime] Make array_set_value_impl single-exit 2017-06-20 15:00:01 -04:00
Aleksey Kliger c2f95645ca [runtime] Don't call icall ves_icall_System_Array_SetValueImpl directly
add a helper function array_set_value_impl and call that from elsewhere in
native code.
2017-06-20 14:59:59 -04:00
Aleksey Kliger 3611e8ec48 [runtime] Add mono_error_set_invalid_cast () 2017-06-20 14:59:57 -04:00
Aleksey Kliger 6344d4be9f [runtime] Use coop handles for System.Reflection.MonoField.SetValueInternal 2017-06-20 14:59:56 -04:00
Marek Safar 1334748e5a Bump corefx 2017-06-20 20:17:08 +02:00
Aleksey Kliger b5d64ebd0a [runtime] Add mono_nullable_init_from_handle 2017-06-20 13:53:46 -04:00
monojenkins ef29b9fbfa [msvc] Update csproj files (#5075) 2017-06-20 18:30:37 +02:00
Aleksey Kliger 7ee123b1e2 [coop handles] Add MONO_HANDLE_SET_FIELD_REF macro
Set a field in an object when you have a MonoClassField*
2017-06-20 11:29:43 -04:00
Aleksey Kliger 5831edbc3f [coop handles] Add mono_object_handle_pin_unbox 2017-06-20 11:29:43 -04:00
Bernhard Urban 68f5463685 [bcl tests] do not attempt to delete non-existing files
This fixes an issue we see on the BCL test suite when run in the context
of Xamarin Android:

```
I/mono-stdout( 2534):     Certificate1 [FAIL] : TearDown : System.UnauthorizedAccessException : Access to the path "temp.b64" is denied.
```

It seems like those files aren't generated anymore.  Not sure why this
starts to be a problem now.
2017-06-20 16:36:28 +02:00
Alex Rønne Petersen f4346ebc54 [profiler] Remove an unnecessary check that could hide potential bugs. 2017-06-20 06:38:21 +02:00
Alex Rønne Petersen 4cf3f02cac [acceptance-tests] Update the profiler-stress test runner for the profiler's new argument style.
This allows us to test a lot more combinations than previously.
2017-06-20 06:22:28 +02:00
Alex Rønne Petersen afa9a853fb [profiler] Fix 'no' argument parsing. 2017-06-20 05:49:58 +02:00
Alex Rønne Petersen 10ba222234 [profiler] Implement a new buffer reader/writer lock algorithm.
See the comment + assertions to get an idea of how it works.
2017-06-20 05:39:16 +02:00
Alex Rønne Petersen ccd373f429 [profiler] Require an ack of the previous sampling signal before sending another.
This avoids situations where we could end up filling the signal queue
completely, leading to the undocumented EAGAIN return value from pthread_kill,
which breaks ~everything in the STW/GC code because it thinks an error return
value from pthread_kill means the thread has exited.

The actual reason why this happened is that when a thread is suspended, we mask
all signals except the restart signal for that thread. This means that a
program with a large number of threads or where GC collections could take
longer than usual would end up with tens of thousands of sampling signals
queued up, eventually reaching the limit of the user-level signal queue (see
`ulimit -i` and `RLIMIT_SIGPENDING`).

We only do this on systems where we use real time signals. Non-RT signals do
not have this problem as the kernel will throttle them.
2017-06-20 05:39:14 +02:00
Alex Rønne Petersen bdfa3ef2ca [utils/threads] Export small ID functions as part of the API.
These will be used in the log profiler.

Also, make mono_thread_info_register_small_id () only allocate a new small ID
if one isn't already allocated for the current thread. This is necessary so
that we can allocate a small ID for a thread and not have it be overwritten
if/when that thread is later attached probably (which also results in this
function being called).
2017-06-20 05:39:12 +02:00
Alex Rønne Petersen 9aaa0083d0 [utils/threads] Print an error and abort if pthread_kill returns an error that isn't ESRCH. 2017-06-20 05:39:11 +02:00
Alex Rønne Petersen 333c6665a2 [profiler] Remove a FIXME that likely won't be addressed now. 2017-06-20 05:39:09 +02:00
Alex Rønne Petersen 1ebb4e4cbd [profiler] Ensure that buffer size is adjusted to whatever an event actually needs.
Very large events could previously result in potential overflows because
buffers always had the same size (BUFFER_SIZE, 64k).
2017-06-20 05:39:07 +02:00
Alex Rønne Petersen 1448821251 [profiler] Remove the buffer size hack in ensure_logbuf_unsafe ().
This is blatantly hiding potential bugs. This kind of code is not okay.
2017-06-20 05:39:06 +02:00
Alex Rønne Petersen 37ddfb1da4 [profiler] Attach threads automatically in all callbacks.
This hardens the profiler against cases where an unattached thread causes some
event callback to be invoked. This is particularly relevant when embedding.
2017-06-20 05:38:51 +02:00
Alex Rønne Petersen ce31c277fb [profiler] Flush the dumper thread every second.
If a program is idle, we likely won't get enough samples to prompt the dumper
thread to send its log buffer to the writer thread. This can make it seem like
the profiler isn't working when it actually is. So, just send the dumper
thread's log buffer every second to make sure data is delivered in a timely
fashion.
2017-06-20 03:19:44 +02:00
Alex Rønne Petersen 38d0080cf5 [profiler] Take the reader lock when modifying the thread-local method list.
It can be modified by other threads during sync points.
2017-06-20 03:19:44 +02:00
Ludovic Henry a08574bf9e [threads] Store MonoInternalThread in MonoThreadInfo for use when detaching (#5058)
* [threads] Make mono_thread_attach_full static

* [threads] Remove  prefix on MonoThreadInfoCallbacks callbacks

* [threads] Rename mono_threads*_init functions to mono_thread_info*_init

* [threads] Remove dead method mono_runtime_is_critical_method

* [threads] Move MonoThreadInfoCallbacks to metadata/threads

* [threads] Store MonoInternalThread in MonoThreadInfo for use when detaching

When the native thread would exit, the TLS keys are destroyed. There is a TLS destructor for MonoThreadInfo, but not for MonoInternalThread. If MonoInternalThread is destroyed before MonoThreadInfo, then MonoThreadInfoCallbacks.thread_detach wouldn't successfully detach the current MonoInternalThread as mono_thread_internal_current would return NULL. This would lead to MonoInternalThread still laying around, while their corresponding MonoThreadInfo has already been destroyed. This fixes this problem, since we now rely on MonoThreadInfo to store the MonoInternalThread for detach.
2017-06-19 20:35:54 -04:00
Alex Rønne Petersen 3765f987d5 Merge pull request #5070 from alexrp/profiler-version-bump
[profiler] Bump log profiler version to 2.0 due to breaking argument changes.
2017-06-20 01:29:15 +02:00
Alex Rønne Petersen 523e9ff615 [profiler] Bump log profiler version to 2.0 due to breaking argument changes. 2017-06-20 01:24:51 +02:00
Alex Rønne Petersen 8da9924557 Merge pull request #5062 from alexrp/profiler-library
[profiler] Introduce the Mono.Profiler.Log library. (take 2)
2017-06-20 01:04:18 +02:00
Alex Rønne Petersen fbb36d5500 [profiler] Introduce the Mono.Profiler.Log library. API still unstable. 2017-06-20 00:47:52 +02:00
Alex Rønne Petersen bcd8b38b57 Merge pull request #5063 from alexrp/profiler-format-changes
[profiler] A few small format changes
2017-06-20 00:46:50 +02:00
Alex Rønne Petersen a308a7cd22 [profiler] Bump format version to 14. 2017-06-20 00:31:21 +02:00
Alex Rønne Petersen 7ef2b4f919 [profiler] Update format description comment. 2017-06-20 00:31:19 +02:00
Alex Rønne Petersen 33db577741 [profiler] Encode the address in TYPE_SAMPLE_UBIN as a pointer. 2017-06-20 00:31:18 +02:00
Alex Rønne Petersen 1fc8f5631c [profiler] Add an exception object field to TYPE_CLAUSE. 2017-06-20 00:31:16 +02:00
Alex Rønne Petersen c4c6a9373d [profiler] Add an image pointer field to assembly load events. 2017-06-20 00:31:14 +02:00
Alex Rønne Petersen 1520a7aaba [profiler] Simplify the encoding of monitor events.
The way the event was encoded was highly irregular with respect to the rest of
the format.
2017-06-20 00:30:45 +02:00
Zoltan Varga 533bcc0c49 [jit] Fix a warning. 2017-06-19 16:52:57 -04:00
Aleksey Kliger (λgeek) 26cad094ee Merge pull request #5059 from lambdageek/tbt
[tests] Rework TypeBuilderTest SetUp/TearDown
2017-06-19 15:41:14 -04:00
Zoltan Varga bee68ad79f [arm64] Remove an assert which is hit when mono_arch_get_call_target () is called with a 'b' instead of a 'bl'. 2017-06-19 14:33:54 -04:00
Rodrigo Kumpera b5d36a9abb Merge pull request #5027 from kumpera/damn-you-strerror
[eglib] Replace strerror with strerror_r as the former is not thread safe.
2017-06-19 14:00:03 -04:00
Zoltan Varga ca7b288837 [jit] Treat the mono_threads_attach_coop () icall specially, since it can be called from native-to-managed wrappers on unattached threads, so calling it shouldn't go through the trampoline infrastructure. (#5056) 2017-06-19 13:49:31 -04:00
Aleksey Kliger f99700a264 [tests] Don't run SRE saved assembly in current process
Windows doesn't like deleting the file, and the original bug was a problem in
SRE, not in the AssemblyBuilder.Save ()
2017-06-19 12:35:38 -04:00
Zoltan Varga df203f3532 [interp] Implement runtime invokes by executing the runtime-invoke wrappers using the interpreter. This saves some code and allows better interop with JIT exceptions. (#5057) 2017-06-19 11:12:33 -04:00
Alexander Köplinger f98b92ea6c [MacSDK] Bump msbuild 2017-06-19 15:20:03 +02:00
Alexander Köplinger dbaab5d01a [packaging] Add a few more missing files to Windows MSI
Also add a safeguard so we don't accidentally leave files with
OSX paths in the package.
2017-06-19 14:58:50 +02:00
Alexander Köplinger e5207856a0 Bump cecil and api-snapshot 2017-06-19 13:58:15 +02:00
Alexander Köplinger 1aef35403d [btls] Fix a small memleak in btls-x509-lookup.c (#5065)
Noticed this while looking at the Clang Analysis Report[1] as the
only memory leak in the report and thought why not fix it :)

[1] https://jenkins.mono-project.com/job/test-mono-mainline-staticanalysis/Clang_Analysis_Report/
2017-06-19 12:54:32 +02:00
Alexander Köplinger 68130ebec9 [packaging] Add a few missing msbuild files to Windows MSI 2017-06-19 01:39:07 +02:00
Alex Rønne Petersen 9e469d7b9e [profiler] Add an exception clause callback that receives the exception object. 2017-06-18 05:40:05 +02:00
Zoltan Varga d421ee95b0 [sdb] Fix invokes to string ctors. Fixes #57197. 2017-06-17 01:32:34 -04:00
Ludovic Henry 6fc58f529b [w32handle] Unify WaitHandle.Wait{One,Any,All} icalls (#5051) 2017-06-16 21:01:51 -04:00
Aleksey Kliger 5c06650885 [tests] Rework TypeBuilderTest SetUp/TearDown
- Create a unique temporary directory for each test in TypeBuilderTest and delete
  it on TearDown.

- Change tests to use tempDir instead of Path.GetTempPath ()

- Change IsSerializable () test to how it was 11 years ago and have it write to a
  file with a simple name (but now in a directory where noone else is writing)

- Change FieldsWithSameName (), FieldsWithSameNameAndType () and
  MethodsWithSameNameAndSig () to use the default temp assembly (now in a
  unique tempDir) instead of using the CreateTempAssembly ()

- Remove CreateTempAssembly function. It is dead code.
2017-06-16 19:58:27 -04:00
Ludovic Henry 77a8ed1b39 [threads] Rework MonoThreadInfoCallbacks.thread_{register,detach,unregister} callbacks (#5055)
* [threads] Use MonoThreadInfo.{stack_start_limit,stack_end} in more places

* [threads] Remove dead code

* [threads] Rename MonoThreadInfoCallbacks.thread_{register,detach,unregister} to MonoThreadInfoCallbacks.thread_{attach,detach,detach_with_lock} respectively
2017-06-16 19:14:13 -04:00
Zoltan Varga cf39a9cd43 [runtime] Add a mono_marshal_get_runtime_invoke_full () function with an extra need_direct_wrapper argument to allow generation of runtime-invoke wrappers which directly call a method without using the 'addr' argument. (#5053) 2017-06-16 17:45:41 -04:00
Zoltan Varga 7e220bf4ff [interp] Implement CEE_RETHROW properly by allocating a separate exception variable for each clause, and not overwriting stack traces on a rethrow. (#5040) 2017-06-16 16:01:38 -04:00
Rodrigo Kumpera d4bd4f0091 Merge pull request #5014 from vkargov/vk-kasha
[jit] Always cache the latest image set in case of a cache miss.
2017-06-16 14:42:20 -04:00
monojenkins afd9c96b3f [msvc] Update csproj files (#5052) 2017-06-16 18:32:26 +02:00
Alexander Köplinger 6c6ab73705 [packaging] Add back IronLangs to Windows MSI
It was just temporarily removed from the Mac package to work around
a build break. This was fixed so we need to add iron* back.
2017-06-16 17:55:15 +02:00
Alexander Köplinger aaceb6f0cf Bump API snapshot 2017-06-16 17:12:44 +02:00
Aleksey Kliger (λgeek) cfa6ff88d1 Merge pull request #5010 from Unity-Technologies/boehm-gc-alloc-fixed-sre
Boehm GC Fixes - SRE and Handle Stack
2017-06-16 10:38:37 -04:00
David Karlaš ff3a3a6fad Merge pull request #5049 from mono/fixSdbTests
Fixed Mono.Debugger.Soft unit tests
2017-06-16 15:04:54 +02:00
Marek Habersack 9285e189c1 Enable translation of WSEACCESS (10013) on mobile (#5050)
This error can occur on mobile devices during network operations
as evidenced in https://bugzilla.xamarin.com/show_bug.cgi?id=56653
and having an actual description of the error printed in this case
makes it easier for the user to discover what's going on.
2017-06-16 11:30:16 +02:00
David Karlaš 5a0573df99 Fixed Mono.Debugger.Soft unit tests and added new new String('a', 3); unit test after return; 2017-06-16 09:46:57 +02:00
David Karlaš c329548380 Merge pull request #5042 from mono/sdbSyncDebuggerLibs
Upstreaming changes from mono/debugger-libs to Mono.Debugger.Soft
2017-06-16 08:41:17 +02:00
David Karlaš 9549385e47 Bug 44266 - Unable to change variable values whilst debugging
https://github.com/mono/debugger-libs/commit/ac17c08938408abc7f5aaf0f862d83bbd2b56d42
2017-06-16 08:23:29 +02:00
David Karlaš 3f899a3198 caching thread state
https://github.com/mono/debugger-libs/commit/e3e665525a59823563c23babaf5d0e29a44a644a
2017-06-16 08:23:29 +02:00
David Karlaš dd15ef7b68 Updated SourceLocation with end line and end column
https://github.com/mono/debugger-libs/commit/479a84ce506e7cf25d6aac4353d59b7fc6526a17
2017-06-16 08:23:28 +02:00
David Karlaš a427893839 Fix one extra allocation on MethodMirror.FullName
https://github.com/mono/debugger-libs/commit/cfea89011ef690fe2cd9fefccf6b34ee1d4b1584
2017-06-16 08:23:28 +02:00
David Karlaš 866ad511fe Bug 36053 - Broken enum values conversion
plus moved some code to correct location
https://github.com/mono/debugger-libs/commit/d65261617baddb5b41f665b0eb717cd1f81873b6
2017-06-16 08:23:28 +02:00
David Karlaš 86f8dd621a Fixed fetching Enum values on older runtimes
https://github.com/mono/debugger-libs/commit/525c3a685d52eb6ed053ee23c358e54dc091d9cb
2017-06-16 08:23:28 +02:00
David Karlaš daa673f978 [Debugger] Set the encoding of the error/output readers.
Bug 40556 - Output pad no longer displays unicode characters
https://github.com/mono/debugger-libs/commit/c10de4dd44493156a112fdc0d315db75e0457a2d
2017-06-16 08:23:28 +02:00
Rodrigo Kumpera a21319d1ca Merge pull request #5032 from kumpera/profiler-reorder-heap-events
Fix how HEAP_START / HEAP_END works
2017-06-15 20:56:05 -04:00
Alexander Köplinger cfe36830d4 Add back missing TypeConverter that got removed in last commit
Also bump API snapshot with the latest changes.
2017-06-16 01:20:03 +02:00
Frederik Carlier 831381caa9 Use CoreFX sources for System.Printing (#5041) 2017-06-16 00:57:02 +02:00
Frederik Carlier e33294bf22 Use CoreFX sources for System.Drawing.Imaging (#5048)
* Use CoreFX sources for System.Drawing.Imaging

* Bump API snapshot
2017-06-16 00:55:18 +02:00
Aleksey Kliger 762ac3d618 In mono_thread_info_suspend_lock in non-coop, don't assert MonoThreadInfo* is non-NULL
mono_thread_info_suspend_lock () can be called from boehm-gc.c
on_gc_notification before the new thread's start_wrapper calls
mono_thread_info_attach but after pthread_create calls the start wrapper.

As a result, the asserts in mono_thread_info_suspend_lock_with_info can catch
the new thread in an inconsistent state.
2017-06-15 13:50:10 -04:00
monojenkins 259afc7850 [msvc] Update csproj files 2017-06-15 19:49:57 +02:00
Frederik Carlier c238778b63 Use Drawing2D classes from CoreFX 2017-06-15 18:51:09 +02:00
Jo Shields 4a054b40ae Ensure monodoc/Test/ exists, with an empty file
This prevents build failures building monodoc tests, as git cannot check out empty directories, but Test/ must exist for `make check` to work
2017-06-15 18:49:53 +02:00
Aleksey Kliger be684e09b4 Initialize new handle chunks on in mono_handle_stack_alloc () 2017-06-15 10:39:57 -04:00
Frederik Carlier 3830eca92c Use Brush classes from CoreFX (#5039) 2017-06-15 11:29:35 +02:00
Bernhard Urban aa59a09fd7 Revert "[win] set HAVE_ONLINE_VES" (#5038)
This reverts commit 501e77f912.

superseded by https://github.com/mono/mono/pull/5000
2017-06-15 00:45:50 -04:00
Zoltan Varga e600333511 [arm64] Fix the patching of MONO_PATCH_INFO_METHOD_JUMP so it handles thunks properly. Allocate thunk space for tail calls. Fixes asserts in the System.Numerics xunit tests. (#5026) 2017-06-14 21:54:01 -04:00
Alexander Köplinger 581b46d90d [packaging] Add missing .pc files to Windows folder
It got accidentally ignored by the root .gitignore.
2017-06-15 02:16:18 +02:00
Rodrigo Kumpera 17af65a784 [profiler] Handle zero object heap dumps in mprof-report and fix the test suite. 2017-06-14 14:54:18 -07:00
Rodrigo Kumpera 5ebdc64ef8 [profiler] Emit post-gc sync point with the world stopped to avoid racing with allocating threads not stopped on the GC lock. 2017-06-14 14:54:17 -07:00
Rodrigo Kumpera 6f740b5bc3 [sgen] Don't report GC moves with the world running and before a GC happened - it makes no sense!. 2017-06-14 14:54:15 -07:00
Rodrigo Kumpera cfe5263372 [sgen] Move STW GC events to sgen-stw.c so they are properly reported. 2017-06-14 14:54:10 -07:00
Rodrigo Kumpera c23173ee4b [profiler] Move HEAP_START and HEAP_EVENTS to happen outside of heap shots.
They now are produced every time a GC spills heap events such as roots, moves and objects.

Additionally, I changed GC syncpoints to happen in case any GC events are active.
It's a safer choice with little penalty. Figuring out the actual combinations that would require them is non-trivial.
2017-06-14 14:53:59 -07:00
Rodrigo Kumpera 7c284c8c2b [eglib] Linux needs errno.h for ERANGE 2017-06-14 11:36:59 -07:00
Alexander Köplinger acf546b1ba [packaging] Fix wrong argument in Windows script 2017-06-14 20:35:50 +02:00
Zoltan Varga 89fa700441 [jit] Add a ExceptionTraceIp structure to represents entries in MonoException.trace_ips, making it easier to add more information to it in the future. NFC. (#5025) 2017-06-14 14:28:01 -04:00
Rodrigo Kumpera 2e68bc17e3 [eglib] Handle ERANGE in g_strerror 2017-06-14 11:25:27 -07:00
Aleksey Kliger (λgeek) f97b7bd2a2 Merge pull request #5020 from lambdageek/fix-strict-loader-image-cache-hit
[loader] If using strict strong names, recheck loaded assm before returning it.
2017-06-14 14:17:10 -04:00
Alexander Köplinger 7f28de8559 [packaging] Fix prerequisite in Windows script 2017-06-14 18:29:43 +02:00
Frederik Carlier 3307394dba Use CoreFX sources for System.Drawing.Text (#5036) 2017-06-14 18:20:07 +02:00
Frederik Carlier fb4877a8d7 Use CoreFX sources for System.Drawing.Imaging (#5035)
* Use CoreFX sources for System.Drawing.Imaging

* Bump API snapshot
2017-06-14 18:17:19 +02:00
Frederik Carlier d31ccce651 Use source from CoreFX for System.Drawing.Drawing2D (#5034) 2017-06-14 18:12:32 +02:00
Alexander Köplinger 348ec2cf7a [packaging] Remove msiexec prerequisite from Windows script
We're using lessmsi now.
2017-06-14 17:31:04 +02:00
Alexander Köplinger b85f34d763 [packaging] Exit Windows packaging script on error
Also quote passed in mdk path.
2017-06-14 16:29:29 +02:00
Jonathan Chambers 466c00b8f0 Use GC memory for handle stack under Boehm so it's scanned. Cleanup handle stack on thread unregister. 2017-06-14 09:18:17 -04:00
Bernhard Urban a0bf70a140 [metadata] s/HAVE_ONLINE_VES/ENABLE_ILGEN/g 2017-06-14 15:03:21 +02:00
Bernhard Urban d720e3368c [configure] move HAVE_ONLINE_VES away from autotools to a header file 2017-06-14 15:03:21 +02:00
Alexander Köplinger 1ebd866eaa Bump corefx 2017-06-14 07:58:28 +02:00
saraedum 39d1e1889f [Mono.Security] Fix typo in CryptographicException message
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=52621
2017-06-14 01:43:46 +02:00
Aleksey Kliger 5f0dd2998d [loader] If using strict strong names, recheck loaded assm before returning it.
Suppose we have two versions of an assembly: AsmA 1.0.0.0 and AsmA 2.0.0.0 that
we want to load into the same domain at the same time (for example we want to
load AsmB and AsmC that statically reference the two versions, respectively, or
maybe we used reflection).  Suppose version 1 got loaded first (and we found it
on our MONO_PATH in "somepathdir/AsmA.dll").  Now we want to load version 2.
The problem is that if version 1 is on MONO_PATH first, we'll find a filename
that matches ("somepathdir/AsmA.dll") and try to open that image.  Then we'll
end up here in mono_assembly_open_predicate() after the mono_image_open_a_lot()
call hits the image cache.  So we get back an image and image->assembly is
version 1.

The old behavior would just return any non-NULL image->assembly.  The new
behavior is to check the predicate and reject opening the propose file if the
predicate doesn't match.  (If we're not using the strict loader, or if there's
no predicate set, return the existing image->assembly as before).
2017-06-13 19:07:52 -04:00
Aleksey Kliger 87714d8a45 [tests] Strict assembly loading of two version of the same assm should work.
In particular, we should be able to use classes/methods that are unique to each
version.  We should not get only one version loaded.
2017-06-13 19:07:51 -04:00
Alexander Köplinger 258efac3c6 [MacSDK] Remove quotes in nuget wrapper script
None of the other wrapper scripts quote the Mono path and this
broke the Windows packaging script which extracts nuget from the
Mac package.
2017-06-14 00:45:58 +02:00
Bernhard Urban 1a4ce67a49 Revert "[exceptions] only do SIGSEGV related actions for SIGSEGVs in mono_handle_native_crash"
This reverts commit a27bc024f1.

We never want the crash handler to be recursive.
2017-06-13 23:43:06 +02:00
Rodrigo Kumpera e68c3b8027 [eglib] Replace strerror with strerror_r as the former is not thread safe.
This change would be nicer if the code was moved to the runtime so we could use our PAL.
2017-06-13 13:40:34 -07:00
Bernhard Urban 2640a8d862 [aot] fix compilation for targets that do not set MONO_ARCH_HAVE_FULL_AOT_TRAMPOLINES (#5017) 2017-06-13 15:56:52 -04:00
Rodrigo Kumpera aa8605d0eb Merge pull request #5011 from kumpera/quiet-mode
Don't emit profiler events we don't need to.
2017-06-13 15:53:46 -04:00
Rodrigo Kumpera 4b9d0677c9 [profiler] Don't emit sync point on restart the world unless gc moves are enabled. 2017-06-13 12:53:31 -07:00
Rodrigo Kumpera 6ccea37726 [profiler] Add + prefix to file names to append the pid. This makes enabling it with env vars doable. 2017-06-13 12:52:53 -07:00
Marius Ungureanu 56d5fce7f4 Bump bockbuild (#5023) 2017-06-13 20:52:42 +02:00
Alexander Köplinger 00f7811683 [ci] Get rid of remaining usages of WORKSPACE env var
Most of it was already removed in ea519ada8c
2017-06-13 18:07:47 +02:00
Marek Safar c5b00568ba Bump corefx 2017-06-13 16:43:10 +02:00
Alexander Köplinger 27bf99ebed [packaging] Fix path to wrapper.bat for Windows MSI 2017-06-13 16:18:21 +02:00
Vlad Brezae 2015a4ab21 Merge pull request #5002 from BrzVlad/feature-sgen-modes
[sgen] SGen modes
2017-06-13 14:14:47 +03:00
Vlad Brezae 2eb33cebf5 Merge pull request #5021 from BrzVlad/fix-parallel-fixes
[sgen] Fix parallel fixes
2017-06-13 14:07:29 +03:00
Rodrigo Kumpera ccda92d896 [profiler] Fix issue found by review. 2017-06-12 22:08:28 -07:00
Alexander Köplinger 69f8abf794 [packaging] Simplify Windows packaging scripts
We don't need to build in a separate checkout of mono anymore.
Also use .pkg passed in from upstream build.
2017-06-13 04:13:54 +02:00
Alexander Köplinger a4d6fccef9 [packaging] Move Windows MSI scripts into repository
They lived in https://github.com/mono/release before, moving them
into the main repo allows us to version them more easily.

Note: I intend to do more cleanup on those scripts in the future,
this is just the first step.
2017-06-13 04:11:39 +02:00
Vlad Brezae c98b69bc05 [man] Add entries for sgen modes and new major/minor types 2017-06-13 02:33:21 +03:00
Vlad Brezae 382a9b3679 [sgen] Add sgen modes
Group gc params configurations into general gc modes. The default mode (SGEN_MODE_NONE) is what we've been using so far, meaning old default features. The other modes can include experimental features.
2017-06-13 02:33:19 +03:00
Rodrigo Kumpera bd9b4e9b24 [profiler] Remove heapshot request polling from all over the place and depend only on the finalizer callback.
We the profiler now emiting a lot less events by default, all the existing polling no longer makes sense as they won't matter in the common path.

Instead we make sure the finalization end callback is always installed and poll from it.

This introduces the risk of a heapdump never happening or experiencing long delays because there are either too many finalizers or one of them hung.
It's an acceptable risk.
2017-06-12 16:09:56 -07:00
Marek Safar eab4b7e67b [build] Bumps mcs bootstrap requirement 2017-06-12 23:31:03 +02:00
monojenkins b9e7bcabe4 [msvc] Update csproj files (#4898) 2017-06-12 22:55:04 +02:00
Rodrigo Kumpera e6e0331cde [profiler] When using heapshot, don't collect roots when not doing a heapshot. 2017-06-12 12:45:21 -07:00
Rodrigo Kumpera 540ef7fb38 [profiler] Don't emit sync points during GC if we don't need to. 2017-06-12 11:33:11 -07:00
Rodrigo Kumpera 76e9739a43 [profiler] Don't emit thread and gc events if they are not enabled. 2017-06-12 11:33:11 -07:00
Rodrigo Kumpera e1b061052d Merge pull request #4967 from kumpera/profiler-arg-cleanup
Rework profiler argument handling.
2017-06-12 10:07:24 -07:00
Marek Safar 5f26cd5416 Bump corefx 2017-06-12 18:41:57 +02:00
Pablo Ruiz García db758b9f85 Fix OpenMappedWebConfiguration throws: System.IndexOutOfRangeException, when using RazorGenerator under mono (#5013) 2017-06-12 01:55:26 +02:00
Alexander Köplinger 1890aa6ec3 Fix System.Numerics xunit tests and add them to CI (#5006)
* Fix System.Numerics xunit tests and add them to CI

Xunit.Extensions.NetCore.dll is available as a net46 version now
so we can just use it instead of building it from our buildtools fork.
This also allows us to remove the fork from our submodules.

We were missing running the System.Numerics xunit tests in CI,
this adds them so we catch breaks like these earlier.

* Skip tests on Windows, they seem to fail there
2017-06-12 01:44:50 +02:00
Marek Safar a497e40075 [mcs] C#7 type pattern matching 2017-06-11 09:52:26 +02:00
Vladimir Kargov d8dab47fd0 [jit] Always cache the latest image set in case of a cache miss. 2017-06-09 22:52:36 -07:00
Zoltan Varga 60d58d9128 [sdb] Fix passing of nullable parameters in invokes. Fixes #57160. (#5012) 2017-06-09 23:53:39 -04:00
Vlad Brezae a5fcc9413d [sgen] Avoid using parallel minors for small nurseries
It is not effective and it can lead to regressions, due to the added synchronizations and work splitting.
2017-06-10 01:50:20 +03:00
Vlad Brezae 1d1069575d [sgen] Disable parallel mode if not enough cores 2017-06-10 01:43:04 +03:00
Vlad Brezae 57d7457da5 [sgen] Use logical cpu count for number of workers
It actually leads to better performance. The downside is the creation of more sgen workers. This is currently capped at 8.
2017-06-10 01:33:09 +03:00
Jonathan Chambers 128e454ad2 Use regular allocator rather than GC memory for SRE related types since the contained GC tracked hash tables are now themselves roots since 863ddf25bf.
Fixes crash due to MonoDynamicAssembly or MonoDynamicImage being collected under Boehm as they were unreferenced GC memory.
2017-06-09 18:21:22 -04:00
Rodrigo Kumpera 61f32e7f14 Remove the mono-profiler- prefix from all source files in the profiler subdir.
Additionally, rename arg-parsing.c to log-args.c so it's clear it's part of the log profiler.
2017-06-09 13:58:15 -07:00
Rodrigo Kumpera 74695b9d03 [profiler]Use g_warning and remove bad usage() line 2017-06-09 13:04:22 -07:00
Rodrigo Kumpera f8a969aae9 Merge pull request #4998 from kumpera/fix_56684
[corlib] Don't pass RuntimeMethodHandle across domains. Fixes #56684
2017-06-09 14:44:43 -04:00
Aleksey Kliger (λgeek) 417389513f Merge pull request #4997 from lambdageek/bug-57222
[sre] FieldBuilder:RuntimeResolve shouldn't lookup by name (Fixes #57222)
2017-06-09 13:40:28 -04:00
Marek Safar e871e6f844 Bump corefx 2017-06-09 18:48:01 +02:00
Bernhard Urban a3e6b2cd8b [marshal] allocate dummy string always in root domain
otherwise it can happen that the dummy string is allocated in a
different domain, and when it's onloaded the GC root points to an
invalid object.
2017-06-09 12:49:59 +02:00
Rodrigo Kumpera 310192e3cb Bunch of minor fixes. 2017-06-08 15:48:06 -07:00
Rodrigo Kumpera 468339deb6 Remove env var. 2017-06-08 15:46:07 -07:00
Rodrigo Kumpera 826558a4af update usage, print warning on output:-FILENAME and add a TODO. 2017-06-08 15:46:07 -07:00
Rodrigo Kumpera 334d05b1e7 Remove spurious header. Change from enum to bucket of defines. 2017-06-08 15:46:06 -07:00
Aleksey Kliger dd0eab4247 [test] Test SRE of a class with two methods with the same name.
Regression test for https://bugzilla.xamarin.com/show_bug.cgi?id=57222

Although methods aren't affected by this bug, I added a regression test for
this case anyway in case the implementation changes.

Currently MethodBuilder.RuntimeResolve() goes through a different codepath - it
calls RuntimeType.GetMethod (MethodInfo) which calls into an icall which looks
for a method with a matching token rather than a matching name.
2017-06-08 17:47:42 -04:00
Rodrigo Kumpera 8a1db7bb93 [corlib] Don't pass RuntimeMethodHandle across domains. Fixes #56684
We can't pass RuntimeMethodHandle across AppDomains since that can lead to memory corruption.

The way this happens is that when Domain (A) passes a method handle (M) to Domain (B), (B) will get the reflection object for
which will add that MonoMethod to the per-domain reflection hashtable. This won't cause the assembly of (M) to be registered with (B).

When (A) is unloaded, it might be the only domain referencing the assembly of (M), cause it to unload resulting in (B) having a dangling
pointer to (M) on its reflection hashtable.

The fix is to serialize enough lookup data across the wire so we can do type/method lookup using reflection on the target domain.
It might be slower, but this only happens on some remoting slowpaths anyways.

Finally, we can't simply register the assembly of (M) into domain (B) as that list (MonoDomain::domain_assemblies) is used for type loading,
thus breaking the target domain in some scenarios.
2017-06-08 14:10:38 -07:00
Aleksey Kliger 64d523c524 [sre] FieldBuilder:RuntimeResolve shouldn't lookup by name. (Fixes #57222)
RuntimeType:GetField (FieldInfo) looks up the field by name and attributes,
which doesn't work for SRE because it is legal to create multiple fields with
the same name and type and attributes.  So lookup using the
RuntimeFieldHandle (aka MonoClassField*) instead.
2017-06-08 16:13:57 -04:00
Aleksey Kliger 6b1529a15c [test] Test SRE of a class with two fields with same name
Regression test for https://bugzilla.xamarin.com/show_bug.cgi?id=57222
2017-06-08 16:13:56 -04:00
Aleksey Kliger (λgeek) 8a10c623f3 Merge pull request #4995 from lambdageek/dev-monodis-show-field-tokens
[monodis] Document --show-tokens and show field tokens
2017-06-08 15:54:04 -04:00
Zoltan Varga fc53acc968 [amd64] Fix a check in mono_emit_stack_alloc (). (#4985) 2017-06-08 15:47:27 -04:00
Aleksey Kliger edffe785ba [monodis] Show field tokens in --show-tokens mode 2017-06-08 12:36:32 -04:00
Aleksey Kliger 850f2df48b [monodis] Print table name (when valid) in --show-tokens mode 2017-06-08 12:36:30 -04:00
Aleksey Kliger 5e3ffa5a51 [monodis] Document --show-tokens 2017-06-08 12:36:24 -04:00
Niklas Therning 230a43461c Merge pull request #4994 from lewurm/interp-aot-mode-fix-windows
[win] set HAVE_ONLINE_VES
2017-06-08 14:48:10 +02:00
Bernhard Urban 501e77f912 [win] set HAVE_ONLINE_VES 2017-06-08 11:50:19 +02:00
Bernhard Urban fe06971e14 [interp] disable bug-45841-fpstack-exceptions.exe on CI 2017-06-08 10:23:00 +02:00
Bernhard Urban e686d39489 [interp] provide stub for icall_trampoline for x86 and ppc
keep the linker happy
2017-06-07 23:54:55 +02:00
Bernhard Urban b1000f0b2e [interp] root domain must be used for AOT'd wrappers used by interpreter 2017-06-07 23:27:44 +02:00
Bernhard Urban 1f0ad125dd [interp aot] documentation 2017-06-07 23:27:44 +02:00
Bernhard Urban d87817c174 [marshal] some things are required in the interpreter despite DISABLE_JIT 2017-06-07 23:27:44 +02:00
Bernhard Urban 51125153e5 [configure] introduce HAVE_ONLINE_VES 2017-06-07 23:27:44 +02:00
Bernhard Urban d4f922abce [interp] fix when DISABLE_JIT is set 2017-06-07 23:27:44 +02:00
Bernhard Urban 7ca4c72cc8 [interp] add InterpMethodArguments struct to offset-tool 2017-06-07 23:27:44 +02:00
Bernhard Urban 2e78636ac7 [interp] add MONO_AOT_MODE_INTERP 2017-06-07 23:27:44 +02:00
Bernhard Urban 0ddf58fe64 [interp] add --aot=interp, so we can run mono --full-aot --interpreter 2017-06-07 23:27:44 +02:00
vkargov 6baf669349 [tests] Re-enable bug-45841-fpstack-exceptions.exe (#4927)
* [tests] Re-enable bug-45841-fpstack-exceptions.exe

* [tests] Pass correct parameters in bug-45841.
2017-06-07 17:02:21 -04:00
Marek Safar 522d027663 [mcs] Better detection of null operator inside conditional expression. Fixes #57232 2017-06-07 18:01:00 +02:00
Martin Baulig dc58d950f2 Cosmetic; remove [Category ("Martin")] from the test. 2017-06-07 11:54:25 -04:00
Martin Baulig 83f74c4123 [System]: Fix possible initialization issue in MonoTlsProviderFactory. (#4987)
* [Mono.Security]: Add test for MonoTlsProviderFactory.GetProvider ().

* [System]: Fix possible initialization issue in MonoTlsProviderFactory.
2017-06-07 11:46:21 -04:00
Martin Baulig fff41905e9 [System]: Actually disable the keychain code and SecItemImport() on XI. (#4983) 2017-06-07 11:27:05 -04:00
Marek Safar 44a2d35676 [mcs] C#7 out variable declaration 2017-06-07 14:14:18 +02:00
Alexander Köplinger 1d6a8ed6ea [MacSDK] Bump libgdiplus to latest (#4984)
We were using a very old commit of libgdiplus. This brings in
the latest changes.
2017-06-07 14:08:27 +02:00
Bernhard Urban 4ede66b950 [interp] factor out everything that allocates a MonoLMFExt on the stack in order to reduce stack pressure in the main interpreter loop 2017-06-07 12:22:05 +02:00
Bernhard Urban 2b84f5bc33 [interp] factor out MINT_JIT_CALL instruction from interpreter switch in order to reduce stack pressure 2017-06-07 12:22:05 +02:00
Vlad Brezae 42311595ae [sgen] Make sure workers process jobs only if they are running (#4974)
This simplifies logic and prevents serial context being used by multiple workers at the same time.
2017-06-07 12:58:54 +03:00
Frederik Carlier 0526617e0a System.Drawing: Start consuming sources from corefx
Closes https://github.com/mono/mono/pull/4980
2017-06-06 23:46:01 +02:00
Alexander Köplinger 9b63661c15 [MacSDK] Update version number in msbuild.py 2017-06-06 23:01:50 +02:00
Bernhard Urban a46742dcb6 [mini] set MONO_ARCH_HAVE_INIT_LMF_EXT on architectures that implement mono_arch_init_lmf_ext
it worked before, because we relied on implicit linking
2017-06-06 20:00:58 +02:00
Bernhard Urban a4f960311e [mini] guard mono_arch_init_lmf_ext prototype properly 2017-06-06 19:15:44 +02:00
Bernhard Urban c64f332016 [arm] don't set MONO_ARCH_SOFT_DEBUG_SUPPORTED on android cross compiling
follow up fix for https://github.com/mono/mono/pull/4956

this breaks the cross compiler on windows for android:

```
  [9:07:36]                       /bin/sh ../../libtool  --tag=CC   --mode=compile /Users/builder/android-toolchain/mxe/bin/i686-w64-mingw32.static-gcc -DHAVE_CONFIG_H -I. -I/U  sers/builder/data/lanes/5000/ff452183/source/xamarin-android/external/mono/mono/mini -I../..   -DWINVER=0x0600 -D_WIN32_WINNT=0x0600 -D_WIN32_IE=0x0501 -D_UNICODE -DUNICODE -  DWIN32_THREADS -DFD_SETSIZE=1024 -g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes  -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno  -cast-qual -Wwrite-strings -Wno-switch -Wno-switch-enum -Wno-unused-value -Wno-attributes -Wno-format-zero-length -D__ARM_EABI__ -DARM_FPU_VFP=1 -DNO_UNALIGNED_ACCESS -I/User  s/builder/data/lanes/5000/ff452183/source/xamarin-android/external/mono -I/Users/builder/data/lanes/5000/ff452183/source/xamarin-android/external/mono/eglib/src -I../../eglib  /src -I/Users/builder/data/lanes/5000/ff452183/source/xamarin-android/build-tools/mono-runtimes/obj/Release//llvm/installed-win32/usr/include -DNDEBUG -D__NO_CTYPE_INLINE -D_  GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DLLVM_API_VERSION=4 -O -I../arch/arm -fvisibility=hidden -DXAMARIN_PRODUCT_VERSION=0 -static   -static-libgcc -std=gnu99 -fno-strict-aliasing -fwrapv -DMONO_DLL_EXPORT -Wno-unused-but-set-variable -g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-  prototypes  -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wwrite-strings -Wno-switch -Wno-switch-enum -Wno-unused-value -Wno-attributes -Wno-format-ze  ro-length -mno-tls-direct-seg-refs -Werror-implicit-function-declaration -MT libmini_la-mini-arm-gsharedvt.lo -MD -MP -MF .deps/libmini_la-mini-arm-gsharedvt.Tpo -c -o libmin  i_la-mini-arm-gsharedvt.lo `test -f 'mini-arm-gsharedvt.c' || echo '/Users/builder/data/lanes/5000/ff452183/source/xamarin-android/external/mono/mono/mini/'`mini-arm-gsharedv  t.c
  [9:07:36]                       /Users/builder/data/lanes/5000/ff452183/source/xamarin-android/external/mono/mono/mini/mini-arm.c: In function 'mono_arch_is_single_step_event  ':
  [9:07:36]                       /Users/builder/data/lanes/5000/ff452183/source/xamarin-android/external/mono/mono/mini/mini-arm.c:7242:2: error: unknown type name 'siginfo_t'
  [9:07:36]                         siginfo_t *sinfo = info;
  [9:07:36]                         ^
  [9:07:36]                       /Users/builder/data/lanes/5000/ff452183/source/xamarin-android/external/mono/mono/mini/mini-arm.c:7248:11: error: request for member 'si_addr'   in something not a structure or union
  [9:07:36]                         if (sinfo->si_addr >= ss_trigger_page && (guint8*)sinfo->si_addr <= (guint8*)ss_trigger_page + 128)
  [9:07:36]                                  ^
  [9:07:36]                       /Users/builder/data/lanes/5000/ff452183/source/xamarin-android/external/mono/mono/mini/mini-arm.c:7248:57: error: request for member 'si_addr'   in something not a structure or union
  [9:07:36]                         if (sinfo->si_addr >= ss_trigger_page && (guint8*)sinfo->si_addr <= (guint8*)ss_trigger_page + 128)
  [9:07:36]                                                                                ^
  [9:07:36]                       /Users/builder/data/lanes/5000/ff452183/source/xamarin-android/external/mono/mono/mini/mini-arm.c: In function 'mono_arch_is_breakpoint_event'  :
  [9:07:36]                       /Users/builder/data/lanes/5000/ff452183/source/xamarin-android/external/mono/mono/mini/mini-arm.c:7262:2: error: unknown type name 'siginfo_t'
  [9:07:36]                         siginfo_t *sinfo = info;
  [9:07:36]                         ^
  [9:07:36]                       /Users/builder/data/lanes/5000/ff452183/source/xamarin-android/external/mono/mono/mini/mini-arm.c:7267:11: error: request for member 'si_signo  ' in something not a structure or union
  [9:07:36]                         if (sinfo->si_signo == DBG_SIGNAL) {
  [9:07:36]                                  ^
  [9:07:36]                       /Users/builder/data/lanes/5000/ff452183/source/xamarin-android/external/mono/mono/mini/mini-arm.c:7269:12: error: request for member 'si_addr'   in something not a structure or union
  [9:07:36]                          if (sinfo->si_addr >= bp_trigger_page && (guint8*)sinfo->si_addr <= (guint8*)bp_trigger_page + 128)
  [9:07:36]                                   ^
  [9:07:36]                       /Users/builder/data/lanes/5000/ff452183/source/xamarin-android/external/mono/mono/mini/mini-arm.c:7269:58: error: request for member 'si_addr'   in something not a structure or union
  [9:07:36]                          if (sinfo->si_addr >= bp_trigger_page && (guint8*)sinfo->si_addr <= (guint8*)bp_trigger_page + 128)
```
2017-06-06 19:15:44 +02:00
Alexander Köplinger 6320fcb16b Bump API snapshot 2017-06-06 18:36:50 +02:00
Martin Baulig 21d5c9c346 [System]: Correctly implement close and shutdown in SslStream. (#4969)
* [System]: Correctly implement close and shutdown in SslStream.

* Cleanup.

* Cosmetic.

* More ReferenceSources/SR2.cs into common.sources to make it build.
2017-06-06 11:46:29 -04:00
Marek Habersack d0b0e2b880 Use correct path separator for satellite assemblies in cross builds (#4976)
When creating a bundle on Windows to run on Android, macOS/iOS or Linux we need
to use the target system's path separator when storing satellite assemblies in
the bundle instead of the host system's one. Failing to do so will embed (on
Windows) the satellite assemblies with paths like

   fr_FR\myassembly.resources.dll

while at runtime Mono will try to look up the assembly by

   fr_FR/myassembly.resources.dll

and fail to find it, obviously. The `--style` parameter is now consulted to see
what path separator character should be used.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=55603
2017-06-06 16:06:00 +02:00
Marek Safar ff0a6e77ff Bump corefx 2017-06-06 16:02:31 +02:00
Alexander Köplinger e2340cd101 [man] Remove mention of MONO_AOT_CACHE from mono.1
The env var was removed a long time ago in b8766a812d
and was replaced by options to --aot. This came up in Gitter today.
2017-06-06 15:43:02 +02:00
ralovich bfa744e645 implement Image.SetPropertyItem() method v4 (#1167)
This is thought to be fixing https://bugzilla.novell.com/show_bug.cgi?id=406307.

v4: state that my changes are licensed under MIT X11 license
2017-06-05 19:43:41 -04:00
Ludovic Henry 9c412c0b91 [w32handle] Fix deadlock on SignalAndWait (#4973)
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=57069
2017-06-05 18:07:40 -04:00
Aleksey Kliger (λgeek) 11ec98cacd Merge pull request #4962 from lambdageek/dev-handles-sockets
[w32socket] Use coop handles for many Socket icalls
2017-06-05 17:50:30 -04:00
Aleksey Kliger 23058b943f [w32socket] Use coop handles for System.Net.Sockets.Socket.cancel_blocking_socket_operation 2017-06-05 15:01:47 -04:00
Aleksey Kliger 65b981632c [coop handles] Add mono_internal_thread_handle_ptr () function
MonoInternalThreadHandle is not really needed - all MonoInternalThread
instances are supposed to be pinned.  But for uniformity, the icall marshaller
makes handles anyway.  This function lets us get back to a raw ptr.
2017-06-05 15:01:47 -04:00
Aleksey Kliger 6544bcfda8 [runtime] typedef MonoThread MonoThreadObject
MonoThreadHandle is already taken.  So define MonoThreadObject as an alias for
MonoThread and then make MonoThreadObjectHandle the coop handle type.
2017-06-05 15:01:47 -04:00
Aleksey Kliger 2251178eac [w32socket] Use coop handles for icalls in System.Net.Sockets.Socket
- Use coop handles for create_object_from_sockaddr

  Eventually want to rewrite its callers to use
  create_object_handle_from_sockaddr directly.

- Use coop handles for

  - LocalEndPoint_internal

  - RemoteEndPoint_internal

- inside create_sockaddr_from_object

  Eventually callers should be updated to use create_sockaddr_form_handle
  directly.

- Use coop handles for

  - ReceiveFrom_internal

  - Bind_internal

  - Connect_internal

  - SendTo_internal

- Remove dead code (create_object_from_sockaddr, create_sockaddr_from_object)

- Use coop handles for

  - Receive_internal WSABUF[]

  - Receive_internal byte[]

  - Send_internal

  - Send_array_internal

  - SetSocketOption_internal

  - GetSocketOption_arr_internal

  - GetSocketOption_obj_internal

  - IOControl_internal

  - SendFile_internal

- Remove more dead code

- Use coop handles for

  - Socket_internal

  - Select_internal

- Trivial coop handles conversion for several icalls in System.Net.Sockets.Socket

  None of these functions use managed objects, so just add a MonoError* argument.
2017-06-05 15:01:47 -04:00
Aleksey Kliger 7daf4b739e [coop handles] Define MonoSafeHandleHandle
Used to access System.Net.Sockets.SafeSocketHandle from native code
2017-06-05 15:01:46 -04:00
Aleksey Kliger bd9fa57b81 [coop handles] Macros to access a handle via a MonoClassField 2017-06-05 15:01:46 -04:00
Aleksey Kliger 68bff52cae [marshal] Wrap byref reference args to icalls in coop handles correctly.
Previously we only had "out" reference args working - they get a handle that's
initialized to NULL on entry and then writes back to the out arg on icall
return.

For "ref" reference args, do the same thing but initialize to the initial
argument value.
2017-06-05 15:01:46 -04:00
Marek Safar 8873c44400 [mcs] Remove unwanted tests 2017-06-05 20:56:09 +02:00
Ludovic Henry b603482343 Bump to 5.5 for master branch 2017-06-05 11:29:28 -04:00
Alexander Köplinger d30c17f44e Revert "[marshal] delay dummy string allocation"
Reverts 5e23a773b4

It seems to cause a crash during msbuild tests:

```
  xunit -> Microsoft.Build.Engine.UnitTests...
  Stacktrace:

  Native stacktrace:

  	0   mono                                0x0017cad4 mono_handle_native_crash + 308
  	1   mono                                0x001e2b03 sigabrt_signal_handler + 147
  	2   libsystem_platform.dylib            0x920a8deb _sigtramp + 43
  	3   ???                                 0xffffffff 0x0 + 4294967295
  	4   libsystem_c.dylib                   0x940bb27c abort + 155
  	5   mono                                0x0036886d mono_log_write_logfile + 381
  	6   mono                                0x003630d2 structured_log_adapter + 50
  	7   mono                                0x00380d1b monoeg_assertion_message + 107
  	8   mono                                0x0033863d major_scan_object_with_evacuation + 3373
  	9   mono                                0x0033b3d0 drain_gray_stack + 6608
  	10  mono                                0x0032df57 finish_gray_stack + 151
  	11  mono                                0x0032d3c6 major_finish_collection + 118
  	12  mono                                0x00329909 major_do_collection + 169
  	13  mono                                0x003288bd sgen_perform_collection + 605
  	14  mono                                0x0032a90b sgen_gc_collect + 75
  	15  mono                                0x002d5c4d unload_thread_main + 861
  	16  mono                                0x002abb6b start_wrapper + 795
  	17  libsystem_pthread.dylib             0x9ae6d5fb _pthread_body + 144
  	18  libsystem_pthread.dylib             0x9ae6d485 _pthread_struct_init + 0
  	19  libsystem_pthread.dylib             0x9ae72cf2 thread_start + 34

  Debug info from gdb:

  (lldb) command source -s 0 '/tmp/mono-gdb-commands.2tso9f'
  Executing commands in '/tmp/mono-gdb-commands.2tso9f'.
  (lldb) process attach --pid 2037
  2017-06-02 13:07:23.000 lldb[2093:282f] Metadata.framework [Error]: couldn't get the client port
  Process 2037 stopped
  * thread #1, name = 'tid_507', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
      frame #0: 0x923cc7ca libsystem_kernel.dylib`__psynch_cvwait + 10
  libsystem_kernel.dylib`__psynch_cvwait:
  ->  0x923cc7ca <+10>: jae    0x923cc7da                ; <+26>
      0x923cc7cc <+12>: calll  0x923cc7d1                ; <+17>
      0x923cc7d1 <+17>: popl   %edx
      0x923cc7d2 <+18>: movl   0xe0b084f(%edx), %edx

  Executable module set to "/Users/builder/data/lanes/2716/mono-mac-sdk/external/bockbuild/stage/bin/mono".
  Architecture set to: i386-apple-macosx.
  (lldb) thread list
  Process 2037 stopped
  * thread #1: tid = 0x530e96a, 0x923cc7ca libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'tid_507', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
    thread #2: tid = 0x530e96b, 0x923cc7ca libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'SGen worker'
    thread #3: tid = 0x530e96c, 0x923cc7ca libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'SGen worker'
    thread #4: tid = 0x530e96d, 0x923c7fb6 libsystem_kernel.dylib`semaphore_wait_trap + 10, name = 'Finalizer'
    thread #5: tid = 0x530e96e, 0x923cd992 libsystem_kernel.dylib`kevent64 + 10, queue = 'com.apple.libdispatch-manager'
    thread #6: tid = 0x530ea26, 0x923ccace libsystem_kernel.dylib`__select + 10, name = 'tid_5a03'
    thread #7: tid = 0x530edf1, 0x923cc7ca libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'tid_4007'
    thread #8: tid = 0x530edf2, 0x923cc7ca libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Threadpool worker'
    thread #9: tid = 0x530edf3, 0x923cc7ca libsystem_kernel.dylib`__psynch_cvwait + 10, name = 'Threadpool worker'
    thread #10: tid = 0x530edf4, 0x923ccff2 libsystem_kernel.dylib`__wait4 + 10, name = 'Domain unloader'
  (lldb) thread backtrace all
  * thread #1, name = 'tid_507', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
    * frame #0: 0x923cc7ca libsystem_kernel.dylib`__psynch_cvwait + 10
      frame #1: 0x9ae6fd1d libsystem_pthread.dylib`_pthread_cond_wait + 728
      frame #2: 0x9ae71bd9 libsystem_pthread.dylib`pthread_cond_wait$UNIX2003 + 71
      frame #3: 0x00361ea9 mono`mono_os_event_wait_multiple + 505
      frame #4: 0x00361ca5 mono`mono_os_event_wait_one + 53
      frame #5: 0x00376b49 mono`mono_thread_info_wait_one_handle + 41
      frame #6: 0x002d51b5 mono`mono_domain_try_unload + 485
      frame #7: 0x002d4f6a mono`ves_icall_System_AppDomain_InternalUnload + 90
      frame #8: 0x05bf9ee0
      frame #9: 0x018ce01d mscorlib.dll.dylib`System_AppDomain_Unload_System_AppDomain + 45
      frame #10: 0x05bf9d60
      frame #11: 0x05bf9ccc
      frame #12: 0x05bf9d04
      frame #13: 0x05bf9c90
      frame #14: 0x05bf996d
      frame #15: 0x02e7d171
      frame #16: 0x005c26d4
      frame #17: 0x005b6878
      frame #18: 0x005b6b7a
      frame #19: 0x000c38a8 mono`mono_jit_runtime_invoke + 1592
      frame #20: 0x002e43fe mono`do_runtime_invoke + 94
      frame #21: 0x002e7de3 mono`do_exec_main_checked + 147
      frame #22: 0x002e69a5 mono`mono_runtime_run_main_checked + 69
      frame #23: 0x0013b687 mono`mono_jit_exec + 311
      frame #24: 0x0013e2b2 mono`mono_main + 10114
      frame #25: 0x000b22db mono`main + 2011
      frame #26: 0x000b1af5 mono`start + 53
    thread #2, name = 'SGen worker'
      frame #0: 0x923cc7ca libsystem_kernel.dylib`__psynch_cvwait + 10
      frame #1: 0x9ae6fd1d libsystem_pthread.dylib`_pthread_cond_wait + 728
      frame #2: 0x9ae71bd9 libsystem_pthread.dylib`pthread_cond_wait$UNIX2003 + 71
      frame #3: 0x0035f0e9 mono`thread_func + 249
      frame #4: 0x9ae6d5fb libsystem_pthread.dylib`_pthread_body + 144
      frame #5: 0x9ae6d485 libsystem_pthread.dylib`_pthread_start + 130
      frame #6: 0x9ae72cf2 libsystem_pthread.dylib`thread_start + 34
    thread #3, name = 'SGen worker'
      frame #0: 0x923cc7ca libsystem_kernel.dylib`__psynch_cvwait + 10
      frame #1: 0x9ae6fd1d libsystem_pthread.dylib`_pthread_cond_wait + 728
      frame #2: 0x9ae71bd9 libsystem_pthread.dylib`pthread_cond_wait$UNIX2003 + 71
      frame #3: 0x0035f0e9 mono`thread_func + 249
      frame #4: 0x9ae6d5fb libsystem_pthread.dylib`_pthread_body + 144
      frame #5: 0x9ae6d485 libsystem_pthread.dylib`_pthread_start + 130
      frame #6: 0x9ae72cf2 libsystem_pthread.dylib`thread_start + 34
    thread #4, name = 'Finalizer'
      frame #0: 0x923c7fb6 libsystem_kernel.dylib`semaphore_wait_trap + 10
      frame #1: 0x002dbeb6 mono`finalizer_thread + 278
      frame #2: 0x002abb6b mono`start_wrapper + 795
      frame #3: 0x9ae6d5fb libsystem_pthread.dylib`_pthread_body + 144
      frame #4: 0x9ae6d485 libsystem_pthread.dylib`_pthread_start + 130
      frame #5: 0x9ae72cf2 libsystem_pthread.dylib`thread_start + 34
    thread #5, queue = 'com.apple.libdispatch-manager'
      frame #0: 0x923cd992 libsystem_kernel.dylib`kevent64 + 10
      frame #1: 0x91b5c899 libdispatch.dylib`_dispatch_mgr_invoke + 238
      frame #2: 0x91b5c532 libdispatch.dylib`_dispatch_mgr_thread + 52
    thread #6, name = 'tid_5a03'
      frame #0: 0x923ccace libsystem_kernel.dylib`__select + 10
      frame #1: 0x0036df29 mono`mono_poll + 409
      frame #2: 0x002b482f mono`poll_event_wait + 111
      frame #3: 0x002b345f mono`selector_thread + 1439
      frame #4: 0x002abb6b mono`start_wrapper + 795
      frame #5: 0x9ae6d5fb libsystem_pthread.dylib`_pthread_body + 144
      frame #6: 0x9ae6d485 libsystem_pthread.dylib`_pthread_start + 130
      frame #7: 0x9ae72cf2 libsystem_pthread.dylib`thread_start + 34
    thread #7, name = 'tid_4007'
      frame #0: 0x923cc7ca libsystem_kernel.dylib`__psynch_cvwait + 10
      frame #1: 0x9ae6fd1d libsystem_pthread.dylib`_pthread_cond_wait + 728
      frame #2: 0x9ae71c25 libsystem_pthread.dylib`pthread_cond_timedwait$UNIX2003 + 71
      frame #3: 0x003760f3 mono`mono_thread_info_sleep + 979
      frame #4: 0x002b1a86 mono`monitor_thread + 262
      frame #5: 0x002abb6b mono`start_wrapper + 795
      frame #6: 0x9ae6d5fb libsystem_pthread.dylib`_pthread_body + 144
      frame #7: 0x9ae6d485 libsystem_pthread.dylib`_pthread_start + 130
      frame #8: 0x9ae72cf2 libsystem_pthread.dylib`thread_start + 34
    thread #8, name = 'Threadpool worker'
      frame #0: 0x923cc7ca libsystem_kernel.dylib`__psynch_cvwait + 10
      frame #1: 0x9ae6fd1d libsystem_pthread.dylib`_pthread_cond_wait + 728
      frame #2: 0x9ae71c25 libsystem_pthread.dylib`pthread_cond_timedwait$UNIX2003 + 71
      frame #3: 0x002b12e0 mono`worker_thread + 1024
      frame #4: 0x002abb6b mono`start_wrapper + 795
      frame #5: 0x9ae6d5fb libsystem_pthread.dylib`_pthread_body + 144
      frame #6: 0x9ae6d485 libsystem_pthread.dylib`_pthread_start + 130
      frame #7: 0x9ae72cf2 libsystem_pthread.dylib`thread_start + 34
    thread #9, name = 'Threadpool worker'
      frame #0: 0x923cc7ca libsystem_kernel.dylib`__psynch_cvwait + 10
      frame #1: 0x9ae6fd1d libsystem_pthread.dylib`_pthread_cond_wait + 728
      frame #2: 0x9ae71c25 libsystem_pthread.dylib`pthread_cond_timedwait$UNIX2003 + 71
      frame #3: 0x002b12e0 mono`worker_thread + 1024
      frame #4: 0x002abb6b mono`start_wrapper + 795
      frame #5: 0x9ae6d5fb libsystem_pthread.dylib`_pthread_body + 144
      frame #6: 0x9ae6d485 libsystem_pthread.dylib`_pthread_start + 130
      frame #7: 0x9ae72cf2 libsystem_pthread.dylib`thread_start + 34
    thread #10, name = 'Domain unloader'
      frame #0: 0x923ccff2 libsystem_kernel.dylib`__wait4 + 10
      frame #1: 0x940d9ea5 libsystem_c.dylib`waitpid$UNIX2003 + 48
      frame #2: 0x0017cba7 mono`mono_handle_native_crash + 519
      frame #3: 0x001e2b03 mono`sigabrt_signal_handler + 147
      frame #4: 0x920a8deb libsystem_platform.dylib`_sigtramp + 43
  (lldb) detach
  Process 2037 detached
  (lldb) quit

  =================================================================
  Got a SIGABRT while executing native code. This usually indicates
  a fatal error in the mono runtime or one of the native libraries
  used by your application.
  =================================================================
```
2017-06-05 16:35:29 +02:00
Marek Safar 2ca4575eeb [mcs] Throw expression cannot be placed after any colon. 2017-06-05 15:27:28 +02:00
Marek Safar 51b93b6c23 [mcs] C#7 throw expression 2017-06-05 12:23:06 +02:00
Alexander Köplinger ed9fb93c62 Bump bockbuild to bring in 64bit fix 2017-06-04 19:27:26 +02:00
Rodrigo Kumpera 5ea6b70ca1 [profiler] Another atempt at fixing linux. 2017-06-04 10:01:52 -07:00
Zoltan Varga 7d1644d234 Revert "[sdb] Add an API to make the contents of the 'State Machine Hoisted Local Scopes' table in ppdb files available in sdb. (#4961)" (#4970)
This reverts commit 010fce60af.
2017-06-02 13:52:50 -04:00
Zoltan Varga 010fce60af [sdb] Add an API to make the contents of the 'State Machine Hoisted Local Scopes' table in ppdb files available in sdb. (#4961) 2017-06-02 13:43:56 -04:00
Alexander Köplinger c3667fa861 Update API snapshot 2017-06-02 19:12:31 +02:00
Rodrigo Kumpera 8716b46c87 [profiler] Fix linux. 2017-06-02 09:24:39 -07:00
Zoltan Varga cfdbdfc9eb [jit] Avoid running class cctors for remoting wrappers in the source domain. Fixes #56821. (#4950) 2017-06-02 11:54:54 -04:00
Bernhard Urban 077582d3f9 [interp] respect remoting proxies when resolving virtual methods 2017-06-02 17:18:45 +02:00
Bernhard Urban db51810499 [interp] reference domain that owns method in RuntimeMethod and couple other domain related fixes 2017-06-02 17:18:45 +02:00
Bernhard Urban 5e23a773b4 [marshal] delay dummy string allocation 2017-06-02 17:18:45 +02:00
Alexander Köplinger 1ca679877e Update API snapshot 2017-06-02 13:34:28 +02:00
Alexander Köplinger 9cb34c2a76 [Mono.Options] Fix test and add suite to CI (#4963)
* [Mono.Options] Fix test and add suite to CI

We missed running Mono.Options tests on CI so we didn't catch
this error which was introduced with: https://github.com/mono/mono/pull/4719

```
CSC     [net_4_x-darwin] net_4_x_Mono.Options_test.dll
Test/Mono.Options/CommandSetTest.cs(231,16): error CS7036: There is no argument given that corresponds to the required formal parameter 'error' of 'CommandSet.CommandSet(string, TextWriter, TextWriter, Converter<string, string>)'
```

* [Mono.Options] Stop hardcoding \n to fix tests on Windows
2017-06-02 13:07:12 +02:00
Marek Safar 03c7f4f63b [corlib] Updates api 2017-06-02 11:53:54 +02:00
Bernhard Urban 869a2b0121 [arm] remove cross compiling guard for MONO_ARCH_SOFT_DEBUG_SUPPORTED 2017-06-02 10:22:04 +02:00
Bernhard Urban 0e409c5558 [interp] guard remoting functions properly 2017-06-02 10:21:12 +02:00
Zoltan Varga 010fcfb9ec [runtime] Remove all NACL support. It was unmaintained for a long time. (#4955)
https://blog.chromium.org/2017/05/goodbye-pnacl-hello-webassembly.html
2017-06-02 03:51:44 -04:00
Marius Ungureanu 045232ef52 [Posix] Optimize string marshal code by using unsafe code (#4964) 2017-06-02 09:03:47 +02:00
Alexander Köplinger a560146b7c [MacSDKRelease] Pin revision of mono-extensions
With the new bockbuild in place we can finally remove the
implicit dependency on a point-in-time state of mono-extensions
and instead explicitly pin the desired revision.
2017-06-02 03:42:01 +02:00
Rodrigo Kumpera b64dd253b6 [profile] Update test suite. 2017-06-01 18:41:27 -07:00
Rodrigo Kumpera 75343422a5 [profiler] Move argument parsing to arg-parsing.c and significantly rework argument parsing.
This removes all [no]foo weirdness and flag dancing in favor a simpler model.

Users can enable/disable both events and profiling modes. We expose pretty much all individual events.

A profiling feature is a group of flags that enable a specific profiling scenario.
	Right now we have code coverage, perf sampling, gc alloc and heap dump as features.

All events can be prefixed with 'no' and cause them to be disabled. We'll later introduce some sanity
checking around misconfiguration.

Finally, this changes the default set of enabled events to threads and gc. Everything else must be added on top.
Experience has shown that the vast majority of those events are just noise when profiling and the current configuration
design made it quite awkward to introduce quieter modes.
2017-06-01 18:41:13 -07:00
Zoltan Varga 02db562b69 [aot] Revert a change from d135465fba which broke the aot compiler on windows. 2017-06-01 16:06:30 -04:00
Zoltan Varga 1b35e551d5 [ikdasm] Bump external/ikdasm to master. 2017-06-01 11:38:07 -04:00
Marek Safar 65b5d9b115 [mcs] Constant folding of enum constant and literal was using wrong operands. Fixes #53202 2017-06-01 16:31:57 +02:00
Marek Safar 76f0a58429 [mcs] Moves using static lookup at the end of simple name lookup rules. Fixes #55348 2017-06-01 15:27:30 +02:00
Alexander Köplinger 572e868f97 Bump api-snapshot
I accidentally pushed the wrong branch yesterday.
2017-06-01 11:21:31 +02:00
Marek Safar 313d06b169 Updates api-snapshot 2017-06-01 09:12:42 +02:00
Marek Safar 74524d8b92 Bump corert 2017-06-01 09:06:46 +02:00
Ludovic Henry 5b88ecbe0b [Socket] Fix Socket.BeginConnect to multiple IPAddress (#4960)
We would previously mix 2 SocketAsyncResult, and in case we would succeed asynchronously, we would return one that would not be updated afterwards.

The solution consists in using only 1 SocketAsyncResult that we ensure to update accordingly.
2017-05-31 18:22:27 -04:00
Aleksey Kliger (λgeek) a17afc056b Merge pull request #4935 from lambdageek/dev-handles-may
[coop handles] w32event, w32handle and DNS icalls
2017-05-31 14:34:20 -04:00
Zoltan Varga d5eb1e5aed [runtime] Avoid calling mono_class_from_mono_type () for sre arrays, it could initialize unfinished element types. Create a normal MonoType structure instead. Fixes #56611. (#4952) 2017-05-31 13:21:10 -04:00
Marek Safar 74c86ff4cc [System] Adds watch specific HttpListenerWebSocketContext 2017-05-31 19:16:38 +02:00
Marius Ungureanu 4ad2d48197 Bump bockbuild to include gtk# bump (#4959) 2017-05-31 16:49:10 +02:00
Alexander Köplinger cbf2e5be18 Bump api-snapshot 2017-05-31 12:45:43 +02:00
Bernhard Urban 135e4ddf27 [unaligned] relax test regarding floating point precision 2017-05-31 11:17:29 +02:00
Bernhard Urban 6d298d47f9 [interp] use memmove for some primitve types, because it takes care of unaligned addresses
relevant on architectures which do not support unaligned load/stores.
2017-05-31 11:17:29 +02:00
Marek Safar a75c5db541 Bump corefx 2017-05-31 09:07:32 +02:00
Marek Safar 34a4ffcc45 [build] Fixes profile path for aot compilation 2017-05-31 08:45:16 +02:00
Marek Safar 798a08c1f1 Bump cecil 2017-05-31 08:20:23 +02:00
Alexander Köplinger cbd180afe6 [System] Add missing configuration properties to the list of properties (#4954)
After looking at https://github.com/mono/mono/pull/4949 I did a
quick pass through the other config sections and found two more
cases where we missed adding to the properties list.
2017-05-31 03:52:08 +02:00
Alexander Köplinger c4aa50d2e1 [MacSDK] Bump xamarin-gtk-theme.py to latest revision from private bockbuild 2017-05-31 03:50:09 +02:00
Alexander Köplinger 84fe1a5774 [MacSDK] Port two msbuild fixes from private bockbuild
https://github.com/xamarin/bockbuild/commit/58467b852e13b4bdfc75a2a0f9b9507b417b0694:

    [msbuild] Create symlinks from lib/mono/xbuild/Microsoft/NuGet/*
    msbuild install script cannot do this as the source files are installed
    by mono, which are in a different staging directory.

https://github.com/xamarin/bockbuild/commit/fb9656a7613bab2d77c8ce7e05d673c5abbbdac5:

    Partially Revert "[msbuild] Remove redundant msbuild logic from mono_master.py"

    Use 15.0 instead of mono version! msbuild's install script cannot
    copy these since bockbuild installs msbuild to a separate staging
    directory from mono. So, it needs to be done here.
2017-05-31 03:33:45 +02:00
Alexander Köplinger 819026f391 Bump bockbuild to include gtk+ patch 2017-05-31 03:33:44 +02:00
Cody Russell 45e66c5362 [System] Add useDefaultCredentialsProp to the list of properties. (#4949) 2017-05-31 01:39:26 +02:00
Vlad Brezae cef99c3837 [runtime] Don't make the domain id allocatable before we clear the domain (#4942)
Otherwise, while we are clearing the domain, another domain might be created that has the same id as the current one. This would lead to crashes due to releasing of data from the newly created domain (ex gchandles).
2017-05-31 01:28:50 +03:00
Rodrigo Kumpera f7e0f70b7d Merge pull request #4938 from kumpera/optimize_ref_queries
Add concurrent read version of MonoGHashTable and use it with MonoDomain::refobject
2017-05-30 15:20:44 -07:00
Rodrigo Kumpera feb90c6d43 [win32] Add new files. 2017-05-30 13:03:35 -07:00
Aleksey Kliger b1b5ab0524 [w32socket] Remove dead code 2017-05-30 15:15:06 -04:00
Aleksey Kliger fd201644a0 [w32socket] Use coop handles for System.Net.Dns.GetHostByAddr_internal 2017-05-30 15:14:18 -04:00
Aleksey Kliger 97e9bbae7e [w32socket] Use coop handles for System.Net.Dns.GetHostByName_internal 2017-05-30 14:57:09 -04:00
Marek Safar d466cb5fa5 [mcs] Don't emit param-array attribute on method overrides, it's ignored by C# compiler. Fixes #53244 2017-05-30 19:36:13 +02:00
Alexis Christoforides 828d2adff9 Bump bockbuild 2017-05-30 13:29:33 -04:00
Alexander Köplinger 37fe83f6ea [S.R.I.RuntimeInformation] Fix FrameworkDescription on Android (#4946)
* [S.R.I.RuntimeInformation] Fix FrameworkDescription on Android

It turns out using `DllImport ["__Internal"]` doesn't work on
XA (and other cases where Mono is embedded) because it searches
for the method in the host which embeds Mono and doesn't find it,
resulting in an EntryPointNotFoundException.

We need to switch to an icall instead. However there's already
an existing icall+BCL wrapper: Mono.Runtime.GetDisplayName().

Added IVT from corlib to S.R.I.RuntimeInformation so we can call it.

* Update API snapshot
2017-05-30 18:34:53 +02:00
Marek Safar e06781fb7a [mcs] Reset catch state variable after it has been checked. Fixes #54322 2017-05-30 11:39:46 +02:00
Marek Safar 1782b291f8 [mcs] New property/indexer cannot have accessors implementing an interface in base type. Fixes #56627 2017-05-29 23:57:00 +02:00
Jochen Kühner 7b51e84dc5 Bugfix Ping.cs (#4936) 2017-05-29 23:05:34 +02:00
Bernhard Urban 0f00eb3e59 [interp] implement RELOC_LONG_BRANCH. fixes test/imt_big_iface_test.exe 2017-05-29 22:21:04 +02:00
Rodrigo Kumpera 2769d84822 [runtime] Handle mono_method_body_get_object returning NULL on success. 2017-05-29 10:36:54 -07:00
Alexander Köplinger 966d8f2a57 [Facades] Update to match latest contracts (#4939)
* [Facades] Update to match latest contracts

* Update API snapshot
2017-05-29 19:31:44 +02:00
Bernhard Urban b3901be2f6 [CI] ignore appdomain-unload-asmload.exe on interp and full-aot 2017-05-29 17:50:02 +02:00
Bernhard Urban ee90fc601e [android] add hardware specific workaround for Nexus9 in armv7 mode
we got a couple of bug reports, all with the same failure:

https://bugzilla.xamarin.com/show_bug.cgi?id=44907
https://bugzilla.xamarin.com/show_bug.cgi?id=46482
https://bugzilla.xamarin.com/show_bug.cgi?id=51791

The bugs are private, therefore here what I wrote:

```
Thank you Matthias, this was very helpful.

>>> 09-30 12:24:50.347: A/DEBUG(6211): pid: 6191, tid: 6209, name: Thread-4  >>> com.distech.x50.ui.droid <<<
>>> 09-30 12:24:50.347: A/DEBUG(6211): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8
>>> 09-30 12:24:50.347: A/DEBUG(6211):     r0 d6b58728  r1 00004001  r2 00000000  r3 d6b58738
>>> 09-30 12:24:50.347: A/DEBUG(6211):     r4 00000008  r5 ea97427c  r6 00001f3c  r7 00000015
>>> 09-30 12:24:50.347: A/DEBUG(6211):     r8 00001f38  r9 00000015  sl d6b58728  fp d67fed90
>>> 09-30 12:24:50.347: A/DEBUG(6211):     ip ea9742c0  sp d67fed60  lr ea7a4504  pc ea716a58  cpsr 800e0010

The crash happens on this assignment:
https://github.com/mono/mono/blob/de1865dad5c0350f391fedcaa08f02f610530d3f/mono/mini/mini-generic-sharing.c#L418
Here the according disassembly:
https://gist.github.com/lewurm/b1094749027c9e5ea19fdc4fac7905a7

The crash happens in the last loop iteration (`r9=i`, `r7=slot`).  Looking
at the machine code it just _cannot_ happen, which is confirmed by the C
code as well: `*oti` successfully happens in the if check, but after
returning from `alloc_oti()`, `oti` doesn't contain a valid address anymore.
I suspect some weird hardware issue that fails to restore all registers
properly from the stack.
```
[...]

```
Thanks again Matthias.  Unfortunately, I'm out of ideas, and I can't
blame anything but the hardware. The situation we see is too weird. We
segfault at offset `0xdda60: str sl, [r4]`, but really we should
already segfault at offset `0xdda2c: ldrge   sl, [r4, #8]!"`.  So I
suspect two things why this could happen:

(1) The instruction at `dda2c` fails to do the post-increment correctly
    for *whatever* reason.

(2) Something along the execution path corrupts the stackslot, where
    `r4` is saved, in such a way that it *exactly* masks it with `0xf`.
    Everything else on the stack looks fine, so this is sort of very
    unlikely to be honest.

This only happens on a very specific device: The Nexus 9 is the only
device that was ever shipped with the Tegra K1 T132.  I suspect an issue
in the binary translation layer of `armv7` instruction set to the internal
micro-ops of the CPU.  I tried to stress test the instruction in
question (see https://github.com/lewurm/ldrinsntest), however I was not
able to trigger a crash.  So either, I'm missing some context in order
to trigger the bug or I'm on a completely wrong track.

That said, even if we could proof that it is indeed a hardware issue,
the workaround is also non-trivial (it would then either need a fix in
gcc or require a microcode update by the chip vendor).
```

And then we saw:
https://github.com/golang/go/issues/19809#issuecomment-290804472

Another hint that this device is buggy.
2017-05-29 15:48:29 +02:00
Alexander Köplinger 621faafcaf Bump bockbuild 2017-05-29 12:33:02 +02:00
Rodrigo Kumpera 4e72eaacaa [runtime] Change MonoDomain::refobject_hash to use MonoConcGHashTable.
This change massively improves reflection query scalability.

Given this benchmark and my 4 cores laptop:

```
const int T_C = 4;
var list = new List<Thread> ();
bool done = false;
int count = 0;
for (int i = 0; i < T_C; ++i) {
	var t = new Thread(() => {
		while (!done) {
			typeof (Driver)
				.GetMethods (
					BindingFlags.Public | BindingFlags.NonPublic |
					BindingFlags.Instance | BindingFlags.Static);
			Interlocked.Increment (ref count);
		}
	});
	t.Start ();
	list.Add (t);
}

Thread.Sleep (5000);
done = true;
foreach (var t in list)
	t.Join ();
Console.WriteLine ("Got {0} lists done", count);
```

This change makes us go from 166.725 queries/s to 5.140.821 queries/s. Or 30x faster.
2017-05-28 20:16:29 -07:00
Rodrigo Kumpera 3a0d3e1169 [runtime] Add concurrent read variant of MonoGHashTable name MonoConcGHashTable.
Use the same design as MonoConcHashTable.

Aaaaand confusing name will confuse.
2017-05-28 17:42:54 -07:00
Marek Safar da76a7b803 [mcs] Improves imported destructor detection. Fixes #54159 2017-05-28 13:48:42 +02:00
Alexander Köplinger a7c31c9805 Bump bockbuild 2017-05-28 02:02:31 +02:00
Alexander Köplinger 73f3ee63cc Bump bockbuild to fix wrench build 2017-05-28 01:18:02 +02:00
Rodrigo Kumpera 5c7f10154f Merge pull request #4904 from kumpera/more_opts
[runtime] Change jit_info_table_num_elements to O(1).
2017-05-27 12:29:01 -07:00
Rodrigo Kumpera 992525a6df Merge pull request #4928 from kumpera/ptr_to_struct_intrinsic
[mini] Intrinsify Marshal.PtrToStructure<T>
2017-05-27 12:27:37 -07:00
Zoltan Varga 76e2c3227f Interp sdb (#4911)
* [interpreter] Add beginnings of debugger support.

Handle debugger support similarly to the JIT:
- Add a MINT_SDB_SEQ_POINT instruction to the debugger IR. Replace it with a MINT_BREAKPOINT instruction when a breakpoint is placed.
- Store the sequence point information in the existing sequence point data structures.

* [interp] Add support for debugger stacktraces.

* [interp] Add support for debugger frame info.

* [interp] Connect seq points inside the same basic block so simple single stepping works.

* [interp] Link sequence points in different basic blocks the same way the JIT does it.

* [interp] Allocate some bitsets from a mempool.

* [interp] Rewrite the patching in the transform pass to make it a bit easier to understand.

* [interp] Add interruption support for sdb.

* [interp] Add support for mkrefany,refanytype and refanyval.

* [interp] Fix debugger failures.

* Add support for setting byref variables.
* Fix thread interruption when the top frame is an interpreter frame.
* Allow stack walks when a thread is suspended while transforming a method.
* Implement method entry/exit events.
* Fix ldstr+dynamic methods.

* [interp] Implement support for Debugger.Break.

* [interp] Change the offsets in MonoJitInfo/seq points into byte based from short based to reduce the amount of special casing needed in other parts of the code.

* [interp] Factor out the push/pop lmf code into a pair of helper functions.

* [mixed] Fix mixed mode EH.

* [interp] Implement support for MONO_VERBOSE_METHOD. Improve sequence point placement.

* [interp] Implement support for SetIP ().

Pass the target thread as an additional argument to mono_interp_set_resume_state (). Check the resume state after single
stepping/breakpoints in the interpreter.

* [interp] Disable the usage of the STLOC_NP opcodes when running under the debugger, it doesn't work if the ip is changed when the execution is stopped.

* [interp] Fix async stack walks in the debugger when the thread is in native code called from interpreter code.

* [interp] Fix the disable interpreter build.

* [interp] Fix the calculation of native offsets in the line number info.

* [interp] Fix the build.

* [interp] Make CMD_STACK_FRAME_GET_THIS behave the same when called on managed-to-native frames, with the interpreter, frame->has_ctx is set.

* [interp] Fix typos, remove some dead code, use g_print instead of printf in a few places, move some interpreter stubs to interp-stubs.c.
2017-05-27 12:29:56 -04:00
Zoltan Varga 5b4ccf033f [runtime] Fix a race in mono_class_get_virtual_methods () which happens when klass->method is NULL initially, but gets initialized later. Use the lowest bit of the iterator pointer to distinguish between the two cases. Fixes #56824. (#4933) 2017-05-27 09:33:59 -04:00
Rodrigo Kumpera 071c3f5697 [runtime] Change jit_info_table_num_elements to O(1).
On very large apps such as XS, this looking can take half a second of CPU time when opening a big solution.
2017-05-27 01:29:03 -07:00
Bill Holmes 9a08e45324 [Mono.Posix] Adding .Net Core 2.0 support. (#4774) 2017-05-27 08:24:10 +02:00
Aleksey Kliger 574f482506 [w32socket] addrinfo_to_IPHostEntry_handles
- change addrinfo_to_IPHostEntry to use the handles version
- next commits will update the callers to use the _handles version directly
2017-05-26 18:43:24 -04:00
Alexis Christoforides 500eec69c7 Re-bump bockbuild for libtiff URL change 2017-05-26 16:11:08 -04:00
Aleksey Kliger 5d50b36c5f [System] Use coop handles for System.Net.Dns.GetHostName_internal 2017-05-26 16:03:25 -04:00
Alexis Christoforides 89ceb247c4 Revert "Bump bockbuild", as it breaks the build.
This reverts commit 30f9a22f08.
2017-05-26 15:39:22 -04:00
Rodrigo Kumpera 2d57bab36b Merge pull request #4931 from kumpera/com-interop-fix
Fix cominterop bug
2017-05-26 12:28:40 -07:00
Rodrigo Kumpera ed0b9b227b [mini]Add test for PtrToStruct<T> 2017-05-26 12:26:44 -07:00
Rodrigo Kumpera 0cac21043d Merge pull request #4840 from kumpera/unaligned-access
Another round of cleanups plus fix how the JIT emit unaligned access.
2017-05-26 12:17:02 -07:00
Aleksey Kliger 44b7efbee0 [runtime] Use coop handles for ves_icall_System_Threading_Mutex_OpenMutex_internal
- add mono_w32mutex_open for w32mutex-unix.c
2017-05-26 14:44:59 -04:00
Aleksey Kliger 0a0da6cbe1 [runtime] Use coop handles for ves_icall_System_Threading_Mutex_CreateMutex_internal 2017-05-26 14:26:21 -04:00
Aleksey Kliger 310b69ce3d [runtime] Use coop handles for ves_icall_System_Threading_Events_OpenEvent_internal 2017-05-26 14:26:19 -04:00
Aleksey Kliger 0a3a12b9aa [w32event] Use coop handles for System.Threading.NativeEventCalls.CreateEvent_internal
- Make a new mono_w32event_create_full on unix
- Convert the MonoString to utf8 (unix) or utf16 (win32) in the icall, then
  call an implementation func.
- transition to GC safe mode around the win32 api call on Windows
2017-05-26 14:26:18 -04:00
Alexis Christoforides 30f9a22f08 Bump bockbuild 2017-05-26 13:41:35 -04:00
Aleksey Kliger 93e74ce434 [coop handles] Add mono_string_handle_pin_chars 2017-05-26 10:29:20 -04:00
Aleksey Kliger f48e4357c9 [w32handle] Const-ify arg of mono_w32handle_namespace_search_handle 2017-05-26 10:29:18 -04:00
Aleksey Kliger a377fa737c [remoting] Use coop handles for ves_icall_System_Runtime_Activation_ActivationServices_EnableProxyActivation 2017-05-26 10:29:14 -04:00
Aleksey Kliger aa7df40d0c [remoting] Use coop handles for ves_icall_IsTransparentProxy 2017-05-26 10:28:06 -04:00
Rodrigo Kumpera 414e98156a [mini] Intrinsify Marshal.PtrToStructure<T> 2017-05-25 22:43:55 -07:00
Rodrigo Kumpera 565d626c05 [runtime] Add support for using COM types from corlib.
This can be reproduced by trying to load a type that implements a COM interface corlib ships.
2017-05-25 17:11:27 -07:00
Rodrigo Kumpera 31ec985a6f [mini] Fix the llvmonlycheck test. 2017-05-25 16:13:27 -07:00
Aleksey Kliger b9b72e5947 [remoting] refactor ves_icall_InternalExecute
Pull the FieldGetter and FieldSetter logic into separate functions
2017-05-25 12:05:34 -04:00
Aleksey Kliger b4b33c06e6 [runtime] Use coop handles for System.Runtime.Remoting.RemotingServices.GetVirtualMethod 2017-05-25 11:31:29 -04:00
Rodrigo Kumpera 091181ba1d Fix the CpBlk and InitBlk intrinsics. 2017-05-23 16:59:07 -07:00
Bernhard Urban 1516837c58 [interp] fix unaligned. 2017-05-22 22:13:01 +02:00
Rodrigo Kumpera 48d1ebf570 [jit] Fix x86 failures and handle unaligned load with offset 2017-05-19 19:47:51 -07:00
Rodrigo Kumpera 5e5e381907 [jit] Add unaligned tests. 2017-05-18 20:16:30 -07:00
Rodrigo Kumpera 11917e41a8 [jit] Properly handle unaligned memory access. 2017-05-18 16:38:05 -07:00
Rodrigo Kumpera b79a891772 [jit] Assorted small changes.
Remove 10000 size check in mini_emit_memory_copy_bytes, this is no longer needed now that the memcpy expansion logic in mini_emit_memcpy_internal was fixes.

Use a define for 10000.

Remove useless debug spew.
2017-05-18 16:19:22 -07:00
Rodrigo Kumpera 8884492839 [mini] Remove assert and document reason it can't be used. 2017-05-18 15:56:54 -07:00
Rodrigo Kumpera eec0a66009 [jit] Remove mini_emit_stobj from method-to-ir.c and move mini_emit_wb_aware_memcpy to memory-access.c 2017-05-17 18:51:19 -07:00
Rodrigo Kumpera e05343ddf5 [jit] Replace usage of mini_emit_stobj with mini_emit_memory_copy and simplify usage since the later can handle ref types. 2017-05-17 18:51:19 -07:00
Rodrigo Kumpera 45f1fb7d50 [jit] Fix wording of the function description 2017-05-17 18:51:19 -07:00
Rodrigo Kumpera 414b5fc644 [jit] Fix mono_debug_count breakage introduced by the g_getenv change. 2017-05-17 18:51:19 -07:00
Rodrigo Kumpera 0fd8ecd055 [mini] Add mini_emit_memory_copy to replace mini_emit_stobj 2017-05-17 18:51:19 -07:00
Rodrigo Kumpera 28a16d28a0 [jit] Fix large const memcpy/memset when when the intrins pass is disabled. 2017-05-17 18:51:19 -07:00
Rodrigo Kumpera 32eb3111ee [runtime] Rework how unaligned memcpy/memset are generated.
Problems with the current code:
	It's wrong on 64bits if align == 4
	It's wrong on 64bits if offset is not 0 or 4.
	It generates bad code if align > 1 && align < SIZEOF_VOIDP

This PR implements unaligned based on the following set of assumptions that are true for the current set of platforms we support:

- A load/store of size X works with data aligned on X. IE, a short store can handle addresses aligned to 2
- Unaligned access is either disallowed or plain slower.
- Both source and dest abide to the supplied alignment.

The way we emit unaligned access is by emitting the widest possible access based on alignment and offset.

TBH: use unaligned access on targets like x86 that support it and are profitable.
2017-05-17 18:51:18 -07:00
817 changed files with 21828 additions and 26312 deletions

No files matched your search

-3
View File
@@ -26,9 +26,6 @@
[submodule "external/nuget-buildtasks"]
path = external/nuget-buildtasks
url = git://github.com/mono/NuGet.BuildTasks
[submodule "external/buildtools"]
path = external/buildtools
url = git://github.com/mono/buildtools.git
[submodule "external/cecil-legacy"]
path = external/cecil-legacy
url = git://github.com/mono/cecil.git
+32 -4
View File
@@ -44,6 +44,26 @@ namespace Mono.Profiling.Tests.Stress {
static class Program {
static readonly string[] _options = new [] {
"domain",
"assembly",
"module",
"class",
"jit",
"exception",
"gcalloc",
"gc",
"thread",
// "calls", // Way too heavy.
"monitor",
"gcmove",
"gcroot",
"context",
"finalization",
"counter",
"gchandle",
};
static readonly TimeSpan _timeout = TimeSpan.FromHours (6);
static string FilterInvalidXmlChars (string text) {
@@ -75,14 +95,22 @@ namespace Mono.Profiling.Tests.Stress {
for (var i = 0; i < benchmarks.Length; i++) {
var bench = benchmarks [i];
var sampleFreq = rand.Next (0, 1001);
var sampleFreq = rand.Next (-1000, 1001);
var sampleMode = rand.Next (0, 2) == 1 ? "real" : "process";
var maxSamples = rand.Next (0, cpus * 2000 + 1);
var heapShotFreq = rand.Next (0, 11);
var heapShotFreq = rand.Next (-10, 11);
var maxFrames = rand.Next (0, 33);
var allocMode = rand.Next (0, 2) == 1 ? "alloc" : "noalloc";
var options = _options.ToDictionary (x => x, _ => rand.Next (0, 2) == 1)
.Select (x => (x.Value ? string.Empty : "no") + x.Key)
.ToArray ();
var profOptions = $"sample=cycles/{sampleFreq},sampling-{sampleMode},maxsamples={maxSamples},heapshot={heapShotFreq}gc,maxframes={maxFrames},{allocMode},output=/dev/null";
var profOptions = $"maxframes={maxFrames},{string.Join (",", options)},output=/dev/null";
if (sampleFreq > 0)
profOptions += $",sample={sampleFreq},sampling-{sampleMode},maxsamples={maxSamples}";
if (heapShotFreq > 0)
profOptions += $",heapshot={heapShotFreq}gc";
var info = new ProcessStartInfo {
UseShellExecute = false,
+36 -110
View File
@@ -1,7 +1,7 @@
# Process this file with autoconf to produce a configure script.
#AC_PREREQ([2.62])
AC_INIT(mono, [5.3.0],
AC_INIT(mono, [5.5.0],
[http://bugzilla.xamarin.com/enter_bug.cgi?classification=Mono])
AC_CONFIG_SRCDIR([README.md])
@@ -264,17 +264,8 @@ case "$host" in
with_sgen_default_concurrent=yes
;;
*-*-nacl*)
CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP"
if test "x$disable_munmap" != "xyes"; then
CPPFLAGS="$CPPFLAGS -DUSE_MUNMAP"
fi
libmono_cflags="-D_REENTRANT"
libdl=
libgc_threads=pthreads
use_sigposix=yes
ikvm_native=no
AC_DEFINE(DISABLE_SOCKETS,1,[Disable sockets support])
AC_DEFINE(DISABLE_ATTACH, 1, [Disable agent attach support])
echo "nacl no longer supported."
exit 1
;;
*-*-hpux*)
CPPFLAGS="$CPPFLAGS -DGC_HPUX_THREADS -D_HPUX_SOURCE -D_XOPEN_SOURCE_EXTENDED -D_REENTRANT"
@@ -743,10 +734,6 @@ fi
AM_CONDITIONAL(DISABLE_LIBRARIES, test x$enable_libraries = xno)
case $host in
*nacl* ) with_shared_mono=yes;;
esac
if test "x$host_win32" = "xyes"; then
# Boehm GC requires the runtime to be in its own dll
with_static_mono=no
@@ -825,7 +812,8 @@ AC_ARG_WITH(xammac, [ --with-xammac=yes,no If you w
AC_ARG_WITH(testing_aot_hybrid, [ --with-testing_aot_hybrid=yes,no If you want to build the testing_aot_hybrid assemblies (defaults to no)], [], [with_testing_aot_hybrid=default])
AC_ARG_WITH(testing_aot_full, [ --with-testing_aot_full=yes,no If you want to build the testing_aot_full assemblies (defaults to no)], [], [with_testing_aot_full=default])
AC_ARG_WITH(winaot, [ --with-winaot=yes,no If you want to build the Windows friendly AOT assemblies (defaults to no)], [], [with_winaot=default])
AC_ARG_WITH(orbis, [ --with-orbis=yes,no If you want to build the Orbis assemblies (defaults to no)], [], [with_orbis=default])
AC_ARG_WITH(orbis, [ --with-orbis=yes,no If you want to build the Orbis assemblies (defaults to no)], [], [with_orbis=default])
AC_ARG_WITH(unreal, [ --with-unreal=yes,no If you want to build the Unreal assemblies (defaults to no)], [], [with_unreal=default])
AC_ARG_WITH(runtime_preset, [ --with-runtime_preset=net_4_x,all,aot,hybridaot,fullaot,bitcode Which default profile to build (defaults to net_4_x)], [], [with_runtime_preset=net_4_x])
@@ -846,6 +834,7 @@ with_testing_aot_hybrid_default=no
with_testing_aot_full_default=no
with_winaot_default=no
with_orbis_default=no
with_unreal_default=no
with_bitcode_default=no
with_cooperative_gc_default=no
@@ -865,6 +854,7 @@ elif test x$with_runtime_preset = xall; then
with_xammac_default=yes
with_winaot_default=yes
with_orbis_default=yes
with_unreal_default=yes
elif test x$with_runtime_preset = xfullaot; then
DISABLE_MCS_DOCS_default=yes
with_testing_aot_full_default=yes
@@ -935,6 +925,17 @@ elif test x$with_runtime_preset = xorbis; then
AOT_BUILD_FLAGS="--runtime=mobile --aot=full,$INVARIANT_AOT_OPTIONS"
AOT_RUN_FLAGS="--runtime=mobile --full-aot"
elif test x$with_runtime_preset = xunreal; then
DISABLE_MCS_DOCS_default=yes
with_unreal_default=yes
TEST_PROFILE=ounreal
mono_feature_disable_com='yes'
mono_feature_disable_remoting='yes'
mono_feature_disable_appdomains='yes'
AOT_BUILD_FLAGS="--runtime=mobile --aot=hybrid,$INVARIANT_AOT_OPTIONS"
AOT_RUN_FLAGS="--runtime=mobile --hybrid-aot"
else
with_profile4_x_default=yes
fi
@@ -981,6 +982,9 @@ fi
if test "x$with_orbis" = "xdefault"; then
with_orbis=$with_orbis_default
fi
if test "x$with_unreal" = "xdefault"; then
with_unreal=$with_unreal_default
fi
AM_CONDITIONAL(INSTALL_4_x, [test "x$with_profile4_x" = "xyes"])
@@ -994,8 +998,9 @@ AM_CONDITIONAL(INSTALL_TESTING_AOT_HYBRID, [test "x$with_testing_aot_hybrid" !=
AM_CONDITIONAL(INSTALL_TESTING_AOT_FULL, [test "x$with_testing_aot_full" != "xno"])
AM_CONDITIONAL(INSTALL_WINAOT, [test "x$with_winaot" != "xno"])
AM_CONDITIONAL(INSTALL_ORBIS, [test "x$with_orbis" != "xno"])
AM_CONDITIONAL(INSTALL_UNREAL, [test "x$with_unreal" != "xno"])
AM_CONDITIONAL(FULL_AOT_TESTS, [test "x$TEST_PROFILE" = "xtesting_aot_full"] || [test "x$TEST_PROFILE" = "xwinaot"] || [test "x$TEST_PROFILE" = "xorbis"])
AM_CONDITIONAL(HYBRID_AOT_TESTS, [test "x$TEST_PROFILE" = "xtesting_aot_hybrid"])
AM_CONDITIONAL(HYBRID_AOT_TESTS, [test "x$TEST_PROFILE" = "xtesting_aot_hybrid"] || [test "x$TEST_PROFILE" = "xunreal"])
default_profile=net_4_x
if test -z "$INSTALL_MONODROID_TRUE"; then :
@@ -1019,6 +1024,9 @@ fi
if test -z "$INSTALL_ORBIS_TRUE"; then :
default_profile=orbis
fi
if test -z "$INSTALL_UNREAL_TRUE"; then :
default_profile=unreal
fi
if test -z "$INSTALL_4_x_TRUE"; then :
default_profile=net_4_x
fi
@@ -1275,7 +1283,7 @@ dnl
dnl Boehm GC configuration
dnl
AC_ARG_WITH(libgc, [ --with-libgc=included,none Controls the Boehm GC config, default=included],[libgc=$with_gc],[libgc=included])
AC_ARG_WITH(libgc, [ --with-libgc=included,none Controls the Boehm GC config, default=included],[libgc=$with_libgc],[libgc=included])
AC_ARG_ENABLE(boehm, [ --disable-boehm Disable the Boehm GC.], support_boehm=$enableval,support_boehm=${support_boehm:-yes})
AM_CONDITIONAL(SUPPORT_BOEHM, test x$support_boehm = xyes)
@@ -1333,7 +1341,7 @@ if test "x$support_boehm" = "xyes"; then
gc_msg="none"
;;
*)
AC_MSG_ERROR([Invalid argument to --with-libgc.])
AC_MSG_ERROR([Invalid argument $libgc to --with-libgc.])
;;
esac
@@ -1349,6 +1357,7 @@ if test "x$support_boehm" = "xyes"; then
AC_SUBST(BOEHM_DEFINES)
fi
AM_CONDITIONAL(SUPPORT_NULLGC, test "x$libgc" = "xnone")
dnl
dnl End of Boehm GC Configuration
@@ -1371,8 +1380,6 @@ AC_TRY_COMPILE([
AC_DEFINE_UNQUOTED(MONO_ZERO_LEN_ARRAY, 1, [Length of zero length arrays])
])
AC_CHECK_HEADERS(nacl/nacl_dyncode.h)
dnl ***********************************
dnl *** Checks for signals
dnl ***********************************
@@ -1949,7 +1956,7 @@ if test x$host_win32 = xno; then
AC_CHECK_HEADERS(pthread.h)
AC_CHECK_HEADERS(pthread_np.h)
AC_CHECK_FUNCS(pthread_mutex_timedlock)
AC_CHECK_FUNCS(pthread_getattr_np pthread_attr_get_np pthread_setname_np)
AC_CHECK_FUNCS(pthread_getattr_np pthread_attr_get_np pthread_setname_np pthread_cond_timedwait_relative_np)
AC_CHECK_FUNCS(pthread_kill)
AC_MSG_CHECKING(for PTHREAD_MUTEX_RECURSIVE)
AC_TRY_COMPILE([ #include <pthread.h>], [
@@ -2220,13 +2227,11 @@ if test x$host_win32 = xno; then
dnl **********************************
dnl *** epoll ***
dnl **********************************
if test "x$ac_cv_header_nacl_nacl_dyncode_h" = "xno"; then
AC_CHECK_HEADERS(sys/epoll.h)
haveepoll=no
AC_CHECK_FUNCS(epoll_ctl, [haveepoll=yes], )
if test "x$haveepoll" = "xyes" -a "x$ac_cv_header_sys_epoll_h" = "xyes"; then
AC_DEFINE(HAVE_EPOLL, 1, [epoll supported])
fi
AC_CHECK_HEADERS(sys/epoll.h)
haveepoll=no
AC_CHECK_FUNCS(epoll_ctl, [haveepoll=yes], )
if test "x$haveepoll" = "xyes" -a "x$ac_cv_header_sys_epoll_h" = "xyes"; then
AC_DEFINE(HAVE_EPOLL, 1, [epoll supported])
fi
havekqueue=no
@@ -2859,40 +2864,6 @@ fi
AM_CONDITIONAL(ENABLE_DTRACE, [test x$enable_dtrace = xyes])
AM_CONDITIONAL(DTRACE_G_REQUIRED, [test x$dtrace_g = xyes])
dnl **************
dnl *** NaCl ***
dnl **************
AC_ARG_ENABLE(nacl_codegen, [ --enable-nacl-codegen Enable Native Client code generation], enable_nacl_codegen=$enableval, enable_nacl_codegen=no)
AC_ARG_ENABLE(nacl_gc, [ --enable-nacl-gc Enable Native Client garbage collection], enable_nacl_gc=$enableval, enable_nacl_gc=no)
AM_CONDITIONAL(NACL_CODEGEN, test x$enable_nacl_codegen != xno)
dnl
dnl Hack to use system mono for operations in build/install not allowed in NaCl.
dnl
nacl_self_host=""
if test "x$ac_cv_header_nacl_nacl_dyncode_h" = "xyes"; then
nacl_self_host="nacl_self_host"
fi
AC_SUBST(nacl_self_host)
if test "x$enable_nacl_codegen" = "xyes"; then
MONO_NACL_ALIGN_MASK_OFF=1
AC_DEFINE(TARGET_NACL, 1, [...])
AC_DEFINE(__native_client_codegen__, 1, [...])
fi
if test "x$enable_nacl_gc" = "xyes"; then
if test "x$TARGET" = "xAMD64" -o "x$TARGET" = "xX86"; then
INSTRUMENT_CFLAG="-finstrument-for-thread-suspension"
else
# Not yet implemented
INSTRUMENT_CFLAG=""
fi
CPPFLAGS="$CPPFLAGS $INSTRUMENT_CFLAG -D__native_client_gc__"
fi
AC_SUBST(MONO_NACL_ALIGN_MASK_OFF)
dnl **************************
dnl *** AOT cross offsets ***
dnl **************************
@@ -3155,12 +3126,6 @@ case "$host" in
mingw*)
;;
esac
case "$host" in
x86_64-*-nacl*)
AC_DEFINE(__mono_ilp32__, 1, [64 bit mode with 4 byte longs and pointers])
sizeof_register=8
;;
esac
;;
sparc*-*-*)
if test "x$ac_cv_sizeof_void_p" = "x8"; then
@@ -3241,13 +3206,6 @@ case "$host" in
ACCESS_UNALIGNED="no"
CPPFLAGS="$CPPFLAGS -D__ARM_EABI__"
;;
# TODO: make proper support for NaCl host.
# arm*-*nacl)
# TARGET=ARM;
# arch_target=arm;
# ACCESS_UNALIGNED="no"
# AOT_SUPPORTED="no"
# ;;
aarch64-*)
# https://lkml.org/lkml/2012/7/15/133
TARGET=ARM64
@@ -3308,38 +3266,6 @@ if test "x$host" != "x$target"; then
sizeof_register=8
target_byte_order=G_BIG_ENDIAN
;;
x86_64-*-nacl)
TARGET=AMD64
arch_target=amd64
AC_DEFINE(TARGET_AMD64, 1, [...])
AC_DEFINE(__mono_ilp32__, 1, [64 bit mode with 4 byte longs and pointers])
sizeof_register=8
;;
# TODO: make proper support for NaCl target.
# arm*-*nacl)
# TARGET=ARM
# arch_target=arm
# AC_DEFINE(TARGET_ARM, 1, [...])
# ACCESS_UNALIGNED="no"
# sizeof_register=4
# CPPFLAGS="$CPPFLAGS \
# -D__ARM_EABI__ \
# -D__arm__ \
# -D__portable_native_client__ \
# -Dtimezone=_timezone \
# -DDISABLE_SOCKETS \
# -DDISABLE_ATTACH \
# -DUSE_NEWLIB"
# Can't use tls, since it depends on the runtime detection of tls offsets
# in mono-compiler.h
# with_tls=pthread
# ;;
i686-*-nacl)
TARGET=X86
arch_target=x86
AC_DEFINE(TARGET_X86, 1, [...])
sizeof_register=4
;;
arm*-linux-*)
TARGET=ARM;
arch_target=arm;
@@ -3630,7 +3556,6 @@ fi
AM_CONDITIONAL(ENABLE_INTERPRETER, [test x$enable_interpreter = xyes])
dnl
dnl Simple Generational checks (sgen)
dnl
@@ -4653,6 +4578,7 @@ echo "
Xamarin.Mac: $with_xammac
Windows AOT: $with_winaot
Orbis: $with_orbis
Unreal: $with_unreal
Test profiles: AOT Full ($with_testing_aot_full), AOT Hybrid ($with_testing_aot_hybrid)
JNI support: $jdk_headers_found
libgdiplus: $libgdiplus_msg
+1 -1
View File
@@ -141,7 +141,7 @@ AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(void *)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)
AC_CHECK_FUNCS(strlcpy stpcpy strtok_r rewinddir vasprintf)
AC_CHECK_FUNCS(strlcpy stpcpy strtok_r rewinddir vasprintf strerror_r)
AC_CHECK_FUNCS(getrlimit)
AC_CHECK_FUNCS(fork execv execve)
+1 -1
View File
@@ -32,7 +32,7 @@ typedef signed @GSIZE@ gssize;
#define G_HAVE_ISO_VARARGS
#endif
#if defined (__native_client__) || defined (HOST_WATCHOS)
#if defined (HOST_WATCHOS)
#undef G_BREAKPOINT
#define G_BREAKPOINT()
#endif
-10
View File
@@ -154,15 +154,6 @@ g_file_open_tmp (const gchar *tmpl, gchar **name_used, GError **error)
gchar *
g_get_current_dir (void)
{
#ifdef __native_client__
char *buffer;
if ((buffer = g_getenv("NACL_PWD"))) {
buffer = g_strdup(buffer);
} else {
buffer = g_strdup(".");
}
return buffer;
#else
int s = 32;
char *buffer = NULL, *r;
gboolean fail;
@@ -181,5 +172,4 @@ g_get_current_dir (void)
* so we return the buffer here since it has a pointer to the valid string
*/
return buffer;
#endif
}
+1
View File
@@ -14,6 +14,7 @@
#endif
#include <stdint.h>
#include <inttypes.h>
#include <eglib-config.h>
#ifndef EGLIB_NO_REMAP
+69 -1
View File
@@ -32,6 +32,12 @@
#include <ctype.h>
#include <glib.h>
#ifndef G_OS_WIN32
#include <pthread.h>
#endif
#include <errno.h>
/*
* g_strndup and g_vasprintf need to allocate memory with g_malloc if
* ENABLE_OVERRIDABLE_ALLOCATORS is defined so that it can be safely freed with g_free
@@ -191,10 +197,72 @@ g_strdup_printf (const gchar *format, ...)
return ret;
}
/*
Max error number we support. It's empirically found by looking at our target OS.
Last this was checked was June-2017.
Apple is at 106.
Android is at 133.
*/
#define MONO_ERRNO_MAX 200
#define str(s) #s
#ifndef G_OS_WIN32
static pthread_mutex_t strerror_lock = PTHREAD_MUTEX_INITIALIZER;
#endif
static char *error_messages [MONO_ERRNO_MAX];
const gchar *
g_strerror (gint errnum)
{
return strerror (errnum);
if (errnum < 0)
errnum = -errnum;
if (errnum >= MONO_ERRNO_MAX)
return ("Error number higher than " str (MONO_ERRNO_MAX));
if (!error_messages [errnum]) {
#ifndef G_OS_WIN32
pthread_mutex_lock (&strerror_lock);
#endif
#ifdef HAVE_STRERROR_R
char tmp_buff [128]; //Quite arbitrary, should be large enough
char *buff = tmp_buff;
int buff_len = sizeof (tmp_buff);
int r;
buff [0] = 0;
while ((r = strerror_r (errnum, buff, buff_len - 1))) {
if (r != ERANGE) {
buff = g_strdup_printf ("Invalid Error code '%d'", errnum);
break;
}
if (buff == tmp_buff)
buff = g_malloc (buff_len * 2);
else
buff = g_realloc (buff, buff_len * 2);
buff_len *= 2;
//Spec is not clean on whether size argument includes space for null terminator or not
}
if (!error_messages [errnum])
error_messages [errnum] = g_strdup (buff);
if (buff != tmp_buff)
g_free (buff);
#else
if (!error_messages [errnum])
error_messages [errnum] = g_strdup_printf ("Error code '%d'", errnum);
#endif
#ifndef G_OS_WIN32
pthread_mutex_unlock (&strerror_lock);
#endif
}
return error_messages [errnum];
}
gchar *
Submodule external/buildtools deleted from b5cc6e6ab5.
+1 -1
+1 -1
+1 -1
+1 -1
+29 -13
View File
@@ -181,6 +181,16 @@ Gives the path for the temporary LLVM bitcode file created during AOT.
.I info
Print the architecture the AOT in this copy of Mono targets and quit.
.TP
.I interp
Generates all required wrappers, so that it is possible to run --interpreter without
any code generation at runtime. This option only makes sense with \fBmscorlib.dll\fR.
Embedders can set
.nf
mono_jit_set_aot_mode (MONO_AOT_MODE_INTERP);
.fi
.ne
.TP
.I ld-flags
Additional flags to pass to the C linker (if the current AOT mode calls for invoking it).
.TP
@@ -290,7 +300,7 @@ mono_aot_register_module (mono_aot_module_hello_info);
.I stats
Print various stats collected during AOT compilation.
.TP
.I temp_path=[path]
.I temp-path=[path]
Explicitly specify path to store temporary files created during AOT compilation.
.TP
.I threads=[number]
@@ -1091,11 +1101,6 @@ code generation backend. For example \fBLLVM_COUNT=10\fR would only
compile 10 methods with LLVM and then switch to the Mono JIT engine.
\fBLLVM_COUNT=0\fR would disable the LLVM engine altogether.
.TP
\fBMONO_AOT_CACHE\fR
If set, this variable will instruct Mono to ahead-of-time compile new
assemblies on demand and store the result into a cache in
~/.mono/aot-cache.
.TP
\fBMONO_ASPNET_INHIBIT_SETTINGSMAP\fR
Mono contains a feature which allows modifying settings in the .config files shipped
with Mono by using config section mappers. The mappers and the mapping rules are
@@ -1304,10 +1309,19 @@ first generation (of two). A larger nursery will usually speed up the
program but will obviously use more memory. The default nursery size
4 MB.
.TP
\fBmajor=\fIcollector\fR Specifies which major collector to use.
Options are `marksweep' for the Mark&Sweep collector, and
`marksweep-conc' for concurrent Mark&Sweep. The non-concurrent
Mark&Sweep collector is the default.
\fBmajor=\fIcollector\fR
Specifies which major collector to use.
Options are `marksweep' for the Mark&Sweep collector, `marksweep-conc'
for concurrent Mark&Sweep and `marksweep-conc-par' for parallel and
concurrent Mark&Sweep. The concurrent Mark&Sweep collector is the default.
.TP
\fBmode=balanced|throughput|pause\fR[:\fImax-pause\fR]
Specifies what should be the garbage collector's target. The `throughput'
mode aims to reduce time spent in the garbage collector and improve
application speed, the `pause' mode aims to keep pause times to a minimum
and it receives the argument \fImax-pause\fR which specifies the maximum
pause time in milliseconds that is acceptable and the `balanced' mode
which is a general purpose optimal mode.
.TP
\fBsoft-heap-limit=\fIsize\fR
Once the heap size gets larger than this size, ignore what the default
@@ -1370,9 +1384,11 @@ more memory when it reaches a stable size.
This option is EXPERIMENTAL, so it might disappear in later versions of mono.
.TP
\fBminor=\fIminor-collector\fR
Specifies which minor collector to use. Options are 'simple' which
promotes all objects from the nursery directly to the old generation
and 'split' which lets object stay longer on the nursery before promoting.
Specifies which minor collector to use. Options are `simple' which
promotes all objects from the nursery directly to the old generation,
`simple-par' which has same promotion behavior as `simple' but using
multiple workers and `split' which lets objects stay longer on the nursery
before promoting.
.TP
\fBalloc-ratio=\fIratio\fR
Specifies the ratio of memory from the nursery to be use by the alloc space.
+3 -1
View File
@@ -23,6 +23,7 @@ xbuild_12_SUBDIRS := build class tools/xbuild
xbuild_14_SUBDIRS := build class tools/xbuild
winaot_SUBDIRS := build class
orbis_SUBDIRS := build class
unreal_SUBDIRS := build class
include build/rules.make
@@ -77,6 +78,7 @@ $(_boot_:%=profile-do--testing_aot_hybrid--%): profile-do--testing_aot_hy
$(_boot_:%=profile-do--testing_aot_full--%): profile-do--testing_aot_full--%: profile-do--build--%
$(_boot_:%=profile-do--winaot--%): profile-do--winaot--%: profile-do--build--%
$(_boot_:%=profile-do--orbis--%): profile-do--orbis--%: profile-do--build--%
$(_boot_:%=profile-do--unreal--%): profile-do--unreal--%: profile-do--build--%
$(_boot_:%=profile-do--build--%): profile-do--build--%: profile-do--basic--%
testcorlib:
@@ -142,7 +144,7 @@ distcheck: dist-tarball
MONO_API_SNAPSHOT_PATH := $(topdir)../external/api-snapshot/
GENAPI := $(MONO_API_SNAPSHOT_PATH)tools/genapi/GenAPI.exe
MONO_API_SNAPSHOT_PROFILE_PATH := $(MONO_API_SNAPSHOT_PATH)profiles/$(PROFILE)/
MONO_API_ASSEMBLIES_IGNORED := $(addprefix $(topdir)class/lib/$(PROFILE)/, Mono.CSharp.dll SystemWebTestShim.dll standalone-runner-support.dll nunit.core.dll nunit.core.extensions.dll nunit.core.interfaces.dll nunit.framework.dll nunit.framework.extensions.dll nunit.mocks.dll nunit.util.dll nunit-console-runner.dll nunitlite.dll)
MONO_API_ASSEMBLIES_IGNORED := $(addprefix $(topdir)class/lib/$(PROFILE)/, Mono.CSharp.dll SystemWebTestShim.dll standalone-runner-support.dll nunit.core.dll nunit.core.extensions.dll nunit.core.interfaces.dll nunit.framework.dll nunit.framework.extensions.dll nunit.mocks.dll nunit.util.dll nunit-console-runner.dll nunitlite.dll Mono.Profiler.Log.dll)
MONO_API_ASSEMBLIES := $(filter-out $(MONO_API_ASSEMBLIES_IGNORED), $(wildcard $(topdir)class/lib/$(PROFILE)/*.dll)) $(wildcard $(topdir)class/lib/$(PROFILE)/Facades/*.dll)
MONO_API_ASSEMBLIES_CS := $(MONO_API_ASSEMBLIES:$(topdir)class/lib/$(PROFILE)/%.dll=$(MONO_API_SNAPSHOT_PROFILE_PATH)%.cs)
+8 -1
View File
@@ -40,7 +40,14 @@ class X {
if (!Version.TryParse (field.GetValue (null) as string, out version))
return 4;
if (version < new Version (4, 9))
Version min_mono_version;
#if __MonoCS__
min_mono_version = new Version (5, 4);
#else
min_mono_version = new Version (4, 9);
#endif
if (version < min_mono_version)
return 5;
return 0;
+33
View File
@@ -0,0 +1,33 @@
#! -*- makefile -*-
BOOTSTRAP_PROFILE = build
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_CSC)
MCS = $(BOOTSTRAP_MCS)
profile-check:
@:
DEFAULT_REFERENCES = -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll
PROFILE_MCS_FLAGS = \
-d:NET_1_1 \
-d:NET_2_0 \
-d:NET_2_1 \
-d:MOBILE \
-d:MOBILE_DYNAMIC \
-d:NET_3_5 \
-d:NET_4_0 \
-d:NET_4_5 \
-d:MONO \
-nowarn:1699 \
-nostdlib \
$(DEFAULT_REFERENCES) \
$(PLATFORM_DEBUG_FLAGS)
FRAMEWORK_VERSION = 2.1
NO_INSTALL = yes
MOBILE_DYNAMIC = yes
MOBILE_PROFILE = yes
NO_CONSOLE = yes
+5 -7
View File
@@ -20,9 +20,10 @@ TEST_RUNTIME_WRAPPERS_PATH = $(shell dirname $(RUNTIME))/_tmpinst/bin
ifndef NO_TEST
test_nunit_lib = nunitlite.dll
xunit_core := xunit.core xunit.abstractions xunit.assert
xunit_core := xunit.core xunit.abstractions xunit.assert Xunit.NetCore.Extensions
xunit_deps := System.Runtime
xunit_class_deps := Xunit.NetCore.Extensions
xunit_src := $(patsubst %,$(topdir)/../external/xunit-binaries/%,BenchmarkAttribute.cs BenchmarkDiscover.cs)
xunit_class_deps :=
xunit_libs_ref = $(patsubst %,-r:$(topdir)/../external/xunit-binaries/%.dll,$(xunit_core))
xunit_libs_ref += $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE)/Facades/%.dll,$(xunit_deps))
@@ -89,9 +90,6 @@ endif
tests_CLEAN_FILES += $(topdir)/build/deps/nunit-$(PROFILE).stamp
$(topdir)/class/lib/$(PROFILE)/$(PARENT_PROFILE)Xunit.NetCore.Extensions.dll:
$(MAKE) -C $(topdir)/class/Xunit.NetCore.Extensions
endif
test_assemblies :=
@@ -222,8 +220,8 @@ run-xunit-test-lib: xunit-test-local
$$ok
@rm -f xunit.execution.desktop.dll
$(xunit_test_lib): $(the_assembly) $(xtest_response) $(xunit_libs_dep)
$(TEST_COMPILE) $(LIBRARY_FLAGS) $(XTEST_LIB_FLAGS) -target:library -out:$@ $(xtest_flags) @$(xtest_response)
$(xunit_test_lib): $(the_assembly) $(xtest_response) $(xunit_libs_dep) $(xunit_src)
$(TEST_COMPILE) $(LIBRARY_FLAGS) $(XTEST_LIB_FLAGS) -target:library -out:$@ $(xtest_flags) @$(xtest_response) $(xunit_src)
xtest_response_preprocessed = $(xtest_response)_preprocessed
+1 -1
View File
@@ -27,7 +27,7 @@
static Read() method of RelaxngPattern class:
RelaxngPattern pattern = RelaxngPattern.Read (
new XmlTextReader ("relaxng.rng");
new XmlTextReader ("relaxng.rng"));
You can also use RelaxngPattern class to reuse grammar instance, as
already described (see Grammar Object Model).
@@ -30,6 +30,6 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyVersion ("4.2.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -21,39 +21,159 @@
//
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.DBNull))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.AcceptRejectRule))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.CommandBehavior))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.CommandType))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.CatalogLocation))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DataAdapter))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DataColumnMapping))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DataColumnMappingCollection))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DataTableMapping))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DataTableMappingCollection))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbColumn))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbCommand))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbCommandBuilder))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbConnection))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbConnectionStringBuilder))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbDataAdapter))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbDataReader))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbDataReaderExtensions))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbDataRecord))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbDataSourceEnumerator))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbEnumerator))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbMetaDataCollectionNames))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbMetaDataColumnNames))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbParameter))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbParameterCollection))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbProviderFactory))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbProviderSpecificTypePropertyAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.DbTransaction))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.GroupByBehavior))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.IDbColumnSchemaGenerator))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.IdentifierCase))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.RowUpdatedEventArgs))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.RowUpdatingEventArgs))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.SchemaTableColumn))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.SchemaTableOptionalColumn))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Common.SupportedJoinOperators))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.ConflictOption))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.ConnectionState))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Constraint))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.ConstraintCollection))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.ConstraintException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DBConcurrencyException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataColumn))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataColumnChangeEventArgs))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataColumnChangeEventHandler))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataColumnCollection))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataRelation))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataRelationCollection))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataRow))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataRowAction))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataRowBuilder))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataRowChangeEventArgs))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataRowChangeEventHandler))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataRowCollection))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataRowState))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataRowVersion))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataRowView))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataSet))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataSetDateTime))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataSysDescriptionAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataTable))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataTableClearEventArgs))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataTableClearEventHandler))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataTableCollection))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataTableNewRowEventArgs))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataTableNewRowEventHandler))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataTableReader))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataView))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataViewManager))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataViewRowState))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataViewSetting))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DataViewSettingCollection))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DbType))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DeletedRowInaccessibleException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.DuplicateNameException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.EvaluateException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.FillErrorEventArgs))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.FillErrorEventHandler))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.ForeignKeyConstraint))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IColumnMapping))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IColumnMappingCollection))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDataAdapter))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDataParameter))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDataParameterCollection))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDataReader))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDataRecord))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDbCommand))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDbConnection))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDbDataAdapter))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDbDataParameter))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IDbTransaction))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.ITableMapping))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.ITableMappingCollection))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.InRowChangingEventException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.InternalDataCollectionBase))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.InvalidConstraintException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.InvalidExpressionException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.IsolationLevel))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.KeyRestrictionBehavior))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.LoadOption))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.MappingType))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.MergeFailedEventArgs))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.MergeFailedEventHandler))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.MissingMappingAction))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.MissingPrimaryKeyException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.MissingSchemaAction))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.NoNullAllowedException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.ParameterDirection))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.PropertyCollection))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.ReadOnlyException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.RowNotInTableException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.Rule))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SchemaSerializationMode))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SchemaType))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SerializationFormat))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlDbType))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlTypes.INullable))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlTypes.SqlAlreadyFilledException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlTypes.SqlBinary))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlTypes.SqlBoolean))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlTypes.SqlByte))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlTypes.SqlBytes))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlTypes.SqlChars))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlTypes.SqlCompareOptions))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlTypes.SqlDateTime))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlTypes.SqlDecimal))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlTypes.SqlDouble))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlTypes.SqlGuid))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlTypes.SqlInt16))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlTypes.SqlInt32))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlTypes.SqlInt64))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlTypes.SqlMoney))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlTypes.SqlNotFilledException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlTypes.SqlNullValueException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlTypes.SqlSingle))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlTypes.SqlString))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlTypes.SqlTruncateException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlTypes.SqlTypeException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlTypes.SqlXml))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlTypes.StorageState))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.StateChangeEventArgs))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.StateChangeEventHandler))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.StatementCompletedEventArgs))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.StatementCompletedEventHandler))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.StatementType))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.StrongTypingException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SyntaxErrorException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.UniqueConstraint))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.UpdateRowSource))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.UpdateStatus))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.VersionNotFoundException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.XmlReadMode))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.XmlWriteMode))]
@@ -30,6 +30,6 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.2.0")]
[assembly: AssemblyVersion ("4.1.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -22,4 +22,19 @@
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.StackFrame))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.StackTrace))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.SymbolStore.ISymbolBinder))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.SymbolStore.ISymbolBinder1))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.SymbolStore.ISymbolDocument))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.SymbolStore.ISymbolDocumentWriter))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.SymbolStore.ISymbolMethod))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.SymbolStore.ISymbolNamespace))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.SymbolStore.ISymbolReader))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.SymbolStore.ISymbolScope))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.SymbolStore.ISymbolVariable))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.SymbolStore.ISymbolWriter))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.SymbolStore.SymAddressKind))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.SymbolStore.SymDocumentType))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.SymbolStore.SymLanguageType))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.SymbolStore.SymLanguageVendor))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.SymbolStore.SymbolToken))]
@@ -30,6 +30,6 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyVersion ("4.2.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -23,7 +23,7 @@ EMBEDDED_DRAWING_DEP := $(filter xammac_net_4_5 testing_aot_full testing_aot_hyb
ifndef EMBEDDED_DRAWING_DEP
# profiles which build a System.Drawing.dll in the repo
REPO_DRAWING_DEP := $(filter net_4_x orbis winaot, $(PROFILE))
REPO_DRAWING_DEP := $(filter net_4_x orbis winaot unreal, $(PROFILE))
ifdef REPO_DRAWING_DEP
LIB_REFS += System.Drawing
@@ -30,6 +30,6 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyVersion ("4.1.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -30,6 +30,6 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -30,6 +30,6 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.1.0.0")]
[assembly: AssemblyVersion ("4.2.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -27,6 +27,7 @@
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.LingerOption))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.MulticastOption))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.NetworkStream))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.ProtocolFamily))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.ProtocolType))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.SelectMode))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.SendPacketsElement))]
@@ -39,7 +39,7 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyVersion ("4.0.3.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -8,7 +8,7 @@
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{71D02788-3AD8-4C43-BDEB-1A3D277496BA}</ProjectGuid>
<OutputType>Library</OutputType>
<NoWarn>1699,1616,1699</NoWarn>
<NoWarn>1699,1616,1699,436</NoWarn>
<HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Windows_NT'">win32</HostPlatform>
<HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Unix' and $([System.IO.File]::Exists('/usr/lib/libc.dylib'))">darwin</HostPlatform>
<HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Unix'">linux</HostPlatform>
@@ -36,7 +36,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<NoWarn>1699,1616,1699,436</NoWarn>
<Optimize>false</Optimize>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;MULTIPLEX_OS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
@@ -44,7 +44,7 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<NoWarn>1699,1616,1699</NoWarn>
<NoWarn>1699,1616,1699,436</NoWarn>
<Optimize>true</Optimize>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;MULTIPLEX_OS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
@@ -12,7 +12,7 @@ LIBRARY = System.Runtime.InteropServices.RuntimeInformation.dll
RESX_RESOURCE_STRING = ../../../../external/corefx/src/System.Runtime.InteropServices.RuntimeInformation/src/Resources/Strings.resx
KEY_FILE = ../../msfinal.pub
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699
SIGN_FLAGS = /delaysign /keyfile:$(KEY_FILE) /nowarn:1616,1699,436
LIB_REFS = System
LIB_MCS_FLAGS = $(SIGN_FLAGS) /unsafe
@@ -35,12 +35,9 @@ namespace System.Runtime.InteropServices
{
public static class RuntimeInformation
{
[DllImport ("__Internal")]
extern static string mono_get_runtime_build_info ();
public static string FrameworkDescription {
get {
return mono_get_runtime_build_info ();
return "Mono " + Mono.Runtime.GetDisplayName ();
}
}
@@ -30,6 +30,6 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.1.1.0")]
[assembly: AssemblyVersion ("4.2.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -25,7 +25,11 @@
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.DataContractAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.DataMemberAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.EnumMemberAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.ExportOptions))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.ExtensionDataObject))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.IExtensibleDataObject))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.IgnoreDataMemberAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.InvalidDataContractException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.KnownTypeAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.OnDeserializedAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.OnDeserializingAttribute))]
@@ -33,4 +37,13 @@
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.OnSerializingAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.SerializationException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.StreamingContext))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.InvalidDataContractException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.StreamingContextStates))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.XmlSerializableServices))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.XPathQueryGenerator))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.Serialization.XsdDataContractExporter))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.IFragmentCapableXmlDictionaryWriter))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.IStreamProvider))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.IXmlBinaryReaderInitializer))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.IXmlBinaryWriterInitializer))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.IXmlTextReaderInitializer))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Xml.IXmlTextWriterInitializer))]
@@ -30,6 +30,6 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.2.0.0")]
[assembly: AssemblyVersion ("4.3.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -21,27 +21,55 @@
//
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Aes))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.AesManaged))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.AsymmetricKeyExchangeDeformatter))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.AsymmetricKeyExchangeFormatter))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.AsymmetricSignatureDeformatter))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.AsymmetricSignatureFormatter))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CryptoConfig))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.DeriveBytes))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.DES))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.DSA))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.DSAParameters))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.DSASignatureDeformatter))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.DSASignatureFormatter))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.ECCurve))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.ECDiffieHellmanPublicKey))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.ECDsa))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.ECParameters))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.ECPoint))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.HMACMD5))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.HMACSHA1))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.HMACSHA256))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.HMACSHA384))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.HMACSHA512))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.MaskGenerationMethod))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.MD5))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.PKCS1MaskGenerationMethod))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RandomNumberGenerator))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RC2))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Rfc2898DeriveBytes))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Rijndael))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RijndaelManaged))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RSA))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RSAEncryptionPadding))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RSAEncryptionPaddingMode))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RSAOAEPKeyExchangeDeformatter))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RSAOAEPKeyExchangeFormatter))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RSAParameters))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RSAPKCS1KeyExchangeDeformatter))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RSAPKCS1KeyExchangeFormatter))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RSAPKCS1SignatureDeformatter))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RSAPKCS1SignatureFormatter))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RSASignaturePadding))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RSASignaturePaddingMode))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.SHA1))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.SHA1Managed))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.SHA256))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.SHA256Managed))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.SHA384))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.SHA384Managed))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.SHA512))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.SHA512Managed))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.SignatureDescription))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.TripleDES))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.ECCurve))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.ECParameters))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.ECPoint))]
@@ -30,6 +30,6 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyVersion ("4.1.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -30,6 +30,6 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyVersion ("4.1.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -22,5 +22,6 @@
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.IOCompletionCallback))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.NativeOverlapped))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Overlapped))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.PreAllocatedOverlapped))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.ThreadPoolBoundHandle))]
@@ -30,6 +30,6 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2016 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyVersion ("4.0.3.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -30,7 +30,7 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyCompany ("Xamarin, Inc.")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("Copyright (c) 2015 Xamarin Inc. (http://www.xamarin.com)")]
[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyVersion ("4.1.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
+1 -1
View File
@@ -29,7 +29,7 @@ LIB_REFS += System.Web
endif
# profiles which build a System.Drawing.dll in the repo
REPO_DRAWING_DEP := $(filter net_4_x orbis winaot, $(PROFILE))
REPO_DRAWING_DEP := $(filter net_4_x orbis winaot unreal, $(PROFILE))
ifdef REPO_DRAWING_DEP
LIB_REFS += System.Drawing
+3
View File
@@ -83,6 +83,9 @@ winaot_PARALLEL_SUBDIRS = $(common_SUBDIRS) $(mobile_only_SUBDIRS)
orbis_SUBDIRS = $(common_DEPS_SUBDIRS) $(netstandard_drawing_SUBDIRS) $(mobile_only_DEPS_SUBDIRS)
orbis_PARALLEL_SUBDIRS = $(common_SUBDIRS) $(mobile_only_SUBDIRS)
unreal_SUBDIRS = $(common_DEPS_SUBDIRS) $(netstandard_drawing_SUBDIRS) $(mobile_only_DEPS_SUBDIRS)
unreal_PARALLEL_SUBDIRS = $(common_SUBDIRS) $(mobile_only_SUBDIRS)
mobile_only_SUBDIRS = System.Net.Ping System.Runtime.Serialization.Formatters System.Security.Cryptography.Csp System.Security.Cryptography.Pkcs \
System.Security.Cryptography.Cng System.Runtime.Loader System.Xml.XPath.XmlDocument System.Reflection.DispatchProxy
+8 -1
View File
@@ -130,6 +130,11 @@ winaot_dirs := \
System.Drawing \
$(pcl_facade_dirs)
unreal_dirs := \
$(mobile_common_dirs) \
System.Drawing \
$(pcl_facade_dirs)
xammac_4_5_dirs := \
corlib \
Mono.Security \
@@ -315,6 +320,7 @@ net_4_x_parallel_dirs := \
System.Workflow.ComponentModel \
System.Workflow.Runtime \
System.Reflection.Context \
Mono.Profiler.Log \
legacy/Mono.Cecil \
$(pcl_facade_dirs)
@@ -352,10 +358,11 @@ xbuild_12_SUBDIRS := $(xbuild_4_0_dirs)
xbuild_14_SUBDIRS := $(xbuild_4_0_dirs) Microsoft.NuGet.Build.Tasks
winaot_SUBDIRS := $(winaot_dirs)
orbis_SUBDIRS := $(orbis_dirs)
unreal_SUBDIRS := $(unreal_dirs)
include ../build/rules.make
SUBDIRS = $(testing_aot_full_dirs) $(testing_aot_hybrid_dirs) $(monotouch_dirs) $(monodroid_dirs) $(xammac_dirs) $(net_4_x_dirs) $(net_4_x_parallel_dirs) $(xammac_net_4_5_SUBDIRS)
SUBDIRS = $(testing_aot_full_dirs) $(testing_aot_hybrid_dirs) $(monotouch_dirs) $(monodroid_dirs) $(xammac_dirs) $(net_4_x_dirs) $(net_4_x_parallel_dirs) $(xammac_net_4_5_SUBDIRS) $(unreal_dirs)
DIST_ONLY_SUBDIRS = dlr aot-compiler reference-assemblies $(xbuild_4_0_dirs) Microsoft.NuGet.Build.Tasks
@@ -150,18 +150,18 @@ namespace MonoTests.Microsoft.Build.Execution
var bm = new BuildManager ();
bm.BeginBuild (new BuildParameters () { Loggers = new ILogger [] {new ConsoleLogger (LoggerVerbosity.Diagnostic, TextWriter.Null.WriteLine, null, null)} });
DateTime waitDone = DateTime.MinValue;
DateTime beforeExec = DateTime.Now;
DateTime beforeExec = DateTime.UtcNow;
var l = new List<BuildSubmission> ();
for (int i = 0; i < 10; i++) {
var sub = bm.PendBuildRequest (new BuildRequestData (proj, new string [] { "Wait1Sec" }));
l.Add (sub);
sub.ExecuteAsync (delegate { waitDone = DateTime.Now; }, null);
sub.ExecuteAsync (delegate { waitDone = DateTime.UtcNow; }, null);
}
bm.EndBuild ();
Assert.IsTrue (l.All (s => s.BuildResult.OverallResult == BuildResultCode.Success), "#1");
DateTime endBuildDone = DateTime.Now;
Assert.IsTrue (endBuildDone - beforeExec >= TimeSpan.FromSeconds (1), "#2");
Assert.IsTrue (endBuildDone > waitDone, "#3");
DateTime endBuildDone = DateTime.UtcNow;
AssertHelper.GreaterOrEqual (endBuildDone - beforeExec, TimeSpan.FromSeconds (1), "#2");
AssertHelper.Greater (endBuildDone, waitDone, "#3");
}
[Test]
@@ -101,15 +101,15 @@ namespace MonoTests.Microsoft.Build.Execution
var bm = new BuildManager ();
bm.BeginBuild (new BuildParameters ());
DateTime waitDone = DateTime.MinValue;
DateTime beforeExec = DateTime.Now;
DateTime beforeExec = DateTime.UtcNow;
var sub = bm.PendBuildRequest (new BuildRequestData (proj, new string [] { "Wait1Sec" }));
sub.ExecuteAsync (delegate { waitDone = DateTime.Now; }, null);
sub.ExecuteAsync (delegate { waitDone = DateTime.UtcNow; }, null);
bm.EndBuild ();
Assert.IsTrue (sub.BuildResult.OverallResult == BuildResultCode.Success, "#1");
DateTime endBuildDone = DateTime.Now;
Assert.IsTrue (endBuildDone - beforeExec >= TimeSpan.FromSeconds (1), "#2");
Assert.IsTrue (waitDone >= beforeExec, "#3");
Assert.IsTrue (endBuildDone >= waitDone, "#4");
Assert.AreEqual (BuildResultCode.Success, sub.BuildResult.OverallResult, "#1");
DateTime endBuildDone = DateTime.UtcNow;
AssertHelper.GreaterOrEqual (endBuildDone - beforeExec, TimeSpan.FromSeconds (1), "#2");
AssertHelper.GreaterOrEqual (waitDone, beforeExec, "#3");
AssertHelper.GreaterOrEqual (endBuildDone, waitDone, "#4");
}
[Test]
@@ -106,9 +106,6 @@
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Conversions.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\COperators.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Declarations\AggregateDeclaration.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Declarations\Declaration.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Declarations\GlobalAttributeDeclaration.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Declarations\NamespaceDeclaration.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\ExplicitConversion.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\ExpressionBinder.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\ExpressionKind.cs" />
@@ -139,7 +136,6 @@
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\EventSymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\FieldSymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\IndexerSymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\LabelSymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\LocalVariableSymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\MethodOrPropertySymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\MethodSymbol.cs" />
@@ -157,13 +153,11 @@
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\SymbolTable.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\SymFactory.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\SymFactoryBase.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\TransparentIdentifierMemberSymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\TypeParameterSymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\UnresolvedAggregateSymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\VariableSymbol.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\ArrayIndex.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\ArrayInitialization.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\ArrayLength.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Assignment.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\BinaryOperator.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Block.cs" />
@@ -173,7 +167,6 @@
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Class.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\CompoundOperator.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Concatenate.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\ConditionalOperator.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Constant.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Event.cs" />
<Compile Include="..\..\..\external\corefx\src\Microsoft.CSharp\src\Microsoft\CSharp\RuntimeBinder\Semantics\Tree\EXPR.cs" />
@@ -58,9 +58,6 @@ corefx/SR.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Conversions.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/COperators.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Declarations/AggregateDeclaration.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Declarations/Declaration.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Declarations/GlobalAttributeDeclaration.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Declarations/NamespaceDeclaration.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExplicitConversion.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExpressionBinder.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/ExpressionKind.cs
@@ -91,7 +88,6 @@ corefx/SR.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/EventSymbol.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/FieldSymbol.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/IndexerSymbol.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/LabelSymbol.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/LocalVariableSymbol.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/MethodOrPropertySymbol.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/MethodSymbol.cs
@@ -109,13 +105,11 @@ corefx/SR.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/SymbolTable.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/SymFactory.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/SymFactoryBase.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/TransparentIdentifierMemberSymbol.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/TypeParameterSymbol.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/UnresolvedAggregateSymbol.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Symbols/VariableSymbol.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ArrayIndex.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ArrayInitialization.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ArrayLength.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Assignment.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/BinaryOperator.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Block.cs
@@ -125,7 +119,6 @@ corefx/SR.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Class.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/CompoundOperator.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Concatenate.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/ConditionalOperator.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Constant.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/Event.cs
../../../external/corefx/src/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Tree/EXPR.cs
@@ -104,6 +104,7 @@
<Compile Include="..\..\mcs\settings.cs" />
<Compile Include="..\..\mcs\statement.cs" />
<Compile Include="..\..\mcs\support.cs" />
<Compile Include="..\..\mcs\tuples.cs" />
<Compile Include="..\..\mcs\typemanager.cs" />
<Compile Include="..\..\mcs\typespec.cs" />
<Compile Include="..\..\mcs\visit.cs" />
@@ -49,6 +49,7 @@ aot.cs
../../mcs/support.cs
../../mcs/typemanager.cs
../../mcs/typespec.cs
../../mcs/tuples.cs
../../mcs/visit.cs
../../class/Mono.CompilerServices.SymbolWriter/MonoSymbolFile.cs
../../class/Mono.CompilerServices.SymbolWriter/MonoSymbolTable.cs
@@ -2214,7 +2214,7 @@ namespace Mono.Debugger.Soft
internal ValueImpl[] Type_GetValues (long id, long[] fields, long thread_id) {
int len = fields.Length;
PacketReader r;
if (thread_id != 0)
if (thread_id != 0 && Version.AtLeast(2, 3))
r = SendReceive (CommandSet.TYPE, (int)CmdType.GET_VALUES_2, new PacketWriter ().WriteId (id).WriteId (thread_id).WriteInt (len).WriteIds (fields));
else
r = SendReceive (CommandSet.TYPE, (int)CmdType.GET_VALUES, new PacketWriter ().WriteId (id).WriteInt (len).WriteIds (fields));
@@ -30,6 +30,11 @@ namespace Mono.Debugger.Soft
if (args != null && args.Length != 0)
throw new NotSupportedException ();
//If method is virtual we can't optimize(execute IL) because it's maybe
//overriden... call runtime to invoke overriden version...
if (method.IsVirtual)
throw new NotSupportedException ();
if (method.IsStatic || method.DeclaringType.IsValueType || this_val == null || !(this_val is ObjectMirror))
throw new NotSupportedException ();
@@ -350,6 +355,12 @@ namespace Mono.Debugger.Soft
} catch {
throw new NotSupportedException ();
}
} else if (method.ReturnType.IsEnum && primitive != null) {
try {
res = method.VirtualMachine.CreateEnumMirror (method.ReturnType, primitive);
} catch {
throw new NotSupportedException ();
}
}
return res;
@@ -59,7 +59,7 @@ namespace Mono.Debugger.Soft
sb.Append (ReturnType.Name);
sb.Append (' ');
if (type_namespace != String.Empty)
sb.Append (type_namespace + ".");
sb.Append (type_namespace).Append (".");
sb.Append(type_name);
sb.Append(":");
sb.Append(Name);
@@ -102,6 +102,18 @@ namespace Mono.Debugger.Soft
}
}
public int EndLineNumber {
get {
return Location.EndLineNumber;
}
}
public int EndColumnNumber {
get {
return Location.EndColumnNumber;
}
}
public bool IsDebuggerInvoke {
get {
return (flags & StackFrameFlags.DEBUGGER_INVOKE) != 0;
@@ -13,6 +13,8 @@ namespace Mono.Debugger.Soft
ManualResetEvent fetchingEvent = new ManualResetEvent (false);
ThreadInfo info;
StackFrame[] frames;
bool threadStateInvalid = true;
ThreadState threadState;
internal ThreadMirror (VirtualMachine vm, long id) : base (vm, id) {
}
@@ -30,6 +32,7 @@ namespace Mono.Debugger.Soft
internal void InvalidateFrames () {
cacheInvalid = true;
threadStateInvalid = true;
}
internal void FetchFrames (bool mustFetch = false) {
@@ -91,7 +94,11 @@ namespace Mono.Debugger.Soft
public ThreadState ThreadState {
get {
return (ThreadState)vm.conn.Thread_GetState (id);
if (threadStateInvalid) {
threadState = (ThreadState) vm.conn.Thread_GetState (id);
threadStateInvalid = false;
}
return threadState;
}
}
@@ -665,7 +665,7 @@ namespace Mono.Debugger.Soft
return res;
}
internal ValueImpl EncodeValue (Value v) {
internal ValueImpl EncodeValue (Value v, List<Value> duplicates = null) {
if (v is PrimitiveValue) {
object val = (v as PrimitiveValue).Value;
if (val == null)
@@ -675,16 +675,22 @@ namespace Mono.Debugger.Soft
} else if (v is ObjectMirror) {
return new ValueImpl { Type = ElementType.Object, Objid = (v as ObjectMirror).Id };
} else if (v is StructMirror) {
return new ValueImpl { Type = ElementType.ValueType, Klass = (v as StructMirror).Type.Id, Fields = EncodeValues ((v as StructMirror).Fields) };
if (duplicates == null)
duplicates = new List<Value> ();
if (duplicates.Contains (v))
return new ValueImpl { Type = (ElementType)ValueTypeId.VALUE_TYPE_ID_NULL, Objid = 0 };
duplicates.Add (v);
return new ValueImpl { Type = ElementType.ValueType, Klass = (v as StructMirror).Type.Id, Fields = EncodeValues ((v as StructMirror).Fields, duplicates) };
} else {
throw new NotSupportedException ();
}
}
internal ValueImpl[] EncodeValues (IList<Value> values) {
internal ValueImpl[] EncodeValues (IList<Value> values, List<Value> duplicates = null) {
ValueImpl[] res = new ValueImpl [values.Count];
for (int i = 0; i < values.Count; ++i)
res [i] = EncodeValue (values [i]);
res [i] = EncodeValue (values [i], duplicates);
return res;
}
@@ -724,6 +730,7 @@ namespace Mono.Debugger.Soft
l.Add (new ThreadStartEvent (vm, req_id, id));
break;
case EventType.ThreadDeath:
vm.GetThread (id).InvalidateFrames ();
vm.InvalidateThreadCache ();
l.Add (new ThreadDeathEvent (vm, req_id, id));
break;
@@ -5,6 +5,7 @@ using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Runtime.Remoting.Messaging;
using System.Text;
namespace Mono.Debugger.Soft
{
@@ -95,6 +96,12 @@ namespace Mono.Debugger.Soft
info.FileName = "valgrind";
info.UseShellExecute = false;
if (info.RedirectStandardError)
info.StandardErrorEncoding = Encoding.UTF8;
if (info.RedirectStandardOutput)
info.StandardOutputEncoding = Encoding.UTF8;
ITargetProcess p;
if (options != null && options.CustomProcessLauncher != null)
p = new ProcessWrapper (options.CustomProcessLauncher (info));
@@ -1165,10 +1165,18 @@ public class Tests : TestsBase, ITest2
return 42;
}
public int invoke_pass_nullable (int? i) {
return (int)i;
}
public int? invoke_return_nullable_null () {
return null;
}
public int invoke_pass_nullable_null (int? i) {
return i.HasValue ? 1 : 2;
}
public void invoke_type_load () {
new Class3 ();
}
+22 -1
View File
@@ -2617,6 +2617,11 @@ public class DebuggerTests
m = s.Type.GetMethod ("ToString");
v = s.InvokeMethod (e.Thread, m, null);
// pass nullable as argument
m = t.GetMethod ("invoke_pass_nullable");
v = this_obj.InvokeMethod (e.Thread, m, new Value [] { s });
AssertValue (42, v);
// return nullable null
m = t.GetMethod ("invoke_return_nullable_null");
v = this_obj.InvokeMethod (e.Thread, m, null);
@@ -2630,6 +2635,11 @@ public class DebuggerTests
m = s.Type.GetMethod ("ToString");
v = s.InvokeMethod (e.Thread, m, null);
// pass nullable null as argument
m = t.GetMethod ("invoke_pass_nullable_null");
v = this_obj.InvokeMethod (e.Thread, m, new Value [] { s });
AssertValue (2, v);
// pass primitive
m = t.GetMethod ("invoke_pass_primitive");
Value[] args = new Value [] {
@@ -2723,6 +2733,17 @@ public class DebuggerTests
task = t.InvokeMethodAsync (e.Thread, m, new Value [] { vm.RootDomain.CreateString ("ABC") });
AssertValue ("ABC", task.Result);
// string constructor
var stringType = vm.RootDomain.Corlib.GetType ("System.String");
var stringConstructor = stringType.GetMethods ().Single (c=>
c.Name == ".ctor" &&
c.GetParameters ().Length == 2 &&
c.GetParameters ()[0].ParameterType.Name == "Char" &&
c.GetParameters ()[1].ParameterType.Name == "Int32");
var str = stringType.NewInstance (e.Thread, stringConstructor, new Value [] { vm.CreateValue ('a'), vm.CreateValue (3)});
AssertValue("aaa", str);
// Argument checking
// null thread
@@ -4122,7 +4143,7 @@ public class DebuggerTests
frames = thread.GetFrames ();
Assert.AreEqual (8, frames.Length, "#7");
Assert.AreEqual ("WaitOne_internal", frames [0].Method.Name, "#8.0");
Assert.AreEqual ("Wait_internal", frames [0].Method.Name, "#8.0");
Assert.AreEqual ("WaitOneNative", frames [1].Method.Name, "#8.1");
Assert.AreEqual ("InternalWaitOne", frames [2].Method.Name, "#8.2");
Assert.AreEqual ("WaitOne", frames [3].Method.Name, "#8.3");
@@ -228,7 +228,7 @@ namespace MonoTests.Mono.Options
e.Run = (args) => e.CommandSet.Out.WriteLine (string.Join (" ", args));
var o = new StringWriter ();
var c = new CommandSet ("set", output:o) {
var c = new CommandSet ("set", output:o, error: Console.Error) {
e,
};
Assert.AreEqual (0, c.Run (new [] { "help", "echo" }));
@@ -56,7 +56,7 @@ namespace MonoTests.Mono.Options
c, v => { string ignore = v.OptionValues [0]; });
c.Option = p [0];
Utils.AssertException (typeof(ArgumentOutOfRangeException),
"Specified argument was out of the range of valid values.\nParameter name: index",
$"Specified argument was out of the range of valid values.{Environment.NewLine}Parameter name: index",
c, v => { string ignore = v.OptionValues [2]; });
c.OptionName = "-a";
Utils.AssertException (typeof(OptionException),
@@ -374,10 +374,10 @@ namespace MonoTests.Mono.Options
p, v => { v.Parse (_("-a", "-b")); });
Assert.AreEqual (a, "-b");
Utils.AssertException (typeof(ArgumentNullException),
"Value cannot be null.\nParameter name: option",
$"Value cannot be null.{Environment.NewLine}Parameter name: option",
p, v => { v.Add ((Option) null); });
Utils.AssertException (typeof(ArgumentNullException),
"Value cannot be null.\nParameter name: header",
$"Value cannot be null.{Environment.NewLine}Parameter name: header",
p, v => { v.Add ((string) null); });
// bad type
@@ -394,10 +394,10 @@ namespace MonoTests.Mono.Options
p, v => { v.Parse (_("-cz", "extra")); });
Utils.AssertException (typeof(ArgumentNullException),
"Value cannot be null.\nParameter name: action",
$"Value cannot be null.{Environment.NewLine}Parameter name: action",
p, v => { v.Add ("foo", (Action<string>) null); });
Utils.AssertException (typeof(ArgumentException),
"Cannot provide maxValueCount of 2 for OptionValueType.None.\nParameter name: maxValueCount",
$"Cannot provide maxValueCount of 2 for OptionValueType.None.{Environment.NewLine}Parameter name: maxValueCount",
p, v => { v.Add ("foo", (k, val) => {/* ignore */}); });
}
@@ -772,7 +772,7 @@ namespace MonoTests.Mono.Options
Utils.AssertException (typeof(ArgumentException), "prototypes must be null!",
p, v => { v.Add ("N|NUM=", (int n) => {}); });
Utils.AssertException (typeof(ArgumentNullException),
"Value cannot be null.\nParameter name: option",
$"Value cannot be null.{Environment.NewLine}Parameter name: option",
p, v => { v.GetOptionForName (null); });
}
@@ -66,60 +66,60 @@ namespace MonoTests.Mono.Options
{
object p = null;
Utils.AssertException (typeof(ArgumentNullException),
"Value cannot be null.\nParameter name: prototype",
$"Value cannot be null.{Environment.NewLine}Parameter name: prototype",
p, v => { new DefaultOption (null, null); });
Utils.AssertException (typeof(ArgumentException),
"Cannot be the empty string.\nParameter name: prototype",
$"Cannot be the empty string.{Environment.NewLine}Parameter name: prototype",
p, v => { new DefaultOption ("", null); });
Utils.AssertException (typeof(ArgumentException),
"Empty option names are not supported.\nParameter name: prototype",
$"Empty option names are not supported.{Environment.NewLine}Parameter name: prototype",
p, v => { new DefaultOption ("a|b||c=", null); });
Utils.AssertException (typeof(ArgumentException),
"Conflicting option types: '=' vs. ':'.\nParameter name: prototype",
$"Conflicting option types: '=' vs. ':'.{Environment.NewLine}Parameter name: prototype",
p, v => { new DefaultOption ("a=|b:", null); });
Utils.AssertException (typeof(ArgumentException),
"The default option handler '<>' cannot require values.\nParameter name: prototype",
$"The default option handler '<>' cannot require values.{Environment.NewLine}Parameter name: prototype",
p, v => { new DefaultOption ("<>=", null); });
Utils.AssertException (typeof(ArgumentException),
"The default option handler '<>' cannot require values.\nParameter name: prototype",
$"The default option handler '<>' cannot require values.{Environment.NewLine}Parameter name: prototype",
p, v => { new DefaultOption ("<>:", null); });
Utils.AssertException (null, null,
p, v => { new DefaultOption ("t|<>=", null, 1); });
Utils.AssertException (typeof(ArgumentException),
"The default option handler '<>' cannot require values.\nParameter name: prototype",
$"The default option handler '<>' cannot require values.{Environment.NewLine}Parameter name: prototype",
p, v => { new DefaultOption ("t|<>=", null, 2); });
Utils.AssertException (null, null,
p, v => { new DefaultOption ("a|b=", null, 2); });
Utils.AssertException (typeof(ArgumentOutOfRangeException),
"Specified argument was out of the range of valid values.\nParameter name: maxValueCount",
$"Specified argument was out of the range of valid values.{Environment.NewLine}Parameter name: maxValueCount",
p, v => { new DefaultOption ("a", null, -1); });
Utils.AssertException (typeof(ArgumentException),
"Cannot provide maxValueCount of 0 for OptionValueType.Required or " +
"OptionValueType.Optional.\nParameter name: maxValueCount",
$"OptionValueType.Optional.{Environment.NewLine}Parameter name: maxValueCount",
p, v => { new DefaultOption ("a=", null, 0); });
Utils.AssertException (typeof(ArgumentException),
"Ill-formed name/value separator found in \"a={\".\nParameter name: prototype",
"Ill-formed name/value separator found in \"a={\"." + Environment.NewLine + "Parameter name: prototype",
p, v => { new DefaultOption ("a={", null); });
Utils.AssertException (typeof(ArgumentException),
"Ill-formed name/value separator found in \"a=}\".\nParameter name: prototype",
"Ill-formed name/value separator found in \"a=}\"." + Environment.NewLine + "Parameter name: prototype",
p, v => { new DefaultOption ("a=}", null); });
Utils.AssertException (typeof(ArgumentException),
"Ill-formed name/value separator found in \"a={{}}\".\nParameter name: prototype",
"Ill-formed name/value separator found in \"a={{}}\"." + Environment.NewLine + "Parameter name: prototype",
p, v => { new DefaultOption ("a={{}}", null); });
Utils.AssertException (typeof(ArgumentException),
"Ill-formed name/value separator found in \"a={}}\".\nParameter name: prototype",
"Ill-formed name/value separator found in \"a={}}\"." + Environment.NewLine + "Parameter name: prototype",
p, v => { new DefaultOption ("a={}}", null); });
Utils.AssertException (typeof(ArgumentException),
"Ill-formed name/value separator found in \"a={}{\".\nParameter name: prototype",
"Ill-formed name/value separator found in \"a={}{\"." + Environment.NewLine + "Parameter name: prototype",
p, v => { new DefaultOption ("a={}{", null); });
Utils.AssertException (typeof(ArgumentException),
"Cannot provide key/value separators for Options taking 1 value(s).\nParameter name: prototype",
$"Cannot provide key/value separators for Options taking 1 value(s).{Environment.NewLine}Parameter name: prototype",
p, v => { new DefaultOption ("a==", null); });
Utils.AssertException (typeof(ArgumentException),
"Cannot provide key/value separators for Options taking 1 value(s).\nParameter name: prototype",
$"Cannot provide key/value separators for Options taking 1 value(s).{Environment.NewLine}Parameter name: prototype",
p, v => { new DefaultOption ("a={}", null); });
Utils.AssertException (typeof(ArgumentException),
"Cannot provide key/value separators for Options taking 1 value(s).\nParameter name: prototype",
$"Cannot provide key/value separators for Options taking 1 value(s).{Environment.NewLine}Parameter name: prototype",
p, v => { new DefaultOption ("a=+-*/", null); });
Utils.AssertException (null, null,
p, v => { new DefaultOption ("a", null, 0); });
+11 -2
View File
@@ -34,9 +34,16 @@ using System.Reflection;
using System.Runtime.InteropServices;
using System.Security.Permissions;
[assembly: AssemblyVersion (Consts.FxVersion)]
#if MONO_POSIX_NETSTANDARD_BUILD
[assembly: AssemblyVersion ("1.0.0.0")]
[assembly: AssemblyTitle("Mono.Posix.NETStandard.dll")]
#else
[assembly: AssemblyVersion (Consts.FxVersion)]
[assembly: AssemblyTitle("Mono.Posix.dll")]
#endif
[assembly: AssemblyDescription("Unix Integration Classes")]
[assembly: CLSCompliant (true)]
@@ -48,9 +55,11 @@ using System.Security.Permissions;
*/
#if !MONO_POSIX_NETSTANDARD_BUILD
// We are using ../Open.snk for MONO_POSIX_NETSTANDARD_BUILD
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../mono.pub")]
#endif
/*
* TODO:
*
@@ -0,0 +1,35 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AssemblyName>Mono.Posix.NETStandard</AssemblyName>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<EnableDefaultItems>false</EnableDefaultItems>
<SignAssembly>true</SignAssembly>
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>..\Open.snk</AssemblyOriginatorKeyFile>
<!--<BaseIntermediateOutputPath>obj-netstandard2.0</BaseIntermediateOutputPath>
<IntermediateOutputPath>obj-netstandard2.0</IntermediateOutputPath>-->
</PropertyGroup>
<PropertyGroup>
<DefineConstants>$(DefineConstants);MONO_POSIX_NETSTANDARD_BUILD</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(ForceUseLibC)' == 'true'">
<DefineConstants>$(DefineConstants);FORCE_USE_LIBC_NOT_MSVC</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Compile Include=".\Assembly\**\*.cs" />
<Compile Include=".\Mono.Posix\**\*.cs" />
<Compile Include=".\Mono.Unix\**\*.cs" />
<Compile Include=".\Mono.Unix.Native\**\*.cs" />
<Compile Include="..\..\build\common\Locale.cs" />
<Compile Remove=".\Mono.Unix.Native\CdeclFunction.cs" />
</ItemGroup>
</Project>
@@ -153,7 +153,7 @@ namespace Mono.Remoting.Channels.Unix
_pool = pool;
_client = client;
_stream = new BufferedStream (client.GetStream());
_controlTime = DateTime.Now;
_controlTime = DateTime.UtcNow;
_buffer = new byte[UnixMessageIO.DefaultStreamBufferSize];
}
@@ -270,7 +270,7 @@ namespace Mono.Remoting.Channels.Unix
{
lock (_pool)
{
entry.ControlTime = DateTime.Now; // Initialize timeout
entry.ControlTime = DateTime.UtcNow; // Initialize timeout
_pool.Add (entry);
Monitor.Pulse (_pool);
}
@@ -295,7 +295,7 @@ namespace Mono.Remoting.Channels.Unix
for (int n=0; n < _pool.Count; n++)
{
UnixConnection entry = (UnixConnection)_pool[n];
if ( (DateTime.Now - entry.ControlTime).TotalSeconds > UnixConnectionPool.KeepAliveSeconds)
if ( (DateTime.UtcNow - entry.ControlTime).TotalSeconds > UnixConnectionPool.KeepAliveSeconds)
{
CancelConnection (entry);
_pool.RemoveAt(n);
@@ -309,6 +309,7 @@ namespace Mono.Unix.Native {
public delegate void SignalHandler (int signal);
#if !NETSTANDARD2_0
internal class XPrintfFunctions
{
internal delegate object XPrintf (object[] parameters);
@@ -335,6 +336,7 @@ namespace Mono.Unix.Native {
syslog = new XPrintf (_syslog.Invoke);
}
}
#endif
//
// Convention: Functions that are part of the C standard library go here.
@@ -378,7 +380,11 @@ namespace Mono.Unix.Native {
//
public class Stdlib
{
#if FORCE_USE_LIBC_NOT_MSVC
internal const string LIBC = "c";
#else
internal const string LIBC = "msvcrt";
#endif
internal const string MPH = "MonoPosixHelper";
// It is possible for Mono.Posix and MonoPosixHelper to get out of sync,
@@ -771,6 +777,7 @@ namespace Mono.Unix.Native {
return sys_fprintf (stream, "%s", message);
}
#if !NETSTANDARD2_0
[Obsolete ("Not necessarily portable due to cdecl restrictions.\n" +
"Use fprintf (IntPtr, string) instead.")]
public static int fprintf (IntPtr stream, string format, params object[] parameters)
@@ -781,6 +788,7 @@ namespace Mono.Unix.Native {
Array.Copy (parameters, 0, _parameters, 2, parameters.Length);
return (int) XPrintfFunctions.fprintf (_parameters);
}
#endif
/* SKIP: fscanf(3) */
@@ -793,6 +801,7 @@ namespace Mono.Unix.Native {
return sys_printf ("%s", message);
}
#if !NETSTANDARD2_0
[Obsolete ("Not necessarily portable due to cdecl restrictions.\n" +
"Use printf (string) instead.")]
public static int printf (string format, params object[] parameters)
@@ -802,6 +811,7 @@ namespace Mono.Unix.Native {
Array.Copy (parameters, 0, _parameters, 1, parameters.Length);
return (int) XPrintfFunctions.printf (_parameters);
}
#endif
/* SKIP: scanf(3) */
@@ -823,6 +833,7 @@ namespace Mono.Unix.Native {
return sys_snprintf (s, (ulong) s.Capacity, "%s", message);
}
#if !NETSTANDARD2_0
[CLSCompliant (false)]
[Obsolete ("Not necessarily portable due to cdecl restrictions.\n" +
"Use snprintf (StringBuilder, string) instead.")]
@@ -853,6 +864,7 @@ namespace Mono.Unix.Native {
Array.Copy (parameters, 0, _parameters, 3, parameters.Length);
return (int) XPrintfFunctions.snprintf (_parameters);
}
#endif
/*
* SKIP:
@@ -4387,6 +4387,7 @@ namespace Mono.Unix.Native {
return UnixMarshal.EscapeFormatString (message, new char[]{'m'});
}
#if !NETSTANDARD2_0
[Obsolete ("Not necessarily portable due to cdecl restrictions.\n" +
"Use syslog(SyslogFacility, SyslogLevel, string) instead.")]
public static int syslog (SyslogFacility facility, SyslogLevel level,
@@ -4415,6 +4416,7 @@ namespace Mono.Unix.Native {
Array.Copy (parameters, 0, _parameters, 2, parameters.Length);
return (int) XPrintfFunctions.syslog (_parameters);
}
#endif
[DllImport (MPH, SetLastError=true,
EntryPoint="Mono_Posix_Syscall_closelog")]
+25 -7
View File
@@ -300,17 +300,35 @@ public class UnixEncoding : Encoding
throw new ArgumentOutOfRangeException ("byteIndex", _("ArgRange_Array"));
}
unsafe {
fixed (char* p = s) {
fixed (byte* b = bytes) {
return GetBytes (p + charIndex, charCount, b + byteIndex, bytes.Length - byteIndex);
}
}
}
}
public unsafe override int GetBytes(char* chars, int charCount, byte* bytes, int byteCount)
{
if (bytes == null || chars == null)
throw new ArgumentNullException (bytes == null ? "bytes" : "chars");
if (charCount < 0 || byteCount < 0)
throw new ArgumentOutOfRangeException (charCount < 0 ? "charCount" : "byteCount");
// Convert the characters into bytes.
char ch;
int length = bytes.Length;
int length = byteCount;
uint pair;
int posn = byteIndex;
int posn = 0;
int charIndex = 0;
while (charCount > 0) {
// Fetch the next UTF-16 character pair value.
ch = s[charIndex++];
ch = chars [charIndex++];
if (ch >= '\uD800' && ch <= '\uDBFF' && charCount > 1) {
// This may be the start of a surrogate pair.
pair = (uint)(s[charIndex]);
pair = (uint)(chars[charIndex]);
if (pair >= (uint)0xDC00 && pair <= (uint)0xDFFF) {
pair = (pair - (uint)0xDC00) +
((((uint)ch) - (uint)0xD800) << 10) +
@@ -326,7 +344,7 @@ public class UnixEncoding : Encoding
}
charCount -= 2;
if (charCount >= 0) {
bytes[posn++] = (byte) s [charIndex++];
bytes[posn++] = (byte)chars [charIndex++];
}
continue;
} else {
@@ -365,7 +383,7 @@ public class UnixEncoding : Encoding
}
// Return the final count to the caller.
return posn - byteIndex;
return posn;
}
// Internal version of "GetCharCount" which can handle a rolling
@@ -394,7 +412,7 @@ public class UnixEncoding : Encoding
uint leftSoFar = (leftOverCount & (uint)0x0F);
uint leftSize = ((leftOverCount >> 4) & (uint)0x0F);
while (count > 0) {
ch = (uint)(bytes[index++]);
ch = (uint)(bytes [index++]);
++next_raw;
--count;
if (leftSize == 0) {
+30 -15
View File
@@ -325,27 +325,42 @@ namespace Mono.Unix {
if (encoding == null)
throw new ArgumentNullException ("encoding");
int min_byte_count = encoding.GetMaxByteCount(1);
char[] copy = s.ToCharArray (index, count);
byte[] marshal = new byte [encoding.GetByteCount (copy) + min_byte_count];
if (index < 0 || count < 0)
throw new ArgumentOutOfRangeException ((index < 0 ? "index" : "count"),
"Non - negative number required.");
int bytes_copied = encoding.GetBytes (copy, 0, copy.Length, marshal, 0);
if (s.Length - index < count)
throw new ArgumentOutOfRangeException ("s", "Index and count must refer to a location within the string.");
if (bytes_copied != (marshal.Length-min_byte_count))
throw new NotSupportedException ("encoding.GetBytes() doesn't equal encoding.GetByteCount()!");
int null_terminator_count = encoding.GetMaxByteCount (1);
int length_without_null = encoding.GetByteCount (s);
int marshalLength = checked (length_without_null + null_terminator_count);
IntPtr mem = AllocHeap (marshal.Length);
IntPtr mem = AllocHeap (marshalLength);
if (mem == IntPtr.Zero)
throw new UnixIOException (Native.Errno.ENOMEM);
bool copied = false;
try {
Marshal.Copy (marshal, 0, mem, marshal.Length);
copied = true;
}
finally {
if (!copied)
FreeHeap (mem);
unsafe {
fixed (char* p = s) {
byte* marshal = (byte*)mem;
int bytes_copied;
try {
bytes_copied = encoding.GetBytes (p + index, count, marshal, marshalLength);
} catch {
FreeHeap (mem);
throw;
}
if (bytes_copied != length_without_null) {
FreeHeap (mem);
throw new NotSupportedException ("encoding.GetBytes() doesn't equal encoding.GetByteCount()!");
}
marshal += length_without_null;
for (int i = 0; i < null_terminator_count; ++i)
marshal[i] = 0;
}
}
return mem;
@@ -56,7 +56,7 @@ namespace MonoTests.Mono.Unix.Native {
Assert.IsFalse (NativeConvert.ToSignum (st.signalReceived) == Signum.SIGURG,
"#IH: Signal Handler invoked when it should have been removed!");
}
#if !NETCOREAPP2_0
[Test]
// MSVCRT.DLL doesn't export snprintf(3).
[Category ("NotDotNet")]
@@ -92,6 +92,7 @@ namespace MonoTests.Mono.Unix.Native {
Assert.AreEqual (s.ToString(), expected,
"#SNPF: printf of many builtin types failed");
}
#endif
}
}
@@ -10,6 +10,7 @@
using NUnit.Framework;
using System;
using System.Diagnostics;
using System.Text;
using System.Threading;
using Mono.Unix;
@@ -25,12 +26,12 @@ namespace MonoTests.Mono.Unix {
static Thread CreateWaitSignalThread (UnixSignal signal, int timeout)
{
Thread t1 = new Thread(delegate() {
DateTime start = DateTime.Now;
var sw = Stopwatch.StartNew ();
bool r = signal.WaitOne (timeout, false);
DateTime end = DateTime.Now;
sw.Stop ();
Assert.AreEqual (signal.Count, 1);
Assert.AreEqual (r, true);
if ((end - start) > new TimeSpan (0, 0, timeout/1000))
if (sw.Elapsed > new TimeSpan (0, 0, timeout/1000))
throw new InvalidOperationException ("Signal slept too long");
});
return t1;
@@ -248,12 +249,12 @@ namespace MonoTests.Mono.Unix {
{
Thread t1 = new Thread (delegate () {
using (UnixSignal a = new UnixSignal (Signum.SIGINT)) {
DateTime start = DateTime.Now;
var sw = Stopwatch.StartNew ();
bool r = a.WaitOne (5000, false);
DateTime end = DateTime.Now;
sw.Stop ();
Assert.AreEqual (a.Count, 1);
Assert.AreEqual (r, true);
if ((end - start) > new TimeSpan (0, 0, 5))
if (sw.Elapsed > new TimeSpan (0, 0, 5))
throw new InvalidOperationException ("Signal slept too long");
}
});
@@ -272,12 +273,12 @@ namespace MonoTests.Mono.Unix {
{
Thread t1 = new Thread (delegate () {
using (UnixSignal a = new UnixSignal (Signum.SIGINT)) {
DateTime start = DateTime.Now;
var sw = Stopwatch.StartNew ();
int idx = UnixSignal.WaitAny (new UnixSignal[]{a}, 5000);
DateTime end = DateTime.Now;
sw.Stop ();
Assert.AreEqual (idx, 0);
Assert.AreEqual (a.Count, 1);
if ((end - start) > new TimeSpan (0, 0, 5))
if (sw.Elapsed > new TimeSpan (0, 0, 5))
throw new InvalidOperationException ("Signal slept too long");
}
});
@@ -297,13 +298,13 @@ namespace MonoTests.Mono.Unix {
Thread t1 = new Thread (delegate () {
using (UnixSignal a = new UnixSignal (Signum.SIGINT))
using (UnixSignal b = new UnixSignal (Signum.SIGTERM)) {
DateTime start = DateTime.Now;
var sw = Stopwatch.StartNew ();
int idx = UnixSignal.WaitAny (new UnixSignal[]{a, b}, 5000);
DateTime end = DateTime.Now;
sw.Stop ();
Assert.AreEqual (idx, 1);
Assert.AreEqual (a.Count, 0);
Assert.AreEqual (b.Count, 1);
if ((end - start) > new TimeSpan (0, 0, 5))
if (sw.Elapsed > new TimeSpan (0, 0, 5))
throw new InvalidOperationException ("Signal slept too long");
}
});
@@ -321,12 +322,12 @@ namespace MonoTests.Mono.Unix {
public void TestNoEmit ()
{
using (UnixSignal u = new UnixSignal (Signum.SIGINT)) {
DateTime start = DateTime.Now;
var sw = Stopwatch.StartNew ();
bool r = u.WaitOne (5100, false);
Assert.AreEqual (r, false);
DateTime end = DateTime.Now;
if ((end - start) < new TimeSpan (0, 0, 5))
throw new InvalidOperationException ("Signal didn't block for 5s; blocked for " + (end-start).ToString());
sw.Stop ();
if (sw.Elapsed < new TimeSpan (0, 0, 5))
throw new InvalidOperationException ("Signal didn't block for 5s; blocked for " + sw.Elapsed.TotalSeconds.ToString());
}
}
@@ -0,0 +1,21 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Reflection;
using System.Resources;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle ("Mono.Profiler.Log")]
[assembly: AssemblyDescription ("Mono Log Profiler API Library")]
[assembly: AssemblyCompany (Consts.MonoCompany)]
[assembly: AssemblyProduct (Consts.MonoProduct)]
[assembly: AssemblyCopyright (Consts.MonoCopyright)]
[assembly: AssemblyVersion (Consts.FxVersion)]
[assembly: SatelliteContractVersion (Consts.FxVersion)]
[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
[assembly: ComVisible (false)]
+12
View File
@@ -0,0 +1,12 @@
thisdir = class/Mono.Profiler.Log
include ../../build/rules.make
LIBRARY = Mono.Profiler.Log.dll
LIBRARY_SNK = ../mono.snk
LIB_REFS = System System.Core
LIB_MCS_FLAGS = /unsafe /keyfile:$(LIBRARY_SNK) /publicsign
NO_TEST = yes
include ../../build/library.make
@@ -0,0 +1,113 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{58A188CE-DED8-48B0-98B7-065A260D21DF}</ProjectGuid>
<OutputType>Library</OutputType>
<NoWarn>1699</NoWarn>
<HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Windows_NT'">win32</HostPlatform>
<HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Unix' and $([System.IO.File]::Exists('/usr/lib/libc.dylib'))">darwin</HostPlatform>
<HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Unix'">linux</HostPlatform>
<OutputPath>./../../class/lib/net_4_x-$(HostPlatform)</OutputPath>
<IntermediateOutputPath>obj-net_4_x-$(HostPlatform)</IntermediateOutputPath>
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
<NoStdLib>True</NoStdLib>
<NoConfig>True</NoConfig>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>
</RootNamespace>
<AssemblyName>Mono.Profiler.Log</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>../mono.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<NoWarn>1699</NoWarn>
<Optimize>false</Optimize>
<DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;MULTIPLEX_OS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<NoWarn>1699</NoWarn>
<Optimize>true</Optimize>
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;MULTIPLEX_OS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<PropertyGroup>
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<Compile Include="..\..\build\common\Consts.cs" />
<Compile Include="..\..\build\common\Locale.cs" />
<Compile Include="Assembly\AssemblyInfo.cs" />
<Compile Include="Mono.Profiler.Log\LogBufferHeader.cs" />
<Compile Include="Mono.Profiler.Log\LogEnums.cs" />
<Compile Include="Mono.Profiler.Log\LogEvent.cs" />
<Compile Include="Mono.Profiler.Log\LogEvents.cs" />
<Compile Include="Mono.Profiler.Log\LogEventVisitor.cs" />
<Compile Include="Mono.Profiler.Log\LogException.cs" />
<Compile Include="Mono.Profiler.Log\LogProcessor.cs" />
<Compile Include="Mono.Profiler.Log\LogReader.cs" />
<Compile Include="Mono.Profiler.Log\LogRuntimeProfiler.cs" />
<Compile Include="Mono.Profiler.Log\LogStream.cs" />
<Compile Include="Mono.Profiler.Log\LogStreamHeader.cs" />␍ </ItemGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<PropertyGroup>
<PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
</PreBuildEvent>
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">
</PreBuildEvent>
<PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
</PostBuildEvent>
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">
</PostBuildEvent>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../corlib/corlib-net_4_x.csproj">
<Project>{2CA6026B-2DC8-4C4C-A12C-1E8234049DB7}</Project>
<Name>corlib-net_4_x</Name>
</ProjectReference>
<ProjectReference Include="../System/System-net_4_x.csproj">
<Project>{2762E921-91A8-4C87-91E9-BA628013F753}</Project>
<Name>System-net_4_x</Name>
</ProjectReference>
<ProjectReference Include="../System.Core/System.Core-net_4_x.csproj">
<Project>{359142A1-D80F-401E-AA64-7167C9317649}</Project>
<Name>System.Core-net_4_x</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
</Project>
@@ -0,0 +1,14 @@
Assembly/AssemblyInfo.cs
../../build/common/Consts.cs
../../build/common/Locale.cs
Mono.Profiler.Log/LogBufferHeader.cs
Mono.Profiler.Log/LogEnums.cs
Mono.Profiler.Log/LogEvent.cs
Mono.Profiler.Log/LogEventVisitor.cs
Mono.Profiler.Log/LogEvents.cs
Mono.Profiler.Log/LogException.cs
Mono.Profiler.Log/LogProcessor.cs
Mono.Profiler.Log/LogReader.cs
Mono.Profiler.Log/LogRuntimeProfiler.cs
Mono.Profiler.Log/LogStream.cs
Mono.Profiler.Log/LogStreamHeader.cs
@@ -0,0 +1,46 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace Mono.Profiler.Log {
public sealed class LogBufferHeader {
const int Id = 0x4d504c01;
public LogStreamHeader StreamHeader { get; }
public int Length { get; }
public ulong TimeBase { get; }
public long PointerBase { get; }
public long ObjectBase { get; }
public long ThreadId { get; }
public long MethodBase { get; }
internal ulong CurrentTime { get; set; }
internal long CurrentMethod { get; set; }
internal LogBufferHeader (LogStreamHeader streamHeader, LogReader reader)
{
StreamHeader = streamHeader;
var id = reader.ReadInt32 ();
if (id != Id)
throw new LogException ($"Invalid buffer header ID (0x{id:X}).");
Length = reader.ReadInt32 ();
TimeBase = CurrentTime = reader.ReadUInt64 ();
PointerBase = reader.ReadInt64 ();
ObjectBase = reader.ReadInt64 ();
ThreadId = reader.ReadInt64 ();
MethodBase = CurrentMethod = reader.ReadInt64 ();
}
}
}
@@ -0,0 +1,212 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
namespace Mono.Profiler.Log {
// mono/profiler/log.h : TYPE_*
enum LogEventType {
Allocation = 0,
GC = 1,
Metadata = 2,
Method = 3,
Exception = 4,
Monitor = 5,
Heap = 6,
Sample = 7,
Runtime = 8,
Coverage = 9,
Meta = 10,
AllocationNoBacktrace = 0 << 4,
AllocationBacktrace = 1 << 4,
GCEvent = 1 << 4,
GCResize = 2 << 4,
GCMove = 3 << 4,
GCHandleCreationNoBacktrace = 4 << 4,
GCHandleDeletionNoBacktrace = 5 << 4,
GCHandleCreationBacktrace = 6 << 4,
GCHandleDeletionBacktrace = 7 << 4,
GCFinalizeBegin = 8 << 4,
GCFinalizeEnd = 9 << 4,
GCFinalizeObjectBegin = 10 << 4,
GCFinalizeObjectEnd = 11 << 4,
MetadataExtra = 0 << 4,
MetadataEndLoad = 2 << 4,
MetadataEndUnload = 4 << 4,
MethodLeave = 1 << 4,
MethodEnter = 2 << 4,
MethodLeaveExceptional = 3 << 4,
MethodJit = 4 << 4,
ExceptionThrowNoBacktrace = 0 << 7,
ExceptionThrowBacktrace = 1 << 7,
ExceptionClause = 1 << 4,
MonitorNoBacktrace = 0 << 7,
MonitorBacktrace = 1 << 7,
HeapBegin = 0 << 4,
HeapEnd = 1 << 4,
HeapObject = 2 << 4,
HeapRoots = 3 << 4,
SampleHit = 0 << 4,
SampleUnmanagedSymbol = 1 << 4,
SampleUnmanagedBinary = 2 << 4,
SampleCounterDescriptions = 3 << 4,
SampleCounters = 4 << 4,
RuntimeJitHelper = 1 << 4,
CoverageAssembly = 0 << 4,
CoverageMethod = 1 << 4,
CoverageStatement = 2 << 4,
CoverageClass = 3 << 4,
MetaSynchronizationPoint = 0 << 4,
}
// mono/profiler/log.h : TYPE_*
enum LogMetadataType {
Class = 1,
Image = 2,
Assembly = 3,
AppDomain = 4,
Thread = 5,
Context = 6,
}
// mono/utils/mono-counters.h : MONO_COUNTER_*
public enum LogCounterType {
Int32 = 0,
UInt32 = 1,
Word = 2,
Int64 = 3,
UInt64 = 4,
Double = 5,
String = 6,
Interval = 7,
}
// mono/utils/mono-counters.h : MONO_COUNTER_*
public enum LogCounterSection {
Jit = 1 << 8,
GC = 1 << 9,
Metadata = 1 << 10,
Generics = 1 << 11,
Security = 1 << 12,
Runtime = 1 << 13,
System = 1 << 14,
User = 1 << 15,
Profiler = 1 << 16,
}
// mono/utils/mono-counters.h : MONO_COUNTER_*
public enum LogCounterUnit {
Raw = 0 << 24,
Bytes = 1 << 24,
Time = 2 << 24,
Count = 3 << 24,
Percentage = 4 << 24,
}
// mono/utils/mono-counters.h : MONO_COUNTER_*
public enum LogCounterVariance {
Monotonic = 1 << 28,
Constant = 1 << 29,
Variable = 1 << 30,
}
// mono/metadata/profiler.h : MonoProfilerCodeBufferType
public enum LogJitHelper {
Unknown = 0,
Method = 1,
MethodTrampoline = 2,
UnboxTrampoline = 3,
ImtTrampoline = 4,
GenericsTrampoline = 5,
SpecificTrampoline = 6,
Helper = 7,
Monitor = 8,
DelegateInvoke = 9,
ExceptionHandling = 10,
}
// mono/profiler/log.h : SAMPLE_*
public enum LogSampleHitType {
Cycles = 1,
Instructions = 2,
CacheMisses = 3,
CacheHits = 4,
Branches = 5,
BranchMisses = 6,
}
// mono/metadata/profiler.h : MonoProfilerGCRootType
[Flags]
public enum LogHeapRootAttributes {
Pinning = 1 << 8,
WeakReference = 2 << 8,
Interior = 4 << 8,
Stack = 0,
Finalizer = 1,
Handle = 2,
Other = 3,
Miscellaneous = 4,
TypeMask = 0xff,
}
// mono/profiler/log.h : MonoProfilerMonitorEvent
public enum LogMonitorEvent {
Contention = 1,
Done = 2,
Fail = 3,
}
// mono/metadata/metadata.h : MonoExceptionEnum
public enum LogExceptionClause {
Catch = 0,
Filter = 1,
Finally = 2,
Fault = 4,
}
// mono/metadata/profiler.h : MonoProfilerGCEvent
public enum LogGCEvent {
Begin = 0,
MarkBegin = 1,
MarkEnd = 2,
ReclaimBegin = 3,
ReclaimEnd = 4,
End = 5,
PreStopWorld = 6,
PostStopWorld = 7,
PreStartWorld = 8,
PostStartWorld = 9,
PreStopWorldLocked = 10,
PostStartWorldUnlocked = 11,
}
// mono/metadata/mono-gc.h : MonoGCHandleType
public enum LogGCHandleType {
Weak = 0,
WeakTrackResurrection = 1,
Normal = 2,
Pinned = 3,
}
// mono/profiler/log.h : MonoProfilerSyncPointType
public enum LogSynchronizationPoint {
Periodic = 0,
WorldStop = 1,
WorldStart = 2,
}
}
@@ -0,0 +1,75 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections;
using System.Linq;
using System.Reflection;
using System.Text;
namespace Mono.Profiler.Log {
public abstract class LogEvent {
const BindingFlags PropertyFlags = BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public;
const string Indent = " ";
internal LogEvent ()
{
}
public LogBufferHeader Buffer { get; internal set; }
public ulong Timestamp { get; internal set; }
public override string ToString ()
{
var sb = new StringBuilder ();
ToString (this, sb, string.Empty, GetType ().Name, 0);
return sb.ToString ();
}
static void ToString (object source, StringBuilder result, string indent, string header, int level)
{
result.AppendLine ($"{indent}{header} {{");
foreach (var prop in source.GetType ().GetProperties (PropertyFlags).OrderBy (p => p.MetadataToken)) {
var name = prop.Name;
var propIndent = indent + Indent;
var value = prop.GetValue (source);
if (value is IList list) {
result.AppendLine ($"{propIndent}{name} = [{list.Count}] {{");
for (var i = 0; i < list.Count; i++) {
var elem = list [i];
var type = elem.GetType ();
var elemIndent = propIndent + Indent;
var elemHeader = $"[{i}] = ";
if (type.IsClass && type != typeof (string))
ToString (elem, result, elemIndent, $"{elemHeader}{type.Name}", level + 1);
else
result.AppendLine ($"{elemIndent}{elemHeader}{elem}");
}
result.AppendLine ($"{propIndent}}}");
} else
result.AppendLine ($"{propIndent}{name} = {value}");
}
var end = $"{indent}}}";
if (level == 0)
result.Append (end);
else
result.AppendLine (end);
}
internal abstract void Accept (LogEventVisitor visitor);
}
}
@@ -0,0 +1,197 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace Mono.Profiler.Log {
public abstract class LogEventVisitor {
public virtual void VisitBefore (LogEvent ev)
{
}
public virtual void VisitAfter (LogEvent ev)
{
}
public virtual void Visit (AppDomainLoadEvent ev)
{
}
public virtual void Visit (AppDomainUnloadEvent ev)
{
}
public virtual void Visit (AppDomainNameEvent ev)
{
}
public virtual void Visit (ContextLoadEvent ev)
{
}
public virtual void Visit (ContextUnloadEvent ev)
{
}
public virtual void Visit (ThreadStartEvent ev)
{
}
public virtual void Visit (ThreadEndEvent ev)
{
}
public virtual void Visit (ThreadNameEvent ev)
{
}
public virtual void Visit (ImageLoadEvent ev)
{
}
public virtual void Visit (ImageUnloadEvent ev)
{
}
public virtual void Visit (AssemblyLoadEvent ev)
{
}
public virtual void Visit (AssemblyUnloadEvent ev)
{
}
public virtual void Visit (ClassLoadEvent ev)
{
}
public virtual void Visit (JitEvent ev)
{
}
public virtual void Visit (JitHelperEvent ev)
{
}
public virtual void Visit (AllocationEvent ev)
{
}
public virtual void Visit (HeapBeginEvent ev)
{
}
public virtual void Visit (HeapEndEvent ev)
{
}
public virtual void Visit (HeapObjectEvent ev)
{
}
public virtual void Visit (HeapRootsEvent ev)
{
}
public virtual void Visit (GCEvent ev)
{
}
public virtual void Visit (GCResizeEvent ev)
{
}
public virtual void Visit (GCMoveEvent ev)
{
}
public virtual void Visit (GCHandleCreationEvent ev)
{
}
public virtual void Visit (GCHandleDeletionEvent ev)
{
}
public virtual void Visit (GCFinalizeBeginEvent ev)
{
}
public virtual void Visit (GCFinalizeEndEvent ev)
{
}
public virtual void Visit (GCFinalizeObjectBeginEvent ev)
{
}
public virtual void Visit (GCFinalizeObjectEndEvent ev)
{
}
public virtual void Visit (ThrowEvent ev)
{
}
public virtual void Visit (ExceptionClauseEvent ev)
{
}
public virtual void Visit (EnterEvent ev)
{
}
public virtual void Visit (LeaveEvent ev)
{
}
public virtual void Visit (ExceptionalLeaveEvent ev)
{
}
public virtual void Visit (MonitorEvent ev)
{
}
public virtual void Visit (SampleHitEvent ev)
{
}
public virtual void Visit (CounterSamplesEvent ev)
{
}
public virtual void Visit (CounterDescriptionsEvent ev)
{
}
public virtual void Visit (UnmanagedBinaryEvent ev)
{
}
public virtual void Visit (UnmanagedSymbolEvent ev)
{
}
public virtual void Visit (AssemblyCoverageEvent ev)
{
}
public virtual void Visit (ClassCoverageEvent ev)
{
}
public virtual void Visit (MethodCoverageEvent ev)
{
}
public virtual void Visit (StatementCoverageEvent ev)
{
}
public virtual void Visit (SynchronizationPointEvent ev)
{
}
}
}
@@ -0,0 +1,625 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
namespace Mono.Profiler.Log {
public sealed class AppDomainLoadEvent : LogEvent {
public long AppDomainId { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class AppDomainUnloadEvent : LogEvent {
public long AppDomainId { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class AppDomainNameEvent : LogEvent {
public long AppDomainId { get; internal set; }
public string Name { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class ContextLoadEvent : LogEvent {
public long ContextId { get; internal set; }
public long AppDomainId { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class ContextUnloadEvent : LogEvent {
public long ContextId { get; internal set; }
public long AppDomainId { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class ThreadStartEvent : LogEvent {
public long ThreadId { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class ThreadEndEvent : LogEvent {
public long ThreadId { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class ThreadNameEvent : LogEvent {
public long ThreadId { get; internal set; }
public string Name { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class ImageLoadEvent : LogEvent {
public long ImagePointer { get; internal set; }
public string Name { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class ImageUnloadEvent : LogEvent {
public long ImagePointer { get; internal set; }
public string Name { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class AssemblyLoadEvent : LogEvent {
public long AssemblyPointer { get; internal set; }
public long ImagePointer { get; internal set; }
public string Name { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class AssemblyUnloadEvent : LogEvent {
public long AssemblyPointer { get; internal set; }
public long ImagePointer { get; internal set; }
public string Name { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class ClassLoadEvent : LogEvent {
public long ClassPointer { get; internal set; }
public long ImagePointer { get; internal set; }
public string Name { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class JitEvent : LogEvent {
public long MethodPointer { get; internal set; }
public long CodePointer { get; internal set; }
public long CodeSize { get; internal set; }
public string Name { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class JitHelperEvent : LogEvent {
public LogJitHelper Type { get; internal set; }
public long BufferPointer { get; internal set; }
public long BufferSize { get; internal set; }
public string Name { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class AllocationEvent : LogEvent {
public long ClassPointer { get; internal set; }
public long ObjectPointer { get; internal set; }
public long ObjectSize { get; internal set; }
public IReadOnlyList<long> Backtrace { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class HeapBeginEvent : LogEvent {
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class HeapEndEvent : LogEvent {
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class HeapObjectEvent : LogEvent {
public struct HeapObjectReference {
public long Offset { get; internal set; }
public long ObjectPointer { get; internal set; }
}
public long ObjectPointer { get; internal set; }
public long ClassPointer { get; internal set; }
public long ObjectSize { get; internal set; }
public IReadOnlyList<HeapObjectReference> References { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class HeapRootsEvent : LogEvent {
public struct HeapRoot {
public long ObjectPointer { get; internal set; }
public LogHeapRootAttributes Attributes { get; internal set; }
public long ExtraInfo { get; internal set; }
}
public long MaxGenerationCollectionCount { get; internal set; }
public IReadOnlyList<HeapRoot> Roots { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class GCEvent : LogEvent {
public LogGCEvent Type { get; internal set; }
public byte Generation { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class GCResizeEvent : LogEvent {
public long NewSize { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class GCMoveEvent : LogEvent {
public IReadOnlyList<long> OldObjectPointers { get; internal set; }
public IReadOnlyList<long> NewObjectPointers { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class GCHandleCreationEvent : LogEvent {
public LogGCHandleType Type { get; internal set; }
public long Handle { get; internal set; }
public long ObjectPointer { get; internal set; }
public IReadOnlyList<long> Backtrace { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class GCHandleDeletionEvent : LogEvent {
public LogGCHandleType Type { get; internal set; }
public long Handle { get; internal set; }
public IReadOnlyList<long> Backtrace { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class GCFinalizeBeginEvent : LogEvent {
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class GCFinalizeEndEvent : LogEvent {
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class GCFinalizeObjectBeginEvent : LogEvent {
public long ObjectPointer { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class GCFinalizeObjectEndEvent : LogEvent {
public long ObjectPointer { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class ThrowEvent : LogEvent {
public long ObjectPointer { get; internal set; }
public IReadOnlyList<long> Backtrace { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class ExceptionClauseEvent : LogEvent {
public LogExceptionClause Type { get; internal set; }
public long Index { get; internal set; }
public long MethodPointer { get; internal set; }
public long ObjectPointer { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class EnterEvent : LogEvent {
public long MethodPointer { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class LeaveEvent : LogEvent {
public long MethodPointer { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class ExceptionalLeaveEvent : LogEvent {
public long MethodPointer { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class MonitorEvent : LogEvent {
public LogMonitorEvent Event { get; internal set; }
public long ObjectPointer { get; internal set; }
public IReadOnlyList<long> Backtrace { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class SampleHitEvent : LogEvent {
public LogSampleHitType Type { get; internal set; }
public long ThreadId { get; internal set; }
public IReadOnlyList<long> UnmanagedBacktrace { get; internal set; }
public IReadOnlyList<long> ManagedBacktrace { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class CounterSamplesEvent : LogEvent {
public struct CounterSample {
public long Index { get; internal set; }
public LogCounterType Type { get; internal set; }
public object Value { get; internal set; }
}
public IReadOnlyList<CounterSample> Samples { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class CounterDescriptionsEvent : LogEvent {
public struct CounterDescription {
public LogCounterSection Section { get; internal set; }
public string SectionName { get; internal set; }
public string CounterName { get; internal set; }
public LogCounterType Type { get; internal set; }
public LogCounterUnit Unit { get; internal set; }
public LogCounterVariance Variance { get; internal set; }
public long Index { get; internal set; }
}
public IReadOnlyList<CounterDescription> Descriptions { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class UnmanagedBinaryEvent : LogEvent {
public long SegmentPointer { get; internal set; }
public long SegmentOffset { get; internal set; }
public long SegmentSize { get; internal set; }
public string FileName { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class UnmanagedSymbolEvent : LogEvent {
public long CodePointer { get; internal set; }
public long CodeSize { get; internal set; }
public string Name { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class AssemblyCoverageEvent : LogEvent {
public string AssemblyName { get; internal set; }
public Guid Guid { get; internal set; }
public string FileName { get; internal set; }
public long NumberOfMethods { get; internal set; }
public long FullyCovered { get; internal set; }
public long PartiallyCovered { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class ClassCoverageEvent : LogEvent {
public string AssemblyName { get; internal set; }
public string ClassName { get; internal set; }
public long NumberOfMethods { get; internal set; }
public long FullyCovered { get; internal set; }
public long PartiallyCovered { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class MethodCoverageEvent : LogEvent {
public string AssemblyName { get; internal set; }
public string ClassName { get; internal set; }
public string MethodName { get; internal set; }
public string MethodSignature { get; internal set; }
public string FileName { get; internal set; }
public ulong MetadataToken { get; internal set; }
public long MethodId { get; internal set; }
public long NumberOfStatements { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class StatementCoverageEvent : LogEvent {
public long MethodId { get; internal set; }
public long RelativeILOffset { get; internal set; }
public ulong Counter { get; internal set; }
public long Line { get; internal set; }
public long Column { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
public sealed class SynchronizationPointEvent : LogEvent {
public LogSynchronizationPoint Type { get; internal set; }
internal override void Accept (LogEventVisitor visitor)
{
visitor.Visit (this);
}
}
}
@@ -0,0 +1,16 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
namespace Mono.Profiler.Log {
public sealed class LogException : Exception {
public LogException (string message)
: base (message)
{
}
}
}
@@ -0,0 +1,577 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading;
namespace Mono.Profiler.Log {
public sealed class LogProcessor {
public LogReader Reader { get; }
public LogEventVisitor ImmediateVisitor { get; }
public LogEventVisitor SortedVisitor { get; }
public LogStreamHeader StreamHeader { get; private set; }
LogBufferHeader _bufferHeader;
ulong _time;
bool _used;
public LogProcessor (LogReader reader, LogEventVisitor immediateVisitor, LogEventVisitor sortedVisitor)
{
if (reader == null)
throw new ArgumentNullException (nameof (reader));
Reader = reader;
ImmediateVisitor = immediateVisitor;
SortedVisitor = sortedVisitor;
}
public void Process ()
{
Process (CancellationToken.None);
}
static void ProcessEvent (LogEventVisitor visitor, LogEvent ev)
{
if (visitor != null) {
visitor.VisitBefore (ev);
ev.Accept (visitor);
visitor.VisitAfter (ev);
}
}
void ProcessEvents (List<LogEvent> events, CancellationToken token)
{
foreach (var ev in events.OrderBy (x => x.Timestamp)) {
token.ThrowIfCancellationRequested ();
ProcessEvent (SortedVisitor, ev);
}
events.Clear ();
}
public void Process (CancellationToken token)
{
if (_used)
throw new InvalidOperationException ("This log processor cannot be reused.");
_used = true;
StreamHeader = new LogStreamHeader (Reader);
var events = new List<LogEvent> (Environment.ProcessorCount * 1000);
while (!Reader.BaseStream.EndOfStream) {
token.ThrowIfCancellationRequested ();
_bufferHeader = new LogBufferHeader (StreamHeader, Reader);
// Use the manual position tracking in LogReader so we're
// compatible with non-seekable streams.
var goal = Reader.Position + _bufferHeader.Length;
while (Reader.Position < goal) {
token.ThrowIfCancellationRequested ();
var ev = ReadEvent ();
ProcessEvent (ImmediateVisitor, ev);
events.Add (ev);
if (ev is SynchronizationPointEvent)
ProcessEvents (events, token);
}
}
ProcessEvents (events, token);
}
LogEvent ReadEvent ()
{
var type = Reader.ReadByte ();
var basicType = (LogEventType) (type & 0xf);
var extType = (LogEventType) (type & 0xf0);
_time = ReadTime ();
switch (basicType) {
case LogEventType.Allocation:
switch (extType) {
case LogEventType.AllocationBacktrace:
case LogEventType.AllocationNoBacktrace:
return new AllocationEvent {
ClassPointer = ReadPointer (),
ObjectPointer = ReadObject (),
ObjectSize = (long) Reader.ReadULeb128 (),
Backtrace = ReadBacktrace (extType == LogEventType.AllocationBacktrace),
};
default:
throw new LogException ($"Invalid extended event type ({extType}).");
}
case LogEventType.GC:
switch (extType) {
case LogEventType.GCEvent:
return new GCEvent {
Type = (LogGCEvent) Reader.ReadByte (),
Generation = Reader.ReadByte (),
};
case LogEventType.GCResize:
return new GCResizeEvent {
NewSize = (long) Reader.ReadULeb128 (),
};
case LogEventType.GCMove: {
var list = new long [(int) Reader.ReadULeb128 ()];
for (var i = 0; i < list.Length; i++)
list [i] = ReadObject ();
return new GCMoveEvent {
OldObjectPointers = list.Where ((_, i) => i % 2 == 0).ToArray (),
NewObjectPointers = list.Where ((_, i) => i % 2 != 0).ToArray (),
};
}
case LogEventType.GCHandleCreationNoBacktrace:
case LogEventType.GCHandleCreationBacktrace:
return new GCHandleCreationEvent {
Type = (LogGCHandleType) Reader.ReadULeb128 (),
Handle = (long) Reader.ReadULeb128 (),
ObjectPointer = ReadObject (),
Backtrace = ReadBacktrace (extType == LogEventType.GCHandleCreationBacktrace),
};
case LogEventType.GCHandleDeletionNoBacktrace:
case LogEventType.GCHandleDeletionBacktrace:
return new GCHandleDeletionEvent {
Type = (LogGCHandleType) Reader.ReadULeb128 (),
Handle = (long) Reader.ReadULeb128 (),
Backtrace = ReadBacktrace (extType == LogEventType.GCHandleDeletionBacktrace),
};
case LogEventType.GCFinalizeBegin:
return new GCFinalizeBeginEvent ();
case LogEventType.GCFinalizeEnd:
return new GCFinalizeEndEvent ();
case LogEventType.GCFinalizeObjectBegin:
return new GCFinalizeObjectBeginEvent {
ObjectPointer = ReadObject (),
};
case LogEventType.GCFinalizeObjectEnd:
return new GCFinalizeObjectEndEvent {
ObjectPointer = ReadObject (),
};
default:
throw new LogException ($"Invalid extended event type ({extType}).");
}
case LogEventType.Metadata: {
var load = false;
var unload = false;
switch (extType) {
case LogEventType.MetadataExtra:
break;
case LogEventType.MetadataEndLoad:
load = true;
break;
case LogEventType.MetadataEndUnload:
unload = true;
break;
default:
throw new LogException ($"Invalid extended event type ({extType}).");
}
var metadataType = (LogMetadataType) Reader.ReadByte ();
switch (metadataType) {
case LogMetadataType.Class:
if (load) {
return new ClassLoadEvent {
ClassPointer = ReadPointer (),
ImagePointer = ReadPointer (),
Name = Reader.ReadCString (),
};
} else
throw new LogException ("Invalid class metadata event.");
case LogMetadataType.Image:
if (load) {
return new ImageLoadEvent {
ImagePointer = ReadPointer (),
Name = Reader.ReadCString (),
};
} else if (unload) {
return new ImageUnloadEvent {
ImagePointer = ReadPointer (),
Name = Reader.ReadCString (),
};
} else
throw new LogException ("Invalid image metadata event.");
case LogMetadataType.Assembly:
if (load) {
return new AssemblyLoadEvent {
AssemblyPointer = ReadPointer (),
ImagePointer = ReadPointer (),
Name = Reader.ReadCString (),
};
} else if (unload) {
return new AssemblyUnloadEvent {
AssemblyPointer = ReadPointer (),
ImagePointer = ReadPointer (),
Name = Reader.ReadCString (),
};
} else
throw new LogException ("Invalid assembly metadata event.");
case LogMetadataType.AppDomain:
if (load) {
return new AppDomainLoadEvent {
AppDomainId = ReadPointer (),
};
} else if (unload) {
return new AppDomainUnloadEvent {
AppDomainId = ReadPointer (),
};
} else {
return new AppDomainNameEvent {
AppDomainId = ReadPointer (),
Name = Reader.ReadCString (),
};
}
case LogMetadataType.Thread:
if (load) {
return new ThreadStartEvent {
ThreadId = ReadPointer (),
};
} else if (unload) {
return new ThreadEndEvent {
ThreadId = ReadPointer (),
};
} else {
return new ThreadNameEvent {
ThreadId = ReadPointer (),
Name = Reader.ReadCString (),
};
}
case LogMetadataType.Context:
if (load) {
return new ContextLoadEvent {
ContextId = ReadPointer (),
AppDomainId = ReadPointer (),
};
} else if (unload) {
return new ContextUnloadEvent {
ContextId = ReadPointer (),
AppDomainId = ReadPointer (),
};
} else
throw new LogException ("Invalid context metadata event.");
default:
throw new LogException ($"Invalid metadata type ({metadataType}).");
}
}
case LogEventType.Method:
switch (extType) {
case LogEventType.MethodLeave:
return new LeaveEvent {
MethodPointer = ReadMethod (),
};
case LogEventType.MethodEnter:
return new EnterEvent {
MethodPointer = ReadMethod (),
};
case LogEventType.MethodLeaveExceptional:
return new ExceptionalLeaveEvent {
MethodPointer = ReadMethod (),
};
case LogEventType.MethodJit:
return new JitEvent {
MethodPointer = ReadMethod (),
CodePointer = ReadPointer (),
CodeSize = (long) Reader.ReadULeb128 (),
Name = Reader.ReadCString (),
};
default:
throw new LogException ($"Invalid extended event type ({extType}).");
}
case LogEventType.Exception:
switch (extType) {
case LogEventType.ExceptionThrowNoBacktrace:
case LogEventType.ExceptionThrowBacktrace:
return new ThrowEvent {
ObjectPointer = ReadObject (),
Backtrace = ReadBacktrace (extType == LogEventType.ExceptionThrowBacktrace),
};
case LogEventType.ExceptionClause:
return new ExceptionClauseEvent {
Type = (LogExceptionClause) Reader.ReadByte (),
Index = (long) Reader.ReadULeb128 (),
MethodPointer = ReadMethod (),
ObjectPointer = ReadObject (),
};
default:
throw new LogException ($"Invalid extended event type ({extType}).");
}
case LogEventType.Monitor:
switch (extType) {
case LogEventType.MonitorNoBacktrace:
case LogEventType.MonitorBacktrace:
return new MonitorEvent {
Event = (LogMonitorEvent) Reader.ReadByte (),
ObjectPointer = ReadObject (),
Backtrace = ReadBacktrace (extType == LogEventType.MonitorBacktrace),
};
default:
throw new LogException ($"Invalid extended event type ({extType}).");
}
case LogEventType.Heap:
switch (extType) {
case LogEventType.HeapBegin:
return new HeapBeginEvent ();
case LogEventType.HeapEnd:
return new HeapEndEvent ();
case LogEventType.HeapObject: {
var ev = new HeapObjectEvent {
ObjectPointer = ReadObject (),
ClassPointer = ReadPointer (),
ObjectSize = (long) Reader.ReadULeb128 (),
};
var list = new HeapObjectEvent.HeapObjectReference [(int) Reader.ReadULeb128 ()];
for (var i = 0; i < list.Length; i++) {
list [i] = new HeapObjectEvent.HeapObjectReference {
Offset = (long) Reader.ReadULeb128 (),
ObjectPointer = ReadObject (),
};
}
ev.References = list;
return ev;
}
case LogEventType.HeapRoots: {
// TODO: This entire event makes no sense.
var ev = new HeapRootsEvent ();
var list = new HeapRootsEvent.HeapRoot [(int) Reader.ReadULeb128 ()];
ev.MaxGenerationCollectionCount = (long) Reader.ReadULeb128 ();
for (var i = 0; i < list.Length; i++) {
list [i] = new HeapRootsEvent.HeapRoot {
ObjectPointer = ReadObject (),
Attributes = (LogHeapRootAttributes) Reader.ReadByte (),
ExtraInfo = (long) Reader.ReadULeb128 (),
};
}
ev.Roots = list;
return ev;
}
default:
throw new LogException ($"Invalid extended event type ({extType}).");
}
case LogEventType.Sample:
switch (extType) {
case LogEventType.SampleHit:
return new SampleHitEvent {
Type = (LogSampleHitType) Reader.ReadByte (),
ThreadId = ReadPointer (),
UnmanagedBacktrace = ReadBacktrace (true, false),
ManagedBacktrace = ReadBacktrace (true),
};
case LogEventType.SampleUnmanagedSymbol:
return new UnmanagedSymbolEvent {
CodePointer = ReadPointer (),
CodeSize = (long) Reader.ReadULeb128 (),
Name = Reader.ReadCString (),
};
case LogEventType.SampleUnmanagedBinary:
return new UnmanagedBinaryEvent {
SegmentPointer = ReadPointer (),
SegmentOffset = (long) Reader.ReadULeb128 (),
SegmentSize = (long) Reader.ReadULeb128 (),
FileName = Reader.ReadCString (),
};
case LogEventType.SampleCounterDescriptions: {
var ev = new CounterDescriptionsEvent ();
var list = new CounterDescriptionsEvent.CounterDescription [(int) Reader.ReadULeb128 ()];
for (var i = 0; i < list.Length; i++) {
var section = (LogCounterSection) Reader.ReadULeb128 ();
list [i] = new CounterDescriptionsEvent.CounterDescription {
Section = section,
SectionName = section == LogCounterSection.User ? Reader.ReadCString () : string.Empty,
CounterName = Reader.ReadCString (),
Type = (LogCounterType) Reader.ReadByte (),
Unit = (LogCounterUnit) Reader.ReadByte (),
Variance = (LogCounterVariance) Reader.ReadByte (),
Index = (long) Reader.ReadULeb128 (),
};
}
ev.Descriptions = list;
return ev;
}
case LogEventType.SampleCounters: {
var ev = new CounterSamplesEvent ();
var list = new List<CounterSamplesEvent.CounterSample> ();
while (true) {
var index = (long) Reader.ReadULeb128 ();
if (index == 0)
break;
var counterType = (LogCounterType) Reader.ReadByte ();
object value = null;
switch (counterType) {
case LogCounterType.String:
value = Reader.ReadByte () == 1 ? Reader.ReadCString () : null;
break;
case LogCounterType.Int32:
case LogCounterType.Word:
case LogCounterType.Int64:
case LogCounterType.Interval:
value = Reader.ReadSLeb128 ();
break;
case LogCounterType.UInt32:
case LogCounterType.UInt64:
value = Reader.ReadULeb128 ();
break;
case LogCounterType.Double:
value = Reader.ReadDouble ();
break;
default:
throw new LogException ($"Invalid counter type ({counterType}).");
}
list.Add (new CounterSamplesEvent.CounterSample {
Index = index,
Type = counterType,
Value = value,
});
}
ev.Samples = list;
return ev;
}
default:
throw new LogException ($"Invalid extended event type ({extType}).");
}
case LogEventType.Runtime:
switch (extType) {
case LogEventType.RuntimeJitHelper: {
var helperType = (LogJitHelper) Reader.ReadByte ();
return new JitHelperEvent {
Type = helperType,
BufferPointer = ReadPointer (),
BufferSize = (long) Reader.ReadULeb128 (),
Name = helperType == LogJitHelper.SpecificTrampoline ? Reader.ReadCString () : string.Empty,
};
}
default:
throw new LogException ($"Invalid extended event type ({extType}).");
}
case LogEventType.Coverage:
switch (extType) {
case LogEventType.CoverageAssembly:
return new AssemblyCoverageEvent {
AssemblyName = Reader.ReadCString (),
Guid = Guid.Parse (Reader.ReadCString ()),
FileName = Reader.ReadCString (),
NumberOfMethods = (long) Reader.ReadULeb128 (),
FullyCovered = (long) Reader.ReadULeb128 (),
PartiallyCovered = (long) Reader.ReadULeb128 (),
};
case LogEventType.CoverageMethod:
return new MethodCoverageEvent {
AssemblyName = Reader.ReadCString (),
ClassName = Reader.ReadCString (),
MethodName = Reader.ReadCString (),
MethodSignature = Reader.ReadCString (),
FileName = Reader.ReadCString (),
MetadataToken = Reader.ReadULeb128 (),
MethodId = (long) Reader.ReadULeb128 (),
NumberOfStatements = (long) Reader.ReadULeb128 (),
};
case LogEventType.CoverageStatement:
return new StatementCoverageEvent {
MethodId = (long) Reader.ReadULeb128 (),
RelativeILOffset = (long) Reader.ReadULeb128 (),
Counter = Reader.ReadULeb128 (),
Line = (long) Reader.ReadULeb128 (),
Column = (long) Reader.ReadULeb128 (),
};
case LogEventType.CoverageClass:
return new ClassCoverageEvent {
AssemblyName = Reader.ReadCString (),
ClassName = Reader.ReadCString (),
NumberOfMethods = (long) Reader.ReadULeb128 (),
FullyCovered = (long) Reader.ReadULeb128 (),
PartiallyCovered = (long) Reader.ReadULeb128 (),
};
default:
throw new LogException ($"Invalid extended event type ({extType}).");
}
case LogEventType.Meta:
switch (extType) {
case LogEventType.MetaSynchronizationPoint:
return new SynchronizationPointEvent {
Type = (LogSynchronizationPoint) Reader.ReadByte (),
};
default:
throw new LogException ($"Invalid extended event type ({extType}).");
}
default:
throw new LogException ($"Invalid basic event type ({basicType}).");
}
}
long ReadPointer ()
{
var ptr = Reader.ReadSLeb128 () + _bufferHeader.PointerBase;
return StreamHeader.PointerSize == sizeof (long) ? ptr : ptr & 0xffffffffL;
}
long ReadObject ()
{
return Reader.ReadSLeb128 () + _bufferHeader.ObjectBase;
}
long ReadMethod ()
{
return _bufferHeader.CurrentMethod += Reader.ReadSLeb128 ();
}
ulong ReadTime ()
{
return _bufferHeader.CurrentTime += Reader.ReadULeb128 ();
}
IReadOnlyList<long> ReadBacktrace (bool actuallyRead, bool managed = true)
{
if (!actuallyRead)
return Array.Empty<long> ();
var list = new long [(int) Reader.ReadULeb128 ()];
for (var i = 0; i < list.Length; i++)
list [i] = managed ? ReadMethod () : ReadPointer ();
return list;
}
}
}
@@ -0,0 +1,157 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace Mono.Profiler.Log {
public sealed class LogReader : IDisposable {
public static Encoding Encoding { get; } = Encoding.UTF8;
public LogStream BaseStream => (LogStream) _reader.BaseStream;
public long Position { get; private set; }
readonly BinaryReader _reader;
byte[] _stringBuffer = new byte [1024];
public LogReader (LogStream stream, bool leaveOpen)
{
_reader = new BinaryReader (stream, Encoding, leaveOpen);
}
public void Dispose ()
{
_reader.Dispose ();
}
internal byte ReadByte ()
{
var b = _reader.ReadByte ();
Position += sizeof (byte);
return b;
}
internal ushort ReadUInt16 ()
{
var i = _reader.ReadUInt16 ();
Position += sizeof (ushort);
return i;
}
internal int ReadInt32 ()
{
var i = _reader.ReadInt32 ();
Position += sizeof (int);
return i;
}
internal long ReadInt64 ()
{
var i = _reader.ReadInt64 ();
Position += sizeof (long);
return i;
}
internal ulong ReadUInt64 ()
{
var i = _reader.ReadUInt64 ();
Position += sizeof (ulong);
return i;
}
internal double ReadDouble ()
{
var d = _reader.ReadDouble ();
Position += sizeof (double);
return d;
}
internal string ReadHeaderString ()
{
var bytes = new byte [ReadInt32 ()];
// ReadBytes doesn't necessarily read the specified amount of
// bytes, so just do it this way.
for (var i = 0; i < bytes.Length; i++)
bytes [i] = ReadByte ();
return Encoding.GetString (bytes);
}
internal string ReadCString ()
{
var pos = 0;
byte val;
while ((val = ReadByte ()) != 0) {
if (pos == _stringBuffer.Length)
Array.Resize (ref _stringBuffer, System.Math.Max (_stringBuffer.Length * 2, pos + 1));
_stringBuffer [pos++] = val;
}
return Encoding.GetString (_stringBuffer, 0, pos);
}
internal long ReadSLeb128 ()
{
long result = 0;
var shift = 0;
while (true) {
var b = ReadByte ();
result |= (long) (b & 0x7f) << shift;
shift += 7;
if ((b & 0x80) != 0x80) {
if (shift < sizeof (long) * 8 && (b & 0x40) == 0x40)
result |= -(1L << shift);
break;
}
}
return result;
}
internal ulong ReadULeb128 ()
{
ulong result = 0;
var shift = 0;
while (true) {
var b = ReadByte ();
result |= (ulong) (b & 0x7f) << shift;
if ((b & 0x80) != 0x80)
break;
shift += 7;
}
return result;
}
}
}
@@ -0,0 +1,13 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Runtime.InteropServices;
namespace Mono.Profiler.Log {
public static class LogRuntimeProfiler {
// TODO: Runtime profiler interface.
}
}
@@ -0,0 +1,71 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.IO;
namespace Mono.Profiler.Log {
public class LogStream : Stream {
public Stream BaseStream { get; }
public virtual bool EndOfStream => BaseStream.Position == BaseStream.Length;
public override bool CanRead => true;
public override bool CanSeek => false;
public override bool CanWrite => false;
public override long Length => throw new NotSupportedException ();
public override long Position {
get => throw new NotSupportedException ();
set => throw new NotSupportedException ();
}
public LogStream (Stream baseStream)
{
if (baseStream == null)
throw new ArgumentNullException (nameof (baseStream));
if (!baseStream.CanRead)
throw new ArgumentException ("Stream does not support reading.", nameof (baseStream));
BaseStream = baseStream;
}
protected override void Dispose (bool disposing)
{
if (disposing)
BaseStream.Dispose ();
}
public override void Flush ()
{
throw new NotSupportedException ();
}
public override int Read (byte[] buffer, int offset, int count)
{
return BaseStream.Read (buffer, offset, count);
}
public override long Seek (long offset, SeekOrigin origin)
{
throw new NotSupportedException ();
}
public override void SetLength (long value)
{
throw new NotSupportedException ();
}
public override void Write (byte[] buffer, int offset, int count)
{
throw new NotSupportedException ();
}
}
}
@@ -0,0 +1,55 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
namespace Mono.Profiler.Log {
public sealed class LogStreamHeader {
const int Id = 0x4d505a01;
public Version Version { get; }
public int FormatVersion { get; }
public byte PointerSize { get; }
public ulong StartupTime { get; }
public int TimerOverhead { get; }
public int Flags { get; }
public int ProcessId { get; }
public int Port { get; }
public string Arguments { get; }
public string Architecture { get; }
public string OperatingSystem { get; }
internal LogStreamHeader (LogReader reader)
{
var id = reader.ReadInt32 ();
if (id != Id)
throw new LogException ($"Invalid stream header ID (0x{id:X}).");
Version = new Version (reader.ReadByte (), reader.ReadByte ());
FormatVersion = reader.ReadByte ();
PointerSize = reader.ReadByte ();
StartupTime = reader.ReadUInt64 ();
TimerOverhead = reader.ReadInt32 ();
Flags = reader.ReadInt32 ();
ProcessId = reader.ReadInt32 ();
Port = reader.ReadUInt16 ();
Arguments = reader.ReadHeaderString ();
Architecture = reader.ReadHeaderString ();
OperatingSystem = reader.ReadHeaderString ();
}
}
}
@@ -27,6 +27,7 @@ using System;
using System.IO;
using System.Net;
using System.Net.Security;
using System.Threading;
using System.Threading.Tasks;
using SSA = System.Security.Authentication;
using System.Security.Cryptography.X509Certificates;
@@ -86,6 +87,10 @@ namespace Mono.Security.Interface
void EndWrite (IAsyncResult asyncResult);
Task WriteAsync (byte[] buffer, int offset, int count, CancellationToken cancellationToken);
Task ShutdownAsync ();
TransportContext TransportContext {
get;
}
@@ -387,7 +387,7 @@ namespace Mono.Security.X509 {
byte[] nullPassword = {0, 0};
calculatedMac = MAC(nullPassword, macSalt.Value, _iterations, authSafeData);
if (!Compare (macValue, calculatedMac))
throw new CryptographicException ("Invalid MAC - file may have been tampe red!");
throw new CryptographicException ("Invalid MAC - file may have been tampered with!");
_password = nullPassword;
}
}
@@ -27,6 +27,7 @@ Mono.Security.Cryptography/PKCS8Test.cs
Mono.Security.Cryptography/RSAManagedTest.cs
Mono.Security.Cryptography/SHA224ManagedTest.cs
Mono.Security.Cryptography/SHA224Test.cs
Mono.Security.Interface/TestProvider.cs
Mono.Security.Protocol.Ntlm/ChallengeResponseTest.cs
Mono.Security.Protocol.Ntlm/MessageBaseTest.cs
Mono.Security.Protocol.Ntlm/Type1MessageTest.cs
@@ -0,0 +1,47 @@
//
// TestProvider.cs
//
// Author:
// Martin Baulig <[email protected]>
//
// Copyright (c) 2017 Xamarin, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
using System.IO;
using System.Security.Cryptography;
using System.Text;
using Mono.Security;
using Mono.Security.Interface;
using NUnit.Framework;
namespace MonoTests.Mono.Security
{
[TestFixture]
public class TestProvider
{
[Test]
public void GetProvider ()
{
var provider = MonoTlsProviderFactory.GetProvider ();
Assert.IsNotNull (provider, "TLS Provider");
}
}
}
@@ -310,19 +310,20 @@ namespace System.IO.MemoryMappedFiles
[MonoLimitation ("Named mappings scope is process local")]
public static MemoryMappedFile OpenExisting (string mapName)
{
throw new NotImplementedException ();
return OpenExisting (mapName, MemoryMappedFileRights.ReadWrite);
}
[MonoLimitation ("Named mappings scope is process local")]
public static MemoryMappedFile OpenExisting (string mapName, MemoryMappedFileRights desiredAccessRights)
{
throw new NotImplementedException ();
return OpenExisting (mapName, desiredAccessRights, HandleInheritability.None);
}
[MonoLimitation ("Named mappings scope is process local")]
public static MemoryMappedFile OpenExisting (string mapName, MemoryMappedFileRights desiredAccessRights, HandleInheritability inheritability)
{
throw new NotImplementedException ();
// FIXME: Actually use desiredAccessRights
return CoreShmCreate (mapName, 0, MemoryMappedFileAccess.ReadWrite, MemoryMappedFileOptions.None, null, inheritability, FileMode.Open);
}
public MemoryMappedViewStream CreateViewStream ()
@@ -393,10 +394,9 @@ namespace System.IO.MemoryMappedFiles
throw new NotImplementedException ();
}
[MonoTODO]
public SafeMemoryMappedFileHandle SafeMemoryMappedFileHandle {
get {
throw new NotImplementedException ();
return handle;
}
}
@@ -301,9 +301,12 @@ namespace MonoTests.System.IO.MemoryMappedFiles {
var name = MkNamedMapping ();
using (var m0 = MemoryMappedFile.CreateNew(name, 4096, MemoryMappedFileAccess.ReadWrite)) {
using (var m1 = MemoryMappedFile.CreateOrOpen (name, 4096, MemoryMappedFileAccess.ReadWrite)) {
using (MemoryMappedViewAccessor v0 = m0.CreateViewAccessor (), v1 = m1.CreateViewAccessor ()) {
v0.Write (10, 0x12345);
Assert.AreEqual (0x12345, v1.ReadInt32 (10));
using (var m2 = MemoryMappedFile.OpenExisting (name)) {
using (MemoryMappedViewAccessor v0 = m0.CreateViewAccessor (), v1 = m1.CreateViewAccessor (), v2 = m2.CreateViewAccessor ()) {
v0.Write (10, 0x12345);
Assert.AreEqual (0x12345, v1.ReadInt32 (10));
Assert.AreEqual (0x12345, v2.ReadInt32 (10));
}
}
}
}
@@ -466,5 +469,13 @@ namespace MonoTests.System.IO.MemoryMappedFiles {
}
}
}
[Test]
public void OpenExistingWithNoExistingThrows()
{
Assert.Throws<FileNotFoundException>(() => {
MemoryMappedFile.OpenExisting (MkNamedMapping ());
});
}
}
}
@@ -0,0 +1,14 @@
#include common_System.Core.dll.sources
#include dynamic_System.Core.dll.sources
System.Security.Cryptography/AesCryptoServiceProvider.cs
System.Security.Cryptography/AesTransform.cs
System.Security.Cryptography/MD5Cng.cs
System.Security.Cryptography/SHA1Cng.cs
System.Security.Cryptography/SHA256Cng.cs
System.Security.Cryptography/SHA384Cng.cs
System.Security.Cryptography/SHA512Cng.cs
../referencesource/System.Core/System/Security/Cryptography/AesManaged.cs
../referencesource/System.Core/System/Security/Cryptography/ECDiffieHellman.cs
../referencesource/System.Core/System/Security/Cryptography/ECKeyXmlFormat.cs
@@ -0,0 +1 @@
#include mobile_System.Data.dll.sources
Loaded 100 of 817 files, more files were not shown because too many files have changed in this diff. Show more