Mitchell Hwang [Tue, 9 Jun 2020 17:41:46 +0000 (13:41 -0400)]
[libraries] Skip GetOpenSslVersion on Apple OS (#37646)
Extend the `PlatformNotSupportedException` for `OpenSslVersion` from `OSX` to `OSX, iOS, and tvOS`, as none of these Apple OS support OpenSsl.
Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
Alexander Köplinger [Tue, 9 Jun 2020 17:06:46 +0000 (19:06 +0200)]
[mono] Add back sys/types.h include for clockid_t (#37653)
Looks like it was accidentally removed in https://github.com/dotnet/runtime/pull/37457
John Kelly [Tue, 9 Jun 2020 16:08:21 +0000 (17:08 +0100)]
Optimise MathF.CopySign and Math.CopySign using SSE intrinsics (#35456)
* Optimise MathF.CopySign and Math.CopySign
* Fix namespace error
* Clear up constant
* Remove x64 dependency for MathF method
* Remove unnecessary constant and unsafe from Math
* Remove unnecessary constant and unsafe from MathF
* Add ARM32/64 paths, and SSE41 path. Change integral constant to FP for perf and add integral constant for fallback
* Move conditional select to seperate helper methods, remove incorrect use of blendv
* Inline mask constants
* Correctly handle ISA not supported
* Remove old comment
* Fix syntax error
* Var -> explicit type
* Move helper method to sep class
As discussed w tanner
* move helper method
* Remove locals
* Fix namespace
* namespace
* Inline locals
* Change helper method to only accept float/double
* fix formatting
* fix sybntax
Fan Yang [Tue, 9 Jun 2020 15:08:25 +0000 (11:08 -0400)]
Check the existence of clocked_t (#37457)
* Use a macro more widely used by unix platforms
* If time.h exists, clock_it must have been defined
* Check the existence of clockit_t
* Move type check to the location near other time checks
Kenneth Pouncey [Tue, 9 Jun 2020 14:26:05 +0000 (16:26 +0200)]
[browser][wasm] Find the correct CoreLib (#37644)
Need to load `System.Private.Corlib`
closes: https://github.com/dotnet/runtime/issues/37636
Tom Deseyn [Tue, 9 Jun 2020 13:27:27 +0000 (15:27 +0200)]
SocketAsyncContext.Unix: remove Lock from IsReady (#36705)
* SocketAsyncContext.Unix: remove Lock from IsReady
* Make QueueState an int
* Update comment
* cleanup comment
* Update for rebase
* Decrement sequenceNumber instead of using nullable int
* PR feedback
Alexander Nikolaev [Tue, 9 Jun 2020 11:57:23 +0000 (13:57 +0200)]
Disable GetAsync_UnicodeHostName_SuccessStatusCodeInResponse (#37487)
SocketsHttpHandlerTest_HttpClientHandlerTest_Http2.GetAsync_UnicodeHostName_SuccessStatusCodeInResponse is periodically failing with TimeoutException. It seems to be caused by the target server unavailability, this PR disables the test until a new unicode test host is found.
Stephen Toub [Tue, 9 Jun 2020 11:54:17 +0000 (07:54 -0400)]
Fix TestExited_SynchronizingObject test (#37639)
Fix race condition.
Sean Hall [Tue, 9 Jun 2020 11:48:19 +0000 (21:48 +1000)]
Enable calling get_runtime_delegate from app context (#37473)
* Add ability for hostfxr_get_runtime_delegate to block on invalid delegate types.
This is required so that the runtime isn't loaded if the request has no chance of succeeding.
Fix spelling of initialization_options_t.
Add context_contract_version_set flag to initialization_options_t.
This allows hostpolicy to know whether it can rely on the version field of corehost_context_contract to be valid.
Also always initialize corehost_context_contract to {}.
* Allow app-based context to call hostfxr_get_runtime_delegate.
Currently, it may only request the load_assembly_and_get_function_pointer delegate.
Fix discrepancy in design doc.
Add error code HostApiUnsupportedScenario for blocks that might be removed. This gives the native host better information on why the request failed.
Add tests for running a component from an app context.
Marek Safar [Tue, 9 Jun 2020 11:03:18 +0000 (13:03 +0200)]
More cleanups and optimizations for System.Runtime.InteropServices.JavaScript (#37613)
Alexander Köplinger [Tue, 9 Jun 2020 10:40:44 +0000 (12:40 +0200)]
Use ConditionalFact/Theory for skipping RemoteExecutor on unsupported platforms (#37479)
RemoteExecutor doesn't work on platforms that can't spawn processes like iOS/Android/WebAssembly.
Stephen Toub [Tue, 9 Jun 2020 10:40:01 +0000 (06:40 -0400)]
Annotate System.ServiceProcess.ServiceController for nullable reference types (#37595)
* Annotate System.ServiceProcess.ServiceController for nullable reference types
* Address PR feedback
Aleksey Kliger (λgeek) [Tue, 9 Jun 2020 10:19:16 +0000 (06:19 -0400)]
[mono] Delete culture/ directory files (#37565)
Related to #37437 - we use libICU for culture information in`dotnet/runtime`, and now we don't sync `src/mono/mono/culture` back to the mono/mono repository, so we can delete all these files.
Viktor Hofer [Tue, 9 Jun 2020 10:10:33 +0000 (12:10 +0200)]
Create Microsoft.NetCore.App.Ref targeting pack for NetCoreAppCurrent in libraries (#37600)
* Create Microsoft.NetCore.App.Ref
Binplace reference assemblies into a Microsoft.NetCore.App.Ref folder
and also copy data files like the RuntimeList.xml and the
PlatformManifest.txt there.
Rename the runtime pack to microsoft.netcore.app.runtime.$(RID)
Fixing a restore issue in the wasm builder (restore and build should
not happen in the same msbuild invocation).
Stephen Toub [Tue, 9 Jun 2020 10:00:01 +0000 (06:00 -0400)]
Enable nullable reference types for full facades (#37589)
Some of our full facades are missing `<Nullable>enable</Nullable>`. I don't think the lack of these causes any issues, but having them makes it easy to confirm what ref assemblies remain to be annotated.
Michal Strehovský [Tue, 9 Jun 2020 09:39:28 +0000 (11:39 +0200)]
Add linker annotations to some of CoreLib (#36532)
Some of these are handled as linker intrinsics, so they'll actually keep less than what the annotation declares. The annotation mostly serves to suppress warnings when linker analyzes the body of the method itself.
Stephen Toub [Tue, 9 Jun 2020 09:28:21 +0000 (05:28 -0400)]
Use [MemberNotNull] to reduce use of `= null!;` (#37490)
* Exclude MemberNotNull from various tools
* Use [MemberNotNull] to reduce use of `= null!;`
Michal Strehovský [Tue, 9 Jun 2020 07:30:54 +0000 (09:30 +0200)]
Reflection annotate more of CoreLib (#37418)
Tomas Weinfurt [Tue, 9 Jun 2020 06:56:41 +0000 (23:56 -0700)]
allow access to crypto props from RemoteCertificateValidationCallback (#37580)
Levi Broderick [Tue, 9 Jun 2020 04:43:59 +0000 (21:43 -0700)]
Obsolete RuntimeHelpers.OffsetToStringData (#35722)
Jeremy Barton [Tue, 9 Jun 2020 04:33:48 +0000 (21:33 -0700)]
Make System.Formats.Asn1 library public
* Move current ASN src and tests into new tree with no modifications
AsnReader partials are named AsnDecoder to better match the final name
for the core logic they contain.
* Make System.Formats.Asn1 package
* Apply changes from API review
Some additional tests were written to increase code coverage after the changes
* Move AsnReader consumers to public API
Aaron Robinson [Tue, 9 Jun 2020 04:21:21 +0000 (21:21 -0700)]
Accept NativeCallableInternalAttribute to support legacy scenario (#37621)
* Accept NativeCallableInternalAttribute to support legacy scenario
* Feedback
Stephen Toub [Tue, 9 Jun 2020 02:22:27 +0000 (22:22 -0400)]
Revert "Update "LICENSE.txt" so that it's recognized as MIT" (#37626)
* Revert "Update "LICENSE.txt" so that it's recognized as MIT"
* Add LICENSE.TXT to global build
Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
Tarek Mahmoud Sayed [Tue, 9 Jun 2020 02:21:01 +0000 (19:21 -0700)]
Support the Encoding enumeration in the Encoding Providers (#37528)
* Support the Encoding enumeration in the Encoding Providers
* Fix build
* Fix netstandard build
* Address the feedback
* More Feedback
* More Feedback
Santiago Fernandez Madero [Tue, 9 Jun 2020 01:58:42 +0000 (18:58 -0700)]
Don't produce windows runtime packs for mono (#37627)
Ivan Diaz Sanchez [Tue, 9 Jun 2020 00:58:50 +0000 (17:58 -0700)]
Make build scripts' -help information more helpful (#37377)
* Sorted the build scripts' help alphabetically, and made the subset error
message softer and without metrics.
* Added simple examples to the scripts' helps.
* Moved short flags to the flag column and rephrased a bit.
* Removed remains of old code.
* Added more examples and rephrased some things for better clarity.
* Added gcc example to build.sh.
* Corrected definition of the Checked configuration.
* Added --clangx to build.sh
Tanner Gooding [Tue, 9 Jun 2020 00:32:54 +0000 (17:32 -0700)]
Fix the remaining jitstress-isas-x86 failures (#37459)
* Ensure the right SIMD size is used for the AsVector256 AVX code
* Don't create GT_SIMD nodes if the baseline ISAs are not supported.
Stephen Toub [Tue, 9 Jun 2020 00:14:18 +0000 (20:14 -0400)]
Respect Process.SynchronizingObject in Process events (#37308)
* Respect Process.SynchronizingObject in Process events
* Address PR feedback
Stephen Toub [Tue, 9 Jun 2020 00:11:32 +0000 (20:11 -0400)]
Initialize AsnEncodedData.RawData to empty array (#37598)
Maintains nullable annotation on RawData.
Stephen Toub [Tue, 9 Jun 2020 00:07:51 +0000 (20:07 -0400)]
Annotate System.Net.WebSockets.WebSocketProtocol for nullable reference types (#37593)
* Annotate System.Net.WebSockets.WebSocketProtocol for nullable reference types
This also helped find that the annotation of WebSocketReceiveResult(..., string closeDescription) was wrong in the ref (it was correct in the src), so I fixed that.
* Address PR feedback and suppress netcoreapp2.1 warnings
Sergey Andreenko [Mon, 8 Jun 2020 23:45:48 +0000 (16:45 -0700)]
No retyping arm/arm64. (#36866)
* Enable for arm/arm64.
* Add more test cases specific to SIMD* handling.
* Support !compDoOldStructRetyping for arm/arm64.
* Review feedback.
* Return `JitDoOldStructRetyping`.
and disable failung tests with old retyping.
* a small workaround for default arm64 behaviour.
monojenkins [Mon, 8 Jun 2020 23:41:10 +0000 (19:41 -0400)]
[wasm] Throw PlatformNotSupportedException instead of NotSupportedException when starting threads/waiting on monitors. (#37604)
<!--
Thank you for your Pull Request!
If you are new to contributing to Mono, please try to do your best at conforming to our coding guidelines http://www.mono-project.com/community/contributing/coding-guidelines/ but don't worry if you get something wrong. One of the project members will help you to get things landed.
Does your pull request fix any of the existing issues? Please use the following format: Fixes #issue-number
-->
Co-authored-by: vargaz <vargaz@users.noreply.github.com>
Rich Lander [Mon, 8 Jun 2020 23:22:06 +0000 (16:22 -0700)]
Merge pull request #36744 from teo-tsirpanis/patch-1
Update "LICENSE.txt" so that it's recognized as MIT
Alexis Christoforides [Mon, 8 Jun 2020 22:08:08 +0000 (18:08 -0400)]
Implement ModuleBuilder.GetFieldToken (#37497)
Contributes to https://github.com/mono/mono/issues/14788
Zoltan Varga [Mon, 8 Jun 2020 21:46:50 +0000 (17:46 -0400)]
[wasm] Pass more assemblies to the pinvoke table generator. (#37608)
John Salem [Mon, 8 Jun 2020 20:59:24 +0000 (13:59 -0700)]
[Test] don't use process var in async readers (#37259)
* don't use process var in async readers
* Add comment
Stephen Toub [Mon, 8 Jun 2020 20:52:19 +0000 (16:52 -0400)]
Update comments on GetCursorPosition (#37609)
Tomas Weinfurt [Mon, 8 Jun 2020 20:32:59 +0000 (13:32 -0700)]
Allow MemoryMappedFile to work on character device (#2183)
* allow MemoryMeppedFile to work on character device
* feedback from review
* feedback from review
* feedback from review
* roll-back write only access
* feedback from review
* fix windows
* avoid exception reordering
* feedback from review
Co-authored-by: Tomas Weinfurt <furt@Shining.local>
Eric Erhardt [Mon, 8 Jun 2020 20:20:53 +0000 (15:20 -0500)]
Allow individual projects to override LangVersion (#37512)
Setting LangVersion in a .targets file makes it hard to override LangVersion in individual projects. Instead, move the default project setting back to the .props file and condition VB based on $(MSBuildProjectExtension), which is available in the .props file.
ILCompiler.Reflection.ReadyToRun needs to set LangVersion to 7.3 so it doesn't break ILSpy.
Fix #37498
dotnet-maestro[bot] [Mon, 8 Jun 2020 20:10:46 +0000 (20:10 +0000)]
[master] Update dependencies from mono/linker Microsoft/vstest (#37562)
* Update dependencies from https://github.com/mono/linker build
20200606.1
Microsoft.NET.ILLink.Tasks
From Version 5.0.0-preview.3.20305.2 -> To Version 5.0.0-preview.3.20306.1
* Update dependencies from https://github.com/microsoft/vstest build
20200608-10
Microsoft.NET.Test.Sdk
From Version 16.7.0-preview-
20200605-01 -> To Version 16.7.0-preview-
20200608-10
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Stephen Toub [Mon, 8 Jun 2020 20:00:11 +0000 (16:00 -0400)]
Annotate System.Resources.Extensions for nullable reference types (#37597)
Simon Nattress [Mon, 8 Jun 2020 18:43:32 +0000 (11:43 -0700)]
Improve R2RTest compile-serp (#37520)
* Improve the robustness and idempotence of compile-serp by backing up all MSIL assemblies that are compiled / referenced. Use those backups during compilations.
* Add `--composite-scenario` switch which currently supports two modes: each assembly is compiled separately, and another where the shared framework, Asp.Net, and Serp core each get a composite image.
* Added new `Crossgen2RunnerOptions` config class we can pass per-compile settings instead of relying on the process-wide `BuildOptions` object. This is needed to allow a single parallel batch of compilations where some are composite images and some are not.
Stephen Toub [Mon, 8 Jun 2020 18:27:27 +0000 (14:27 -0400)]
Add Console.GetCursorPosition (#37559)
Stephen Toub [Mon, 8 Jun 2020 18:27:15 +0000 (14:27 -0400)]
Annotate System.Reflection.Context for nullable reference types (#37592)
Stephen Toub [Mon, 8 Jun 2020 18:27:02 +0000 (14:27 -0400)]
Annotate System.Numerics.Tensors for nullable reference types (#37594)
Stephen Toub [Mon, 8 Jun 2020 18:24:14 +0000 (14:24 -0400)]
Annotate Microsoft.Win32.Registry.AccessControl for nullable reference types (#37596)
Only a few methods defined, and none of their reference type inputs/outputs are nullable.
Santiago Fernandez Madero [Mon, 8 Jun 2020 17:56:36 +0000 (10:56 -0700)]
Collapse mono runtime pack builds in official build (#37511)
* Collapse mono runtime pack builds in official build
* Minor cleanups
monojenkins [Mon, 8 Jun 2020 17:08:25 +0000 (13:08 -0400)]
[wasm] Bump emscripten to 1.39.17. (#37547)
Co-authored-by: vargaz <vargaz@users.noreply.github.com>
monojenkins [Mon, 8 Jun 2020 16:58:27 +0000 (12:58 -0400)]
Mono: Fix deadlock on Alpine (#37456)
Fixes mono/mono#7167
The mono/mono commit
3e8108ea6576b07de2a64528be18674683879189 introduced a deadlock on Alpine, making it impossible to even build mono. This PR reverts the setting of PTHREAD_PRIO_INHERIT when on Alpine.
Since GCC on Alpine doesn't provide a builtin macro to detect Alpine, I also added a #define in configure.ac.
Co-authored-by: rickardp <rickardp@users.noreply.github.com>
Marek Safar [Mon, 8 Jun 2020 16:32:00 +0000 (18:32 +0200)]
Add Browser version of RuntimeInformation (#37256)
Maxim Lipnin [Mon, 8 Jun 2020 16:01:51 +0000 (19:01 +0300)]
Add initial doc about testing libraries on WebAssembly (#37478)
* Add initial doc about testing libraries on WebAssembly
* Address feedback
* Address feedback
Stephen Toub [Mon, 8 Jun 2020 15:05:10 +0000 (11:05 -0400)]
Fix broken System.Console tests (#37558)
Zoltan Varga [Mon, 8 Jun 2020 14:41:01 +0000 (10:41 -0400)]
Implement RandomNumberGeneratorImplementation for wasm. (#37408)
* Implement RandomNumberGeneratorImplementation for wasm.
Simply read from /dev/random which is supported under WebAssembly.
* Address review comments.
* Update src/libraries/System.Security.Cryptography.Algorithms/src/Internal/Cryptography/RandomNumberGeneratorImplementation.WebAssembly.cs
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* Call Read() in a loop.
* Rename to .Browser.cs.
* Add a SystemNative_GetCryptographicallySecureRandomBytes function and use it to read /dev/urandom.
* Error out instead of asserting.
* Make the non secure version depend on the secure version.
* Fix the build.
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
monojenkins [Mon, 8 Jun 2020 14:36:34 +0000 (10:36 -0400)]
Use new ucontext handling for glibc 2.26 (#37568)
<!--
Thank you for your Pull Request!
If you are new to contributing to Mono, please try to do your best at conforming to our coding guidelines http://www.mono-project.com/community/contributing/coding-guidelines/ but don't worry if you get something wrong. One of the project members will help you to get things landed.
Does your pull request fix any of the existing issues? Please use the following format: Fixes #issue-number
-->
Co-authored-by: mgorse <mgorse@users.noreply.github.com>
t-mustafin [Mon, 8 Jun 2020 13:55:06 +0000 (16:55 +0300)]
[crossgen2][arm] Fix assertion repro237932.cs (#37588)
Fix assertion on crossgen2 Debug on ni-compile of 237932/repro237932.cs
test for arm architecture.
Signed-off-by: Timur <t.mustafin@partner.samsung.com>
Kenneth Pouncey [Mon, 8 Jun 2020 12:44:50 +0000 (14:44 +0200)]
[browser][wasm] Remove the use of reflection when instantiating core objects (#37554)
* [browser][wasm] Remove the use of reflection when instantiating core objects
* Fix parameter call
* Address review comments
* Update Runtime.cs
* Address review comments
* Remove unused variable
Egor Bogatov [Mon, 8 Jun 2020 06:36:44 +0000 (09:36 +0300)]
Append -sroa -instcombine (#37458)
Ryan Lucia [Mon, 8 Jun 2020 06:17:45 +0000 (02:17 -0400)]
[runtime] Add remaining runtime events and fix some existing ones on netcore (#36658)
* Wire up OnResourceResolve
* Fix corlib satellite assembly check for postload hook
* Add ALC and AppContext to mono_defaults
* Remove ProcessExit from MonoDomain and clean up caller
* Remove UnhandledException from MonoDomain and call AppContext instead
* Wire up FirstChanceException
Still need to clean up handle usage, resolve some unanswered questions, and fix the remaining test (AssemblyResolve_FirstChanceException)
* Cleanup
* Update AssemblyResolve_FirstChanceException ActiveIssue
* Fix build
* Feedback
* Ensure no stray handles exist during thread finalizer
Adeel Mujahid [Mon, 8 Jun 2020 05:51:08 +0000 (08:51 +0300)]
Implement PAL_IsDebuggerPresent for SunOS (#37273)
Youssef Victor [Sun, 7 Jun 2020 21:10:40 +0000 (23:10 +0200)]
Avoid double-call to Trim (#37566)
Bruce Forstall [Sun, 7 Jun 2020 20:11:43 +0000 (13:11 -0700)]
Clarify `compilerName` argument in build-job.yml (#37523)
Before, it confusingly used the default value `clang` even for Windows.
John Kelly [Sun, 7 Jun 2020 15:54:21 +0000 (16:54 +0100)]
Add Math.Tau, MathF.Tau (#37517)
* Add Math.Tau, MathF.Tau
* Remove unncessary 'checked' and wrong val
Stephen Toub [Sun, 7 Jun 2020 01:43:12 +0000 (21:43 -0400)]
Expose Encoding.Latin1 (#37550)
Stephen Toub [Sat, 6 Jun 2020 21:53:57 +0000 (17:53 -0400)]
Add ValueTask.factory members (#37507)
dotnet-maestro[bot] [Sat, 6 Jun 2020 21:17:20 +0000 (21:17 +0000)]
[master] Update dependencies from mono/linker dotnet/xharness (#37542)
* Update dependencies from https://github.com/mono/linker build
20200605.2
Microsoft.NET.ILLink.Tasks
From Version 5.0.0-preview.3.20304.3 -> To Version 5.0.0-preview.3.20305.2
* Update dependencies from https://github.com/dotnet/xharness build
20200605.1
Microsoft.DotNet.XHarness.TestRunners.Xunit
From Version 1.0.0-prerelease.20304.1 -> To Version 1.0.0-prerelease.20305.1
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
monojenkins [Sat, 6 Jun 2020 18:48:22 +0000 (14:48 -0400)]
[mono] Move some culture-dependent source files to a separate directory (#37437)
* [mono] Move culture-info-tables.h to a separate directory
We'd like to remove culture-info-tables.h from the dotnet/runtime copy of mono since we use ICU
there for globalization like the rest of .NET 5.
The plan is:
1. We move the file (and some others) to a separate directory (this PR)
2. We tell the sync bot to skip `culture/` in the future
3. We delete the files (or make them empty) in dotnet/runtime
* Also move locale.c and culture-info.h
* Also move mono_w32process_ver_language_name
* [msvc] don't compile locales.c if it doesn't exist
It exists for now, but won't after we stop syncing culture/ to dotnet/runtime
Co-authored-by: lambdageek <lambdageek@users.noreply.github.com>
Simon Nattress [Sat, 6 Jun 2020 07:23:54 +0000 (00:23 -0700)]
R2RTest - Launch crossgen2 with dotnet cli instead of corerun (#37531)
* Replace corerun host with dotnet (crossgen2 with corerun on a debug / checked runtime is excruciatingly slow) via a new option, `--dotnet-cli`
* `--dotnet-cli` is optional if r2rtest is launched with a recent .NET 5 runtime - the root executing process is used. Typically this will be dotnet.exe or <repo>\dotnet.cmd. Corerun is still a valid cli for this purpose since we only use it to launch crossgen2.
* Remove `CompileFromCrossgenRspCommand` since it's no longer useful for anybody.
* Factored the options now we have two that are common to all commands.
Eric Erhardt [Sat, 6 Jun 2020 04:14:11 +0000 (23:14 -0500)]
Remove WinRT specific code from EventSource. (#37508)
* Remove WinRT specific code from EventSource.
Follow up to #36715
* Remove EventSource.GetMetadata method, which was only used by ProjectN.
Eric Erhardt [Sat, 6 Jun 2020 03:19:02 +0000 (22:19 -0500)]
Add build support for ILLink.Substitutions.xml files (#37443)
* Add build support for ILLink.Substitutions.xml files
These files enable the ILLinker to dynamically replace method bodies at link-time.
There are two ways of embedding the file:
- By making a single ILLink.Substitutions.xml file next to the .csproj
- By adding one or more files to the @(ILLinkSubstitutionsXmls) MSBuild item. This allows for libraries, like CoreLib, to have a shared substitutions file and also separate substitutions files for each RID - x64, wasm, etc - which all get combined into a single file during the build.
Stephen Toub [Sat, 6 Jun 2020 00:54:01 +0000 (20:54 -0400)]
Annotate System.Net.Http.WinHttpHandler for nullable reference types (#37502)
Santiago Fernandez Madero [Sat, 6 Jun 2020 00:44:18 +0000 (17:44 -0700)]
Don't build coreclr native tests components in official builds (#37525)
Jarret Shook [Sat, 6 Jun 2020 00:02:54 +0000 (17:02 -0700)]
Submit to helix without managed pdbs (#36577)
* Trim managed pdbs
* Fix whitespace diff
Stephen Toub [Fri, 5 Jun 2020 23:00:36 +0000 (19:00 -0400)]
Annotate System.Security.Cryptography.ProtectedData for nullable reference types (#37493)
David Mason [Fri, 5 Jun 2020 22:47:02 +0000 (15:47 -0700)]
Add EventPipe array types to the profiler APIs (#37035)
Follow up for #36242. Allow profilers to emit array types as well.
monojenkins [Fri, 5 Jun 2020 20:44:58 +0000 (16:44 -0400)]
Start unifying unaligned memory access codepaths. (#37445)
The intrinsic expansions for Unsafe.ReadUnaligned and
Unsafe.WriteUnaligned now use mini_emit_memory_load and
mini_emit_memory_store.
stind is now implemented in terms of mini_emit_memory_store; when used
during compilation of the the sgen nursery check wrapper,
mini_emit_memory_store will no longer longer emit a release fence when
storing a reference under the CLR memory model.
mini_emit_memory_load and mini_emit_memory_store also no longer
decompose unaligned loads/stores to explicit byte-wise memcpy move
sequences; the LLVM IR backend already converts
MONO_INST_UNALIGNED-flagged OP_LOAD*/OP_STORE* operations to LLVM memory
movement operations with alignment 1.
Should fix https://github.com/mono/mono/issues/19142.
Co-authored-by: imhameed <imhameed@users.noreply.github.com>
David Mason [Fri, 5 Jun 2020 20:15:18 +0000 (13:15 -0700)]
Stop adding NULL native code addresses in GetNativeCodeStartAddresses (#37195)
If you call in to GetNativeCodeStartAddresses between when a CodeVersion is created and when NativeCodeVersion::SetNativeCodeInterlocked is called, the NativeCodeVersion will return NULL for its address. This fixes that by checking for NULL before adding it to the list of known code addresses.
Matt Galbraith [Fri, 5 Jun 2020 19:47:29 +0000 (12:47 -0700)]
Add testing support for Alpine 3.12 (#37281)
* Update alpine test matrix to have 3.12 as default, remove 3.8 as it is EOL since 5/1/2020
* Add support in idna tests for Unicode 13 and fix Unicode 11 parsing and test execution
* Remove alpine 3.9 from test matrix as it is no longer supported
* Fix builds
* PR Feedback
* Update Unicode11 test data and remove not needed changes
Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
Layomi Akinrinade [Fri, 5 Jun 2020 19:11:25 +0000 (15:11 -0400)]
Strip the ILLinkTrim.xml file from the System.ComponentModel.TypeConverter assembly (#37402)
* Strip the ILLinkTrim.xml file from the System.ComponentModel.TypeConverter assembly
* Address review feedback
* Update DefaultConstructor -> PublicParameterlessConstructor
* Fix ComObjectType property annotation
Andrew Au [Fri, 5 Jun 2020 18:55:36 +0000 (11:55 -0700)]
Avoiding using recursive pattern matching (#37451)
Simon Nattress [Fri, 5 Jun 2020 18:54:28 +0000 (11:54 -0700)]
Enum dispose signature (#37450)
* Fix case where CG2 emits incorrect signature
When making a constrained virtual call to `IDisposable.Dispose()` on a value type, we were emitting the owner type into the signature incorrectly. This caused a `MissingMethodException` at runtime as the runtime tried to resolve `System.IDisposable.Dispose()` on `IDisposable` instead of the constrained type.
Fixes CG2 compiled code which iterates over `S.R.M.MethodDefinitionHandleCollection` and its peers.
dotnet-maestro[bot] [Fri, 5 Jun 2020 18:41:19 +0000 (18:41 +0000)]
[master] Update dependencies from mono/linker Microsoft/vstest dotnet/xharness (#37481)
* Update dependencies from https://github.com/mono/linker build
20200604.3
Microsoft.NET.ILLink.Tasks
From Version 5.0.0-preview.3.20304.2 -> To Version 5.0.0-preview.3.20304.3
* Update dependencies from https://github.com/microsoft/vstest build
20200605-01
Microsoft.NET.Test.Sdk
From Version 16.7.0-preview-
20200603-01 -> To Version 16.7.0-preview-
20200605-01
* Update dependencies from https://github.com/dotnet/xharness build
20200604.1
Microsoft.DotNet.XHarness.TestRunners.Xunit
From Version 1.0.0-prerelease.20303.2 -> To Version 1.0.0-prerelease.20304.1
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
monojenkins [Fri, 5 Jun 2020 18:19:46 +0000 (14:19 -0400)]
[aot] Fix the binary search in the llvmonly unbox tramp table. (#37480)
Fixes https://github.com/mono/mono/issues/19879.
Co-authored-by: vargaz <vargaz@users.noreply.github.com>
Santiago Fernandez Madero [Fri, 5 Jun 2020 18:13:01 +0000 (11:13 -0700)]
Fix JitRegs* optional builds (#37468)
* Fix JitRegs* optional builds
* Override _BuildConfig correctly
monojenkins [Fri, 5 Jun 2020 18:04:37 +0000 (14:04 -0400)]
[interp] Optimize do_jit_call (). (#37361)
* Move the JIT call related fields to a separate JitCallInfo structure.
* Compute calling convention information and store it into JitCallInfo
to avoid most type processing at call time.
Co-authored-by: vargaz <vargaz@users.noreply.github.com>
Andy Ayers [Fri, 5 Jun 2020 17:50:30 +0000 (10:50 -0700)]
GC stress fix for reverse pinvoke stubs (#37432)
Reverse PInvoke stubs change the thread to preemptive mode before
they exit. Often the epilog immediately follows this helper call,
but in some cases there may be a region with a few instructions
before we reach the epilog.
If there is a normal GC triggered while the method is in this region
then the runtime will not report GC references from the stub frame.
If the stub method is fully interruptible we will put GC coverage
interrupts in this region when doing GC stress. When these trigger a GC
then the runtime will report GC references from the stub frame.
So if while executing in this region we happen to do a normal GC and then
a stress invoked GC, the stress mode GC can find invalid GC references
in the frame, as the objects referenced could have been collected/moved
by the normal GC that happened just before.
There are a couple of avenues for a fix, but since this is a stress mode
only problem, I've modified GC stress avoid invoking a GC when the thread
is already in preemptive mode and the method is a reverse PINvoke stub.
Fixes #13720.
Stephen Toub [Fri, 5 Jun 2020 14:50:51 +0000 (10:50 -0400)]
Add non-generic TaskCompletionSource (#37452)
- Adds the type, almost an exact copy of `TaskCompletionSource<TResult>`, but creating a `Task` instead of a `Task<TResult>`. Primary benefits here are symmetry, smaller `Task` object, and not forcing a developer to specify an unnecessary type name.
- Adds tests for both TCS and TCS<TResult>.
- Switches a bunch of usage of the generic type over to the non-generic, both in src and tests.
Marie Píchová [Fri, 5 Jun 2020 11:44:19 +0000 (13:44 +0200)]
Do not test PostAsync_Cancel_CancellationTokenPassedToContent on WinHttpHandler. (#37441)
Stephen Toub [Fri, 5 Jun 2020 09:05:55 +0000 (05:05 -0400)]
Make Task.WhenAny(task, task) public (#37448)
Vitek Karas [Fri, 5 Jun 2020 07:13:48 +0000 (00:13 -0700)]
Proposal for allowing "get delegate" functionality on application host context (#36990)
Describe the long-term vision for the hosting components in terms of ability exposed through APIs.
Removes the limitation of `hostfxr_get_runtime_delegate` to make it work on app host context as well.
Defines a new runtime delegate which operates on default load context only.
Some cleanup of the document.
Co-authored-by: Elinor Fung <47805090+elinor-fung@users.noreply.github.com>
Eugene Rozenfeld [Fri, 5 Jun 2020 05:57:27 +0000 (22:57 -0700)]
Changes for basic block flags. (#37335)
Fix the code that propagates flags from the basic block of the return
expression to the caller's basic block during inlining. We are now
properly tracking the basic block of the return expression.
Fixes #36588.
Don't mark BBJ_RETURN blocks with BBF_BACKWARD_JUMP since they are
executed at most once.
The first change had a few diffs because we propagated BBF_BACKWARD_JUMP
flag. After analyzing them I realized that we shouldn't mark BBJ_RETURN
blocks with BBF_BACKWARD_JUMP in the first place. That resulted in some
diffs because we are less aggressive with inlining of calls outside of
loops.
Santiago Fernandez Madero [Fri, 5 Jun 2020 05:13:48 +0000 (22:13 -0700)]
Fix app local loading in Unix (#37455)
Sung Yoon Whang [Fri, 5 Jun 2020 03:40:05 +0000 (20:40 -0700)]
Add OS distro info to ProcessInfo event (#37375)
* Add OS distro info to EventPipeEventSource/ProcessInfo Event
* Fix typo
* Bump up the version
* add arch info, osx->macos
Simon Nattress [Fri, 5 Jun 2020 03:29:14 +0000 (20:29 -0700)]
Fix incorrect devirtualization in CG2 (#37370)
* Fix incorrect devirtualization in CG2
When making a constrained virtual method call on a boxed value type, CG2 devirtualizes the call incorrectly resulting in a direct call. This breaks code patterns like:
```
foreach (TestEnum val in Enum.GetValues(typeof(TestEnum)))
{
buffer += val.ToString();
}
```
In the call to ToString(), `getCallInfo` is passed a boxed `TestEnum` and is calling `object.ToString()`. The constrained type is `TestEnum` so we end up making a direct call to `object.ToString()`. Fixed by removing the constrained type from devirtualization consideration which is how Crossgen treats this call.
* Port other interesting devirtualization cases
Ensure our devirtualization matches crossgen1's behavior. We were not devirtualizing delegate invoke calls, and we were devirtualizing all internal calls (not just JIT intrinsics) which is not necessarily version resilient.
Alexander Köplinger [Fri, 5 Jun 2020 02:16:55 +0000 (04:16 +0200)]
Set RollForward=Major for ILVerify dotnet tool (#37433)
This allows it to be used by later versions of dotnet if the original one isn't available.
Jose Perez Rodriguez [Fri, 5 Jun 2020 00:25:43 +0000 (17:25 -0700)]
Adding extensibility point to global-build-job and some minor refactoring (#37427)
Santiago Fernandez Madero [Fri, 5 Jun 2020 00:23:16 +0000 (17:23 -0700)]
Update name suffix for unified pipelines to be more clear (#37461)
Sven Boemer [Thu, 4 Jun 2020 23:48:53 +0000 (16:48 -0700)]
Remove ClearInitLocalsAssemblies arg (#37355)
See https://github.com/mono/linker/pull/1237.
Setting the boolean ClearInitLocals is sufficient here because we are
only linking the target assembly. If in the future we need to control
it per-assembly, we can use metadata on AssemblyPaths:
https://github.com/mono/linker/blob/master/src/ILLink.Tasks/LinkTask.cs#L23
Maxim Lipnin [Thu, 4 Jun 2020 23:17:13 +0000 (02:17 +0300)]
Add an msbuild property to pass a JavaScript engine in WASM test build (#37420)
Santiago Fernandez Madero [Thu, 4 Jun 2020 22:57:10 +0000 (15:57 -0700)]
Compress mono builds that don't run tests to single jobs (#37373)
* Compress mono builds that don't run tests to single jobs
* PR Feedback
Andrew Au [Thu, 4 Jun 2020 21:02:37 +0000 (14:02 -0700)]
Allow user to specify independent heap hard limits for different object heaps. (#37166)