Compare commits

...
212 Commits
Author SHA1 Message Date
Alexander Köplinger b538187892 [ci] Update osx-package.groovy to fix package build 2019-02-01 11:06:03 +01:00
monojenkins 1028e14aef [2018-08] [Network] Fix CVE 2018-8292 on Mac OS X. (#12153)
* [Network] Fix CVE 2018-8292 on Mac OS X.

This commit ensures that CVE 2018-8292 is fixed by not setting
auto-redirect in the first request done by CFNetwork. CFNetwork has the
same bug, but we can work around it by performing the first request,
checking the response and, if it is a rediret, follow it without the
Authorization headers.

* No need to close the obc, it can be reused.

* Small typo.

* Fix error while chaging the request :/

* Minor style changes.
2019-02-01 10:03:04 +01:00
Martin Baulig 62031dcabf Use 'OnlyFaulted' only. 2019-01-29 16:46:29 +01:00
Martin Baulig a6203e5d2d Add TaskContinuationOptions.OnlyOnFaulted | TaskContinuationOptions.OnlyOnCanceled as suggested by Marek. 2019-01-29 16:46:29 +01:00
Martin Baulig b493ada939 [System]Make sure HttpWebRequest observes exceptions on timeout. #10488.
`HttpWebRequest.RunWithTimeoutWorker()` needs to observe the worker task's exception
on timeout to prevent it from being thrown via the `TaskScheduler.UnobservedTaskException`
event.  Fixes #10488.
2019-01-29 16:46:29 +01:00
Egor Bogatov 000780ca82 [2018-04] Add non-generic AsyncValueTaskMethodBuilder, etc (#11747)
Fixes https://github.com/mono/mono/issues/11731
2018-11-20 17:46:04 +01:00
monojenkins 969357ac02 Bump API snapshot submodule 2018-10-07 15:26:19 +02:00
Marek Safar fb7bbea8f9 Bump corefx 2018-10-07 15:26:19 +02:00
monojenkins 1fd01f4fd7 [2018-04] [runtime] Disable stack guard for main thread on osx (#10904)
* [runtime] Disable stack guard for main thread on osx

On macOS Mojave, it seems that changing the mapping of stack pages for main thread can lead to corruption bugs.

https://github.com/mono/mono/issues/10802

* [runtime] Fix undefined pthread_main_np (#10930)

It is exported only when _DARWIN_C_SOURCE is defined.
2018-10-03 16:34:57 +02:00
monojenkins e1af6ea5e7 [sdks] One more update to get XA PR builds working on Linux (#10854)
It turns out some Debian versions identify themselves as `Debian GNU/Linux`, add
this string to the list of distributions which have mingw. This *should* fix the
PR builds (fingers crossed)
2018-09-27 21:30:55 -04:00
monojenkins 288a9254f5 [merp] Fix return value handling of posix_spawn (#10829) 2018-09-27 10:31:17 -04:00
Marek Habersack d95b5e57c4 [sdks] Debian Linux doesn't need to build MXE
Debian and its derivatives include full mingw chain (both 64 and 32-bit) and so
they don't need to build the toolchain at all. However, the current detection of
Linux flavor takes into account only Ubuntu and all other distros are configured
to *require* MXE but they do *not* build them.

This commit fixes detection of distros which provide the mingw toolchain in a
way that makes it easy to extend the set of compatible distributions as needed.
In order to mark a distribution as one with MinGW one has to add the `:Distro:`
string to the `LINUX_WITH_MINGW` make variable in `mxe.mk`. The `Distro` string
is whatever the `determine-linux-flavor.sh` script returns.
2018-09-27 09:33:32 +02:00
monojenkins 1d40dbb42e [SDKS] Build host runtime with correct bitness (#10776)
When building 32-bit binaries on a 64-bit system and vice versa, it is necessary
to pass the `-m32` or `-m64` compiler flags, respectively. Failure to do so will
result not only in linking problems (different binary architecture) but also in
problems when using some system headers which are sensitive to the architecture.
For instance, `ucontext.h` contains register set definitions for different
architectures and building Mono runtime with a 64-bit compiler targetting 32-bit
architecture results in this error:

   .../mono/mono/utils/mono-sigcontext.h:173:74: error: ‘REG_EIP’ undeclared (first use in this function); did you mean ‘REG_RIP’?
      #define UCONTEXT_REG_EIP(ctx) (((ucontext_t*)(ctx))->uc_mcontext.gregs [REG_EIP])

The issue here is that the compiler defines the `__x86_64__` macro which causes
`ucontext.h` to choose declarations for amd64 (which does not use `REG_EIP` but
has `REG_RIP` instead) while Mono runtime assumes its building for a 32-bit host
and uses 32-bit register names. Passing `-m32` to the compiler will fix the
issue as now the compiler will define the `__i386__` macro and all parties will
agree where they are and what they want.

This commit uses a rather baroque statement when constructing compiler flags to
build the Mono runtime to check whether the host triple targets 32 or 64-bit
host and adds the appropriate flag.
2018-09-24 22:37:56 +02:00
monojenkins 5b9b00dd61 [crash] Fix summarize_frame assertion (#10726) 2018-09-21 10:33:40 -04:00
monojenkins 99f7533b63 Bump API snapshot submodule 2018-09-20 13:05:31 +02:00
Marek Safar 33a0966d83 [mcs] Removes tests which depend on new public APIs 2018-09-20 13:05:31 +02:00
Marek Safar 4d8bdab15e [mcs] Don't report internal error when Span type is not available 2018-09-20 13:05:31 +02:00
Marek Safar 4309250dcd [corlib] Hide types which could conflict with System.Memory 2018-09-20 13:05:31 +02:00
monojenkins 2334327c43 [offset-tool] Error out when parsing fails. (#10697) 2018-09-19 17:16:17 -04:00
monojenkins ddb9dc31f3 Bump API snapshot submodule 2018-09-18 16:42:59 +02:00
monojenkins 9fca0d8760 [2018-04] [Facades] Adds System.Threading.Tasks.Extensions for mobile profiles (#9977) 2018-09-18 16:42:59 +02:00
Marek Safar 46ff31252d [Facades] Removes System.Memory 2018-09-10 14:33:37 +02:00
Alexander Köplinger 72175aa65a [ci] Fix run-test-mac-sdk.sh build
0dbcdd5 added CFLAGS etc in front of the command but that's not something the TESTCMD can execute.
We shouldn't pass CFLAGS etc at all for this since that is handled by bockbuild.
2018-09-07 17:25:52 +02:00
monojenkins 0f3df535f2 [2018-04] Ensure the finalization in DeflateStream is performed in the correct order. (#10354)
* Ensure the finalization of SafeHandle and GCHandle in DeflateStreamNative is performed in the correct order.

* Do not access BaseStream from finalizer.
2018-09-06 18:52:14 -04:00
monojenkins 93b43680c0 [2018-04] [corlib] Bring back String.Concat with __arglist (#10460)
Backport of #10452.
Fixes #9996
Tested repro project from the link on a local PostgresSQL server and EntityFramework packages.

See https://github.com/aspnet/EntityFramework6/blob/master/src/EntityFramework/Core/Objects/ELinq/MethodCallTranslator.cs#L1482-L1497
2018-09-04 13:14:59 +02:00
Ludovic Henry cca6805688 [2018-04] [sdks] Add cross-{arm,arm64,x86,x86_64}{,-win} runtimes for XA (#10395)
* [sdks] Add CrossRuntimeTemplate

* [sdks] Add cross-{arm,arm64,x86,x86_64}{,-win} runtimes for XA

* [sdks] Factor various variables for RuntimeTemplate

* [sdks] Make LLVM work on CI

A global CFLAGS would be set in `run-jenkins.sh`, and that would screw up with LLVM. The global CFLAGS makes sense as long as we are only building Mono, but that's not the case with LLVM anymore.
2018-08-31 14:52:35 -04:00
Ludovic Henry 82b313a29e [sdb] Disable an assert to avoid breaking debugging. (#10313)
Fixes https://github.com/mono/mono/issues/8848.
Fixes https://github.com/mono/mono/issues/9262.
Fixes https://github.com/mono/mono/issues/8627.
2018-08-28 07:48:16 -04:00
Alexander Kyte cedb9d921d [2018-04] Add pipeline to convert managed exception into telemetry format (#10248) 2018-08-27 15:56:33 -04:00
Ludovic Henry e613a64b4f [sdks] Fix typo (#10308) 2018-08-27 10:57:23 -04:00
Ludovic Henry e2018ed1e7 [2018-04] [sdks] Fix llvm local variable names (#10300)
* [sdks] Fix llvm local variable names

* [sdks] Allow for overwriting llvm-{llvm32,llvm64} CC and CXX
2018-08-27 07:57:04 -04:00
Marek Habersack d092c53b97 [eglib] Fix URI to file name conversion
Hexadecimal ASCII to decimal integer conversion must be 10-based.
2018-08-24 09:26:51 +02:00
Alexander Köplinger 582f242d47 Bump xunit-binaries
Gets in fix for invalid NUnit xml output generated by xunit

(cherry picked from commit 0955dd2307)
2018-08-22 13:16:27 +02:00
Alexander Köplinger ad910039be Bump nunitlite to get NUnit2 xml output fix and failure on file not found fix (#10188)
See mono/NUnitLite#11 and mono/NUnitLite#12

(cherry picked from commit 8f67fb9fb1)
2018-08-20 14:42:59 +02:00
monojenkins 172a5333ba [System.Xml.Linq] Fix namespace conflict with new Xamarin.Mac namespace in test code. (#10184)
macOS 10.14 introduces a Network framework, which means Xamarin.Mac now has a Network namespace.

This conflicts with 'using Network = System.Net':

> mono/mcs/class/System.Xml.Linq/Test/System.Xml.Schema/ExtensionsTest.cs(97,27): error CS0576: Namespace '<global namespace>' contains a definition conflicting with alias 'Network'

so just remove the using and use the full 'System.Net' namespace instead.
2018-08-20 12:10:54 +02:00
EgorBo f3a2216b65 backport #9800 to 2018-04 2018-08-03 14:09:39 +02:00
Ankit Jain 07ac089735 Bump msbuild to track mono-2018-04 (#9834)
Pick up fix for https://github.com/xamarin/xamarin-android/issues/1845 .
2018-08-02 00:34:55 +02:00
monojenkins d31dbe843a Apply F# portable pdb debug fix for pinvokes & bump (#9798)
It wasn't possible to debug any F# app that contained PInvokes.
The F# compiler omitted MethodDebuginformation for PInvokes which in
turn caused Mono to fail on an assertion.

```
* Assertion at metadata.c:1117, condition `idx < t->rows' not met
```
2018-07-30 12:43:25 +02:00
Marek Safar a4ac628267 [corlib] Disable comparer xunit tests because we are still running referencesource version on mobile 2018-07-27 00:41:04 +02:00
Marek Safar 4f10cd1027 [corlib] Disable broken corefx tests 2018-07-24 14:42:54 +02:00
Bernhard Urban 16538b28e3 [TermInfo] fix reading integer value for new file format
16bit vs. 32bit only applies for offsets, not for actual entries in the
file format.

Fixes https://github.com/mono/mono/issues/8340
2018-07-20 10:38:46 +02:00
Marek Safar e92217aad3 Bump bockbuild 2018-07-19 21:40:59 +02:00
monojenkins b25c713504 [llvm] Avoid using the preserveall calling convention in another place on watchos. (#9579)
Fixes https://github.com/mono/mono/issues/9318.
2018-07-19 12:45:31 +02:00
monojenkins ebc0c7c215 Fix LogcatTextWriter_Log interpreting messages it logs, potentially writing random garbage and/or crashing (introduced by https://github.com/mono/mono/commit/984f6484666c2ee6fefec949c81fdff1189c9488) (Fixes https://github.com/xamarin/xamarin-android/issues/1951) (#9614) 2018-07-18 11:41:22 -04:00
monojenkins d851c21b1f [runtime] Make sigterm dumper send file to merp (#9608) 2018-07-18 11:39:23 -04:00
monojenkins d4a680b045 [arm64] Make OP_CHECK_THIS read only a byte, to prevent unaligned access errors. (#9545) 2018-07-14 10:45:31 +02:00
Alexander Köplinger 0d29bd39f1 Merge pull request #9484 from alexanderkyte/2018-04-merp_params
[Backport 2018-04] Add merp parameters
2018-07-12 21:16:05 +02:00
monojenkins 2e6757dae9 [sdk] Do not fix android platform-tools version. Make it configurable. (#9509)
[2018-04] [sdk] Do not fix android platform-tools version. Make it configurable.

Backport of #9473.

/cc @lewurm
2018-07-12 07:40:50 -04:00
Alexander Kyte 6a7c7f6853 [runtime] Enable application to register path for MERP restart 2018-07-10 15:30:26 -04:00
Alexander Kyte ba63aa3589 [runtime] Make merp eventType icall argument 2018-07-10 15:29:59 -04:00
Jay Krell 9d4d9a8668 [Coop] Convert Mono.Runtime to coop. (#8599) 2018-07-10 15:29:32 -04:00
Zoltan Varga c95a4a2d2c [llvm] Avoid using the preserveall calling convention on watchos, xcode10 asserts on it.
Fixes https://github.com/mono/mono/issues/9318.
2018-07-10 10:45:23 +02:00
Alexis Christoforides 5f411d9696 Merge pull request #9445 from monojenkins/backport-pr-9440-to-2018-04
[2018-04] Add another Darwin file system
2018-07-06 19:03:25 -04:00
Miguel de Icaza c03434f8f4 Add another Darwin file system
This prevents a test failure when Time Machine partitions are mounted on the
host running the test.
2018-07-06 14:44:41 +00:00
Alexander Köplinger 9d69811fd6 Bump bockbuild 2018-07-02 23:18:00 +02:00
monojenkins 2389814c3c [runtime] Fix the --enable-minimal=aot build. (#9393)
Fixes https://github.com/mono/mono/issues/8430.
2018-07-02 18:31:17 +02:00
Bernhard Urban 5a3352aba2 [interp] fix scope issue regarding klass var (#9377)
[2018-04] [interp] fix scope issue regarding `klass` var

`klass` exists in the main loop, but we defined `klass` again inside the
block, so the outer `klass` never had the right value.

Fixes https://github.com/mono/mono/issues/9023

Backport of https://github.com/mono/mono/pull/9348#issuecomment-401305916
2018-06-30 01:25:24 -04:00
monojenkins 0a4c7bb91b [mini] add workaround for AMD Ryzen Threadripper issue (#9357)
[2018-04] [mini] add workaround for AMD Ryzen Threadripper issue

Backport of #9321.

/cc @lewurm
2018-06-29 19:40:37 -04:00
Marek Safar 33b8e6c418 [build] Skips RemoteExecuted bases tests on monodroid
The proper implementation will be written later
2018-06-30 00:09:15 +02:00
monojenkins c060398eae [2018-04] [sdks] Only rebuild MXE when it doesn't exist, not when we just cloned the sources (#9365)
* [sdks] Only rebuild MXE when it doesn't exist, not when we just cloned the sources

* [sdks] Default to ~/android-toolchain and ~/android-archives to better share with XA
2018-06-29 14:15:59 +02:00
Alexander Kyte 095dbce56f Merge pull request #9329 from monojenkins/backport-pr-9274-to-2018-04
[2018-04] Make requested MERP file format changes
2018-06-28 11:35:09 -04:00
Marek Safar c2f12ea864 Bump linker 2018-06-28 13:26:24 +02:00
Martin Baulig d0bb0ce89f [System]: HttpWebRequest now throws WebExceptionStatus.RequestCanceled on abort. (#9212) (#9304)
* [System]: `HttpWebRequest` now throws `WebExceptionStatus.RequestCanceled` on abort.  #9031.

Cleanup the internal `HttpWebRequest.RunWithTimeout()` function and use
`GetWebException()` everywhere to throw `WebException` with
`WebExceptionStatus.RequestCanceled` on abort.

New tests for this will be added to the web-tests by extending the existing
`Xamarin.WebTests.HttpInstrumentationTests.AbortDuringHandshake` to check the
synchronous and begin/end async APIs as well, using both `GET` and `POST`.

See https://github.com/xamarin/web-tests/blob/master/Xamarin.WebTests.Tests/Xamarin.WebTests.HttpInstrumentationTests/AbortDuringHandshake.cs.

Fixes #9031.

* Fix exception checks, setting `TransferEncoding` without `SendChunked` is supposed to throw `InvalidOperationException`.

(cherry picked from commit 0a8b1b2666)
2018-06-27 21:29:25 +02:00
Alexander Kyte 18080dc75a [merp] Change XML file output path 2018-06-27 10:21:34 +00:00
Alexander Kyte 872843aa92 [merp] Change and emit event type 2018-06-27 10:21:34 +00:00
monojenkins 3645833a7a [runtime] Make mono-state dumper abandon stuck threads (#9260)
Threads which do things with signals and locks may end up unresponsive
to our signals. I cannot get threads that crash in a lock to respond to
SIGTERM on Darwin even if I explicitly unmask SIGTERM on those threads.

In order to defensively program against platform bugs around signals and
stubborn threads, we need to be able to abandon these threads and
continue, dumping other threads.
2018-06-25 21:32:25 +02:00
monojenkins 5e8001a4ff [2018-04] [runtime] Package merp params in 3 ways needed (#9268)
* [runtime] Package merp params in 3 ways needed

* [runtime] Use GUID rather than assembly name in json
2018-06-25 21:32:10 +02:00
Bernhard Urban 639ca72904 [interp] make interp-only mode work again on 2018-04, mixed mode changes broke them. we need to fix it properly on master 2018-06-25 12:21:43 +02:00
Zoltan Varga d68cb85dc6 [2018-04] [interp] fullAOT mixed mode (#8838)
* [jit] Move the handling of special methods like pinvoke etc. into mini-runtime.c, since they are not handled by the JIT.

* [jit] Add a --full-aot-interp command line argument which is the same as --full-aot with a fallback to the interpreter.

* [jit] Implement fallback to the interpreter in full-aot+interp mode.

* [jit] Add a 'methods using the interpreter' stat.
2018-06-25 12:21:43 +02:00
Bernhard Urban 6f5656ea86 [interp] add FULL_AOT flags to AOT image when --aot=interp is used
fixes regression from 67e995c6e2
2018-06-25 12:21:43 +02:00
Bernhard Urban 33f6b1d249 [aot-compiler] use mono_aot_mode_is_interp instead of directly using the flag 2018-06-25 12:21:43 +02:00
Martin Baulig 8ae8c52383 [System]: Fix bug in WebResponseStream.GetResponse() that will make some people happy. #9228. (#9244)
Manual backport for #9228.

(cherry picked from commit a40aaa4878062a0d739e18719eb1c77c70862851)
(cherry picked from commit 6e4dd9facb546391b6f8abb4c9a72b639b804276)
2018-06-22 10:16:07 -04:00
Ankit Jain c87ebef727 Bump msbuild to track mono-2018-04 (#9241) 2018-06-20 19:26:24 -04:00
Aleksey Kliger f22c8b706e [loader] LoadFrom of problematic images should reprobe (correctly)
This reverts commit 569bd3bc52
which itself reverted efe1fdeb9d.

Additionally, cherrypick 60f06e6ca2: refonly load
of problematic image is allowed.
2018-06-19 13:26:50 -04:00
Bernhard Urban 9d43da2ebf [profiler] account for nullbyte in allocated buffer 2018-06-19 10:35:14 +02:00
Rodrigo Kumpera 3737edb881 [corlib] Allow DM with an extra param to have the first one bound to null. Fixes #9033. 2018-06-19 10:34:45 +02:00
Bernhard Urban 07c8f25fe5 [interp] check existence of InterpMethod before removing it from interp code hastable
when creating dynamic methods, we put those in a queue so they can be
collected later via `mono_jit_free_method ()`. the interpreter part was
assuming, as soon as we allocate a dynamic method, it will be executed
eventually and therefore an InterpMethod must exist in
`info.interp_code_hash`, but this isn't necessarily the case.
2018-06-18 11:25:12 +02:00
Alexander Köplinger 335e62c3a0 [packaging] Ignore Mac path in MSBuild .targets file during check
It contains this fragment:

```
<TargetFrameworkFallbackSearchPaths Condition="$([MSBuild]::IsOSPlatform('osx'))">$(TargetFrameworkFallbackSearchPaths);/Library/Frameworks/Mono.framework/External/xbuild-frameworks</TargetFrameworkFallbackSearchPaths>
```

(cherry picked from commit 7f347cfc10)
2018-06-18 11:09:13 +02:00
monojenkins 36fe14548c [Linux,XA build] Fix building of Windows cross-compilers on Ubuntu Linux (#9173)
Ubuntu Linux (possibly others too, but only Ubuntu is tested thus the
limitation) don't need to build or use `mxe`, they instead use mingw packaged
for the distribution, thus making the build faster.

This commit detects the Linux flavor in use and, if it's Ubuntu, configures the
build so that system mingw is used instead of mxe.
2018-06-16 15:17:09 +02:00
monojenkins 6de3d54a24 [SDKS,Android] Install cmake when provisioning Android SDK (#9139)
Android NDK supports cmake in addition to the older make-based ndk-build as the
build system and Xamarin.Android is in the process of switching the build of its
native bits to cmake. The reason for this switch is that certain parts of
Xamarin.Android (libmonodroid) are built for both the host system and
the Android target. The host system build currently uses hand-crafted code
directly in .csproj to build the native bits while the Android build uses
ndk-build. This results in duplication of code, compiler parameters are
specified in two locations - it is easy to introduce incompatibilities, bug
fixes may be applied only in one scenario etc.

Using cmake allows us to use a single build "script" for all the targets, thus
making the build more reliable. Android SDK has a cmake package which contains
full support for NDK builds and allows us to easily use cmake across all the
supported platforms without having to install cmake on the host system.

This commit adds the cmake package to the Android SDK provisiong process and,
alas, at the same time adds a workaround to properly unpack the package. Unlike
other Android SDK packages, cmake doesn't unpack to a single subdirectory of the
zip root, instead all its files and directories are placed directly in the zip
root. This requires yet another workaround to install the package properly.
2018-06-16 15:15:27 +02:00
Alexander Köplinger cb54c26f6c Bump bockbuild to fix environment variables expansion bug (#9178)
Brings in https://github.com/mono/bockbuild/pull/67.

This fixes the msbuild build problem where it'd crash with `error MSB4242: The SDK resolver "NuGetSdkResolver" failed to run. Unexpected failure reading NuGet.Config. Path: '@/external/bockbuild/builds/msbuild-15/artifacts/toolset/restore.proj/$HOME/.config/NuGet/NuGet.Config'.`.

The reason is that bockbuild exported the `XDG_CONFIG_HOME` environment variable with the value `$HOME/.config`. The problem is that the `$HOME` in there is never expanded so it just stays as the literal value. 

`XDG_CONFIG_HOME` is later used by e.g. `Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)` which is what nuget uses to construct the path to NuGet.config - hence why we end up with the weird path.

We now just expand the variables in bockbuild before we pass them on.

Fixes https://github.com/mono/mono/issues/9179
2018-06-16 10:02:03 +02:00
Aleksey Kliger (λgeek) 569bd3bc52 Revert "[loader] LoadFrom of problematic images should reprobe" (#9112)
This reverts commit efe1fdeb9d.

Fix for #9044 on `2018-04`
2018-06-15 15:59:50 +02:00
Jay Krell 1f44e26ab4 Remove ServiceControllerTest.cs.
Mitigates https://github.com/mono/mono/issues/9002.

(cherry picked from commit 68dfbf9bc6)
2018-06-14 21:10:41 +02:00
Rodrigo Kumpera 7b9563bc1c [profiler] Don't raise events until the profiler transitions to the ready state. Fixes #8866.
We can't raise event before that as the profiler depends on too much runtime
infrastructure at this point for it to reliably work.

For example, we need the threading infrastructure to be init'd so we can access the
thread-local profiler state to store events there.
2018-06-14 14:56:38 +02:00
monojenkins 615252ca70 update to Android P final API. (#9077) 2018-06-12 13:13:54 +02:00
Jo Shields 47fe82d812 Merge pull request #9018 from monojenkins/backport-pr-8092-to-2018-04
[2018-04] [arm64] Fix llvm jit support.
2018-06-04 15:33:20 -04:00
Jo Shields 0fd16dfa23 Merge pull request #9001 from monojenkins/backport-pr-8348-to-2018-04
[2018-04] [runtime] Add llvm aot mode with graceful fallback
2018-06-04 13:03:53 -04:00
Zoltan Varga 56521df97b [arm64] Fix llvm jit support. 2018-06-04 14:57:18 +00:00
Marek Safar e129a25c91 [System.Runtime.Serialization] Makes more APIs work for mobile 2018-06-03 08:43:49 +02:00
Ankit Jain 543b6872fe Bump msbuild to track mono-2018-04
.. and update build command line to track changes.
2018-06-03 08:33:42 +02:00
Alexander Kyte ed7cb7a6b7 [runtime] Add llvm aot mode with graceful fallback 2018-06-02 03:58:17 +00:00
Ludovic Henry 33a9dca493 Add PowerPC configure flags for LLVM, and clean up failover linker flags (#8996) 2018-06-01 20:05:01 -04:00
Alexis Christoforides 7008c37886 Merge pull request #8992 from monojenkins/backport-pr-8285-to-2018-04
[2018-04] [mono-api-html] Fix markdown diff which was reversed
2018-06-01 10:56:15 -04:00
Sebastien Pouliot 854f3e2952 [mono-api-html] Fix markdown diff which was reversed
The previous code would produce

```diff
-public const string Version = "11.11.0";
+public const string Version = "11.9.1";
```

instead of

```diff
-public const string Version = "11.9.1";
+public const string Version = "11.11.0";
```

when diff are inlined. The addition and removal sections are fine.
2018-06-01 12:10:37 +00:00
Zoltan Varga c54cae3345 [bitcode] Fix the generation of invalid llvm IR for some Span code. 2018-06-01 12:22:02 +02:00
Sebastien Pouliot 5d60a2b843 [mono-api-html] Update tool to optionally output markdown
Output formatting is now delegate to a `Formatter` subclass. The default
one remains HTML with `HtmlFormatter` so any script should not see any
difference.

The output file is largely identical, except a few whitespace changes
that could not easily be avoided and how modified base types were
reported, since that was different from the rest.

The big change is the `--md` option which can output markdown, which
is the format to use from docs.microsoft.com. There are less options
available, e.g. colors, so additions are rendered using the `csharp`
blocks, while modification are rendered as a `diff` block.

Each assembly output is made to be easy to re-assemble into a single
document if needed, e.g. https://github.com/xamarin/xamarin-macios/pull/3814
2018-06-01 10:43:58 +02:00
Alexis Christoforides 1f3334fd93 Merge pull request #8974 from mono/backport-fix-gh-8712-to-2018-04
[2018-04] [System.IO] Finish initializing all FileSystemWatchers, not just the first one
2018-05-31 12:48:41 -04:00
Alexis Christoforides 23c06f5e54 Merge pull request #8973 from monojenkins/backport-pr-8813-to-2018-04
[2018-04] [System.Windows.Forms] fix PropertyGrid
2018-05-31 11:59:42 -04:00
Alexis Christoforides 9def5c0a11 [System.IO] Dispatch events asynchronously in FileSystemWatcher.DispatchEvents()
This used to happen in RaiseEvents(), but some CoreFX FSW tests require that a derived FSW be able to fire its event synchronously.
2018-05-31 09:26:39 -04:00
Alexis Christoforides c903094761 [System.IO] Prevent the CoreFX bridge from even try-entering a monitor.
In the case of the FSEvent FileSystemWatcher, the CFRunLoop event loop thread has already an interrupt handler installed in the icall, and mono_monitor_try_enter  may try to install one as well which is not supported. So we create separate event tasks before we use the Operation() method.
2018-05-31 09:26:03 -04:00
Alexis Christoforides 462f511222 [System.IO] Finish initializing all FileSystemWatchers, not just the first one
Fixes https://github.com/mono/mono/issues/8712
2018-05-31 09:23:55 -04:00
sancheolz a08e664e4c [System.Windows.Forms] fix PropertyGrid
When ProppertyGrid contains more than one propertyTab it crashes whith NullReferenceException. And when clicking on propertyTab toolstripbutton it didn`t switch to this tab.
2018-05-31 13:15:56 +00:00
Jo Shields 2987232bc1 Merge pull request #8953 from directhex/fix-2018-llvm
Fix building of LOADED_LLVM on Linux, from duplicate eglib linking (#8287)
2018-05-30 15:39:06 -04:00
Jo Shields 5ddc0c5fdf Fix building of LOADED_LLVM on Linux, from duplicate eglib linking (#8287)
(cherry picked from commit ed30706c31)
2018-05-30 12:16:12 -04:00
Marek Safar b2ded076c9 [build] Includes tools used by XI/XA build CI in build profile 2018-05-30 09:47:56 +02:00
Alexander Kyte fa9903bcc1 [2018-04] Finalize merp integration (#8870) 2018-05-29 15:18:58 -04:00
monojenkins 820bff26b3 [2018-04] Sanitize TLS handling in the profiler. (#8881)
Backport of #8824.

/cc @marek-safar
2018-05-25 17:06:18 -04:00
monojenkins 6d28c8f962 Bump API snapshot submodule 2018-05-25 10:31:30 +02:00
Marek Safar b2cac0129f Bump cecil 2018-05-25 10:31:30 +02:00
Marek Safar 8c55e41d50 Bump linker to resolve XA issues 2018-05-24 19:19:53 +02:00
Alexander Kyte ba806e58df [runtime] Gracefully handle crashes before mono-state dependencies initialized (#8843) 2018-05-24 12:38:34 -04:00
Marek Safar 0e0bf762ed [corlib] Update TaskFactory tests to accommodate running on different sync context
Fixes #8721
2018-05-24 10:00:13 +02:00
monojenkins 46e3bd5099 [corlib] Disables test which depends on LogicalCallContext for mobile (#8835)
Backport of #8830.

/cc @marek-safar
2018-05-23 17:06:33 -04:00
monojenkins 67c1e412e2 [monitor] Fix abort of synchronisation wrapper (#8828)
Backport of #8812.

/cc @marek-safar
2018-05-23 10:56:34 -04:00
Alexis Christoforides b705cec3c7 Merge pull request #8836 from monojenkins/backport-pr-7412-to-2018-04
[2018-04] [MacSDK] Update Nuget to 4.7.0
2018-05-23 09:59:43 -04:00
Alexis Christoforides a18994cc41 [MacSDK] Update Nuget to 4.7.0
This update includes (should include) https://github.com/NuGet/NuGet.Client/commit/eca1a8d23a54818c116eef63875de6a554227ea7 which we need in Mono.
2018-05-23 13:57:53 +00:00
Aleksey Kliger efe1fdeb9d [loader] LoadFrom of problematic images should reprobe
The "problematic images" are Windows-specific assemblies that are often
included with applications that do not work on Mono, but for which Mono has its
own implementation.

Previously (9ec8ec5) we changed mono to deny
loading problematic images using Assembly.Load or when one assembly references
another and we find a problematic image using the usual assembly search.

For Assembly.LoadFrom, we used to emit a warning and then load the assembly anyway.

In this commit, we change the behavior: If Assembly.LoadFrom tries to open a
problematic image, we will instead probe for an assembly of that name in the
default context.  That should eventually end up opening Mono's version of that
assembly.

Example:
  Suppose a problematic System.Runtime.InteropServices.RuntimeInformation.dll
  is in the application bin path: /home/user/myapp/bin

  1. User code does (for whatever reason)
  Assembly.LoadFrom ("/home/user/myapp/bin/System.Runtime.InteropServices.RuntimeInformation.dll")

  2. We find the image and try to open it; add it to the images absfpath to
  image hash; note that there are no binding redirects; but that it is a
  problematic image.  We extract the assembly
  name ("System.Runtime.InteropServices.RuntimeInformation", version x.y.z.w
  and public key token 123456789a) from the problematic image.

  3. We probe for "System.Runtime.InteropServices.RuntimeInformation version
  x.y.z.w public key token 123456789a" in the default context.

  4. We find
  /home/user/myapp/bin/System.Runtime.InteropServices.RuntimeInformation.dll in
  the application bin path; we try to open it, we see it's already in the
  images hash, but it's a problematic image,  and we're not in a loadfrom
  context (we re-probed with default!) so we keep probing

  5. We find
  <prefix>/lib/mono/4.5/Facaded/System.Runtime.InteropServices.RuntimeInformation.dll,
  it's not a problematic image, so we open that and return it to (3)

  6. We return to (2) and close the problematic image and return the good one
  instead.

  7. Assembly.LoadFrom returns with the good image.

Fixes #8726
2018-05-23 12:15:37 +02:00
Bernhard Urban 993fc87b3f [debugger] more locking and avoid race around mono_threads_join_lock & loader lock 2018-05-23 09:58:14 +02:00
Alexander Kyte 737ecd1033 [debugger] Add locking around tls->frames usage/freeing 2018-05-23 09:58:14 +02:00
monojenkins 09855094c1 [android] Fix truncating of messages longer than 4096 characters (#8762)
Backport of #8735.

/cc @marek-safar
2018-05-22 16:57:51 -04:00
Marek Habersack 419d3136fe mkbundle interop changes
mkbundle works by generating a small C source file which, in addition to
embedded assemblies/configs/etc, contains a certain amount of code to initialize
the bundle, uncompress the assemblies and set runtime options (e.g. AOT mode).
This source code is generated based on a number of templates shipped as
resources inside `mkbundle.exe` and is not part of any public, maintained API.

The generated code contains calls to Mono runtime which work just fine when
mkbundle is used to generate a desktop application bundle with the default
template code. However, it breaks when a third party (like Xamarin.Android)
embeds Mono runtime and loads it dynamically **after** the application is
initialized. Such third parties must ensure that the bundle's startup code is
able to access the Mono runtime functions it needs by providing pointers to
them, loaded using e.g. the `dlsym` function.

However, as the Mono calls are hard-coded into the generated source code, the
third party needs to resort to search-and-replace methods (e.g. Xamarin.Android
https://github.com/xamarin/xamarin-android/blob/62e7792ca52949f2fa213330d292865ad78d2bfa/src/Xamarin.Android.Build.Tasks/Tasks/MakeBundleNativeCodeExternal.cs#L159-L166)
which are very fragile and prone to undetected breakage.

One example of such breakage which slipped under the radar is
https://github.com/xamarin/xamarin-android/issues/1651 which was caused by
addition of the `mono_jit_set_aot_mode` call to the generated code. The change
slipped under the radar and was discovered only after release.

This commit attempts to make the situation better by establishing a sort of a
code contract between "upstream" mkbundle and the third party. Since the
template code is not "public" (nor should it be), the third party cannot simply
include a header file with the API definitions. Instead, the idea here is to
ensure that all and any Mono runtime calls needed by the template code are
placed in a dispatch structure as pointers to functions and that the structure
needs to be initialized by the embedding party before calling the
`mono_mkbundle_init()` function. The third party is responsible for maintenance
of its own version of the dispatch structure as well as for its initialization
via the `initialize_mono_api` function in the template code. The generated code
must include the third party's version of the structure, in place of the default
one as shipped with `mkbundle`, and to make it possible this commit adds the
`--mono-api-struct-path` mkbundle parameter which points to a file that's
injected into the generated code, replacing the default structure definition.

Following that, the `mono_mkbundle_init()` code calls the `validate_api_struct`
function which checks each and every pointer in the structure for `null`,
exiting the application with error if any `null` pointer is encountered.
This (along with the `initialize_mono_api` function in the template) has the
additional effect that if the third party's structure is incompatible with the
default one a build error will happen, thus allowing early detection of obvious
incompatibilities/omissions.

As long as all the new Mono runtime calls are added to the structure, the above
should make it possible for issues like the one linked to above to not happen in
the future.
2018-05-22 16:54:28 +02:00
EgorBo 97101d40aa don't fail on unsupported ipv6 in BeginConnect 2018-05-22 16:52:51 +02:00
Alexander Kyte 4785686a4d Backport "Implement Freeform Unmanaged Error" to 2018-04 (#8688) 2018-05-22 10:49:40 -04:00
monojenkins 61c25c4e10 Added corlib .sources files for the ORBIS profile (#8786) 2018-05-22 12:33:10 +02:00
Zoltan Varga 99fedb1741 [aot] Fix encoding/decoding of types with custom modifiers. (#8729)
* [aot] Fix encoding/decoding of types with custom modifiers.

Fixes https://github.com/mono/mono/issues/8701.

* [aot] Add a test, disabling for now because it depends on c# 7.2.

* [aot] Bump AOT file format version.

* [aot] Only disable the test with mcs.

* [aot] Fix compilation of test.
2018-05-21 18:40:34 +02:00
Alexander Köplinger 32ae8ad528 Bump bockbuild to get Pango patch
Backport of https://github.com/mono/mono/pull/8748
2018-05-18 16:54:51 +02:00
monojenkins c1ef203b2c [corlib tests] improve ThreadPrincipalTests regarding SynchronizationContext (#8761)
Backport of #8746.
2018-05-18 15:16:53 +02:00
Alexander Köplinger a7160188e5 [ci] Fix URL for apidiff/csprojdiff report
The upgraded HTML publisher plugin on Jenkins now generates a different URL.

(cherry picked from commit fa9579a8fa)
2018-05-18 14:25:31 +02:00
Alexander Köplinger ef73a4955d Bump bockbuild to pull in GTK userSpaceScaleFactor deprecation warning fix
Cherry-picked from 6e14d3f143
2018-05-16 02:16:32 +02:00
monojenkins 769481d834 [Mono.CSharp] Mimic the settings from System to track the feature flags, fixes GitHub #8698 (#8706) 2018-05-14 21:03:55 +02:00
monojenkins 4e47c8dfdc Bump msbuild to track mono-2018-02 (#8683) 2018-05-14 12:47:13 +02:00
Alexis Christoforides c4492e0949 Merge pull request #8656 from monojenkins/backport-pr-8438-to-2018-04
[2018-04] [System] When doing process redirect, use Console.OutputEncoding instead of Console.Out.Encoding.
2018-05-10 09:52:52 -04:00
Rodrigo Kumpera ab6962b183 [System] Add regression test for #8417. 2018-05-10 10:14:27 +00:00
Rodrigo Kumpera ad1a10e4a4 [System] When doing process redirect, use Console.OutputEncoding instead of Console.Out.Encoding. Fixes #8417.
This change makes mono behave in the same way as dotnet, which uses Console.OutputEncoding instead of whatever Console.Out is.
2018-05-10 10:14:27 +00:00
Ankit Jain ecf6b88205 Bump msbuild to track mono-2018-02 (#8631)
* Bump msbuild to track mono-2018-02

* [msbuild] Zip test results and log files for surfacing in jenkins (#8523)

(cherry picked from commit 0b8f0d2f83)
2018-05-09 23:09:45 +02:00
Alexander Köplinger f3577389f6 Merge pull request #8595 from monojenkins/backport-pr-8580-to-2018-04
[2018-04] nuget-hash-extractor: updates
2018-05-06 19:29:14 +02:00
Ankit Jain 9a4c8f3398 nuget-hash-extractor: Add msbuild extensions nuget version from
.. mono-2018-02 branch, which tracks vs15.7:

    Microsoft.NET.Build.Extensions:         2.1.200-preview-62827-05

Version from:
https://github.com/dotnet/cli/blob/b390c9805e6730886129e424f9ce23ee4604266c/build/DependencyVersions.props

None of the assemblies were newer, so none of the lists have any
changes.
2018-05-05 19:01:01 +00:00
Ankit Jain f42debee5e nuget-hash-extractor: Add msbuild extensions nuget version from
.. xplat-master msbuild branch.

	Microsoft.NET.Build.Extensions:         2.1.300-preview3-62804-06

Version from:
https://github.com/dotnet/cli/blob/8c937a0db08e56660aca456ac088f2d0e70735ab/build/DependencyVersions.props

None of the assemblies were newer, so none of the lists have any
changes.

(cherry picked from commit 7d68b33343)
2018-05-05 19:01:01 +00:00
Ankit Jain 9ca82d47ee nuget-hash-extractor: Add all option to emit all 3 lists
This is faster than invoking the extractor thrice.

(cherry picked from commit 34d79079d2)
2018-05-05 19:01:01 +00:00
Ankit Jain ce195600a3 nuget-hash-extractor: Improvements for better, deterministic output
- Ensure the various lists we emit have unique entries, are sorted to be
deterministic
- Ignore ref assemblies

(cherry picked from commit de7a1ec01b)
2018-05-05 19:01:01 +00:00
Ankit Jain da473eaff5 nuget-hash-extractor: Sort the lists for easier reviews
mcs/tools/xbuild/data/deniedAssembliesList.txt:
	- sorted by name and assembly version
	- This file had one duplicate line
		System.Text.Encoding.CodePages.dll,FD178CD4-EF4F-44D5-9C3F-812B1E25126B,4,0,2,0

mono/metadata/image.c:
	- sorted by hashcode
	- This had one duplicate line
		IGNORED_ASSEMBLY (0xFA686A38, SYS_TEXT_ENC_CODEPAGES, "FD178CD4-EF4F-44D5-9C3F-812B1E25126B", "4.3.0 net46"),

(cherry picked from commit 376050c2bc)
2018-05-05 19:01:01 +00:00
monojenkins 858aa226dc [native types] fix nfloat:NaN on arm64 JIT and interp (#8565)
interp: If one of the operands is NaN, we have a default result: It is false (0)
when doing a compare (`ceq_r8`), but must be true (1) on `cne_r8`.

JIT: match behaviour what C# compiler would generate for float/double.
2018-05-04 17:08:01 -07:00
monojenkins fd09fd9d44 [sdks] fix $(mktemp) usage on older versions of macOS (#8521)
Context: https://unix.stackexchange.com/questions/30091/fix-or-alternative-for-mktemp-in-os-x

When making the bumps to use the `mono-sdks` upstream in Xamarin.Android,
we were getting build errors such as:

    usage: mktemp [-d] [-q] [-t prefix] [-u] template ... (TaskId:404)

The build bot is running Mavericks (10.9), so it must be an issue with older
versions of macOS.

When reading the Unix StackExchange post, it appears that the `-t` option
without a template should work more reliably on older macOS versions.

Then I tested it locally via `make -C sdks/builds provision-android`.

The command:

    mktemp -d unzip_android_archive_XXXXXXXX

Resulted in paths such as:

    creating: unzip_android_archive_Nt1XzgS5/android-P/

And sure enough, looking into `sdks/builds` it had created a directory in
the working directory, so it isn't using a path inside of `$TMPDIR`.

Changing the command to:

    mktemp -d -t unzip_android_archive_XXXXXXXX

Resulted in paths such as:

    creating: /var/folders/nx/rzr6lcqj6j3_vp7vtp28v2cw0000gn/T/unzip_android_archive_W247QkyW/android-P/

The StackExchange post mentions `-t` is a "prefix" that gets expanded to
`$TMPDIR/{prefix}.XXXXXXXX`, so I think it is better to use this option as
long as it works on all platforms.
2018-04-30 17:24:59 -04:00
monojenkins 12a2142852 [2018-04] [arm64] Interp entry trampoline (#8484)
* [interp] Interp entry trampoline for arm64

* [interp] Include lmf wrapper in aot image

* [arm64] Add unwind info for native to interp trampoline

* [arm64] Set correct frame type for trampoline frames
2018-04-28 00:06:37 +02:00
monojenkins c7b237f1be [2018-04] [interp] Enter in the interp through a single generic trampoline (#8453)
[2018-04] [interp] Enter in the interp through a single generic trampoline

Backport of #8056.

/cc @lewurm
2018-04-27 01:40:44 +02:00
Alexis Christoforides 0ebfd3e385 Merge pull request #8471 from monojenkins/backport-pr-8306-to-2018-04
[2018-04] [sdks] Wrap configure to provide better output.
2018-04-26 17:04:57 -04:00
Rolf Bjarne Kvinge 50d84a3719 Only show config.log when running on bots. 2018-04-26 18:06:54 +00:00
Rolf Bjarne Kvinge 3e566852dc [sdks] Wrap configure to provide better output.
Wrap configure in a script that:

* Captures stdout/stderr and only shows it in case of errors.
* If configure fails, and a cache file was used, deletes the cache file and
  tries again.
* If configure really fails, then print config.log in addition to
  stdout/stderr, since a lot of valuable diagnostic output is in that file
  (and it's annoying to track down configure failures on bots when the file
  with the important output has already been deleted).
2018-04-26 18:06:54 +00:00
Alexis Christoforides 61fa43b909 Merge pull request #8423 from luhenry/backport-pr-8411-to-2018-04
[2018-04] [mini] Don't verify types if you store to a pointer byref.
2018-04-24 16:08:03 -04:00
Ludovic Henry 196ea0219b Merge branch '2018-04' into backport-pr-8411-to-2018-04 2018-04-24 13:47:03 -04:00
Zoltan Varga b7db3364a0 [2018-04] Backport float32 changes. (#8398)
* [jit] Don't emulate conv.r8.un when running with llvm. (#8095)

* [jit] Make mini-ops.h a dependency of the cpu-<ARCH>.h files. (#8094)

* [llvm] Add intrinsics support for some of the new MathF icalls when using llvm+float32. (#8096)

* [llvm] Add intrinsics support for some of the new MathF icalls when using llvm+float32.

* [jit] Use m_class_get_name ().

* [llvm] Fix the signature of the llvm instrinsic used by OP_ABSF.

* [llvm] Use llvm.fabs only on amd64, it doesn't seem to be supported on some platforms.

* [jit] Various float32 fixes. (#8133)

* [jit] Add a MONO_ARCH_FLOAT32_SUPPORTED arch-specific define, use it to disable float32 on platforms which don't support it.

* [amd64] Fix r4fp support for the ATOMIC_LOAD/STORE_R4 opcodes.

* [jit] Disable a unused test method with invalid IL.

* [jit] Handle r4->u conversion correctly in float32 mode.

* [amd64] Fix some OP_R<cmp> opcodes.

* [llvm] Fix the name of the llvm.fabs intrinsic. (#8140)

* [jit] Add some implicit r4<->r8 conversions in float32 mode to the JIT front end, the CLR allows them. (#8156)

* [jit] Add some implicit r4<->r8 conversions in float32 mode to the JIT front end, the CLR allows them.

* [jit] Use m_class_get_byval_arg ().

* [jit] Use r8 for r4 stack vars to avoid problems with stack merges when one side is an r4 and the other an r8. Add conversions for compares. (#8196)

* [jit] Use r8 for r4 stack vars to avoid problems with stack merges when one side is an r4 and the other an r8. Add conversions for compares.

* [jit] Use m_class_get_byval_arg in one place.

* Add a FIXME.

* [jit] More float32 fixes. (#8234)

* [jit] Add a r8->r4 conversion in stind.r4 when the item on the stack is a r8 because of stack merging.

* [jit] Disable a SIMD test which can fail with -O=float32 due to precision problems.

* [jit] Use m_class_get_byval_arg ().

* [jit] Fix OP_RCONV_TO_I on amd64.

* [jit] Revert '[jit] Use r8 for r4 stack vars to avoid problems with stack merges when one side is an r4 and the other an r8. Add conversions for compares. (#8196)'. It causes r4-r4 merges to produce an r8 stack value, leading to invalid il errors.

* [arm64] Fix some 32 bit float compares so they handle unordered operands correctly. (#8255)

* [jit] Enable float32 by default. (#4731)

* [jit] Enable float32 by default.

* [arm64] Fix some 32 bit float compares so they handle unordered operands correctly.

* [runtime] Disable a coreclr test which fails with float32.

* Revert "[llvm] Fix the name of the llvm.fabs intrinsic. (#8140)"

This reverts commit a248b755af942429fb6a1acdbc8e4f5689c9767d.

* Revert "[llvm] Add intrinsics support for some of the new MathF icalls when using llvm+float32. (#8096)"

This reverts commit 68161345cece7a4dacf6d8d7401f2e5114ee4fbc.
2018-04-24 13:39:22 -04:00
Alexis Christoforides 20ae78fcc8 Merge pull request #8394 from monojenkins/backport-pr-8318-to-2018-04
[2018-04] [runtime] Handle failed classes in mono_type_get_checked ().
2018-04-24 11:58:45 -04:00
monojenkins a5af7f28dc [arm] Fix a regression introduced by: (#8414)
[watch] Align cinfo->stack_usage to 16 on watchos. (#8354)

Fixes https://github.com/mono/mono/issues/8409.
2018-04-24 03:55:08 -04:00
Rodrigo Kumpera 869e019e15 [mini] Add regression test for punting a type system check. 2018-04-23 17:17:45 -04:00
Rodrigo Kumpera 3ddda667e1 [mini] Don't verify types if you store to a pointer byref. Workarounds #8403. 2018-04-23 17:16:53 -04:00
monojenkins 599f3dd3af [watch] Align cinfo->stack_usage to 16 on watchos. (#8375)
Fixes https://github.com/mono/mono/issues/7685.
2018-04-23 12:57:22 -04:00
monojenkins efdd8353ed [packaging] Apply F# patch that fixes #8310 (#8400)
Upstream patch is at https://github.com/fsharp/fsharp/pull/844
2018-04-23 12:46:53 -04:00
Ludovic Henry cf3e776887 [2018-04] [runtime] Add a signal handler for sigterm (#8384)
* [runtime] Add a signal handler for sigterm

* [runtime] Register sigtramp when merp handler enabled

* [runtime] Limit sigterm handler symbol definition to OSX
2018-04-23 08:49:17 -04:00
Zoltan Varga 38ffddd6c7 [runtime] Set the error if the class has a failure. 2018-04-21 19:31:42 +00:00
Zoltan Varga f2943b182a [runtime] Use m_class_has_failure (). 2018-04-21 19:31:42 +00:00
Zoltan Varga 584b77e402 [runtime] Handle failed classes in mono_type_get_checked (). Fixes https://github.com/mono/mono/issues/8311. 2018-04-21 19:31:42 +00:00
monojenkins 34bb601d18 [sdks] Match more closely the pre-SDKs configure flags passed to LLVM (#8381) 2018-04-20 16:07:42 -04:00
monojenkins b759166b96 [System.Net] do not use Thread for SocketTest.TestSelect1 (#8368)
it makes the test less reliable. Potentially helps with
https://github.com/mono/mono/issues/8360
2018-04-20 16:06:20 -04:00
Alexis Christoforides b7015d6fd2 Merge pull request #8336 from monojenkins/backport-pr-8302-to-2018-04
[2018-04] Fix mono_perfcounter_instance_exists to match prototype when #ifndef …
2018-04-19 18:04:34 -04:00
Niklas Therning 68f94932b7 Remove unused signal.h include in interp.c
This include breaks compiling the interpreter on platforms which don't have a
signal.h. The code in interp.c doesn't seem to need it to be included anyway.
2018-04-19 23:55:46 +02:00
monojenkins de3c8c587a [corlib] Disable failing test on XA (#8353)
This follows https://github.com/mono/mono/commit/64ec2dd3eb1309b84819b34c4279d946acacd082.
2018-04-19 21:40:40 +02:00
Jay Krell 766778b545 Fix mono_perfcounter_instance_exists to match prototype when #ifndef DISABLE_PERFCOUNTERS. 2018-04-19 10:20:24 +00:00
monojenkins 3693fb14f4 [sdks] Fix mktemp parameters (#8323) 2018-04-18 19:19:53 -04:00
monojenkins 98a3dd7f34 [corlib] Fix TimeZoneInfo.Local when /usr/share/zoneinfo is a symlink (#8305)
We'd be using the path verbatim to compare with the resolved value of
/etc/localtime but if it's a symlink (like on OSX 10.13+) the comparison failed.

The fix is to resolve any symlinks for /usr/share/zoneinfo too.

Fixes https://github.com/mono/mono/issues/8267 and https://github.com/xamarin/maccore/issues/628
2018-04-18 21:15:00 +02:00
monojenkins 32ba15ee0b [corlib] SynchronizationContext does not work on non-root AppDomain on Android (#8297)
AndroidEnvironment.GetDefaultSyncContext just crashes when called on an AppDomain which is not the root AppDomain. This started appearing with the mono:2018-02 integration during which https://github.com/mono/mono/commit/252d61d0558b0bfa3461f3339ce617e2e4c285bb was introduced.

Fixes https://github.com/xamarin/xamarin-android/issues/1561\#issuecomment-381736716
2018-04-18 11:22:05 -04:00
monojenkins 0931f21c4c [w32file-unix] fix mistake in 8430155946 (#8300)
commit message said
> [w32file-unix] convert nano seconds to microseconds properly, by using
> TICKS_PER_MILLISECOND (which has L suffix in its definition)

first it talks about microseconds, but then uses constant for _milli_
seconds
2018-04-18 13:44:21 +02:00
monojenkins 85e13e6e2f [2018-04] [runtime] Add public API to set the pending exception. (#8279)
* [runtime] Add public API to set the pending exception.

Xamarin.iOS and Xamarin.Mac need a public API to set the pending exception
when converting Objective-C exceptions to managed exceptions.

This adds a public API to support this scenario.

Partially fixes https://bugzilla.xamarin.com/show_bug.cgi?id=60065.

* [runtime] Document that pending exceptions should not be overwritten when the runtime is handling a thread abort request.
2018-04-17 17:49:09 -04:00
monojenkins d835b7d55f [2018-04] Fix timestamp for file copy (#8248)
* [FileTest] regression for https://github.com/xamarin/xamarin-macios/issues/3929

* [w32file-unix] fix File.Copy timestamps

4a8d840d6f introduced that the destination
file of a copy operation has the same modification and access timestamps
as the source file.

With e0e185d70a this behaviour regresses,
since getting timestamps provides more precise information. Fixing this
by being more accurate when applying timestamps to destination file.

* [w32file-unix] convert nano seconds to microseconds properly, by using TICKS_PER_MILLISECOND (which has L suffix in its definition)

* [w32file-unix] introduce constant for ns->qs conversion with proper suffix

fixes problem on 32bit.
2018-04-15 13:24:33 -04:00
monojenkins 1d946e0f38 [sdks] Fix typo + Fix verbosity of unzip-android-archive.sh (#8244) 2018-04-13 19:37:51 -04:00
monojenkins bfa85bcaaa [msvc] Update csproj files 2018-04-13 10:17:05 +02:00
Alexis Christoforides ecd24fa6b5 Merge pull request #8204 from monojenkins/backport-pr-8202-to-2018-04
[2018-04] [system.net] disable some tests to unblock XI integration
2018-04-12 16:27:19 -04:00
Bernhard Urban eee8ff7cfc [system.net] disable some tests to unblock XI integration
regression tracked here: https://github.com/xamarin/xamarin-macios/issues/3827
2018-04-12 16:12:10 +00:00
Rolf Bjarne Kvinge 99a992605f [System.Net.Http] Use '*' as the host instead of '+' in the tests. Fixes xamarin/maccore#673.
Use '*' as the host instead of '+' in the tests.

The behavior should be the same, just faster, because '+' will fail to resolve
("Could not resolve host '+'"), and we'll fall back to the same behavior as
'*': https://github.com/mono/mono/blob/5128cce2dcd097aa4e7b86dd3b56e833c15a9ff0/mcs/class/System/System.Net/EndPointManager.cs#L83-L96

The problem arises when failing to resolve '+' takes a long time: on some of
our bots it takes 5-10 seconds. This adds up quickly since the tests try many
times, effectively increasing a test run from 1-2 seconds to 30+ minutes.

Fixes https://github.com/xamarin/maccore/issues/673.
2018-04-12 17:31:43 +02:00
Aleksey Kliger 13aa6b7199 [eglib] GMarkup: allow all ASCII NameStartChar and NameChar except ':'
Follow https://www.w3.org/TR/xml/#sec-common-syn except don't allow ':' and
non-ASCII.

Element and attribute names must start with a letter or '_'.
Element and attribute names may contain letters, numbers, '.', '-', '_'.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=19436
2018-04-12 03:10:40 +02:00
monojenkins 3472efcdf9 [sdks] Add ANDROID_BUILD_TOOLS_DIR to differentiate it from ANDROID_BUILD_TOOLS_VERSION (#8194) 2018-04-11 19:10:12 -04:00
monojenkins 1029de3147 [sdks] Fix typo (#8188) 2018-04-11 18:18:27 -04:00
Marek Safar 2859780927 [corlib] Make more crypto oids work on mobile profiles when not linked out 2018-04-11 17:13:36 +02:00
monojenkins 61ab3f7a34 [2018-04] [sdks] Add support for building llvm unless the USE_PREBUILT_LLVM Make.config var is set. (#8148)
* [sdks] Add support for building llvm unless the USE_PREBUILT_LLVM Make.config var is set.

* [sdks] Use prebuilt llvm binaries on ios CI.

* [sdks] Use the IGNORE_PACKAGE_LLVM variable to enable the building of llvm.
2018-04-11 09:41:18 -04:00
Bernhard Urban 6d5d7b57f2 [interp] support r4 (single) in stelem instruction
Fixes https://github.com/mono/mono/issues/8143
2018-04-11 15:40:11 +02:00
monojenkins f710b2c8e5 [llvm] Increase the inline limit when using llvm in jit mode. (#8167) 2018-04-11 08:24:24 -04:00
Marek Safar e50ce8ad66 [mcs] Fixes parameter check for interface types used with default parameters 2018-04-11 11:04:00 +02:00
Alexander Köplinger b818777705 [System] Don't use http://www.mono-project.com for test (#8147)
When we tried switching mono-project.com to enforce HTTPS these tests
started failing on systems without working SSL configuration.

Use a different domain which is guaranteed to be available over HTTP instead.

(cherry picked from commit a748bad303)
2018-04-10 15:04:08 +02:00
Marek Safar 05ed822a48 [corlib] Implements CryptoConfig::AddAlgorithm on all profiles 2018-04-10 11:17:17 +02:00
monojenkins 0a5fdb5841 [2018-04] [Facades] Add System.Drawing.Common on mobile only (#8129)
* [Facades] Add System.Drawing.Common on mobile only

Fixes https://github.com/mono/mono/issues/8089

* Bump API snapshot submodule
2018-04-10 02:33:40 +02:00
monojenkins 13183bc82b [2018-04] [corlib] Enable machine.config dependant version of CryptoConfig for net_4_x profile only (#7974)
* [corlib] Enable machine.config dependant version of CryptoConfig for net_4_x profile only

* [corlib] Update linker descriptor with missing types

* Bump API snapshot
2018-04-09 22:15:36 +02:00
Marek Safar 147e34f254 [mcs] Adds private protected modifier to the parser only 2018-04-09 19:38:26 +02:00
monojenkins 561092003c [w32file] Fix memory leak (#8113)
Fixes https://github.com/mono/mono/issues/7655
2018-04-09 09:26:13 -04:00
monojenkins 6cdbc561fc [sdks] Fix arguments passed to llvm on Linux (#8110) 2018-04-09 08:48:13 -04:00
Bernhard Urban 0dba58a734 [2018-04] more iOS sdk backports (#8063)
* [sdks] Add support for running device tests on ios.

* [sdks] More fixes for running device tests (#7994)

* [sdks] Update Info.plist.in so it works with older ios versions and tvos.

* [sdks] Add support for embedding a provisioning profile inside the app.

* [sdks] Set MinimumOSVersion to 10.1 on ios. (#8019)
2018-04-07 22:23:38 -04:00
monojenkins c0af9ad2cc [mcs] Fixes codegen when probing reference type expression is known to pass and pattern variable has to be created (#8086) 2018-04-07 22:22:38 -04:00
monojenkins 88b6094e06 [System] Disables compiled regex (#8088)
Fixes #7828
2018-04-07 22:21:30 -04:00
monojenkins 4fbdeebbe8 [mcs] Implements C# 7 digits separators (#8098) 2018-04-07 22:20:45 -04:00
Bernhard Urban bd8731da01 [interp] use same domain as transform phase to register debug data for a method 2018-04-06 20:40:13 -04:00
monojenkins ea838e84f1 [SDKS] fix Linux (and possibly other OSes) build for Android (#8043)
OS: Ubuntu 18.03
CMake: 3.10

For some reason cmake fails to detect any make program (be it ninja or make)
when cross-compiling for Android in XA. It happens despite the programs being in
$PATH and working correctly. The effect is that CMAKE_MAKE_PROGRAM is set to
"not found" in CMakeCache.txt and configuration fails as follows:

 Call Stack (most recent call first):
   external/mono/external/boringssl/util/android-cmake/android.toolchain.cmake:1140 (CMAKE_FORCE_CXX_COMPILER)
   external/mono/sdks/builds/android-armeabi-v7a-debug/mono/btls/build-shared/CMakeFiles/3.10.2/CMakeSystem.cmake:6 (include)
      CMakeLists.txt:3 (project)
   CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
      -- Configuring incomplete, errors occurred!

This commit does not fix the issue, per se, but it works around it by finding
the first ninja/make (as configured) executable in $PATH and setting the
CMAKE_MAKE_PROGRAM to full path of the executable. I haven't spent too much time
investigating *why* cmake fails to find the executable (I merely ran it with
--trace-expand --debug-output which revealed nothing of consequence) but this
workaround should be safe for any version of CMake and any OS we use makefiles
on.
2018-04-06 16:16:16 -04:00
Marek Safar c3ae712ab1 [mcs] Implements C# 7.2 stackalloc span conversion in conditional expression 2018-04-06 20:53:51 +02:00
Bernhard Urban 7af9ad8cdb [interp] workaround undefined behaviour in r8 to u1 cast
This fixes `test_0_simple_double_casts` on iOS/arm64.
According to the C standard (section [conv.fpint]), the behaviour of
such a cast is undefined if the truncated value doesn't fit into the
destination type.

```c
unsigned char __attribute__ ((noinline)) convr8u1 (double i)
{
        return (unsigned char) i;
}
```

for arm64, `clang -O0` produces:

```
_convr8u1:
100006848:  ff 43 00 d1     sub sp, sp, #16
10000684c:  e0 07 00 fd     str d0, [sp, #8]
100006850:  e0 07 40 fd     ldr d0, [sp, #8]
100006854:  08 00 78 1e     fcvtzs  w8, d0
100006858:  00 1d 00 53     uxtb    w0, w8
10000685c:  ff 43 00 91     add sp, sp, #16
100006860:  c0 03 5f d6     ret
```

while `clang -O2` produces:

```
_convr8u1:
100006ae8:  00 00 78 1e     fcvtzs  w0, d0
100006aec:  c0 03 5f d6     ret
```

which is fine according the standard: Any value < 256 gets casted just
fine, but for example `convr8u1 ((double) 0xffff)` would end up with
`0xffff` in `w0`.

We workaround this behaviour by casting to a 32bit int first, the
resulting code looks like this then:

```
_convr8u1:
100006ae4:  08 00 78 1e     fcvtzs  w8, d0
100006ae8:  00 1d 00 12     and w0, w8, #0xff
100006aec:  c0 03 5f d6     ret
```
2018-04-06 08:40:49 -04:00
Zoltan Varga 5921faad1c [runtime] Fix --disable-btls. 2018-04-06 11:45:33 +02:00
Marek Safar 4bad0d6765 [mcs] Implements C# 7.2 conditional ref expression 2018-04-06 08:20:12 +02:00
Bernhard Urban b0aaec8e96 [interp] do not bake object reference into code stream
it won't be scanned by the GC, defer string allocation to
execution-time instead.
2018-04-06 01:25:40 -04:00
monojenkins e0b0a87e65 [sdks] Use wget in place of curl, it's installed by default on Linux (#8059)
[2018-04] [sdks] Use wget in place of curl, it's installed by default on Linux
2018-04-05 19:22:53 -04:00
Martin Baulig b8fb7b5e18 [System]Fix memory leak in the web stack related to Task.Delay (partial fix of #7356).
Using `Task.Delay (timeout)` has the potential of possibly allocating and holding large
chunks of memory throughout the timeout period.  While this is not strictly speaking a
memory leak because those objects will eventually be disposed and garbage collected, it
can cause memory usage of apps to grow quite significantly in the short run.

The default timeout values are as follows:

* `HttpWebRequest.ReadWriteTimeout`: 5 minutes.

* `HttpWebRequest.Timeout`: 100 seconds.

* `ServicePointManager.MaxServicePointIdleTime`: 100 seconds.

And these values can be increased by the user.  This means that we're potentially holding
hundreds, maybe even thousands of timeout objects in memory for 5+ minutes.

This has now been fixed by using the `Task.Delay(int,CancellationToken)` constructor.

Note that disposing a `CancellationTokenSource` will not cancel it, so the following code
will still leak:

	using (var cts = new CancellationTokenSource ()) {
		Task.Delay (TimeSpan.FromDays (3), cts.Token);
		// Work
	}

To actually make the `Task.Delay` instance go away when we're done with it, we need to
use this pattern:

	var cts = new CancellationTokenSource ();
	try {
		Task.Delay (TimeSpan.FromDays (3), cts.Token);
		// Work
	} finally {
		cts.Cancel ();
		cts.Dispose ();
	}

We also cannot use `CancellationToken.CancelAfter()` for timeouts because unfortunately
some of the underlying framework code that we're using does not honor cancellation
requests - like for instance `NetworkStream`.

This is a partial fix for #7356.  While this commit significantly improves the problem,
there may be other unrelated issues left that needs to be investigated.
2018-04-06 00:00:02 +02:00
monojenkins 8a20f0dfff [SDKS] Fix Android SDK build on Linux (#8024)
Current build uses `tar` to extract ZIP archives. This works with BSD
tar but not with GNU tar, alas. Tar was used in order to strip the root
directory of Android archive while moving files into place. This commit
replaces `tar` with a call to a shell script (because doing what it does
using Make defines is an exercise in pain) which works both on macOS/BSD
and on Linux.
2018-04-05 11:35:29 -04:00
monojenkins 04529e90e2 [interp] fix i4<>i8 conversion for builtin types, it was inverted (#7987) 2018-04-04 18:23:04 -04:00
monojenkins 83d7bc1a0c [sdks] Fix MXE_PREFIX for XA (#8009)
It should take 7 characters from the hash, not 6.
2018-04-04 15:29:03 -04:00
monojenkins d1c10f8693 [sdb] Add reference counting for single step requests, they can be accessed concurrently by the single step processing code and the event request clearing code. Fixes #7137. (#7971) 2018-04-04 13:38:38 -04:00
monojenkins e9b1c90e9d [2018-04] [sdks] Add provisioning for Android SDK and NDK (#7978)
* [sdks] Add provisioning for Android SDK and NDK

This will also be used by XA

* Add missing backslash to mxe.mk

* Only grab bin/autopoint

* [sdks] Use provisioning for MXE

We want to treat MXE the same way we do Android SDK and NDK because it only rarely changes, and it's very long to build it.
2018-04-04 13:50:16 +02:00
monojenkins 59e6eb29e6 [2018-04] [Facades] Add System.Memory facade to mobile profiles (#7968)
* [Facades] Add System.Memory facade to mobile profiles

Contains only the types we have right now.

Fixes https://github.com/mono/mono/issues/7610

* Bump API snapshot submodule
2018-04-03 18:42:27 +02:00
Ludovic Henry 5053d17e50 Bump version to 5.14 (#7954) 2018-04-02 22:23:29 -04:00
253 changed files with 7385 additions and 2161 deletions

No files matched your search

+47 -13
View File
@@ -1,7 +1,7 @@
# Process this file with autoconf to produce a configure script.
#AC_PREREQ([2.62])
AC_INIT(mono, [5.13.0],
AC_INIT(mono, [5.14.0],
[https://github.com/mono/mono/issues/new])
AC_CONFIG_SRCDIR([README.md])
@@ -40,7 +40,7 @@ MONO_VERSION_BUILD=`echo $VERSION | cut -d . -f 3`
# This can be reset to 0 when Mono's version number is bumped
# since it's part of the corlib version (the prefix '1' in the full
# version number is to ensure the number isn't treated as octal in C)
MONO_CORLIB_COUNTER=3
MONO_CORLIB_COUNTER=6
MONO_CORLIB_VERSION=`printf "1%02d%02d%02d%03d" $MONO_VERSION_MAJOR $MONO_VERSION_MINOR 0 $MONO_CORLIB_COUNTER`
AC_DEFINE_UNQUOTED(MONO_CORLIB_VERSION,$MONO_CORLIB_VERSION,[Version of the corlib-runtime interface])
@@ -978,6 +978,30 @@ AC_SUBST(JEMALLOC_LDFLAGS)
AC_SUBST(JEMALLOC_AUTOCONF_FLAGS)
fi
# Terminology:
# Crash privacy - Attempts to not send identifying information in the crash dump / to protect the obscurity of the program control flow
# MERP - The MS telemetry profile. Not for general use.
# Structured crashes - crashes at runtime that trigger a stack walk by mono that happens cooperatively
# Structured crashes are not merp crashes. Structured crashes are json dumps made by mono during crashes. Merp upload is going to use the dumping code is a very specific way, and is enabled at runtime with an icall.
#--with-crash_privacy=yes --with-structured_crashes=no means we don't wanna dump in non-merp-enabled builds, and we want to not send symbol strings. This is going to be the default pair of settings for VS4Mac.
#--with-crash_privacy=yes --with-structured_crashes=yes means you want to see crashes on your console, and you want to not see unmanaged symbol names. This is an option for proprietary apps that have manual bugs filed.
#--with-crash_privacy=no --with-structured_crashes=no means you want to see no crash dumps on failure and you don't care about privacy. This is how you'd set a "don't want it, don't care" configuration.
#--with-crash_privacy=no --with-structured_crashes=yes means you want full crashes and you want to see them in the terminal, not on telemetry. This is going to be how we build for CI.
AC_ARG_WITH(crash-privacy, [ --with-crash_privacy=yes,no If you want your crashes to not include names of symbols present in the binary. ], [], [with_crash_privacy=no])
AC_ARG_WITH(structured-crashes, [ --with-structured_crashes=yes,no If you want your unmanaged crashes to result in a small crash dump file. ], [], [with_structured_crashes=yes])
if test "x$with_crash_privacy" = "xno"; then
AC_DEFINE(MONO_PRIVATE_CRASHES,1,[Do not include names of unmanaged functions in the crash dump])
fi
if test "x$with_structured_crashes" = "xno"; then
AC_DEFINE(DISABLE_STRUCTURED_CRASH,1,[Do not create structured crash files during unmanaged crashes])
fi
#
# Set the build profiles and options before things which use them
#
@@ -3216,9 +3240,22 @@ if test "x$enable_llvm" = "xyes"; then
fi
llvm_codegen="x86codegen"
LLVM_ARCH_LIBS="-lLLVMX86Disassembler -lLLVMX86CodeGen -lLLVMX86AsmParser -lLLVMX86Desc -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils"
case "$target" in
arm*)
llvm_codegen="armcodegen"
LLVM_ARCH_LIBS="-lLLVMARMDisassembler -lLLVMARMCodeGen -lLLVMARMAsmParser -lLLVMARMDesc -lLLVMARMInfo -lLLVMARMAsmPrinter"
;;
aarch64*)
llvm_codegen="aarch64codegen"
LLVM_ARCH_LIBS="-lLLVMARMDisassembler -lLLVMARMCodeGen -lLLVMARMAsmParser -lLLVMARMDesc -lLLVMARMInfo -lLLVMARMAsmPrinter"
;;
powerpc*)
llvm_codegen="powerpccodegen"
LLVM_ARCH_LIBS="-lLLVMPowerPCDisassembler -lLLVMPowerPCCodeGen -lLLVMPowerPCAsmParser -lLLVMPowerPCDesc -lLLVMPowerPCInfo -lLLVMPowerPCAsmPrinter"
;;
aarch64*)
llvm_codegen="aarch64codegen"
;;
esac
@@ -3284,17 +3321,14 @@ if test "x$enable_llvm" = "xyes"; then
LLVM_LDFLAGS="-L$with_llvm/lib"
LLVM_SYSTEM_LIBS="-lshell32 -lpsapi -limagehlp -ldbghelp -lm"
LLVM_LIBS="-lLLVMLTO -lLLVMObjCARCOpts -lLLVMLinker -lLLVMipo -lLLVMVectorize -lLLVMBitWriter \
-lLLVMARMDisassembler -lLLVMARMCodeGen -lLLVMARMAsmParser -lLLVMARMDesc -lLLVMARMInfo \
-lLLVMARMAsmPrinter -lLLVMTableGen -lLLVMDebugInfo -lLLVMOption -lLLVMX86Disassembler \
-lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMX86Desc \
-lLLVMMCDisassembler -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMJIT \
-lLLVMAnalysis -lLLVMTarget \
-lLLVMTableGen -lLLVMDebugInfo -lLLVMOption -lLLVMSelectionDAG -lLLVMAsmPrinter \
-lLLVMMCDisassembler -lLLVMJIT -lLLVMAnalysis -lLLVMTarget \
-lLLVMIRReader -lLLVMAsmParser -lLLVMLineEditor -lLLVMMCAnalysis -lLLVMInstrumentation \
-lLLVMInterpreter -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils \
-lLLVMipa -lLLVMAnalysis -lLLVMProfileData -lLLVMMCJIT -lLLVMTarget -lLLVMRuntimeDyld \
-lLLVMObject -lLLVMMCParser -lLLVMBitReader -lLLVMExecutionEngine -lLLVMMC -lLLVMCore \
-lLLVMSupport -lstdc++"
LLVM_LIBS="$LLVM_LIBS $LLVM_SYSTEM_LIBS"
LLVM_LIBS="$LLVM_LIBS $LLVM_ARCH_LIBS $LLVM_SYSTEM_LIBS"
llvm_config_path=$with_llvm/include/llvm/Config/llvm-config.h
llvm_api_version=`awk '/MONO_API_VERSION/ { print $3 }' $llvm_config_path`
@@ -3627,11 +3661,7 @@ if test "x$host" != "x$target"; then
# TEGRA
CPPFLAGS="$CPPFLAGS"
;;
armv5-*-linux-androideabi*)
AC_DEFINE(TARGET_ANDROID, 1, [...])
CPPFLAGS="$CPPFLAGS"
;;
*-linux-androideabi*)
*-linux-android*)
AC_DEFINE(TARGET_ANDROID, 1, [...])
CPPFLAGS="$CPPFLAGS"
;;
@@ -4554,6 +4584,10 @@ AC_ARG_ENABLE(btls, [ --disable-btls Disable the BoringTls provider
AC_ARG_ENABLE(btls-lib, [ --disable-btls-lib Disable building the BTLS native library], enable_btls_lib=$enableval, enable_btls_lib=$BTLS_SUPPORTED)
AC_ARG_WITH(btls_android_ndk, [ --with-btls-android-ndk Android NDK for BoringTls])
if test "x$enable_btls" = "xno"; then
enable_btls_lib=no
fi
AM_CONDITIONAL(BTLS, test x$enable_btls_lib = xyes)
btls_android=no
+1 -1
+1 -1
+1 -1
+1 -1
+30
View File
@@ -271,6 +271,36 @@ This flag is mutually exlusive with
By default the mkbundle tool will download from a Mono server the
target runtimes, you can specify a different server to provide
cross-compiled runtimes.
.TP
.I "--mono-api-struct-path FILE"
FILE points to a file with the definition of the \fIBundleMonoAPI\fP structure which contains the
required pointers to various Mono API functions used throughout the generated code. This mechanism
is meant to be used by third parties which embed the Mono runtime and dynamically load and initialize
it as part of the application startup, in which case the Mono APIs will not be available for the shared
library loader and the bundle will fail to work (one example of such an embedding third party is
Xamarin.Android).
After providing the definition FILE, the embedder must call the \fIvoid initialize_mono_api (const BundleMonoAPI *info)\fP
function found in the generated code
.B before
calling \fIvoid mono_mkbundle_init ()\fP. The structure passed to \fIinitialize_mono_api\fP doesn't need
to be dynamically allocated as its contents is copied to the local structure in the generated code and no
pointer to the passed structure is retained or used after \fIinitialize_mono_api\fP returns.
The list of pointers is not documented here. Instead, please look at the \fIbundle-mono-api.inc\fP file
found in the mkbundle source directory in your Mono source tree (\fImcs/tools/mkbundle\fP) or in the Mono's
GitHub repository, https://github.com/mono/mono/blob/master/mcs/tools/mkbundle/bundle-mono-api.inc
Please note that your structure must match the one expected by your version of the Mono runtime.
The file must also define the \fImkbundle_log_error\fP function with the following signature:
.nf
static void mkbundle_log_error (const char *format, ...) {}
.fi
The function should implement logging API specific to the embedder.
.SH OLD EMBEDDING
.PP
The old embedding system compiles a small C stub that embeds the
+3
View File
@@ -471,6 +471,9 @@ in your program, or Mono's class libraries attempts to generate code
dynamically. You should test your software upfront and make sure that
you do not use any dynamic features.
.TP
\fB--full-aot-interp\fR
Same as --full-aot with fallback to the interpreter.
.TP
\fB--gc=boehm\fR, \fB--gc=sgen\fR
Selects the Garbage Collector engine for Mono to use, Boehm or SGen.
Currently this merely ensures that you are running either the
+7 -2
View File
@@ -27,11 +27,16 @@ xunit_src := $(patsubst %,$(topdir)/../external/xunit-binaries/%,BenchmarkAttri
ifeq ($(USE_XTEST_REMOTE_EXECUTOR), YES)
XTEST_REMOTE_EXECUTOR = $(topdir)/class/lib/$(PROFILE)/RemoteExecutorConsoleApp.exe
xunit_src += $(topdir)/../mcs/class/test-helpers/AdminHelper.cs \
$(topdir)/../mcs/class/test-helpers/RemoteExecutorTestBase.Mono.cs \
$(topdir)/../external/corefx/src/CoreFx.Private.TestUtilities/src/System/IO/FileCleanupTestBase.cs \
$(topdir)/../external/corefx/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.Process.cs \
$(topdir)/../external/corefx/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.cs \
$(topdir)/../external/corefx/src/Common/src/System/PasteArguments.cs
ifeq ($(PROFILE),monodroid)
xunit_src += $(topdir)/../mcs/class/test-helpers/RemoteExecutorTestBase.Mobile.cs
else
xunit_src += $(topdir)/../mcs/class/test-helpers/RemoteExecutorTestBase.Mono.cs \
$(topdir)/../external/corefx/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.Process.cs
endif
endif
xunit_class_deps :=
@@ -0,0 +1,35 @@
//
// Copyright (c) 2018 Microsoft
//
// 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.Reflection;
using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Drawing.Common")]
[assembly: AssemblyDescription ("System.Drawing.Common")]
[assembly: AssemblyDefaultAlias ("System.Drawing.Common")]
[assembly: AssemblyCompany ("Mono development team")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("(c) Various Mono authors")]
[assembly: AssemblyVersion ("4.0.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -0,0 +1,49 @@
MCS_BUILD_DIR = ../../../build
thisdir = class/Facades/System.Drawing.Common
SUBDIRS =
include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Drawing.Common.dll
KEYFILE = ../../Open.snk
LIBRARY_SNK = $(KEYFILE)
SIGN_FLAGS = /delaysign /nowarn:1616,1699
LIB_REFS =
LIB_MCS_FLAGS = $(SIGN_FLAGS) $(EXTRA_LIB_MCS_FLAGS)
ifdef false # we'll enable this at a later point
# xammac_net_4_5 and the testing_* profiles are special, they don't build
# System.Drawing.dll or equivalent neither in Mono nor in the XM repo.
# For now we embed the types directly here.
# TODO: find a better solution.
EMBEDDED_DRAWING_DEP := $(filter xammac_net_4_5 testing_aot_full testing_aot_hybrid, $(PROFILE))
ifndef EMBEDDED_DRAWING_DEP
# profiles which build a System.Drawing.dll in the repo
REPO_DRAWING_DEP := $(filter net_4_x orbis winaot unreal wasm, $(PROFILE))
ifdef REPO_DRAWING_DEP
LIB_REFS += System.Drawing
else
# When System.Drawing.dll is not built in the Mono repo but in
# the product repo like in the XI/XA case we need to pass in a reference
# to the assembly containing drawing types like Rectangle etc. from there.
# This needs to be passed in via EXTERNAL_FACADE_DRAWING_REFERENCE.
LIB_MCS_FLAGS += /r:$(EXTERNAL_FACADE_DRAWING_REFERENCE)
endif
endif
endif
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
include $(MCS_BUILD_DIR)/library.make
@@ -0,0 +1,2 @@
TypeForwarders.cs
AssemblyInfo.cs
@@ -0,0 +1,174 @@
//
// Copyright (c) 2018 Microsoft
//
// 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.
//
#if false // we'll enable these at a later point
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Bitmap))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.BitmapSuffixInSameAssemblyAttribute))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.BitmapSuffixInSatelliteAssemblyAttribute))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Brush))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Brushes))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.BufferedGraphics))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.BufferedGraphicsContext))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.BufferedGraphicsManager))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.CharacterRange))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.ColorTranslator))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.ContentAlignment))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.CopyPixelOperation))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Design.CategoryNameCollection))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.AdjustableArrowCap))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.Blend))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.ColorBlend))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.CombineMode))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.CompositingMode))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.CompositingQuality))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.CoordinateSpace))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.CustomLineCap))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.DashCap))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.DashStyle))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.FillMode))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.FlushIntention))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.GraphicsContainer))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.GraphicsPath))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.GraphicsPathIterator))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.GraphicsState))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.HatchBrush))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.HatchStyle))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.InterpolationMode))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.LinearGradientBrush))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.LinearGradientMode))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.LineCap))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.LineJoin))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.Matrix))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.MatrixOrder))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.PathData))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.PathGradientBrush))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.PathPointType))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.PenAlignment))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.PenType))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.PixelOffsetMode))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.QualityMode))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.RegionData))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.SmoothingMode))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.WarpMode))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Drawing2D.WrapMode))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Font))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.FontFamily))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.FontStyle))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Graphics))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Graphics.DrawImageAbort))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Graphics.EnumerateMetafileProc))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.GraphicsUnit))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Icon))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.IDeviceContext))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Image))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Image.GetThumbnailImageAbort))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.ImageAnimator))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.BitmapData))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ColorAdjustType))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ColorChannelFlag))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ColorMap))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ColorMapType))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ColorMatrix))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ColorMatrixFlag))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ColorMode))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ColorPalette))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.EmfPlusRecordType))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.EmfType))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.Encoder))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.EncoderParameter))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.EncoderParameters))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.EncoderParameterValueType))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.EncoderValue))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.FrameDimension))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ImageAttributes))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ImageCodecFlags))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ImageCodecInfo))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ImageFlags))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ImageFormat))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.ImageLockMode))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.Metafile))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.MetafileFrameUnit))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.MetafileHeader))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.MetafileType))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.MetaHeader))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.PaletteFlags))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.PixelFormat))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.PlayRecordCallback))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.PropertyItem))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Imaging.WmfPlaceableFileHeader))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Pen))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Pens))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.Duplex))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.InvalidPrinterException))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.Margins))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PageSettings))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PaperKind))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PaperSize))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PaperSource))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PaperSourceKind))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PreviewPageInfo))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PreviewPrintController))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrintAction))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrintController))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrintDocument))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrinterResolution))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrinterResolutionKind))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrinterSettings))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrinterSettings.PaperSizeCollection))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrinterSettings.PaperSourceCollection))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrinterSettings.PrinterResolutionCollection))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrinterSettings.StringCollection))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrinterUnit))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrinterUnitConvert))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrintEventArgs))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrintEventHandler))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrintPageEventArgs))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrintPageEventHandler))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.PrintRange))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.QueryPageSettingsEventArgs))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.QueryPageSettingsEventHandler))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Printing.StandardPrintController))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Region))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.RotateFlipType))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.SolidBrush))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.StringAlignment))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.StringDigitSubstitute))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.StringFormat))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.StringFormatFlags))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.StringTrimming))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.StringUnit))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.SystemBrushes))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.SystemColors))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.SystemFonts))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.SystemIcons))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.SystemPens))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Text.FontCollection))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Text.GenericFontFamilies))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Text.HotkeyPrefix))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Text.InstalledFontCollection))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Text.PrivateFontCollection))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.Text.TextRenderingHint))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.TextureBrush))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Drawing.ToolboxBitmapAttribute))]
#endif
@@ -0,0 +1,35 @@
//
// Copyright (c) 2018 Microsoft
//
// 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.Reflection;
using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Memory")]
[assembly: AssemblyDescription ("System.Memory")]
[assembly: AssemblyDefaultAlias ("System.Memory")]
[assembly: AssemblyCompany ("Mono development team")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("(c) Various Mono authors")]
[assembly: AssemblyVersion ("4.0.1.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
+24
View File
@@ -0,0 +1,24 @@
MCS_BUILD_DIR = ../../../build
thisdir = class/Facades/System.Memory
SUBDIRS =
include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Memory.dll
KEYFILE = ../../Open.snk
LIBRARY_SNK = $(KEYFILE)
SIGN_FLAGS = /delaysign /nowarn:1616,1699
LIB_REFS =
LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
include $(MCS_BUILD_DIR)/library.make
@@ -0,0 +1,3 @@
TypeForwarders.cs
AssemblyInfo.cs
@@ -0,0 +1,47 @@
//
// Copyright (c) 2018 Microsoft
//
// 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.
//
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.MemoryExtensions))]
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Memory<>))]
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ReadOnlyMemory<>))]
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ReadOnlySpan<>))]
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Span<>))]
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.MemoryHandle))]
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.OperationStatus))]
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.StandardFormat))]
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.Binary.BinaryPrimitives))]
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.MemoryMarshal))]
// TODO: we don't have these types yet
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.SequencePosition))]
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.BuffersExtensions))]
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.IBufferWriter<>))]
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.IMemoryOwner<>))]
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.IPinnable))]
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.MemoryManager<>))]
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.MemoryPool<>))]
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.ReadOnlySequenceSegment<>))]
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.ReadOnlySequence<>))]
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.Text.Base64))]
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.Text.Utf8Formatter))]
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.Text.Utf8Parser))]
//[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.SequenceMarshal))]
@@ -0,0 +1,36 @@
//
// Copyright (C) 2018 Microsoft Corporation
//
// 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.Reflection;
using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Threading.Tasks.Extensions")]
[assembly: AssemblyDescription ("System.Threading.Tasks.Extensions")]
[assembly: AssemblyDefaultAlias ("System.Threading.Tasks.Extensions")]
[assembly: AssemblyCompany ("Mono development team")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("(c) Various Mono authors")]
[assembly: AssemblyVersion ("4.2.0.0")]
[assembly: AssemblyInformationalVersion ("4.0.0.0")]
[assembly: AssemblyFileVersion ("4.0.0.0")]
@@ -0,0 +1,108 @@
<?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="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">net_4_x</Platform>
<ProjectGuid>{F1D7CE36-B18B-48F0-B42A-7556448F98BA}</ProjectGuid>
<OutputType>Library</OutputType>
<NoWarn>1699,1616,1699</NoWarn>
<LangVersion>latest</LangVersion>
<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>
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
<NoStdLib>True</NoStdLib>
<NoConfig>True</NoConfig>
<AssemblyName>System.Threading.Tasks.Extensions</AssemblyName>
<TargetFrameworkVersion>v2.1</TargetFrameworkVersion>
<SignAssembly>true</SignAssembly>
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>../../Open.snk</AssemblyOriginatorKeyFile>
</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>
<PropertyGroup Condition=" '$(Platform)' == 'monodroid' ">
<OutputPath>./../../../class/lib/monodroid/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;MOBILE_DYNAMIC;MONODROID;ANDROID</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'monotouch' ">
<OutputPath>./../../../class/lib/monotouch/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'monotouch_watch' ">
<OutputPath>./../../../class/lib/monotouch_watch/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;FEATURE_NO_BSD_SOCKETS;MONOTOUCH_WATCH</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'monotouch_tv' ">
<OutputPath>./../../../class/lib/monotouch_tv/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<OutputPath>./../../../class/lib/testing_aot_full/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'winaot' ">
<OutputPath>./../../../class/lib/winaot/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM;WIN_PLATFORM</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'xammac' ">
<OutputPath>./../../../class/lib/xammac/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_DYNAMIC;XAMMAC;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;XAMARIN_MODERN</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'orbis' ">
<OutputPath>./../../../class/lib/orbis/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;ORBIS;DISABLE_REMOTING;DISABLE_COM</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'unreal' ">
<OutputPath>./../../../class/lib/unreal/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;MOBILE;MOBILE_DYNAMIC;NET_3_5;NET_4_0;NET_4_5;MONO</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'wasm' ">
<OutputPath>./../../../class/lib/wasm/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;WASM;DISABLE_REMOTING;DISABLE_COM;FEATURE_NO_BSD_SOCKETS</DefineConstants>
</PropertyGroup>
<!-- @ALL_PROFILE_PROPERTIES@ -->
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<!-- TRACE is set only for Debug configuration, so inherit from platform-specific value -->
<DefineConstants>TRACE;$(DefineConstants)</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="TypeForwarders.cs" />
</ItemGroup>
<!-- @ALL_SOURCES@ -->
<ItemGroup>
<ProjectReference Include="../../corlib/corlib.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<Reference Include="nunitlite">
<HintPath>..\lib\testing_aot_full\nunitlite.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- @ALL_REFERENCES@ -->
<!-- @ALL_RESOURCES@ -->
</Project>
@@ -0,0 +1,24 @@
MCS_BUILD_DIR = ../../../build
thisdir = class/Facades/System.Threading.Tasks.Extensions
SUBDIRS =
include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Threading.Tasks.Extensions.dll
KEYFILE = ../../Open.snk
LIBRARY_SNK = $(KEYFILE)
SIGN_FLAGS = /delaysign /nowarn:1616,1699
LIB_REFS =
LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
include $(MCS_BUILD_DIR)/library.make
@@ -0,0 +1,2 @@
AssemblyInfo.cs
TypeForwarders.cs
@@ -0,0 +1,39 @@
//
// Copyright (C) 2018 Microsoft Corporation
//
// 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.
//
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.AsyncMethodBuilderAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.ValueTaskAwaiter))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.CompilerServices.ValueTaskAwaiter<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Tasks.ValueTask))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Tasks.ValueTask<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Tasks.Sources.IValueTaskSource))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Tasks.Sources.IValueTaskSource<>))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Tasks.Sources.ValueTaskSourceOnCompletedFlags))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Threading.Tasks.Sources.ValueTaskSourceStatus))]
+2 -2
View File
@@ -90,8 +90,8 @@ unreal_PARALLEL_SUBDIRS = $(common_SUBDIRS) $(mobile_only_SUBDIRS)
wasm_SUBDIRS = $(common_DEPS_SUBDIRS) $(netstandard_drawing_SUBDIRS) $(mobile_only_DEPS_SUBDIRS)
wasm_PARALLEL_SUBDIRS = $(common_SUBDIRS) $(mobile_only_SUBDIRS)
mobile_only_SUBDIRS = System.Security.Cryptography.Pkcs \
System.Security.Cryptography.Cng System.Runtime.Loader System.Xml.XPath.XmlDocument System.Reflection.DispatchProxy
mobile_only_SUBDIRS = System.Security.Cryptography.Pkcs System.Threading.Tasks.Extensions \
System.Security.Cryptography.Cng System.Runtime.Loader System.Xml.XPath.XmlDocument System.Reflection.DispatchProxy System.Drawing.Common
mobile_only_DEPS_SUBDIRS = System.Security.Cryptography.OpenSsl
+6
View File
@@ -19,6 +19,12 @@ endif
TEST_MCS_FLAGS =
TEST_LIB_REFS = System.Core
ifndef NO_PROCESS_START
REFERENCE_SOURCES_FLAGS += -d:MONO_FEATURE_PROCESS_START
TEST_MCS_FLAGS += -d:MONO_FEATURE_PROCESS_START
endif
LIB_MCS_FLAGS += $(REFERENCE_SOURCES_FLAGS)
BUILT_SOURCES = $(PROFILE)-parser.cs
@@ -804,7 +804,7 @@ namespace Mono.Data.Sqlite
int enc;
IntPtr p = UnsafeNativeMethods.sqlite3_context_collseq(context, out type, out enc, out len);
if (p != null) seq.Name = UTF8ToString(p, len);
if (p != IntPtr.Zero) seq.Name = UTF8ToString(p, len);
seq.Type = (CollationTypeEnum)type;
seq._func = func;
seq.Encoding = (CollationEncodingEnum)enc;
+54 -4
View File
@@ -57,13 +57,35 @@ namespace System.Net.Http
public HttpRequestMessage Request;
public CancellationTokenRegistration CancellationTokenRegistration;
public CFContentStream ContentStream;
public bool StreamCanBeDisposed;
public void Close ()
{
CancellationTokenRegistration.Dispose ();
if (ContentStream != null) {
ContentStream.Close ();
}
if (ContentStream != null) {
// The Close method of the CFContentStream blocks as you can see:
// public void Close ()
// {
// data_read_event.WaitOne (); // make sure there's no pending data
//
// data_mutex.WaitOne ();
// data = null;
// this.http_stream.ErrorEvent -= HandleErrorEvent;
// data_mutex.ReleaseMutex ();
//
// data_event.Set ();
// }
// This means. that when we want to ignore the data of the content, which happens
// in the first request of a redirect, if we want to close, ignoring the content
// we will have a deadlock.
// Dispose will clean all the data, without waiting for the read, which by design in the
// CFContentStream, blocks the thread. This happens ONLY after the first request that gets
// a redirect status code. All other cases should call close.
if (StreamCanBeDisposed)
ContentStream.Dispose ();
else
ContentStream.Close ();
}
}
}
@@ -173,6 +195,11 @@ namespace System.Net.Http
}
protected internal override async Task<HttpResponseMessage> SendAsync (HttpRequestMessage request, CancellationToken cancellationToken)
{
return await SendAsync (request, cancellationToken, true).ConfigureAwait (false);
}
internal async Task<HttpResponseMessage> SendAsync (HttpRequestMessage request, CancellationToken cancellationToken, bool isFirstRequest)
{
sentRequest = true;
@@ -194,7 +221,8 @@ namespace System.Net.Http
}
}
stream.ShouldAutoredirect = allowAutoRedirect;
if (!isFirstRequest && allowAutoRedirect)
stream.ShouldAutoredirect = allowAutoRedirect;
stream.HasBytesAvailableEvent += HandleHasBytesAvailableEvent;
stream.ErrorEvent += HandleErrorEvent;
stream.ClosedEvent += HandleClosedEvent;
@@ -234,9 +262,31 @@ namespace System.Net.Http
CloseStream (stream);
});
if (isFirstRequest) {
var initialRequest = await response.Task;
var status = initialRequest.StatusCode;
if (IsRedirect (status) && allowAutoRedirect) {
bucket.StreamCanBeDisposed = true;
// remove headers in a redirect for Authentication.
request.Headers.Authorization = null;
return await SendAsync (request, cancellationToken, false).ConfigureAwait (false);
}
return initialRequest;
}
return await response.Task;
}
// Decide if we redirect or not, similar to what is done in the managed handler
// https://github.com/mono/mono/blob/eca15996c7163f331c9f2cd0a17b63e8f92b1d55/mcs/class/referencesource/System/net/System/Net/HttpWebRequest.cs#L5681
static bool IsRedirect (HttpStatusCode status)
{
return status == HttpStatusCode.Ambiguous || // 300
status == HttpStatusCode.Moved || // 301
status == HttpStatusCode.Redirect || // 302
status == HttpStatusCode.RedirectMethod || // 303
status == HttpStatusCode.RedirectKeepVerb; // 307
}
void HandleErrorEvent (object sender, CFStream.StreamEventArgs e)
{
var stream = (CFHTTPStream)sender;
@@ -769,7 +769,7 @@ namespace MonoTests.System.Net.Http
client.SendAsync (request, HttpCompletionOption.ResponseHeadersRead).Wait ();
Assert.Fail ("#1");
} catch (AggregateException e) {
Assert.AreEqual (typeof (ProtocolViolationException), e.InnerException.GetType (), "#2");
Assert.AreEqual (typeof (InvalidOperationException), e.InnerException.GetType (), "#2");
}
Assert.IsNull (failed, "#102");
} finally {
@@ -1461,7 +1461,7 @@ namespace MonoTests.System.Net.Http
HttpListener CreateListener (Action<HttpListenerContext> contextAssert, int port)
{
var l = new HttpListener ();
l.Prefixes.Add (string.Format ("http://+:{0}/", port));
l.Prefixes.Add (string.Format ("http://*:{0}/", port));
l.Start ();
AddListenerContext(l, contextAssert);
+1 -1
View File
@@ -5,7 +5,7 @@ include ../../build/rules.make
LIBRARY = System.Numerics.dll
LIB_REFS = System
KEYFILE = ../ecma.pub
LIB_MCS_FLAGS = /unsafe
LIB_MCS_FLAGS = /unsafe -nowarn:436
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
XTEST_LIB_REFS = System Facades/System.Threading.Tasks Facades/System.Runtime.InteropServices.RuntimeInformation System.Core System.Numerics.Vectors Microsoft.CSharp
XTEST_LIB_FLAGS = -unsafe
@@ -88,6 +88,8 @@
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlSerializableWriter.cs
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlWriterDelegator.cs
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XPathQueryGenerator.cs
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/SchemaHelper.cs
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/SchemaExporter.cs
../referencesource/System.Runtime.Serialization/System/Text/Base64Encoding.cs
../referencesource/System.Runtime.Serialization/System/Text/BinHexEncoding.cs
../referencesource/System.Runtime.Serialization/System/Text/SurrogateChar.cs
@@ -20,8 +20,6 @@
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/ExportOptions.cs
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/ImportOptions.cs
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/SchemaExporter.cs
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/SchemaHelper.cs
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/SchemaImporter.cs
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XsdDataContractExporter.cs
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XsdDataContractImporter.cs
@@ -2,7 +2,7 @@ using System.Diagnostics;
namespace System.Runtime.Serialization {
internal static class DiagnosticUtility {
internal static partial class DiagnosticUtility {
internal static bool ShouldTraceError = true;
internal static readonly bool ShouldTraceWarning = false;
internal static readonly bool ShouldTraceInformation = false;
@@ -308,5 +308,19 @@ public const string XmlMaxStringContentLengthExceeded = @"XML max string content
public const string XmlObjectAssignedToIncompatibleInterface = @"Object of type '{0}' is assigned to an incompatible interface '{1}'.";
#endregion
// CoreFX
public const string PlatformNotSupported_SchemaImporter = "The implementation of the function requires System.Runtime.Serialization.SchemaImporter which is not supported on this platform.";
public const string PlatformNotSupported_IDataContractSurrogate = "The implementation of the function requires System.Runtime.Serialization.IDataContractSurrogate which is not supported on this platform.";
internal static string Format(string resourceFormats)
{
return resourceFormats;
}
internal static string Format(string resourceFormat, object p1)
{
return string.Format (CultureInfo.InvariantCulture, resourceFormat, p1);
}
}
}
@@ -1,227 +0,0 @@
namespace System.Runtime.Serialization
{
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Reflection;
using System.Runtime.Diagnostics;
using System.Security;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;
using System.Runtime.Serialization.Diagnostics;
class SchemaExporter
{
internal static void GetXmlTypeInfo(Type type, out XmlQualifiedName stableName, out XmlSchemaType xsdType, out bool hasRoot)
{
if (IsSpecialXmlType(type, out stableName, out xsdType, out hasRoot))
return;
XmlSchemaSet schemas = new XmlSchemaSet();
schemas.XmlResolver = null;
InvokeSchemaProviderMethod(type, schemas, out stableName, out xsdType, out hasRoot);
if (stableName.Name == null || stableName.Name.Length == 0)
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.GetString(SR.InvalidXmlDataContractName, DataContract.GetClrTypeFullName(type))));
}
internal static bool IsSpecialXmlType(Type type, out XmlQualifiedName typeName, out XmlSchemaType xsdType, out bool hasRoot)
{
xsdType = null;
hasRoot = true;
if (type == Globals.TypeOfXmlElement || type == Globals.TypeOfXmlNodeArray)
{
string name = null;
if (type == Globals.TypeOfXmlElement)
{
xsdType = CreateAnyElementType();
name = "XmlElement";
hasRoot = false;
}
else
{
xsdType = CreateAnyType();
name = "ArrayOfXmlNode";
hasRoot = true;
}
typeName = new XmlQualifiedName(name, DataContract.GetDefaultStableNamespace(type));
return true;
}
typeName = null;
return false;
}
internal static void AddDefaultXmlType(XmlSchemaSet schemas, string localName, string ns)
{
throw new NotImplementedException();
}
static bool InvokeSchemaProviderMethod(Type clrType, XmlSchemaSet schemas, out XmlQualifiedName stableName, out XmlSchemaType xsdType, out bool hasRoot)
{
xsdType = null;
hasRoot = true;
object[] attrs = clrType.GetCustomAttributes(Globals.TypeOfXmlSchemaProviderAttribute, false);
if (attrs == null || attrs.Length == 0)
{
stableName = DataContract.GetDefaultStableName(clrType);
return false;
}
XmlSchemaProviderAttribute provider = (XmlSchemaProviderAttribute)attrs[0];
if (provider.IsAny)
{
xsdType = CreateAnyElementType();
hasRoot = false;
}
string methodName = provider.MethodName;
if (methodName == null || methodName.Length == 0)
{
if (!provider.IsAny)
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.GetString(SR.InvalidGetSchemaMethod, DataContract.GetClrTypeFullName(clrType))));
stableName = DataContract.GetDefaultStableName(clrType);
}
else
{
MethodInfo getMethod = clrType.GetMethod(methodName, /*BindingFlags.DeclaredOnly |*/ BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public, null, new Type[] { typeof(XmlSchemaSet) }, null);
if (getMethod == null)
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.GetString(SR.MissingGetSchemaMethod, DataContract.GetClrTypeFullName(clrType), methodName)));
if (!(Globals.TypeOfXmlQualifiedName.IsAssignableFrom(getMethod.ReturnType)) && !(Globals.TypeOfXmlSchemaType.IsAssignableFrom(getMethod.ReturnType)))
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.GetString(SR.InvalidReturnTypeOnGetSchemaMethod, DataContract.GetClrTypeFullName(clrType), methodName, DataContract.GetClrTypeFullName(getMethod.ReturnType), DataContract.GetClrTypeFullName(Globals.TypeOfXmlQualifiedName), typeof(XmlSchemaType))));
object typeInfo = getMethod.Invoke(null, new object[] { schemas });
if (provider.IsAny)
{
if (typeInfo != null)
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.GetString(SR.InvalidNonNullReturnValueByIsAny, DataContract.GetClrTypeFullName(clrType), methodName)));
stableName = DataContract.GetDefaultStableName(clrType);
}
else if (typeInfo == null)
{
xsdType = CreateAnyElementType();
hasRoot = false;
stableName = DataContract.GetDefaultStableName(clrType);
}
else
{
XmlSchemaType providerXsdType = typeInfo as XmlSchemaType;
if (providerXsdType != null)
{
string typeName = providerXsdType.Name;
string typeNs = null;
if (typeName == null || typeName.Length == 0)
{
DataContract.GetDefaultStableName(DataContract.GetClrTypeFullName(clrType), out typeName, out typeNs);
stableName = new XmlQualifiedName(typeName, typeNs);
providerXsdType.Annotation = GetSchemaAnnotation(ExportActualType(stableName, new XmlDocument()));
xsdType = providerXsdType;
}
else
{
foreach (XmlSchema schema in schemas.Schemas())
{
foreach (XmlSchemaObject schemaItem in schema.Items)
{
if ((object)schemaItem == (object)providerXsdType)
{
typeNs = schema.TargetNamespace;
if (typeNs == null)
typeNs = String.Empty;
break;
}
}
if (typeNs != null)
break;
}
if (typeNs == null)
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.GetString(SR.MissingSchemaType, typeName, DataContract.GetClrTypeFullName(clrType))));
stableName = new XmlQualifiedName(typeName, typeNs);
}
}
else
stableName = (XmlQualifiedName)typeInfo;
}
}
return true;
}
static XmlSchemaComplexType CreateAnyElementType()
{
XmlSchemaComplexType anyElementType = new XmlSchemaComplexType();
anyElementType.IsMixed = false;
anyElementType.Particle = new XmlSchemaSequence();
XmlSchemaAny any = new XmlSchemaAny();
any.MinOccurs = 0;
any.ProcessContents = XmlSchemaContentProcessing.Lax;
((XmlSchemaSequence)anyElementType.Particle).Items.Add(any);
return anyElementType;
}
static XmlSchemaAnnotation GetSchemaAnnotation(params XmlNode[] nodes)
{
if (nodes == null || nodes.Length == 0)
return null;
bool hasAnnotation = false;
for (int i = 0; i < nodes.Length; i++)
if (nodes[i] != null)
{
hasAnnotation = true;
break;
}
if (!hasAnnotation)
return null;
XmlSchemaAnnotation annotation = new XmlSchemaAnnotation();
XmlSchemaAppInfo appInfo = new XmlSchemaAppInfo();
annotation.Items.Add(appInfo);
appInfo.Markup = nodes;
return annotation;
}
static XmlSchemaComplexType CreateAnyType()
{
XmlSchemaComplexType anyType = new XmlSchemaComplexType();
anyType.IsMixed = true;
anyType.Particle = new XmlSchemaSequence();
XmlSchemaAny any = new XmlSchemaAny();
any.MinOccurs = 0;
any.MaxOccurs = Decimal.MaxValue;
any.ProcessContents = XmlSchemaContentProcessing.Lax;
((XmlSchemaSequence)anyType.Particle).Items.Add(any);
anyType.AnyAttribute = new XmlSchemaAnyAttribute();
return anyType;
}
static XmlElement ExportActualType(XmlQualifiedName typeName, XmlDocument xmlDoc)
{
XmlElement actualTypeElement = xmlDoc.CreateElement(ActualTypeAnnotationName.Name, ActualTypeAnnotationName.Namespace);
XmlAttribute nameAttribute = xmlDoc.CreateAttribute(Globals.ActualTypeNameAttribute);
nameAttribute.Value = typeName.Name;
actualTypeElement.Attributes.Append(nameAttribute);
XmlAttribute nsAttribute = xmlDoc.CreateAttribute(Globals.ActualTypeNamespaceAttribute);
nsAttribute.Value = typeName.Namespace;
actualTypeElement.Attributes.Append(nsAttribute);
return actualTypeElement;
}
static XmlQualifiedName actualTypeAnnotationName;
internal static XmlQualifiedName ActualTypeAnnotationName
{
get
{
if (actualTypeAnnotationName == null)
actualTypeAnnotationName = new XmlQualifiedName(Globals.ActualTypeLocalName, Globals.SerializationNamespace);
return actualTypeAnnotationName;
}
}
}
}
@@ -1,54 +0,0 @@
//
// XsdDataContractExporter_mobile.cs
//
// Authors:
// Alexander Köplinger <[email protected]>
//
// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
//
// 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.Collections.Generic;
using System.Reflection;
using System.Xml;
using System.Xml.Schema;
namespace System.Runtime.Serialization
{
public class XsdDataContractExporter
{
public XsdDataContractExporter () { throw new NotImplementedException (); }
public XsdDataContractExporter (XmlSchemaSet schemas) { throw new NotImplementedException (); }
public ExportOptions Options { get { throw new NotImplementedException (); } set { throw new NotImplementedException (); } }
public XmlSchemaSet Schemas { get { throw new NotImplementedException (); } }
public bool CanExport (ICollection<Assembly> assemblies) { throw new NotImplementedException ();}
public bool CanExport (ICollection<Type> types) { throw new NotImplementedException (); }
public bool CanExport (Type type) { throw new NotImplementedException (); }
public void Export (ICollection<Assembly> assemblies) { throw new NotImplementedException (); }
public void Export (ICollection<Type> types) { throw new NotImplementedException (); }
public void Export (Type type) { throw new NotImplementedException (); }
public XmlQualifiedName GetRootElementName (Type type) { throw new NotImplementedException (); }
public XmlSchemaType GetSchemaType (Type type) { throw new NotImplementedException (); }
public XmlQualifiedName GetSchemaTypeName (Type type) { throw new NotImplementedException (); }
}
}
@@ -0,0 +1,31 @@
// 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.Diagnostics;
namespace System.Runtime.Serialization
{
partial class DiagnosticUtility
{
internal static bool IsFatal(Exception exception)
{
while (exception != null)
{
// These exceptions aren't themselves fatal, but since the CLR uses them to wrap other exceptions,
// we want to check to see whether they've been used to wrap a fatal exception. If so, then they
// count as fatal.
if (exception is TypeInitializationException)
{
exception = exception.InnerException;
}
else
{
break;
}
}
return false;
}
}
}
@@ -1,6 +1,8 @@
#include System.Runtime.Serialization.dll.sources
#include ReferenceSource.common.sources
ReferenceSources/SchemaExporter_mobile.cs
ReferenceSources/XsdDataContractExporter_mobile.cs
ReferenceSources/SimplifiedCodeTypeReference.cs
corefx/DiagnosticUtility.cs
../../../external/corefx/src/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XsdDataContractExporter.cs
@@ -1,5 +1,4 @@
../../test-helpers/NunitHelpers.cs
System.ServiceProcess/ServiceBaseTest.cs
System.ServiceProcess/ServiceControllerTest.cs
System.ServiceProcess/ServiceControllerPermissionAttributeTest.cs
System.ServiceProcess/ServiceControllerPermissionTest.cs
@@ -937,6 +937,7 @@ namespace System.Windows.Forms
if (tabs != null && tabs.Count > 0) {
foreach (PropertyTab tab in tabs) {
PropertyToolBarButton button = new PropertyToolBarButton (tab);
button.Click += new EventHandler (toolbarbutton_clicked);
toolbar.Items.Add (button);
if (tab.Bitmap != null) {
tab.Bitmap.MakeTransparent ();
@@ -986,7 +987,7 @@ namespace System.Windows.Forms
scopes.Clear ();
IList currentIntersection = (i == 0 ? (IList)tabAttribute.TabClasses : (IList)intersection);
for (int j=0; j < currentIntersection.Count; j++) {
if ((Type)intersection[j] == tabAttribute.TabClasses[j]) {
if ((Type)currentIntersection[j] == tabAttribute.TabClasses[j]) {
new_intersection.Add (tabAttribute.TabClasses[j]);
scopes.Add (tabAttribute.TabScopes[j]);
}
@@ -1410,8 +1411,10 @@ namespace System.Windows.Forms
toRemove.Add (i);
}
foreach (int indexToRemove in toRemove) {
property_tabs.RemoveAt (indexToRemove);
property_tabs_scopes.RemoveAt (indexToRemove);
if (property_tabs.Count > indexToRemove)
property_tabs.RemoveAt (indexToRemove);
if (property_tabs_scopes.Count > indexToRemove)
property_tabs_scopes.RemoveAt (indexToRemove);
}
property_grid.RefreshToolbar (this);
}
@@ -15,7 +15,6 @@ using NUnit.Framework;
using System;
using System.Xml;
using System.IO;
using Network = System.Net;
using System.Xml.Linq;
using System.Xml.Schema;
using System.Collections.Generic;
@@ -94,7 +93,7 @@ namespace MonoTests.System.Xml.Schema
{
// Create a resolver with default credentials.
XmlUrlResolver resolver = new XmlUrlResolver ();
resolver.Credentials = Network.CredentialCache.DefaultCredentials;
resolver.Credentials = global::System.Net.CredentialCache.DefaultCredentials;
// Set the reader settings object to use the resolver.
XmlReaderSettings settings = new XmlReaderSettings ();
settings.XmlResolver = resolver;
@@ -801,7 +801,7 @@ namespace System.Diagnostics
if (startInfo.RedirectStandardOutput) {
MonoIO.Close (stdout_write, out error);
Encoding stdoutEncoding = startInfo.StandardOutputEncoding ?? Console.Out.Encoding;
Encoding stdoutEncoding = startInfo.StandardOutputEncoding ?? Console.OutputEncoding;
standardOutput = new StreamReader (new FileStream (stdout_read, FileAccess.Read, true, 8192), stdoutEncoding, true);
}
@@ -809,7 +809,7 @@ namespace System.Diagnostics
if (startInfo.RedirectStandardError) {
MonoIO.Close (stderr_write, out error);
Encoding stderrEncoding = startInfo.StandardErrorEncoding ?? Console.Out.Encoding;
Encoding stderrEncoding = startInfo.StandardErrorEncoding ?? Console.OutputEncoding;
standardError = new StreamReader (new FileStream (stderr_read, FileAccess.Read, true, 8192), stderrEncoding, true);
}
@@ -380,7 +380,12 @@ namespace System.IO.Compression
GC.SuppressFinalize (this);
io_buffer = null;
} else {
// When we are in the finalizer we don't want to access the underlying stream anymore
base_stream = Stream.Null;
}
if (z_stream != null) {
z_stream.Dispose();
}
@@ -105,16 +105,16 @@ namespace System.IO {
var result = new C ();
result.Changed += (object o, FileSystemEventArgs args) =>
{ ProxyDispatch (o, FileAction.Modified, args); };
Task.Run (() => ProxyDispatch (o, FileAction.Modified, args));
result.Created += (object o, FileSystemEventArgs args) =>
{ ProxyDispatch (o, FileAction.Added, args); };
Task.Run (() => ProxyDispatch (o, FileAction.Added, args));
result.Deleted += (object o, FileSystemEventArgs args) =>
{ ProxyDispatch (o, FileAction.Removed, args); };
Task.Run (() => ProxyDispatch (o, FileAction.Removed, args));
result.Renamed += (object o, RenamedEventArgs args) =>
{ ProxyDispatch (o, FileAction.RenamedNewName, args); };
Task.Run (() => ProxyDispatch (o, FileAction.RenamedNewName, args));
result.Error += (object o, ErrorEventArgs args) =>
{ ProxyDispatchError (handle, args); };
Task.Run (() => ProxyDispatchError (handle, args));
Operation (map_op: (in_map, out_map, event_map, _) => {
in_map.Add (handle, result);
@@ -37,6 +37,7 @@ using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security.Permissions;
using System.Threading;
using System.Threading.Tasks;
namespace System.IO {
[DefaultEvent("Changed")]
@@ -114,7 +115,7 @@ namespace System.IO {
void InitWatcher ()
{
lock (lockobj) {
if (watcher != null)
if (watcher_handle != null)
return;
string managed = Environment.GetEnvironmentVariable ("MONO_MANAGED_WATCHER");
@@ -510,17 +511,17 @@ namespace System.IO {
case FileAction.Added:
lastData.Name = filename;
lastData.ChangeType = WatcherChangeTypes.Created;
OnCreated (new FileSystemEventArgs (WatcherChangeTypes.Created, path, filename));
Task.Run (() => OnCreated (new FileSystemEventArgs (WatcherChangeTypes.Created, path, filename)));
break;
case FileAction.Removed:
lastData.Name = filename;
lastData.ChangeType = WatcherChangeTypes.Deleted;
OnDeleted (new FileSystemEventArgs (WatcherChangeTypes.Deleted, path, filename));
Task.Run (() => OnDeleted (new FileSystemEventArgs (WatcherChangeTypes.Deleted, path, filename)));
break;
case FileAction.Modified:
lastData.Name = filename;
lastData.ChangeType = WatcherChangeTypes.Changed;
OnChanged (new FileSystemEventArgs (WatcherChangeTypes.Changed, path, filename));
Task.Run (() => OnChanged (new FileSystemEventArgs (WatcherChangeTypes.Changed, path, filename)));
break;
case FileAction.RenamedOldName:
if (renamed != null) {
@@ -536,7 +537,8 @@ namespace System.IO {
if (renamed == null) {
renamed = new RenamedEventArgs (WatcherChangeTypes.Renamed, path, "", filename);
}
OnRenamed (renamed);
var renamed_ref = renamed;
Task.Run (() => OnRenamed (renamed_ref));
renamed = null;
break;
default:
@@ -1046,6 +1046,10 @@ namespace System.Net.Sockets
sockares.EndPoint = remoteEP = sockares.socket.RemapIPEndPoint (ep);
}
if (!sockares.socket.CanTryAddressFamily(sockares.EndPoint.AddressFamily)) {
throw new ArgumentException(SR.net_invalidAddressList);
}
int error = 0;
if (sockares.socket.connect_in_progress) {
+57 -40
View File
@@ -434,7 +434,6 @@ namespace System.Net
}
public string Host {
get {
Uri uri = hostUri ?? Address;
return (hostUri == null || !hostHasPort) && Address.IsDefaultPort ?
@@ -828,7 +827,7 @@ namespace System.Net
WebOperation SendRequest (bool redirecting, BufferOffsetSize writeBuffer, CancellationToken cancellationToken)
{
lock (locker) {
WebConnection.Debug ($"HWR SEND REQUEST: Req={ID} requestSent={requestSent} redirecting={redirecting}");
WebConnection.Debug ($"HWR SEND REQUEST: Req={ID} requestSent={requestSent} actualUri={actualUri} redirecting={redirecting}");
WebOperation operation;
if (!redirecting) {
@@ -858,22 +857,21 @@ namespace System.Net
if (Aborted)
throw CreateRequestAbortedException ();
bool send = !(method == "GET" || method == "CONNECT" || method == "HEAD" ||
method == "TRACE");
bool send = !(method == "GET" || method == "CONNECT" || method == "HEAD" || method == "TRACE");
if (method == null || !send)
throw new ProtocolViolationException ("Cannot send data when method is: " + method);
throw new ProtocolViolationException (SR.net_nouploadonget);
if (contentLength == -1 && !sendChunked && !allowBuffering && KeepAlive)
throw new ProtocolViolationException ("Content-Length not set");
string transferEncoding = TransferEncoding;
if (!sendChunked && transferEncoding != null && transferEncoding.Trim () != "")
throw new ProtocolViolationException ("SendChunked should be true.");
throw new InvalidOperationException (SR.net_needchunked);
WebOperation operation;
lock (locker) {
if (getResponseCalled)
throw new InvalidOperationException ("The operation cannot be performed once the request has been submitted.");
throw new InvalidOperationException (SR.net_reqsubmitted);
operation = currentOperation;
if (operation == null) {
@@ -900,7 +898,7 @@ namespace System.Net
try {
return TaskToApm.End<Stream> (asyncResult);
} catch (Exception e) {
throw FlattenException (e);
throw GetWebException (e);
}
}
@@ -909,7 +907,7 @@ namespace System.Net
try {
return GetRequestStreamAsync ().Result;
} catch (Exception e) {
throw FlattenException (e);
throw GetWebException (e);
}
}
@@ -925,34 +923,37 @@ namespace System.Net
}
internal static Task<T> RunWithTimeout<T> (
Func<CancellationToken, Task<T>> func, int timeout, Action abort)
Func<CancellationToken, Task<T>> func, int timeout, Action abort,
Func<bool> aborted, CancellationToken cancellationToken)
{
var cts = CancellationTokenSource.CreateLinkedTokenSource (cancellationToken);
// Call `func` here to propagate any potential exception that it
// might throw to our caller rather than returning a faulted task.
var cts = new CancellationTokenSource ();
var workerTask = func (cts.Token);
return RunWithTimeoutWorker (workerTask, timeout, abort, cts);
return RunWithTimeoutWorker (workerTask, timeout, abort, aborted, cts);
}
static async Task<T> RunWithTimeoutWorker<T> (
Task<T> workerTask, int timeout, Action abort,
Task<T> workerTask, int timeout, Action abort, Func<bool> aborted,
CancellationTokenSource cts)
{
try {
var timeoutTask = Task.Delay (timeout);
var ret = await Task.WhenAny (workerTask, timeoutTask).ConfigureAwait (false);
if (ret == timeoutTask) {
try {
cts.Cancel ();
abort ();
} catch {
// Ignore; we report the timeout.
}
throw new WebException (SR.net_timeout, WebExceptionStatus.Timeout);
if (await ServicePointScheduler.WaitAsync (workerTask, timeout).ConfigureAwait (false))
return workerTask.Result;
try {
cts.Cancel ();
abort ();
} catch {
// Ignore; we report the timeout.
}
return workerTask.Result;
#pragma warning disable 4014
// Make sure the workerTask's Exception is actually observed.
// Fixes https://github.com/mono/mono/issues/10488.
workerTask.ContinueWith (t => t.Exception?.GetHashCode (), TaskContinuationOptions.OnlyOnFaulted);
#pragma warning restore 4014
throw new WebException (SR.net_timeout, WebExceptionStatus.Timeout);
} catch (Exception ex) {
throw FlattenException (ex);
throw GetWebException (ex, aborted ());
} finally {
cts.Dispose ();
}
@@ -960,7 +961,11 @@ namespace System.Net
Task<T> RunWithTimeout<T> (Func<CancellationToken, Task<T>> func)
{
return RunWithTimeout (func, timeout, Abort);
// Call `func` here to propagate any potential exception that it
// might throw to our caller rather than returning a faulted task.
var cts = new CancellationTokenSource ();
var workerTask = func (cts.Token);
return RunWithTimeoutWorker (workerTask, timeout, Abort, () => Aborted, cts);
}
async Task<HttpWebResponse> MyGetResponseAsync (CancellationToken cancellationToken)
@@ -968,13 +973,6 @@ namespace System.Net
if (Aborted)
throw CreateRequestAbortedException ();
if (method == null)
throw new ProtocolViolationException ("Method is null.");
string transferEncoding = TransferEncoding;
if (!sendChunked && transferEncoding != null && transferEncoding.Trim () != "")
throw new ProtocolViolationException ("SendChunked should be true.");
var completion = new WebCompletionSource ();
WebOperation operation;
lock (locker) {
@@ -1010,14 +1008,14 @@ namespace System.Net
try {
cancellationToken.ThrowIfCancellationRequested ();
WebConnection.Debug ($"HWR GET RESPONSE LOOP: Req={ID} {auth_state.NtlmAuthState}");
WebConnection.Debug ($"HWR GET RESPONSE LOOP: Req={ID} Op={operation?.ID} {auth_state.NtlmAuthState}");
writeStream = await operation.GetRequestStreamInternal ();
await writeStream.WriteRequestAsync (cancellationToken).ConfigureAwait (false);
stream = await operation.GetResponseStream ();
WebConnection.Debug ($"HWR RESPONSE LOOP #0: Req={ID} - {stream?.Headers != null}");
WebConnection.Debug ($"HWR RESPONSE LOOP #0: Req={ID} Op={operation?.ID} - {stream?.Headers != null}");
(response, redirect, mustReadAll, writeBuffer, ntlm) = await GetResponseFromData (
stream, cancellationToken).ConfigureAwait (false);
@@ -1025,7 +1023,7 @@ namespace System.Net
throwMe = GetWebException (e);
}
WebConnection.Debug ($"HWR GET RESPONSE LOOP #1: Req={ID} - redirect={redirect} mustReadAll={mustReadAll} writeBuffer={writeBuffer != null} ntlm={ntlm != null} - {throwMe != null}");
WebConnection.Debug ($"HWR GET RESPONSE LOOP #1: Req={ID} Op={operation?.ID} - redirect={redirect} mustReadAll={mustReadAll} writeBuffer={writeBuffer != null} ntlm={ntlm != null} - {throwMe != null}");
lock (locker) {
if (throwMe != null) {
@@ -1148,13 +1146,18 @@ namespace System.Net
}
WebException GetWebException (Exception e)
{
return GetWebException (e, Aborted);
}
static WebException GetWebException (Exception e, bool aborted)
{
e = FlattenException (e);
if (e is WebException wexc) {
if (!Aborted || wexc.Status == WebExceptionStatus.RequestCanceled || wexc.Status == WebExceptionStatus.Timeout)
if (!aborted || wexc.Status == WebExceptionStatus.RequestCanceled || wexc.Status == WebExceptionStatus.Timeout)
return wexc;
}
if (Aborted || e is OperationCanceledException || e is ObjectDisposedException)
if (aborted || e is OperationCanceledException || e is ObjectDisposedException)
return CreateRequestAbortedException ();
return new WebException (e.Message, e, WebExceptionStatus.UnknownError, null);
}
@@ -1169,6 +1172,20 @@ namespace System.Net
if (Aborted)
throw CreateRequestAbortedException ();
string transferEncoding = TransferEncoding;
if (!sendChunked && transferEncoding != null && transferEncoding.Trim () != "") {
/*
* The only way we could get here without already catching this in the
* `TransferEncoding` property settor is via HttpClient, which does not
* do strict checking on all headers.
*
* We can remove this check again after switching to the CoreFX version
* of HttpClient.
*
*/
throw new InvalidOperationException (SR.net_needchunked);
}
return TaskToApm.Begin (RunWithTimeout (MyGetResponseAsync), callback, state);
}
@@ -1180,7 +1197,7 @@ namespace System.Net
try {
return TaskToApm.End<HttpWebResponse> (asyncResult);
} catch (Exception e) {
throw FlattenException (e);
throw GetWebException (e);
}
}
@@ -1198,7 +1215,7 @@ namespace System.Net
try {
return GetResponseAsync ().Result;
} catch (Exception e) {
throw FlattenException (e);
throw GetWebException (e);
}
}
@@ -336,7 +336,6 @@ namespace System.Net
// Is there anything in the queue?
var next = group.GetNextOperation ();
Debug ($"{me} no pending operations.");
if (next == null)
return false;
@@ -442,6 +441,19 @@ namespace System.Net
Interlocked.Decrement (ref currentConnections);
}
public static async Task<bool> WaitAsync (Task workerTask, int millisecondTimeout)
{
var cts = new CancellationTokenSource ();
try {
var timeoutTask = Task.Delay (millisecondTimeout, cts.Token);
var ret = await Task.WhenAny (workerTask, timeoutTask).ConfigureAwait (false);
return ret != timeoutTask;
} finally {
cts.Cancel ();
cts.Dispose ();
}
}
class ConnectionGroup
{
public ServicePointScheduler Scheduler {
@@ -568,9 +580,9 @@ namespace System.Net
public (WebConnection connection, bool created) CreateOrReuseConnection (WebOperation operation, bool force)
{
Scheduler.Debug ($"CREATE OR REUSE: group={ID} OP={operation.ID} force={force}");
Scheduler.Debug ($"CREATE OR REUSE: group={ID} Op={operation.ID} force={force}");
var connection = FindIdleConnection (operation);
Scheduler.Debug ($"CREATE OR REUSE #1: group={ID} OP={operation.ID} force={force} - connection={connection?.ID}");
Scheduler.Debug ($"CREATE OR REUSE #1: group={ID} Op={operation.ID} force={force} - connection={connection?.ID}");
if (connection != null)
return (connection, false);
@@ -600,11 +612,9 @@ namespace System.Net
return m_tcs.Task.Wait (millisecondTimeout);
}
public async Task<bool> WaitAsync (int millisecondTimeout)
public Task<bool> WaitAsync (int millisecondTimeout)
{
var timeoutTask = Task.Delay (millisecondTimeout);
var ret = await Task.WhenAny (m_tcs.Task, timeoutTask).ConfigureAwait (false);
return ret != timeoutTask;
return ServicePointScheduler.WaitAsync (m_tcs.Task, millisecondTimeout);
}
public void Set ()
@@ -371,9 +371,10 @@ namespace System.Net
async Task WriteChunkTrailer ()
{
using (var cts = new CancellationTokenSource ()) {
var cts = new CancellationTokenSource ();
try {
cts.CancelAfter (WriteTimeout);
var timeoutTask = Task.Delay (WriteTimeout);
var timeoutTask = Task.Delay (WriteTimeout, cts.Token);
while (true) {
var completion = new WebCompletionSource ();
var oldCompletion = Interlocked.CompareExchange (ref pendingWrite, completion, null);
@@ -385,13 +386,13 @@ namespace System.Net
throw new WebException ("The operation has timed out.", WebExceptionStatus.Timeout);
}
try {
await WriteChunkTrailer_inner (cts.Token).ConfigureAwait (false);
} catch {
// Intentionally eating exceptions.
} finally {
pendingWrite = null;
}
await WriteChunkTrailer_inner (cts.Token).ConfigureAwait (false);
} catch {
// Intentionally eating exceptions.
} finally {
pendingWrite = null;
cts.Cancel ();
cts.Dispose ();
}
}
@@ -149,7 +149,7 @@ namespace System.Net
ReadTimeout, () => {
Operation.Abort ();
InnerStream.Dispose ();
}).ConfigureAwait (false);
}, () => Operation.Aborted, cancellationToken).ConfigureAwait (false);
} catch (Exception e) {
throwMe = GetReadException (WebExceptionStatus.ReceiveFailure, e, "ReadAsync");
}
@@ -404,22 +404,28 @@ namespace System.Net
return;
}
var timeoutTask = Task.Delay (ReadTimeout);
var completion = new WebCompletionSource ();
while (true) {
/*
* 'currentRead' is set by ReadAsync().
*/
cancellationToken.ThrowIfCancellationRequested ();
var oldCompletion = Interlocked.CompareExchange (ref pendingRead, completion, null);
if (oldCompletion == null)
break;
var timeoutCts = new CancellationTokenSource ();
try {
var timeoutTask = Task.Delay (ReadTimeout, timeoutCts.Token);
while (true) {
/*
* 'currentRead' is set by ReadAsync().
*/
cancellationToken.ThrowIfCancellationRequested ();
var oldCompletion = Interlocked.CompareExchange (ref pendingRead, completion, null);
if (oldCompletion == null)
break;
// ReadAsync() is in progress.
var oldReadTask = oldCompletion.WaitForCompletion ();
var anyTask = await Task.WhenAny (oldReadTask, timeoutTask).ConfigureAwait (false);
if (anyTask == timeoutTask)
throw new WebException ("The operation has timed out.", WebExceptionStatus.Timeout);
// ReadAsync() is in progress.
var oldReadTask = oldCompletion.WaitForCompletion ();
var anyTask = await Task.WhenAny (oldReadTask, timeoutTask).ConfigureAwait (false);
if (anyTask == timeoutTask)
throw new WebException ("The operation has timed out.", WebExceptionStatus.Timeout);
}
} finally {
timeoutCts.Cancel ();
timeoutCts.Dispose ();
}
WebConnection.Debug ($"{ME} READ ALL ASYNC #1");
@@ -652,7 +658,7 @@ namespace System.Net
else
StatusDescription = string.Empty;
if (pos >= buffer.Size)
if (pos >= buffer.Offset)
return true;
}
+2 -2
View File
@@ -43,7 +43,7 @@ System/RemoteExecutorTests.cs
../../../external/corefx/src/Common/tests/System/Net/SslProtocolSupport.cs
#../../../external/corefx/src/System.Net.Security/tests/UnitTests/*.cs:TlsAlertsMatchWindowsInterop.cs
#../../../external/corefx/src/System.Net.Security/tests/UnitTests/System/Security/Authentication/ExtendedProtection/*.cs
../../../external/corefx/src/System.Net.Security/tests/UnitTests/Fakes/*.cs:FakeSslState.cs,FakeLazyAsyncResult.cs
#../../../external/corefx/src/System.Net.Security/tests/UnitTests/Fakes/*.cs:FakeSslState.cs,FakeLazyAsyncResult.cs
../../../external/corefx/src/Common/src/System/Net/Logging/NetEventSource.Common.cs
../../../external/corefx/src/Common/src/System/Net/InternalException.cs
../../../external/corefx/src/System.Net.Security/src/System/Net/Security/TlsAlertMessage.cs
@@ -56,7 +56,7 @@ System/RemoteExecutorTests.cs
#../../../external/corefx/src/System.Net.Ping/tests/FunctionalTests/*.cs
# System.Net.WebSockets
../../../external/corefx/src/System.Net.WebSockets/tests/*.cs
#../../../external/corefx/src/System.Net.WebSockets/tests/*.cs
# System.Net.WebProxy
#../../../external/corefx/src/System.Net.WebProxy/tests/*.cs
@@ -254,12 +254,11 @@ namespace MonoTests.System.Net.Sockets
{
Socket srv = CreateServer (NetworkHelpers.FindFreePort ());
ClientSocket clnt = new ClientSocket (srv.LocalEndPoint);
Thread th = new Thread (new ThreadStart (clnt.ConnectSleepClose));
Socket acc = null;
try {
th.Start ();
acc = srv.Accept ();
clnt.Connect ();
clnt.Write ();
acc = srv.Accept ();
ArrayList list = new ArrayList ();
ArrayList empty = new ArrayList ();
list.Add (acc);
@@ -279,6 +278,7 @@ namespace MonoTests.System.Net.Sockets
if (acc != null)
acc.Close ();
srv.Close ();
clnt.Close ();
}
}
@@ -300,10 +300,13 @@ namespace MonoTests.System.Net.Sockets
sock = new Socket (AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
}
public void ConnectSleepClose ()
public void Connect ()
{
sock.Connect (ep);
Thread.Sleep (2000);
}
public void Close ()
{
sock.Close ();
}
@@ -3457,6 +3457,7 @@ namespace MonoTests.System.Net
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
[Category ("MobileNotWorking")] // https://github.com/xamarin/xamarin-macios/issues/3827
// Bug6737
// This test is supposed to fail prior to .NET 4.0
public void Post_EmptyRequestStream ()
@@ -1221,6 +1221,7 @@ namespace MonoTests.System.Net
[Test]
[Category ("StaticLinkedAotNotWorking")] // Native MPH loading issues
[Category ("MobileNotWorking")] // https://github.com/xamarin/xamarin-macios/issues/3827
#if FEATURE_NO_BSD_SOCKETS
[ExpectedException (typeof (PlatformNotSupportedException))]
#endif
@@ -1685,10 +1685,12 @@ namespace MonoTests.System.Net
// We throw a PlatformNotSupportedException deeper, which is caught and re-thrown as WebException
[ExpectedException (typeof (WebException))]
#endif
[Category ("MobileNotWorking")] // https://github.com/xamarin/xamarin-macios/issues/3827
[Category ("InetAccess")]
public void GetWebRequestOverriding ()
{
GetWebRequestOverridingTestClass testObject = new GetWebRequestOverridingTestClass ();
testObject.DownloadData ("http://www.mono-project.com");
testObject.DownloadData ("http://www.example.com");
Assert.IsTrue (testObject.overridedCodeRan, "Overrided code wasn't called");
}
@@ -88,7 +88,7 @@ namespace MonoTests.System.Net
WebClient wc = new WebClient ();
string filename = Path.GetTempFileName ();
var task = wc.DownloadFileTaskAsync ("http://www.mono-project.com/", filename);
var task = wc.DownloadFileTaskAsync ("http://www.example.com/", filename);
Assert.IsTrue (task.Wait (15000));
Assert.IsTrue (task.IsCompleted);
@@ -26,7 +26,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !MOBILE
#if MONO_FEATURE_CAS
using NUnit.Framework;
@@ -26,6 +26,9 @@ namespace MonoTests.System.Threading {
}
[Test]
#if MONODROID
[Ignore("https://github.com/mono/mono/issues/8349")]
#endif
public void WaitHandle_WaitOne_SynchronizationContext ()
{
var e = new ManualResetEvent(false);
@@ -75,6 +75,7 @@ using System.Runtime.InteropServices;
[assembly: InternalsVisibleTo ("System, PublicKey=" + AssemblyRef.FrameworkPublicKeyFull2)]
[assembly: InternalsVisibleTo ("System.Core, PublicKey=" + AssemblyRef.FrameworkPublicKeyFull2)]
[assembly: InternalsVisibleTo ("System.Numerics, PublicKey=00000000000000000400000000000000")]
[assembly: InternalsVisibleTo ("System.Runtime.WindowsRuntime, PublicKey=00000000000000000400000000000000")]
[assembly: InternalsVisibleTo ("System.Runtime.WindowsRuntime.UI.Xaml, PublicKey=00000000000000000400000000000000")]
@@ -171,6 +171,7 @@
<type fullname="System.Exception" preserve="fields">
<!-- used in mini-exceptions.c (if trace is enabled) -->
<method name="get_Message" />
<method name="FixRemotingException" feature="remoting" />
</type>
<!-- exception.c (mono_get_exception_execution_engine) -->
@@ -229,6 +230,9 @@
<method signature="System.Void .ctor(System.String)" />
</type>
<!-- reflection.c mono_get_reflection_missing_object -->
<type fullname="System.Missing" preserve="fields" />
<type fullname="System.MarshalByRefObject" preserve="fields" feature="remoting" />
<type fullname="System.MethodAccessException">
+6 -1
View File
@@ -98,7 +98,7 @@ endif
COREFX_FLAGS := -d:FEATURE_PORTABLE_SPAN
WARNING_ABOUT_DISABLED_WARNING=1635
LOCAL_MCS_FLAGS = -unsafe -nostdlib -nowarn:612,618,3001,3002,3003,$(WARNING_ABOUT_DISABLED_WARNING) -d:INSIDE_CORLIB,MONO_CULTURE_DATA -d:LIBC $(REFERENCE_SOURCES_FLAGS) $(COREFX_FLAGS)
LOCAL_MCS_FLAGS = -unsafe -nostdlib -nowarn:612,618,3001,3002,3003,3019,$(WARNING_ABOUT_DISABLED_WARNING) -d:INSIDE_CORLIB,MONO_CULTURE_DATA -d:LIBC $(REFERENCE_SOURCES_FLAGS) $(COREFX_FLAGS)
DEFAULT_REFERENCES =
TEST_LIB_REFS = System.Core System
@@ -116,6 +116,11 @@ endif
TEST_MCS_FLAGS += -debug -nowarn:168,219,618,672 -unsafe \
-define:MONO_DATACONVERTER_STATIC_METHODS $(TEST_RESX_RESOURCES:%=-resource:%) -resource:LinkerDescriptor/mscorlib_test.xml,$(test_lib:.dll=.xml)
ifeq ($(PROFILE),net_4_x)
LIB_MCS_FLAGS += -d:FEATURE_CRYPTO_CONFIGURABLE
TEST_MCS_FLAGS += -d:FEATURE_CRYPTO_CONFIGURABLE
endif
CC_PROFILE := $(filter monotouch% xammac, $(PROFILE))
ifdef CC_PROFILE
+50 -4
View File
@@ -81,22 +81,68 @@ namespace Mono {
return true;
}
[MethodImplAttribute (MethodImplOptions.InternalCall)]
static extern string ExceptionToState_internal (Exception exc, out ulong portable_hash, out ulong unportable_hash);
static Tuple<String, ulong, ulong>
ExceptionToState (Exception exc)
{
ulong portable_hash;
ulong unportable_hash;
string payload_str = ExceptionToState_internal (exc, out portable_hash, out unportable_hash);
return new Tuple<String, ulong, ulong> (payload_str, portable_hash, unportable_hash);
}
#if !MOBILE
[MethodImplAttribute (MethodImplOptions.InternalCall)]
static extern void DisableMicrosoftTelemetry (IntPtr appBundleID, IntPtr appSignature, IntPtr appVersion, IntPtr merpGUIPath);
static extern void DisableMicrosoftTelemetry ();
[MethodImplAttribute (MethodImplOptions.InternalCall)]
static extern void EnableMicrosoftTelemetry_internal (IntPtr appBundleID, IntPtr appSignature, IntPtr appVersion, IntPtr merpGUIPath);
static extern void EnableMicrosoftTelemetry_internal (IntPtr appBundleID, IntPtr appSignature, IntPtr appVersion, IntPtr merpGUIPath, IntPtr eventType, IntPtr appPath);
static void EnableMicrosoftTelemetry (string appBundleID_str, string appSignature_str, string appVersion_str, string merpGUIPath_str)
[MethodImplAttribute (MethodImplOptions.InternalCall)]
static extern void SendMicrosoftTelemetry_internal (IntPtr payload, ulong portable_hash, ulong unportable_hash);
static void SendMicrosoftTelemetry (string payload_str, ulong portable_hash, ulong unportable_hash)
{
if (RuntimeInformation.IsOSPlatform (OSPlatform.OSX)) {
using (var payload_chars = RuntimeMarshal.MarshalString (payload_str))
{
SendMicrosoftTelemetry_internal (payload_chars.Value, portable_hash, unportable_hash);
}
} else {
throw new PlatformNotSupportedException("Merp support is currently only supported on OSX.");
}
}
// Usage:
//
// catch (Exception exc) {
// var monoType = Type.GetType ("Mono.Runtime", false);
// var m = monoType.GetMethod("SendExceptionToTelemetry", BindingFlags.NonPublic | BindingFlags.Static);
// m.Invoke(null, new object[] { exc });
// }
static void SendExceptionToTelemetry (Exception exc)
{
ulong portable_hash;
ulong unportable_hash;
string payload_str = ExceptionToState_internal (exc, out portable_hash, out unportable_hash);
SendMicrosoftTelemetry (payload_str, portable_hash, unportable_hash);
}
static void EnableMicrosoftTelemetry (string appBundleID_str, string appSignature_str, string appVersion_str, string merpGUIPath_str, string eventType_str, string appPath_str)
{
if (RuntimeInformation.IsOSPlatform (OSPlatform.OSX)) {
using (var appBundleID_chars = RuntimeMarshal.MarshalString (appBundleID_str))
using (var appSignature_chars = RuntimeMarshal.MarshalString (appSignature_str))
using (var appVersion_chars = RuntimeMarshal.MarshalString (appVersion_str))
using (var merpGUIPath_chars = RuntimeMarshal.MarshalString (merpGUIPath_str))
using (var eventType_chars = RuntimeMarshal.MarshalString (eventType_str))
using (var appPath_chars = RuntimeMarshal.MarshalString (appPath_str))
{
EnableMicrosoftTelemetry_internal (appBundleID_chars.Value, appSignature_chars.Value, appVersion_chars.Value, merpGUIPath_chars.Value);
EnableMicrosoftTelemetry_internal (appBundleID_chars.Value, appSignature_chars.Value, appVersion_chars.Value, merpGUIPath_chars.Value, eventType_chars.Value, appPath_chars.Value);
}
} else {
throw new PlatformNotSupportedException("Merp support is currently only supported on OSX.");
+8 -1
View File
@@ -51,7 +51,7 @@ namespace System
public static readonly String Empty;
public unsafe static implicit operator ReadOnlySpan<char> (String value)
internal unsafe static ReadOnlySpan<char> ToReadOnlySpan (String value)
{
if (value == null)
return default;
@@ -87,6 +87,13 @@ namespace System
return -1;
}
[CLSCompliant(false)]
public static String Concat(Object arg0, Object arg1, Object arg2, Object arg3, __arglist)
{
// Added to maintain backward compatibility, see https://github.com/mono/mono/issues/9996
throw new PlatformNotSupportedException();
}
internal unsafe int IndexOfUncheckedIgnoreCase (string value, int startIndex, int count)
{
int valueLen = value.Length;
@@ -6,6 +6,8 @@ using System.Text;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Mono;
namespace System.IO {
class LogcatTextWriter : TextWriter {
@@ -74,8 +76,8 @@ namespace System.IO {
}
}
fixed (byte *b_message = Encoding.UTF8.GetBytes(message + '\0')) {
Log (b_message);
using (SafeStringMarshal str = new SafeStringMarshal(message)) {
Log ((byte*) str.Value);
}
}
}
@@ -172,7 +172,7 @@ namespace System.Reflection.Emit {
CreateDynMethod ();
deleg = Delegate.CreateDelegate (delegateType, this);
deleg = Delegate.CreateDelegate (delegateType, null, this);
return deleg;
}
@@ -30,7 +30,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if FULL_AOT_RUNTIME
#if !FEATURE_CRYPTO_CONFIGURABLE
// This is a special version of CryptoConfig that is not configurable and
// every "choice" is statiscally compiled. As long as CreateFromName is not
@@ -38,17 +38,13 @@
using System.Runtime.InteropServices;
using System.Security.Permissions;
using System.Collections.Generic;
namespace System.Security.Cryptography {
[ComVisible (true)]
public partial class CryptoConfig {
public static void AddAlgorithm (Type algorithm, params string[] names)
{
throw new PlatformNotSupportedException ();
}
public static void AddOID (string oid, params string[] names)
{
throw new PlatformNotSupportedException ();
@@ -61,12 +57,12 @@ namespace System.Security.Cryptography {
return CreateFromName (name, null);
}
[PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)]
public static object CreateFromName (string name, params object[] args)
{
if (name == null)
throw new ArgumentNullException ("name");
// TODO: These ignore args
switch (name.ToLowerInvariant ()) {
case "system.security.cryptography.dsacryptoserviceprovider":
case "system.security.cryptography.dsa":
@@ -156,8 +152,8 @@ namespace System.Security.Cryptography {
case "system.security.cryptography.hashalgorithm":
case "system.security.cryptography.sha1":
case "system.security.cryptography.sha1cryptoserviceprovider":
case "system.security.cryptography.sha1cng":
case "sha1":
case "system.security.cryptography.sha1cng":
case "sha":
case "http://www.w3.org/2000/09/xmldsig#sha1":
return new SHA1CryptoServiceProvider ();
@@ -193,23 +189,47 @@ namespace System.Security.Cryptography {
case "tripledes":
case "3des":
return new TripleDESCryptoServiceProvider ();
// These are not yet linker friendly
case "x509chain":
name = "System.Security.Cryptography.X509Certificates.X509Chain, System";
break;
case "2.5.29.15":
name = "System.Security.Cryptography.X509Certificates.X509KeyUsageExtension, System";
break;
case "2.5.29.19":
name = "System.Security.Cryptography.X509Certificates.X509BasicConstraintsExtension, System";
break;
case "2.5.29.14":
name = "System.Security.Cryptography.X509Certificates.X509SubjectKeyIdentifierExtension, System";
break;
case "2.5.29.37":
name = "System.Security.Cryptography.X509Certificates.X509EnhancedKeyUsageExtension, System";
break;
case "aes":
#if FULL_AOT_DESKTOP // TODO: why is this special cased? we could use AesManaged like other full AOT profiles
name = "System.Security.Cryptography.AesCryptoServiceProvider, System.Core";
#else
#if MONOTOUCH || XAMMAC
name = "System.Security.Cryptography.AesManaged, System.Core";
#else
name = "System.Security.Cryptography.AesCryptoServiceProvider, System.Core";
#endif
break;
}
lock (lockObject) {
Type algoClass = null;
if (algorithms?.TryGetValue (name, out algoClass) == true) {
try {
return Activator.CreateInstance (algoClass, args);
} catch {
}
}
}
try {
// last resort, the request type might be available (if care is taken for the type not to be linked
// away) and that can allow some 3rd party code to work (e.g. extra algorithms) and make a few more
// unit tests happy
return Activator.CreateInstance (Type.GetType (name));
return Activator.CreateInstance (Type.GetType (name), args);
}
catch {
// method doesn't throw any exception
@@ -272,6 +292,11 @@ namespace System.Security.Cryptography {
return null;
}
}
static void Initialize ()
{
algorithms = new Dictionary<string, Type> (StringComparer.OrdinalIgnoreCase);
}
}
}
@@ -29,9 +29,43 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.Collections.Generic;
namespace System.Security.Cryptography {
public partial class CryptoConfig {
public partial class CryptoConfig
{
static readonly object lockObject = new object ();
static Dictionary<string,Type> algorithms;
public static void AddAlgorithm (Type algorithm, params string[] names)
{
if (algorithm == null)
throw new ArgumentNullException (nameof (algorithm));
if (!algorithm.IsVisible)
throw new ArgumentException ("Algorithms added to CryptoConfig must be accessable from outside their assembly.", nameof (algorithm));
if (names == null)
throw new ArgumentNullException (nameof (names));
var algorithmNames = new string [names.Length];
Array.Copy (names, algorithmNames, algorithmNames.Length);
foreach (string name in algorithmNames) {
if (string.IsNullOrEmpty (name)) {
throw new ArgumentException ("CryptoConfig cannot add a mapping for a null or empty name.");
}
}
lock (lockObject) {
if (algorithms == null) {
Initialize ();
}
foreach (string name in algorithmNames) {
algorithms [name] = algorithm;
}
}
}
public static byte[] EncodeOID (string str)
{
@@ -30,7 +30,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !FULL_AOT_RUNTIME
#if FEATURE_CRYPTO_CONFIGURABLE
using System.Collections;
using System.Collections.Generic;
@@ -50,8 +50,6 @@ namespace System.Security.Cryptography {
[ComVisible (true)]
public partial class CryptoConfig {
static private object lockObject;
static private Dictionary<string,Type> algorithms;
static private Dictionary<string,string> unresolved_algorithms;
static private Dictionary<string,string> oids;
@@ -281,12 +279,6 @@ public partial class CryptoConfig {
// SHA512 provider
const string nameSHA512Provider = "System.Security.Cryptography.SHA512CryptoServiceProvider";
const string defaultSHA512Provider = "System.Security.Cryptography.SHA512CryptoServiceProvider" + system_core_assembly;
static CryptoConfig ()
{
// lock(this) is bad
// http://msdn.microsoft.com/library/en-us/dnaskdr/html/askgui06032003.asp?frame=true
lockObject = new object ();
}
private static void Initialize ()
{
@@ -562,20 +554,6 @@ public partial class CryptoConfig {
return result;
}
public static void AddAlgorithm (Type algorithm, params string[] names)
{
if (algorithm == null)
throw new ArgumentNullException ("algorithm");
if (names == null)
throw new ArgumentNullException ("names");
foreach (string name in names) {
if (String.IsNullOrWhiteSpace (name))
throw new ArithmeticException ("names");
algorithms [name] = algorithm;
}
}
public static void AddOID (string oid, params string[] names)
{
if (oid == null)
@@ -55,7 +55,9 @@ namespace System.Threading
static int WaitOneNative (SafeHandle waitableSafeHandle, uint millisecondsTimeout, bool hasThreadAffinity, bool exitContext)
{
bool release = false;
#if !MONODROID
var context = SynchronizationContext.Current;
#endif
try {
waitableSafeHandle.DangerousAddRef (ref release);
@@ -64,6 +66,7 @@ namespace System.Threading
SynchronizationAttribute.ExitContext ();
#endif
#if !MONODROID
// HACK: Documentation (and public posts by experts like Joe Duffy) suggests that
// users must first call SetWaitNotificationRequired to flag that a given synchronization
// context overrides .Wait. Because invoking the Wait method is somewhat expensive, we use
@@ -79,7 +82,9 @@ namespace System.Threading
false,
(int)millisecondsTimeout
);
} else {
} else
#endif
{
unsafe {
IntPtr handle = waitableSafeHandle.DangerousGetHandle ();
return Wait_internal (&handle, 1, false, (int)millisecondsTimeout);
+1 -22
View File
@@ -173,7 +173,7 @@ namespace System {
offset++;
offset += ((int) number) * intOffset;
return GetInteger (buffer, offset);
return GetInt16 (buffer, offset);
}
public string Get (TermInfoStrings tstr)
@@ -222,27 +222,6 @@ namespace System {
return (short) (uno + dos * 256);
}
int GetInt32 (byte [] buffer, int offset)
{
int b1 = (int) buffer [offset];
int b2 = (int) buffer [offset + 1];
int b3 = (int) buffer [offset + 2];
int b4 = (int) buffer [offset + 3];
if (b1 == 255 && b2 == 255 && b3 == 255 && b4 == 255)
return -1;
return b1 + b2 << 8 + b3 << 16 + b4 << 24;
}
int GetInteger (byte [] buffer, int offset)
{
if (intOffset == 2)
return GetInt16 (buffer, offset);
else
// intOffset == 4
return GetInt32 (buffer, offset);
}
string GetString (byte [] buffer, int offset)
{
int length = 0;
+2 -1
View File
@@ -266,11 +266,12 @@ namespace System
}
}
#if LIBC
const string DefaultTimeZoneDirectory = "/usr/share/zoneinfo";
static string timeZoneDirectory;
static string TimeZoneDirectory {
get {
if (timeZoneDirectory == null)
timeZoneDirectory = "/usr/share/zoneinfo";
timeZoneDirectory = readlink (DefaultTimeZoneDirectory) ?? DefaultTimeZoneDirectory;
return timeZoneDirectory;
}
set {
@@ -1286,6 +1286,35 @@ namespace MonoTests.System.IO
}
}
/* regression test from https://github.com/xamarin/xamarin-macios/issues/3929 */
[Test]
public void LastWriteTimeSubMsCopy ()
{
string path = tmpFolder + Path.DirectorySeparatorChar + "lastWriteTimeSubMs";
if (File.Exists (path))
File.Delete (path);
string path_copy = tmpFolder + Path.DirectorySeparatorChar + "LastWriteTimeSubMs_copy";
if (File.Exists (path_copy))
File.Delete (path_copy);
try {
var fmt = "HH:mm:ss:fffffff";
for (var i = 0; i < 200; i++) {
File.WriteAllText (path, "");
var untouched = File.GetLastWriteTimeUtc (path);
File.Copy (path, path_copy);
var copy_touched = File.GetLastWriteTimeUtc (path_copy);
Assert.IsTrue (copy_touched >= untouched, $"Iteration #{i} failed, untouched: {untouched.ToString (fmt)} copy_touched: {copy_touched.ToString (fmt)}");
File.Delete (path_copy);
}
} finally {
DeleteFile (path);
DeleteFile (path_copy);
}
}
[Test]
public void GetCreationTime_Path_Null ()
{
@@ -744,6 +744,55 @@ namespace MonoTests.System.Reflection.Emit
Assert.AreEqual (typeof (TypedRefTarget), TypedReference.GetTargetType (tr));
}
#endif
static Action GenerateProblematicMethod (bool add_extra, bool mismatch = false, bool use_vts = false)
{
Type this_type = typeof(object);
Type bound_type = typeof(object);
if (mismatch) {
this_type = typeof (string);
bound_type = typeof (DynamicMethodTest);
} else if (use_vts) {
this_type = typeof (int);
bound_type = typeof (long);
}
Type[] args;
if (add_extra)
args = new[] { this_type };
else
args = new Type [0];
var mb = new DynamicMethod("Peek", null, args, bound_type, true);
var il = mb.GetILGenerator ();
il.Emit(OpCodes.Ret);
return (Action) mb.CreateDelegate(typeof(Action));
}
[Test]
public void ExtraArgGetsIgnored ()
{
GenerateProblematicMethod (true) ();
}
[Test]
public void ExactNumberOfArgsWork ()
{
GenerateProblematicMethod (false) ();
}
[Test]
public void ExtraArgWithMismatchedTypes ()
{
GenerateProblematicMethod (true, mismatch: true) ();
}
[Test]
[ExpectedException (typeof (ArgumentException))]
public void ExtraArgWithValueType ()
{
GenerateProblematicMethod (true, use_vts: true) ();
}
}
}
@@ -31,6 +31,7 @@
using NUnit.Framework;
using System;
using System.Linq;
using System.Threading;
using System.Reflection;
#if !MONOTOUCH && !FULL_AOT_RUNTIME
@@ -890,6 +891,60 @@ namespace MonoTests.System.Reflection
}
}
static void EnsureMethodExists (Type type, string name, params Type[] parameterTypes)
{
var method = type.GetTypeInfo ().GetDeclaredMethods (name)
.SingleOrDefault (m => m.GetParameters ().Select (p => p.ParameterType).SequenceEqual (parameterTypes));
Assert.IsNotNull (method, $"{type}.{name}");
}
public void EnsureEntityFrameworkMethodsExist ()
{
// EntityFramework6 relies on the following methods
// see https://github.com/aspnet/EntityFramework6/blob/master/src/EntityFramework/Core/Objects/ELinq/MethodCallTranslator.cs#L846
// also https://github.com/mono/mono/pull/10452
EnsureMethodExists (typeof (Math), "Ceiling", typeof (decimal));
EnsureMethodExists (typeof (Math), "Ceiling", typeof (double));
EnsureMethodExists (typeof (Math), "Floor", typeof (decimal));
EnsureMethodExists (typeof (Math), "Floor", typeof (double));
EnsureMethodExists (typeof (Math), "Round", typeof (decimal));
EnsureMethodExists (typeof (Math), "Round", typeof (double));
EnsureMethodExists (typeof (Math), "Round", typeof (decimal), typeof (int));
EnsureMethodExists (typeof (Math), "Round", typeof (double), typeof (int));
EnsureMethodExists (typeof (Decimal), "Floor", typeof (decimal));
EnsureMethodExists (typeof (Decimal), "Ceiling", typeof (decimal));
EnsureMethodExists (typeof (Decimal), "Round", typeof (decimal));
EnsureMethodExists (typeof (Decimal), "Round", typeof (decimal), typeof (int));
EnsureMethodExists (typeof (String), "Replace", typeof (String), typeof (String));
EnsureMethodExists (typeof (String), "ToLower");
EnsureMethodExists (typeof (String), "ToUpper");
EnsureMethodExists (typeof (String), "Trim");
EnsureMethodExists (typeof (Math), "Truncate", typeof (decimal));
EnsureMethodExists (typeof (Math), "Truncate", typeof (double));
EnsureMethodExists (typeof (Math), "Pow", typeof (double), typeof (double));
EnsureMethodExists (typeof (Guid), "NewGuid");
EnsureMethodExists (typeof (String), "Contains", typeof (string));
EnsureMethodExists (typeof (String), "IndexOf", typeof (string));
EnsureMethodExists (typeof (String), "StartsWith", typeof (string));
EnsureMethodExists (typeof (String), "EndsWith", typeof (string));
EnsureMethodExists (typeof (String), "Substring", typeof (int));
EnsureMethodExists (typeof (String), "Substring", typeof (int), typeof (int));
EnsureMethodExists (typeof (String), "Remove", typeof (int));
EnsureMethodExists (typeof (String), "Remove", typeof (int), typeof (int));
EnsureMethodExists (typeof (String), "IsNullOrEmpty", typeof (string));
EnsureMethodExists (typeof (String), "Concat", typeof (string), typeof (string));
EnsureMethodExists (typeof (String), "Concat", typeof (string), typeof (string), typeof (string));
EnsureMethodExists (typeof (String), "Concat", typeof (string), typeof (string), typeof (string), typeof (string));
EnsureMethodExists (typeof (String), "Concat", typeof (object), typeof (object));
EnsureMethodExists (typeof (String), "Concat", typeof (object), typeof (object), typeof (object));
EnsureMethodExists (typeof (String), "Concat", typeof (object), typeof (object), typeof (object), typeof (object));
EnsureMethodExists (typeof (String), "Concat", typeof (object[]));
EnsureMethodExists (typeof (String), "Concat", typeof (string[]));
EnsureMethodExists (typeof (String), "Trim", typeof (Char[]));
EnsureMethodExists (typeof (String), "TrimStart", typeof (Char[]));
EnsureMethodExists (typeof (String), "TrimEnd", typeof (Char[]));
}
[Test]
public void TestLocalVariableTypes ()
{
@@ -37,6 +37,10 @@ namespace MonoTests.System.Security.Cryptography {
[TestFixture]
public class CryptoConfigTest {
public class FakeAlgorithm
{
}
void CreateFromName (string name, string objectname)
{
object o = CryptoConfig.CreateFromName (name);
@@ -137,20 +141,9 @@ public class CryptoConfigTest {
// additional names (URL) used for XMLDSIG (System.Security.Cryptography.Xml)
// URL taken from http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/
[Test]
#if MOBILE
[Ignore ("System.Security.dll is not part of Moonlight, MonoTouch and Mono for Android")]
#endif
public void CreateFromURL ()
{
// URL used in SignatureMethod element
CreateFromName ("http://www.w3.org/2000/09/xmldsig#dsa-sha1", "System.Security.Cryptography.DSASignatureDescription");
CreateFromName ("http://www.w3.org/2000/09/xmldsig#rsa-sha1", "System.Security.Cryptography.RSAPKCS1SHA1SignatureDescription");
CreateFromName ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha256", "System.Security.Cryptography.RSAPKCS1SHA256SignatureDescription");
CreateFromName ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha384", "System.Security.Cryptography.RSAPKCS1SHA384SignatureDescription");
CreateFromName ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha512", "System.Security.Cryptography.RSAPKCS1SHA512SignatureDescription");
CreateFromName ("http://www.w3.org/2000/09/xmldsig#hmac-sha1", "System.Security.Cryptography.HMACSHA1");
// URL used in DigestMethod element
CreateFromName ("http://www.w3.org/2000/09/xmldsig#sha1", "System.Security.Cryptography.SHA1CryptoServiceProvider");
#if FEATURE_CRYPTO_CONFIGURABLE
// URL used in Canonicalization or Transform elements
CreateFromName ("http://www.w3.org/TR/2001/REC-xml-c14n-20010315", "System.Security.Cryptography.Xml.XmlDsigC14NTransform");
CreateFromName ("http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments", "System.Security.Cryptography.Xml.XmlDsigC14NWithCommentsTransform");
@@ -171,6 +164,17 @@ public class CryptoConfigTest {
CreateFromName ("http://www.w3.org/2000/09/xmldsig# KeyValue/DSAKeyValue", "System.Security.Cryptography.Xml.DSAKeyValue");
CreateFromName ("http://www.w3.org/2000/09/xmldsig# KeyValue/RSAKeyValue", "System.Security.Cryptography.Xml.RSAKeyValue");
CreateFromName ("http://www.w3.org/2000/09/xmldsig# RetrievalMethod", "System.Security.Cryptography.Xml.KeyInfoRetrievalMethod");
#endif
// URL used in SignatureMethod element
CreateFromName ("http://www.w3.org/2000/09/xmldsig#dsa-sha1", "System.Security.Cryptography.DSASignatureDescription");
CreateFromName ("http://www.w3.org/2000/09/xmldsig#rsa-sha1", "System.Security.Cryptography.RSAPKCS1SHA1SignatureDescription");
CreateFromName ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha256", "System.Security.Cryptography.RSAPKCS1SHA256SignatureDescription");
CreateFromName ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha384", "System.Security.Cryptography.RSAPKCS1SHA384SignatureDescription");
CreateFromName ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha512", "System.Security.Cryptography.RSAPKCS1SHA512SignatureDescription");
CreateFromName ("http://www.w3.org/2000/09/xmldsig#hmac-sha1", "System.Security.Cryptography.HMACSHA1");
// URL used in DigestMethod element
CreateFromName ("http://www.w3.org/2000/09/xmldsig#sha1", "System.Security.Cryptography.SHA1CryptoServiceProvider");
CreateFromName ("http://www.w3.org/2001/04/xmlenc#sha256", "System.Security.Cryptography.SHA256Managed");
CreateFromName ("http://www.w3.org/2001/04/xmlenc#sha384", null);
CreateFromName ("http://www.w3.org/2001/04/xmlenc#sha512", "System.Security.Cryptography.SHA512Managed");
@@ -402,6 +406,14 @@ public class CryptoConfigTest {
CryptoConfig cc = new CryptoConfig ();
Assert.AreEqual ("System.Security.Cryptography.CryptoConfig", cc.ToString ());
}
[Test]
public void AddAlgorithm ()
{
CryptoConfig.AddAlgorithm (typeof (FakeAlgorithm), "test");
Assert.IsNotNull (CryptoConfig.CreateFromName ("test"));
}
}
}
@@ -309,17 +309,16 @@ public class SignatureDescriptionTest {
[Test]
public void RSASignatureDescription ()
{
// TODO: this would be cleaner with NUnit TestCase'es but they're NUnit 2.5+ :(
#if FULL_AOT_RUNTIME || MONOTOUCH || MONODROID || XAMMAC || XAMMAC_4_5
RSASignatureDescriptionCore ("http://www.w3.org/2000/09/xmldsig#rsa-sha1", "System.Security.Cryptography.SHA1Cng", "System.Security.Cryptography.SHA1CryptoServiceProvider");
RSASignatureDescriptionCore ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha256", "System.Security.Cryptography.SHA256Cng", "System.Security.Cryptography.SHA256Managed");
RSASignatureDescriptionCore ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha384", "System.Security.Cryptography.SHA384Cng", "System.Security.Cryptography.SHA384Managed");
RSASignatureDescriptionCore ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha512", "System.Security.Cryptography.SHA512Cng", "System.Security.Cryptography.SHA512Managed");
#else
#if FEATURE_CRYPTO_CONFIGURABLE
RSASignatureDescriptionCore ("http://www.w3.org/2000/09/xmldsig#rsa-sha1", "System.Security.Cryptography.SHA1Cng", "System.Security.Cryptography.SHA1Cng");
RSASignatureDescriptionCore ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha256", "System.Security.Cryptography.SHA256Cng", "System.Security.Cryptography.SHA256Cng");
RSASignatureDescriptionCore ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha384", "System.Security.Cryptography.SHA384Cng", "System.Security.Cryptography.SHA384Cng");
RSASignatureDescriptionCore ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha512", "System.Security.Cryptography.SHA512Cng", "System.Security.Cryptography.SHA512Cng");
#else
RSASignatureDescriptionCore ("http://www.w3.org/2000/09/xmldsig#rsa-sha1", "System.Security.Cryptography.SHA1Cng", "System.Security.Cryptography.SHA1CryptoServiceProvider");
RSASignatureDescriptionCore ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha256", "System.Security.Cryptography.SHA256Cng", "System.Security.Cryptography.SHA256Managed");
RSASignatureDescriptionCore ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha384", "System.Security.Cryptography.SHA384Cng", "System.Security.Cryptography.SHA384Managed");
RSASignatureDescriptionCore ("http://www.w3.org/2001/04/xmldsig-more#rsa-sha512", "System.Security.Cryptography.SHA512Cng", "System.Security.Cryptography.SHA512Managed");
#endif
}
@@ -339,7 +339,6 @@ namespace MonoTests.System.Threading.Tasks
bool result = false;
Func<int, int> func = (i) => {
Assert.IsTrue (Thread.CurrentThread.IsThreadPoolThread);
result = true; return i + 3;
};
@@ -445,14 +444,12 @@ namespace MonoTests.System.Threading.Tasks
}
[Test]
[Category ("MacNotWorking")] // Randomly fails - https://bugzilla.xamarin.com/show_bug.cgi?id=51255
public void FromAsync_Completed ()
{
var completed = new CompletedAsyncResult ();
bool? valid = null;
Action<IAsyncResult> end = l => {
Assert.IsFalse (Thread.CurrentThread.IsThreadPoolThread, "#2");
valid = l == completed;
};
Task task = factory.FromAsync (completed, end);
@@ -557,7 +554,6 @@ namespace MonoTests.System.Threading.Tasks
factory = new TaskFactory (scheduler);
Task task = factory.FromAsync (result, l => {
Assert.IsTrue (Thread.CurrentThread.IsThreadPoolThread, "#6");
called = true;
}, TaskCreationOptions.AttachedToParent);
@@ -582,8 +578,6 @@ namespace MonoTests.System.Threading.Tasks
if ((TaskCreationOptions) c != TaskCreationOptions.AttachedToParent)
Assert.Fail ("#11");
Assert.IsFalse (Thread.CurrentThread.IsThreadPoolThread, "#12");
called2 = true;
var ar = Task.CompletedTask;
b.Invoke (ar);
@@ -10,13 +10,17 @@ namespace MonoTests.System.Threading.Tasks
{
[TestFixture]
public class ThreadPrincipalTests
{
{
#if !MONOTOUCH // Uses LogicalCallContext
[Test]
public void PrincipalFlowsToAsyncTask ()
{
var t = _PrincipalFlowsToAsyncTask();
t.GetAwaiter().GetResult();
/* run in different thread to work around problems on platforms
* where SynchronizationContext is set (e.g. Xamarin.iOS) */
Assert.IsTrue (Task.Run (async () => await _PrincipalFlowsToAsyncTask ()).Wait (5000));
}
#endif
public async Task _PrincipalFlowsToAsyncTask ()
{
@@ -124,8 +124,8 @@ namespace MonoTests.System
} catch (DllNotFoundException e) {
return;
}
#if !MONOTOUCH && !XAMMAC && !XAMMAC_4_5
// this assumption is incorrect for iOS, tvO, watchOS and OSX
#if !MONOTOUCH && !XAMMAC
// this assumption is incorrect for the TimeZoneInfo.MonoTouch.cs implementation (iOS, tvOS, watchOS and XamMac Modern)
Assert.IsTrue (TimeZoneInfo.Local.Id != "Local", "Local timezone id should not be \"Local\"");
#endif
}
+4 -4
View File
@@ -5,17 +5,17 @@ namespace System.IO
{
partial class Stream
{
public virtual int Read (Span<byte> destination)
internal virtual int Read (Span<byte> destination)
{
throw new NotImplementedException ();
}
public virtual void Write (ReadOnlySpan<byte> source)
internal virtual void Write (ReadOnlySpan<byte> source)
{
throw new NotImplementedException ();
}
public virtual ValueTask<int> ReadAsync(Memory<byte> destination, CancellationToken cancellationToken = default(CancellationToken))
internal virtual ValueTask<int> ReadAsync(Memory<byte> destination, CancellationToken cancellationToken = default(CancellationToken))
{
if (destination.TryGetArray (out ArraySegment<byte> array))
return new ValueTask<int> (ReadAsync (array.Array, array.Offset, array.Count, cancellationToken));
@@ -23,7 +23,7 @@ namespace System.IO
throw new NotImplementedException ();
}
public virtual Task WriteAsync (ReadOnlyMemory<byte> source, CancellationToken cancellationToken = default(CancellationToken))
internal virtual Task WriteAsync (ReadOnlyMemory<byte> source, CancellationToken cancellationToken = default(CancellationToken))
{
throw new NotImplementedException ();
}
+2 -2
View File
@@ -27,7 +27,7 @@
<PropertyGroup Condition=" '$(Platform)' == 'net_4_x' ">
<OutputPath>./../../class/lib/net_4_x-$(HostPlatform)</OutputPath>
<IntermediateOutputPath>./../../class/obj/$(AssemblyName)-net_4_x-$(HostPlatform)</IntermediateOutputPath>
<DefineConstants>INSIDE_CORLIB;MONO_CULTURE_DATA;LIBC;FEATURE_PAL;GENERICS_WORK;FEATURE_LIST_PREDICATES;FEATURE_SERIALIZATION;FEATURE_ENCODINGNLS;FEATURE_ASCII;FEATURE_LATIN1;FEATURE_UTF7;FEATURE_UTF32;MONO_HYBRID_ENCODING_SUPPORT;FEATURE_ASYNC_IO;NEW_EXPERIMENTAL_ASYNC_IO;FEATURE_UTF32;FEATURE_EXCEPTIONDISPATCHINFO;FEATURE_CORRUPTING_EXCEPTIONS;FEATURE_EXCEPTION_NOTIFICATIONS;FEATURE_STRONGNAME_MIGRATION;FEATURE_USE_LCID;FEATURE_FUSION;FEATURE_CRYPTO;FEATURE_X509_SECURESTRINGS;FEATURE_SYNCHRONIZATIONCONTEXT;FEATURE_SYNCHRONIZATIONCONTEXT_WAIT;HAS_CORLIB_CONTRACTS;FEATURE_MACL;FEATURE_REMOTING;MONO_COM;FEATURE_COMINTEROP;FEATURE_ROLE_BASED_SECURITY;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;FEATURE_PORTABLE_SPAN;NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;MULTIPLEX_OS;FEATURE_PAL;GENERICS_WORK;FEATURE_LIST_PREDICATES;FEATURE_SERIALIZATION;FEATURE_ENCODINGNLS;FEATURE_ASCII;FEATURE_LATIN1;FEATURE_UTF7;FEATURE_UTF32;MONO_HYBRID_ENCODING_SUPPORT;FEATURE_ASYNC_IO;NEW_EXPERIMENTAL_ASYNC_IO;FEATURE_UTF32;FEATURE_EXCEPTIONDISPATCHINFO;FEATURE_CORRUPTING_EXCEPTIONS;FEATURE_EXCEPTION_NOTIFICATIONS;FEATURE_STRONGNAME_MIGRATION;FEATURE_USE_LCID;FEATURE_FUSION;FEATURE_CRYPTO;FEATURE_X509_SECURESTRINGS;FEATURE_SYNCHRONIZATIONCONTEXT;FEATURE_SYNCHRONIZATIONCONTEXT_WAIT;HAS_CORLIB_CONTRACTS;FEATURE_MACL;FEATURE_REMOTING;MONO_COM;FEATURE_COMINTEROP;FEATURE_ROLE_BASED_SECURITY;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;MONO_FEATURE_CONSOLE;MONO_FEATURE_APPLETLS</DefineConstants>
<DefineConstants>INSIDE_CORLIB;MONO_CULTURE_DATA;LIBC;FEATURE_PAL;GENERICS_WORK;FEATURE_LIST_PREDICATES;FEATURE_SERIALIZATION;FEATURE_ENCODINGNLS;FEATURE_ASCII;FEATURE_LATIN1;FEATURE_UTF7;FEATURE_UTF32;MONO_HYBRID_ENCODING_SUPPORT;FEATURE_ASYNC_IO;NEW_EXPERIMENTAL_ASYNC_IO;FEATURE_UTF32;FEATURE_EXCEPTIONDISPATCHINFO;FEATURE_CORRUPTING_EXCEPTIONS;FEATURE_EXCEPTION_NOTIFICATIONS;FEATURE_STRONGNAME_MIGRATION;FEATURE_USE_LCID;FEATURE_FUSION;FEATURE_CRYPTO;FEATURE_X509_SECURESTRINGS;FEATURE_SYNCHRONIZATIONCONTEXT;FEATURE_SYNCHRONIZATIONCONTEXT_WAIT;HAS_CORLIB_CONTRACTS;FEATURE_MACL;FEATURE_REMOTING;MONO_COM;FEATURE_COMINTEROP;FEATURE_ROLE_BASED_SECURITY;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;FEATURE_PORTABLE_SPAN;NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;MULTIPLEX_OS;FEATURE_PAL;GENERICS_WORK;FEATURE_LIST_PREDICATES;FEATURE_SERIALIZATION;FEATURE_ENCODINGNLS;FEATURE_ASCII;FEATURE_LATIN1;FEATURE_UTF7;FEATURE_UTF32;MONO_HYBRID_ENCODING_SUPPORT;FEATURE_ASYNC_IO;NEW_EXPERIMENTAL_ASYNC_IO;FEATURE_UTF32;FEATURE_EXCEPTIONDISPATCHINFO;FEATURE_CORRUPTING_EXCEPTIONS;FEATURE_EXCEPTION_NOTIFICATIONS;FEATURE_STRONGNAME_MIGRATION;FEATURE_USE_LCID;FEATURE_FUSION;FEATURE_CRYPTO;FEATURE_X509_SECURESTRINGS;FEATURE_SYNCHRONIZATIONCONTEXT;FEATURE_SYNCHRONIZATIONCONTEXT_WAIT;HAS_CORLIB_CONTRACTS;FEATURE_MACL;FEATURE_REMOTING;MONO_COM;FEATURE_COMINTEROP;FEATURE_ROLE_BASED_SECURITY;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;MONO_FEATURE_CONSOLE;MONO_FEATURE_APPLETLS;FEATURE_CRYPTO_CONFIGURABLE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'monodroid' ">
<OutputPath>./../../class/lib/monodroid</OutputPath>
@@ -1543,7 +1543,7 @@
<Compile Include="System.Security.Cryptography\CryptoAPITransform.cs" />
<Compile Include="System.Security.Cryptography\CryptoConfig.common.cs" />
<Compile Include="System.Security.Cryptography\CryptoConfig.cs" />
<Compile Include="System.Security.Cryptography\CryptoConfig.fullaot.cs" />
<Compile Include="System.Security.Cryptography\CryptoConfig.Mobile.cs" />
<Compile Include="System.Security.Cryptography\CspKeyContainerInfo.cs" />
<Compile Include="System.Security.Cryptography\DESCryptoServiceProvider.cs" />
<Compile Include="System.Security.Cryptography\DSACryptoServiceProvider.cs" />
+15 -3
View File
@@ -685,7 +685,7 @@ System.Security.AccessControl/SystemAcl.cs
System.Security.Cryptography/CryptoAPITransform.cs
System.Security.Cryptography/CryptoConfig.cs
System.Security.Cryptography/CryptoConfig.common.cs
System.Security.Cryptography/CryptoConfig.fullaot.cs
System.Security.Cryptography/CryptoConfig.Mobile.cs
System.Security.Cryptography/CspKeyContainerInfo.cs
System.Security.Cryptography/DESCryptoServiceProvider.cs
System.Security.Cryptography/DSACryptoServiceProvider.cs
@@ -1626,6 +1626,18 @@ corert/RuntimeAugments.cs
../../../external/corert/src/System.Private.CoreLib/shared/System/Collections/Generic/ValueListBuilder.cs
../../../external/corert/src/System.Private.CoreLib/shared/System/Diagnostics/Debug.cs
../../../external/corert/src/System.Private.CoreLib/shared/System/Threading/DeferredDisposableLifetime.cs
../../../external/corert/src/System.Private.CoreLib/shared/System/Threading/Tasks/Sources/IValueTaskSource.cs
../../../external/corefx/src/Common/src/CoreLib/System/Threading/Tasks/ValueTask.cs
../../../external/corefx/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncMethodBuilderAttribute.cs
../../../external/corefx/src/Common/src/CoreLib/System/Runtime/CompilerServices/AsyncValueTaskMethodBuilder.cs
../../../external/corefx/src/Common/src/CoreLib/System/Runtime/CompilerServices/ConfiguredValueTaskAwaitable.cs
../../../external/corefx/src/Common/src/CoreLib/System/Runtime/CompilerServices/ValueTaskAwaiter.cs
#../../../external/corert/src/System.Private.CoreLib/shared/System/Threading/Tasks/ValueTask.cs
#../../../external/corert/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilderAttribute.cs
#../../../external/corert/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncValueTaskMethodBuilder.cs
#../../../external/corert/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ConfiguredValueTaskAwaitable.cs
#../../../external/corert/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ValueTaskAwaiter.cs
../../../external/corert/src/System.Private.CoreLib/src/Internal/Runtime/Augments/AsyncCausalityTracer.cs
../../../external/corert/src/System.Private.CoreLib/src/Internal/Runtime/Augments/TaskTraceCallbacks.cs
@@ -1740,8 +1752,8 @@ corefx/MemoryExtensions.cs
../../../external/corefx/src/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509ContentType.cs
../../../external/corefx/src/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509KeyStorageFlags.cs
../../../external/corefx/src/System.Threading.Tasks.Extensions/src/System/Threading/Tasks/ValueTask.cs
../../../external/corefx/src/System.Threading.Tasks.Extensions/src/System/Runtime/CompilerServices/*.cs
#../../../external/corefx/src/System.Threading.Tasks.Extensions/src/System/Threading/Tasks/ValueTask.cs
#../../../external/corefx/src/System.Threading.Tasks.Extensions/src/System/Runtime/CompilerServices/*.cs
../../../external/corefx/src/System.Threading.Tasks.Parallel/src/System/Threading/Tasks/*.cs
+9 -8
View File
@@ -181,12 +181,12 @@
../../../external/corefx/src/System.Threading/tests/*.cs:MutexTests.cs,SemaphoreTests.cs,InterlockedTests.netcoreapp.cs,EventWaitHandleTests.cs,XunitAssemblyAttributes.cs,ReaderWriterLockTests.cs,SynchronizationContextTests.cs,ExecutionContextTests.cs,HostExecutionContextManagerTests.cs,EtwTests.cs
# System.Memory
../../../external/corefx/src/System.Memory/tests/*.cs
../../../external/corefx/src/System.Memory/tests/Binary/*.cs
../../../external/corefx/src/System.Memory/tests/Memory/*.cs
../../../external/corefx/src/System.Memory/tests/ReadOnlyMemory/*.cs
../../../external/corefx/src/System.Memory/tests/ReadOnlySpan/*.cs
../../../external/corefx/src/System.Memory/tests/Span/*.cs
#../../../external/corefx/src/System.Memory/tests/*.cs
#../../../external/corefx/src/System.Memory/tests/Binary/*.cs
#../../../external/corefx/src/System.Memory/tests/Memory/*.cs
#../../../external/corefx/src/System.Memory/tests/ReadOnlyMemory/*.cs
#../../../external/corefx/src/System.Memory/tests/ReadOnlySpan/*.cs
#../../../external/corefx/src/System.Memory/tests/Span/*.cs
# System.Collections
../../../external/corefx/src/Common/tests/System/Collections/CollectionAsserts.cs
@@ -208,7 +208,7 @@
../../../external/corefx/src/Common/tests/System/EnumTypes.cs
../../../external/corefx/src/Common/tests/System/ObjectCloner.cs
../../../external/corefx/src/Common/tests/System/Diagnostics/DebuggerAttributes.cs
../../../external/corefx/src/System.Collections/tests/Generic/SortedSet/*.cs
../../../external/corefx/src/System.Collections/tests/Generic/SortedSet/*.cs:SortedSet.TreeSubSet.Tests.cs
../../../external/corefx/src/System.Collections/tests/Generic/HashSet/*.cs
../../../external/corefx/src/System.Collections/tests/Generic/Stack/*.cs
../../../external/corefx/src/System.Collections/tests/Generic/SortedList/*.cs
@@ -219,7 +219,7 @@
../../../external/corefx/src/System.Collections/tests/Generic/HashSet/*.cs
../../../external/corefx/src/System.Collections/tests/Generic/Dictionary/HashCollisionScenarios/*.cs
../../../external/corefx/src/System.Collections/tests/Generic/Dictionary/*.cs
../../../external/corefx/src/System.Collections/tests/Generic/Comparers/*.cs
../../../external/corefx/src/System.Collections/tests/Generic/Comparers/*.cs:Comparers.Generic.cs
../../../external/corefx/src/System.Collections/tests/BitArray/*.cs:BitArray_GetSetTests.cs
../../../external/corefx/src/System.Collections/tests/*.cs
@@ -240,3 +240,4 @@
../../../external/corefx/src/System.Collections.Specialized/tests/HybridDictionary/*.cs
../../../external/corefx/src/System.Collections.Specialized/tests/OrderedDictionary/*.cs
../../../external/corefx/src/System.Collections.Specialized/tests/*.cs:StringCollectionTests.cs
@@ -0,0 +1 @@
#include testing_aot_full_corlib_test.dll.exclude.sources
@@ -0,0 +1 @@
#include corlib_test.dll.sources
@@ -13,7 +13,7 @@ namespace System.Runtime.Serialization
using System.IO;
using System.Reflection;
using System.Runtime.Diagnostics;
using System.ServiceModel.Diagnostics;
// using System.ServiceModel.Diagnostics;
using System.Security;
using System.Xml;
using System.Xml.Schema;
@@ -476,7 +476,7 @@ namespace System {
#if MONO
// Converts a Span into an int
public static int ToInt32(ReadOnlySpan<byte> value)
internal static int ToInt32(ReadOnlySpan<byte> value)
{
if (value.Length < sizeof(int))
ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.value);
@@ -389,7 +389,7 @@ namespace System {
///#endif // #if GENERICS_WORK
#if MONO
public bool TryFormat(Span<char> destination, out int charsWritten, System.ReadOnlySpan<char> format = default, System.IFormatProvider provider = null)
internal bool TryFormat(Span<char> destination, out int charsWritten, System.ReadOnlySpan<char> format = default, System.IFormatProvider provider = null)
{
throw new NotImplementedException ();
}
@@ -710,7 +710,10 @@ namespace System.Runtime.CompilerServices
/// <param name="result">The result for which we need a task.</param>
/// <returns>The completed task containing the result.</returns>
[SecuritySafeCritical] // for JitHelpers.UnsafeCast
private Task<TResult> GetTaskForResult(TResult result)
#if MONO
internal static
#endif
Task<TResult> GetTaskForResult(TResult result)
{
Contract.Ensures(
EqualityComparer<TResult>.Default.Equals(result, Contract.Result<Task<TResult>>().Result),
@@ -775,7 +778,9 @@ namespace System.Runtime.CompilerServices
(typeof(TResult) == typeof(Byte) && default(Byte) == (Byte)(object)result) ||
(typeof(TResult) == typeof(SByte) && default(SByte) == (SByte)(object)result) ||
(typeof(TResult) == typeof(Char) && default(Char) == (Char)(object)result) ||
#if !MONO
(typeof(TResult) == typeof(Decimal) && default(Decimal) == (Decimal)(object)result) ||
#endif
(typeof(TResult) == typeof(Int64) && default(Int64) == (Int64)(object)result) ||
(typeof(TResult) == typeof(UInt64) && default(UInt64) == (UInt64)(object)result) ||
(typeof(TResult) == typeof(Int16) && default(Int16) == (Int16)(object)result) ||
@@ -1360,7 +1360,7 @@ namespace System.Text
}
#if MONO
public unsafe string GetString(ReadOnlySpan<byte> bytes)
internal unsafe string GetString(ReadOnlySpan<byte> bytes)
{
fixed (byte* bytesPtr = &bytes.DangerousGetPinnableReference())
{
@@ -566,7 +566,10 @@ namespace System {
exceptions,
exception,
action,
comparison
comparison,
state,
task,
source
#endif
}
@@ -4,7 +4,7 @@
using System.Reflection;
using System.Text;
using Xunit;
using System.IO;
namespace System.Diagnostics
{
+9
View File
@@ -0,0 +1,9 @@
// CS0273: The accessibility modifier of the `C.S2.set' accessor must be more restrictive than the modifier of the property or indexer `C.S2'
// Line: 7
// Compiler options: -langversion:7.2
class C
{
private string S2 { get; private protected set; }
}
+7
View File
@@ -0,0 +1,7 @@
// CS1013: Invalid number
// Line : 6
class X
{
static int i = 0x0_;
}
+10
View File
@@ -0,0 +1,10 @@
// CS1061: Type `int' does not contain a definition for `__0' and no extension method `__0' of type `int' could be found. Are you missing an assembly reference?
// Line: 8
static class C
{
static void Main ()
{
int c = 0.__0;
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
// CS1527: Namespace elements cannot be explicitly declared as private, protected or protected internal
// CS1527: Namespace elements cannot be explicitly declared as private, protected, protected internal, or private protected
// Line: 4
protected interface IFoo {
+1 -1
View File
@@ -1,4 +1,4 @@
// CS1527: Namespace elements cannot be explicitly declared as private, protected or protected internal
// CS1527: Namespace elements cannot be explicitly declared as private, protected, protected internal, or private protected
// Line: 4
protected internal enum E {
+3 -2
View File
@@ -1,4 +1,5 @@
// CS1527: Namespace elements cannot be explicitly declared as private, protected or protected internal
// Line:
// CS1527: Namespace elements cannot be explicitly declared as private, protected, protected internal, or private protected
// Line: 4
private class X {
}
+11
View File
@@ -0,0 +1,11 @@
// CS1644: Feature `digit separators' cannot be used because it is not part of the C# 6.0 language specification
// Line: 9
// Compiler options: -langversion:6
class X
{
int Test ()
{
var i = 1_0;
}
}
Loaded 100 of 253 files, more files were not shown because too many files have changed in this diff. Show more