platform/upstream/dotnet/runtime.git
3 years agoSlimmer IOptions<T> (#49852)
David Fowler [Fri, 19 Mar 2021 15:16:51 +0000 (08:16 -0700)]
Slimmer IOptions<T> (#49852)

* Slimmer IOptions<T>
- Use a Lazy instead of the IOptionsCache (which is a concurrent dictionary)

3 years ago[main] Update dependencies from dotnet/xharness (#49865)
dotnet-maestro[bot] [Fri, 19 Mar 2021 15:02:27 +0000 (16:02 +0100)]
[main] Update dependencies from dotnet/xharness (#49865)

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 1.0.0-prerelease.21165.2 -> To Version 1.0.0-prerelease.21169.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
3 years agoBig-endian fix: ResourceReader.AllocateStringForNameIndex (#49811)
Ulrich Weigand [Fri, 19 Mar 2021 14:56:27 +0000 (15:56 +0100)]
Big-endian fix: ResourceReader.AllocateStringForNameIndex (#49811)

* Byte-swap characters read from memory-mapped resources
  on big-endian systems

3 years agoBig-endian fix: System.Reflection.Metadata BlobBuilder/BlobWriter (#49812)
Ulrich Weigand [Fri, 19 Mar 2021 14:55:37 +0000 (15:55 +0100)]
Big-endian fix: System.Reflection.Metadata BlobBuilder/BlobWriter (#49812)

* BlobBuilder: do not use Encoding.Unicode.GetBytes but simple
  byte-swaps on big-endian systems (fixes a semantic difference
  to little-endian code w.r.t. surrogate char handling)

* BlobWriter: add big-endian WriteUTF16 code path like BlobBuilder

3 years agoBig-endian fix: Base64Encoder (#49814)
Ulrich Weigand [Fri, 19 Mar 2021 14:54:19 +0000 (15:54 +0100)]
Big-endian fix: Base64Encoder (#49814)

* Take byte order into accout when packing characters into an int

3 years agoAdd clr.iltools subset (#49545)
Ulrich Weigand [Fri, 19 Mar 2021 14:53:10 +0000 (15:53 +0100)]
Add clr.iltools subset (#49545)

* Add new subset to build only the IL tools (ilasm/ildasm)
  (enabled by default)

* New -skipiltools argument to src/coreclr/build-runtime.{cmd,sh}
  (skips building the IL tools if present)

* Actually make -skipjit argument work to not build the JIT & VM

3 years agoBig-endian fix: GUID handling (#49813)
Ulrich Weigand [Fri, 19 Mar 2021 12:00:15 +0000 (13:00 +0100)]
Big-endian fix: GUID handling (#49813)

* Fix Utf8Formatter.Guid on big-endian systems
  (first three fields are stored in native byte order, not always
  little-endian)

* Use Guid constructor in BlobContentId.FromHash to remove
  endian-dependent code accessing the structure directly

3 years agoBig-endian test case fixes: Xoshiro hash (#49709)
Ulrich Weigand [Fri, 19 Mar 2021 11:50:28 +0000 (12:50 +0100)]
Big-endian test case fixes: Xoshiro hash (#49709)

* Skip Xoshiro_AlgorithmBehavesAsExpected on big-endian systems

Co-authored-by: Stephen Toub <stoub@microsoft.com>
3 years agoBig-endian fix: PEBuilder.CalculateChecksum (#49816)
Ulrich Weigand [Fri, 19 Mar 2021 10:46:08 +0000 (11:46 +0100)]
Big-endian fix: PEBuilder.CalculateChecksum (#49816)

* Always use little-endian encoding to compute checksum

3 years agoBig-endian fix: UnmanagedMemoryAccessor.Write (decimal) (#49815)
Ulrich Weigand [Fri, 19 Mar 2021 10:45:59 +0000 (11:45 +0100)]
Big-endian fix: UnmanagedMemoryAccessor.Write (decimal) (#49815)

* Use TryGetBits to avoid dependency on accessing internal
  fields of decimal type (which would be endian-dependent)

3 years agoUse latest DiaSymReader and support ARM64 host in crossgen2 (#49841)
Anton Lapounov [Fri, 19 Mar 2021 09:56:16 +0000 (02:56 -0700)]
Use latest DiaSymReader and support ARM64 host in crossgen2 (#49841)

3 years agoDisable looking for PaxCtl on non Linux/BSD distros (#49746)
Juan Hoyos [Fri, 19 Mar 2021 08:08:23 +0000 (01:08 -0700)]
Disable looking for PaxCtl on non Linux/BSD distros (#49746)

3 years agoFix SuperPMI replay flags (#49850)
Bruce Forstall [Fri, 19 Mar 2021 06:47:53 +0000 (23:47 -0700)]
Fix SuperPMI replay flags (#49850)

Before this fix, when doing replay (not asmdiffs) of a set of
MCH files, the `-f` arguments would accumulate, one for every
MCH file run so far.

3 years agoEnable the latest managed pgo data (#49793)
David Wrighton [Fri, 19 Mar 2021 04:27:51 +0000 (21:27 -0700)]
Enable the latest managed pgo data (#49793)

- Implementation is parallel to existing ibc handling, so that it can be toggled on/off by adjusting the `UsingToolIbcOptimization` property
- Use the same data for all assemblies produced in current build
- Apply data to release builds only
- Disable mismatch assertions in jit for current state where il mismatches are common

3 years agoFix failures on Windows when more warnings are enabled. (#49194)
Aaron Robinson [Fri, 19 Mar 2021 03:58:07 +0000 (20:58 -0700)]
Fix failures on Windows when more warnings are enabled. (#49194)

* Fix warning for System.IO.Compression.Native when more analysis is enabled.

* Fix warnings in corehost when more analysis is enabled.

3 years agoFix or disable warnings on latest VS dogfood (#49799)
Jan Kotas [Fri, 19 Mar 2021 03:20:53 +0000 (20:20 -0700)]
Fix or disable warnings on latest VS dogfood (#49799)

* Fix or disable warnings on latest VS dogfood

* Delete JIT local warning disables

3 years agoDisable android arm64 tests on PRs (#49844)
Santiago Fernandez Madero [Fri, 19 Mar 2021 02:13:32 +0000 (19:13 -0700)]
Disable android arm64 tests on PRs (#49844)

3 years agoSystem.Text.Encodings.Web refactoring and code modernization (#49373)
Levi Broderick [Fri, 19 Mar 2021 01:14:53 +0000 (18:14 -0700)]
System.Text.Encodings.Web refactoring and code modernization (#49373)

- Unify workhorse implementations across all inbox encoders
- Refactor most unsafe code from TextEncoder workhorse routines into standalone helpers
- Fix bounds check logic in workhorse routines
- SSSE3-optimize central workhorse routine
- Remove vestigial code from the library and unit test project
- Add significant unit test coverage for the workhorse routines and unsafe helpers
- Ref: CVE-2021-26701 (MSRC 62749)

3 years agoUpdate ActivityUserGuide.md (#49818)
Noah Falk [Fri, 19 Mar 2021 00:21:34 +0000 (17:21 -0700)]
Update ActivityUserGuide.md (#49818)

Refer activity guide to the official docs

https://github.com/dotnet/docs/pull/23313 is bringing more enhancements shortly

3 years agoImprove the speed of using COMPlus_JitTimeLogCsv (#49798)
Bruce Forstall [Fri, 19 Mar 2021 00:21:15 +0000 (17:21 -0700)]
Improve the speed of using COMPlus_JitTimeLogCsv (#49798)

* Improve the speed of using COMPlus_JitTimeLogCsv

I noticed that setting this and running a superpmi replay
was super slow. (Btw, note that you must use `--sequential`
in the scenario to avoid parallel writes to the log file).

This change fixes this in a number of ways:
1. The `CycleTimer::CyclesPerSecond()` function does not-trivial
computation to compute its answer. So cache the result.
2. It's expensive to constantly open and close the output file
(once per function). Partially, this is because anti-virus seems to
get involved. So open it once, and keep it open until the JIT
process is shut down.
3. Avoid calling `eeGetMethodFullName()` in DEBUG builds. (Note that
JitTimeLogCsv collects interesting information beyond just per-phase
timings that are also useful for extracting from a CSV file.)

* Fix CachedCyclesPerSecond logging

* Fix clang build break

3 years ago[main] Update dependencies from dotnet/arcade dotnet/icu (#49820)
dotnet-maestro[bot] [Fri, 19 Mar 2021 00:16:04 +0000 (20:16 -0400)]
[main] Update dependencies from dotnet/arcade dotnet/icu (#49820)

* Update dependencies from https://github.com/dotnet/arcade build 20210317.3

Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SharedFramework.Sdk
 From Version 6.0.0-beta.21166.5 -> To Version 6.0.0-beta.21167.3

* Update dependencies from https://github.com/dotnet/icu build 20210317.1

Microsoft.NETCore.Runtime.ICU.Transport
 From Version 6.0.0-preview.3.21165.1 -> To Version 6.0.0-preview.3.21167.1

* Revert changes to publish-using-darc.ps1

Workaround still needed for https://github.com/dotnet/arcade/issues/6987

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Ricardo Arenas <riarenas@microsoft.com>
3 years agoOnly override and set EMSDK_PATH if it is not already set. (#49810)
Kenneth Pouncey [Thu, 18 Mar 2021 20:48:58 +0000 (21:48 +0100)]
Only override and set EMSDK_PATH if it is not already set. (#49810)

3 years agoAdd PipeReader.Create from ReadOnlySequence<byte> (#48369)
Aleksander Heintz [Thu, 18 Mar 2021 19:29:01 +0000 (20:29 +0100)]
Add PipeReader.Create from ReadOnlySequence<byte> (#48369)

Add new factory method to PipeReader to create a PipeReader from a ReadOnlySequence<byte>

3 years ago[mbr] Return -1 if relative index is not in given generation (#49795)
Aleksey Kliger (λgeek) [Thu, 18 Mar 2021 19:14:35 +0000 (15:14 -0400)]
[mbr] Return -1 if relative index is not in given generation (#49795)

Logically after an update is applied, tokens refer to rows in tables that are a
concatenation of all the added rows from every update.  (ie: if the baseline
table 0x23 had 2 rows and then generation 1 an added 3 more rows, an index like 0x05
refers to table 0x23 row 3 from gen 1).

The way the lookup works is that the EnC map table records the logical tokens
of the update.  So for table 0x23 the 3 additions in gen 1 will have entries
like encmap row 5 = 0x23000003, row 6 = 0x23000004, row 7 = 0x23000005, and
then rows for the next table and so on.  The relative index in gen1 of token
0x23000005 then, is the distance of its row (ie row 7) from the first token for
the table (ie row 5), plus 1 (since tokens are 1-based).  So in this case token
0x23000005 corresponds to the 7-5+1 = 3rd row of table 0x23 in the gen1 dmeta image.

The problem is that previously we returns this index-base+1 computation even in
cases where we walked either to the end of the encmap table or past the last
row for the table we care about.

In the case where we walked to the end of the encmap table, the index-base+1
could sometimes return a value that looked like a valid token.  The upshot is
that we looked up an incorrect AssemblyRef (0x23 table) from the wrong
generation.

The updated code returns -1 for all cases where we didn't find an encmap row
for our given token.

Example: https://gist.github.com/lambdageek/cd7ea06bf5004ba884e7979f28623da5

3 years agoUpdate branch from master -> main (#49835)
Drew Scoggins [Thu, 18 Mar 2021 18:41:11 +0000 (11:41 -0700)]
Update branch from master -> main (#49835)

3 years agoAdd ActiveIssue to failing System.Numerics.Tests.Vector3Tests.Vector3DistanceTest...
Jo Shields [Thu, 18 Mar 2021 18:40:13 +0000 (14:40 -0400)]
Add ActiveIssue to failing System.Numerics.Tests.Vector3Tests.Vector3DistanceTest (#49825)

3 years agoAdd 3.1 to package index / validation (#49792)
Eric StJohn [Thu, 18 Mar 2021 18:19:21 +0000 (11:19 -0700)]
Add 3.1 to package index / validation (#49792)

* Add 3.1 inbox assembly versions to package index

* Include netcoreapp3.1 for package validation

3 years agoEnable macOS-arm64 libraries tests on runtime-staging rolling builds (#49445)
Steve MacLean [Thu, 18 Mar 2021 18:03:08 +0000 (14:03 -0400)]
Enable macOS-arm64 libraries tests on runtime-staging rolling builds (#49445)

* Disable failing Apple Silicon Libraries tests

-  Use tests.proj to disable catastrophically failing libraries tests
-  Add ActiveIssues where XUnit didn't crash

* Enable CoreCLR lib tests for Apple Silicon in Runtime-Staging

3 years ago[wasm][AOT] Fix System.Buffers.Tests path (#49785)
Mitchell Hwang [Thu, 18 Mar 2021 17:32:11 +0000 (13:32 -0400)]
[wasm][AOT] Fix System.Buffers.Tests path (#49785)

Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
3 years agoEnhance DynamicallyAccessedMembers Attribute (#49778)
Lakshan Fernando [Thu, 18 Mar 2021 16:51:43 +0000 (09:51 -0700)]
Enhance DynamicallyAccessedMembers Attribute (#49778)

* eh fix

* test change that inadvertently got checked in earlier

* Suppresses the trimmer warning on TypeAnalysis ctor

* Incorporating FB

* Update src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DiagnosticSourceEventSource.cs

Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
* Update src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DiagnosticSourceEventSource.cs

Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
* Update src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs

Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
* Fix DynamicDependency as per PR feedback

* an earlier change got reverted

* fixed proj file netcore app condition check

* fixed NETCORE_ENGINEERING_TELEMETRY build failures

* fixeing another NETCORE_ENGINEERING_TELEMETRY build failures

* Adding RequiresUnreferencedCode to TypeAnalysis ctor instead of suppressing the warning to get FB, not fully fixed

* PR FB and suppressing warnings for safe calls

* propagated the warning all the way up

* CI build break fix for one file

* excluding NativeRTEventSrc from being build in a project

* Missed couple of supppressions on NativeRTEventSrc

* build break fixes

* Enhancement to DynamicallyAccessedMembersAttribute

Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
3 years agoAdd Mono AOT Performance runs (#49766)
Drew Scoggins [Thu, 18 Mar 2021 16:46:58 +0000 (09:46 -0700)]
Add Mono AOT Performance runs (#49766)

* Add AOT perf support

* Fix up dependency information

* Fix zipping behavior

* Specify between mono and mono aot

* Fix in another spot

* Cleanup archive

* Last mono cleanup

* Change archive extension to tar.gz

* Fix AOT paths

* Fix mkdir

* Add -p to mkdir

* Add recursive copy

* Fix logic around selecting AOT

* Remove comments

* Add Arm64

* Remove unused variable

3 years agoFileStreamStrategies refactor (#49750)
Adam Sitnik [Thu, 18 Mar 2021 16:35:24 +0000 (17:35 +0100)]
FileStreamStrategies refactor (#49750)

* move all strategy-related types to Strategies subfolder and namespace

* make FileStreamHelpers a partial class, move some cross-platform helper methods there

* rename config switch

* address code review feedback

3 years agoClarify host testing instructions (#49797)
Elinor Fung [Thu, 18 Mar 2021 16:30:37 +0000 (09:30 -0700)]
Clarify host testing instructions (#49797)

3 years agoPrint less confusing message for Mono's FailFast abort (#49802)
Marek Safar [Thu, 18 Mar 2021 16:07:07 +0000 (17:07 +0100)]
Print less confusing message for Mono's FailFast abort (#49802)

3 years agoRemove arcade packaging workaround (#49613)
Viktor Hofer [Thu, 18 Mar 2021 14:29:13 +0000 (15:29 +0100)]
Remove arcade packaging workaround (#49613)

3 years ago[System.Memory.Data] Add `Empty` to `BinaryData` (#49777)
Matt Ellis [Thu, 18 Mar 2021 14:28:31 +0000 (07:28 -0700)]
[System.Memory.Data] Add `Empty` to `BinaryData` (#49777)

This is useful for APIs which return `BinaryData` and want to use a
singleton instead of allocating a new `BinaryData` each
time. Previously, developers would need to create their own static
copy of an empty binary data, now they can just use `Empty`

Fixes #49670

3 years agoUpdate aka.ms links (#48924)
Michelle McDaniel [Thu, 18 Mar 2021 14:22:06 +0000 (07:22 -0700)]
Update aka.ms links (#48924)

* Update aka.ms links

* Temporarily remove the symbols, nethost and badge links

3 years agoAllow for specify return value on System.Linq.Enumerable.*OrDefault methods (#48886)
Foxtrek_64 [Thu, 18 Mar 2021 11:36:40 +0000 (11:36 +0000)]
Allow for specify return value on System.Linq.Enumerable.*OrDefault methods (#48886)

* Fix #20064

* Add API to ref assembly

* Make overloads with defaultValue not nullable

* Add unit tests, simplify implementation

* Add LastOrDefault tests

* Add Queryable tests

* Additional tests. Reformatting TryGet Methods.

* Update src/libraries/System.Linq.Queryable/tests/FirstOrDefaultTests.cs

* Apply suggestions from code review

Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
* Fix ref methods

* Further adjust nullability

* Fix more nullables

* fix failing tests

* Restore coding style

Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
3 years agoStop building extra installer bundles during PGO build (#49779)
Andy Gocke [Thu, 18 Mar 2021 08:55:17 +0000 (01:55 -0700)]
Stop building extra installer bundles during PGO build (#49779)

* Select only the runtime-internal package and turn off installers

* Remove R2R modifications

3 years ago[main] Update dependencies from dotnet/arcade dotnet/icu dotnet/llvm-project dotnet...
dotnet-maestro[bot] [Thu, 18 Mar 2021 08:22:17 +0000 (09:22 +0100)]
[main] Update dependencies from dotnet/arcade dotnet/icu dotnet/llvm-project dotnet/runtime-assets (#49752)

* Update dependencies from https://github.com/dotnet/arcade build 20210316.5

Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SharedFramework.Sdk
 From Version 6.0.0-beta.21155.1 -> To Version 6.0.0-beta.21166.5

* Update dependencies from https://github.com/dotnet/icu build 20210315.1

Microsoft.NETCore.Runtime.ICU.Transport
 From Version 6.0.0-preview.3.21151.1 -> To Version 6.0.0-preview.3.21165.1

* Update dependencies from https://github.com/dotnet/llvm-project build 20210315.1

runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools
 From Version 9.0.1-alpha.1.21158.1 -> To Version 9.0.1-alpha.1.21165.1

* Update dependencies from https://github.com/dotnet/runtime-assets build 20210312.1

System.ComponentModel.TypeConverter.TestData , System.Drawing.Common.TestData , System.IO.Compression.TestData , System.IO.Packaging.TestData , System.Net.TestData , System.Private.Runtime.UnicodeData , System.Runtime.TimeZoneData , System.Security.Cryptography.X509Certificates.TestData , System.Windows.Extensions.TestData
 From Version 5.0.0-beta.21159.1 -> To Version 6.0.0-beta.21162.1

* re-add publishing workaround

workaround for https://github.com/dotnet/arcade/issues/6987

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Ricardo Arenas <riarenas@microsoft.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
3 years ago[mono] Add all instances from the aot profile when using aot profiles… (#49758)
Zoltan Varga [Thu, 18 Mar 2021 08:20:47 +0000 (04:20 -0400)]
[mono] Add all instances from the aot profile when using aot profiles… (#49758)

Fixes https://github.com/dotnet/runtime/issues/49648.

3 years ago[interp] Actually extend the return value when transitioning back to interp from...
Vlad Brezae [Thu, 18 Mar 2021 05:45:21 +0000 (07:45 +0200)]
[interp] Actually extend the return value when transitioning back to interp from aot/jit (#49789)

3 years ago[AndroidCrypto] Avoid printing JNI exceptions in cases where they are expected (...
Elinor Fung [Thu, 18 Mar 2021 05:30:03 +0000 (22:30 -0700)]
[AndroidCrypto] Avoid printing JNI exceptions in cases where they are expected (#49530)

3 years agoruntime-linker-tests: revert earlier change which added browser offse… (#49774)
Ankit Jain [Thu, 18 Mar 2021 03:25:50 +0000 (23:25 -0400)]
runtime-linker-tests: revert earlier change which added browser offse… (#49774)

3 years agoRemove top-level range check nodes (#49271)
SingleAccretion [Thu, 18 Mar 2021 01:38:37 +0000 (04:38 +0300)]
Remove top-level range check nodes (#49271)

Refactored optRemoveRangeCheck to handle top-level standalone range check nodes.

3 years agoUpdate Microsoft.DiaSymReader.Native package (#49739)
Anton Lapounov [Thu, 18 Mar 2021 01:25:54 +0000 (18:25 -0700)]
Update Microsoft.DiaSymReader.Native package (#49739)

3 years agoAnnotate System.Diagnostics.Process APIs throwing PNSE on iOS/tvOS (#49354)
Maxim Lipnin [Wed, 17 Mar 2021 22:48:13 +0000 (01:48 +0300)]
Annotate System.Diagnostics.Process APIs throwing PNSE on iOS/tvOS (#49354)

* Process.Start

* Remove redundant annotations

* Remove iOS since it's in the default list of supported platforms

* Process.Kill

* Make Process.Kill throw PNSE on iOS/tvOS

* Annotate windows-related implementation of Kill method

3 years ago[main] Update dependencies from mono/linker (#49577)
dotnet-maestro[bot] [Wed, 17 Mar 2021 19:56:33 +0000 (20:56 +0100)]
[main] Update dependencies from mono/linker (#49577)

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
Co-authored-by: Marek Safar <marek.safar@gmail.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
3 years agoAdd runtime MVID checks for composite images (#49668)
Tomáš Rylek [Wed, 17 Mar 2021 19:55:49 +0000 (12:55 -0700)]
Add runtime MVID checks for composite images (#49668)

* Crossgen2 implementation of new MVID R2R section
* Runtime checks for assembly MVIDs against native images
* Basic R2RDump support for dumping the manifest assembly MVID table.
* R2R minor version increment; format spec update

Thanks

Tomas

3 years agoFix incorrect merge suppressing my change to publish CG2 framework (#49666)
Tomáš Rylek [Wed, 17 Mar 2021 19:54:02 +0000 (12:54 -0700)]
Fix incorrect merge suppressing my change to publish CG2 framework (#49666)

As David discovered, I apparently made a merge bug in rebasing my
CG2 framework switch-over change prior to checking in that actually
suppressed CG2 publishing due to losing the property
PublishReadyToRunUseCrossgen2. This change fixes that deficiency.

Thanks

Tomas

3 years agofix typo (#49763)
Eirik Tsarpalis [Wed, 17 Mar 2021 18:55:50 +0000 (18:55 +0000)]
fix typo (#49763)

3 years agoMore tests for FileStream edge cases (#49754)
Adam Sitnik [Wed, 17 Mar 2021 18:53:43 +0000 (19:53 +0100)]
More tests for FileStream edge cases (#49754)

* add StreamConformanceTests to the solution file so we can read source code from VS

* add FileOffsetIsPreservedWhenFileStreamIsCreatedFromSafeFileHandle tests

* add WriteAsyncStartsWherePreviousReadAsyncHasFinished test

3 years ago[wasm] Add a mono_wasm_print_stack_trace () helper function usable during runtime...
Zoltan Varga [Wed, 17 Mar 2021 18:46:37 +0000 (14:46 -0400)]
[wasm] Add a mono_wasm_print_stack_trace () helper function usable during runtime debugging. (#49759)

3 years agoInclude "simple" UTF-8 validation and transcoding logic for interpreted and low-footp...
Pavel Savara [Wed, 17 Mar 2021 18:38:39 +0000 (19:38 +0100)]
Include "simple" UTF-8 validation and transcoding logic for interpreted and low-footprint scenarios (#49372)

3 years agoAddress issue where stress mode testing may not work for this more exhaustive than...
David Wrighton [Wed, 17 Mar 2021 18:28:09 +0000 (11:28 -0700)]
Address issue where stress mode testing may not work for this more exhaustive than usual test (#49736)

3 years agoUpdate area-owners.md (#49769)
Vladimir Sadov [Wed, 17 Mar 2021 18:08:18 +0000 (11:08 -0700)]
Update area-owners.md (#49769)

Added myself to hosting areas.

3 years agoAllow jit to disregard PGO; PGO changes for SPMI and MCS (#49551)
Andy Ayers [Wed, 17 Mar 2021 17:58:08 +0000 (10:58 -0700)]
Allow jit to disregard PGO; PGO changes for SPMI and MCS (#49551)

* COMPlus_JitDisablePGO will now block the jit from using profile data. Useful
for investigations and (someday) bug triage. Also disable GDV if we're disabling PGO

* `-base_jit_option` and `-diff_jit_option` can be used to pass options to
superpmy.py asmdiffs.

* Fix SPMI file name computation to better handle cases where the directory is
a relative path.

* Enhance `mcs -jitflags` output to describe how many method contexts have
PGO data, and which kinds of data they hold. Useful for validating that an
SPMI collection done via dynamic PGO has actually collected an interesting
set of jit requests.

3 years ago[wasm] Enable wasm relinking by default for Release config (#49251)
Ankit Jain [Wed, 17 Mar 2021 17:12:16 +0000 (13:12 -0400)]
[wasm] Enable wasm relinking by default for Release config (#49251)

* [wasm] Set default value for $(WasmBuildNative) based on:

- If $(WasmBuildNative) is already set (eg. by user project) to true, then error if EMSDK_PATH is unset
- if unset, and$(PublishTrimmed) == false, then set to false
- if unset, and $(Configuration) == "Release", then set to true
- If it is $(WasmBuildNative) == true after above steps, and emsdk is missing
    => then emit a warning, and set it to false

commits:

* [wasm] Set WasmBuildNative=true for Release config

- But set to `false` if `$(PublishTrimmed)` is not true

Fixes: https://github.com/dotnet/runtime/issues/48349

* dotnet-linker-tests need mono-aot-cross

* [wasm] Cleanup setting emcc flags

* Address review feedback from @lewing

.. and update tests to track the changes.

* Correctly address review feedback:

3 years agoReorganize span parse tests (#47678)
Cyl18 [Wed, 17 Mar 2021 17:09:11 +0000 (01:09 +0800)]
Reorganize span parse tests (#47678)

Co-authored-by: Stephen Toub <stoub@microsoft.com>
3 years ago[wasm] Avoid error-ing out in AOT only mode if an AOT image is not found since apps...
Zoltan Varga [Wed, 17 Mar 2021 16:26:33 +0000 (12:26 -0400)]
[wasm] Avoid error-ing out in AOT only mode if an AOT image is not found since apps (#49318)

can load assemblies which were not AOT-ed, if they don't attempt to execute code from them.

3 years agoAdds support for building Wasm on Windows (#45545)
Steve Pfister [Wed, 17 Mar 2021 16:23:33 +0000 (12:23 -0400)]
Adds support for building Wasm on Windows (#45545)

* First pass at building wasm on windows

* Adds support for building wasm on Windows

Emscripten and EMSDK_PATH must be set up externally.  This differs from linux and macos
where we optionally can do it for you.

* Cleanup

* Feedback

* Rename conflicting target

* Made sure current master still works

* auto provision when EMSDK_PATH is not set and try to see if a browser build works on windows

* Add call in front of batch scripts. All of a sudden it's necessary

* Use RunWithEmSdkEnv task

* Override arch for Browser OS

Similar to what we do in build.sh

* Update machine certificates

To avoid this error:

    Installing tool 'node-12.18.1-64bit'..
      Installation failed!
      Error: Downloading URL 'https://storage.googleapis.com/webassembly/emscripten-releases-builds/deps/node-v12.18.1-win-x64.zip': <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)>
      Warning: Possibly SSL/TLS issue. Update or install Python SSL root certificates (2048-bit or greater) supplied in Python folder or https://pypi.org/project/certifi/ and try again.
      Warning: The SDK/tool 'node-12.18.1-64bit' cannot be activated since it is not installed! Skipping this tool...

The script comes from runtimelabs repo https://github.com/dotnet/runtimelab/blob/d0cda961aeda26faae17c474e26d822cd1e45438/eng/pipelines/runtimelab/update-machine-certs.ps1

* Use msbuild to write the emcc version file

* Put emscripten version in text file

And use it in Makefile and mono.proj

* Try to fix Browser_wasm_Windows detection

* Install native dependencies

I think we are missing cmake and failing with:

      configure: cmake -DENABLE_WERROR=1 -DCMAKE_INSTALL_PREFIX=D:\workspace\_work\1\s\artifacts\obj\mono\Browser.wasm.Debug\out -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Debug -DGC_SUSPEND=preemptive -DENABLE_MINIMAL=jit,portability,sgen_major_marksweep_conc,sgen_split_nursery,sgen_gc_bridge,sgen_toggleref,sgen_debug_helpers,sgen_binary_protocol,logging,shared_perfcounters,interpreter,threads,eventpipe,qcalls -DENABLE_INTERP_LIB=1 -DDISABLE_ICALL_TABLES=1 -DDISABLE_CRASH_REPORTING=1 -DENABLE_ICALL_EXPORT=1 -DENABLE_LAZY_GC_THREAD_CREATION=1 -DENABLE_LLVM_RUNTIME=1 -DENABLE_METADATA_UPDATE=1 "-DCMAKE_C_FLAGS= -fexceptions -ID:\workspace\_work\1\s\.packages\microsoft.netcore.runtime.icu.transport\6.0.0-preview.3.21151.1/runtimes/browser-wasm/native/include" "-DCMAKE_CXX_FLAGS= -fexceptions" D:\workspace\_work\1\s\src\mono\ -DCMAKE_TOOLCHAIN_FILE=D:\workspace\_work\1\s\src\mono\wasm\emsdk\upstream\emscripten\cmake\Modules\Platform\Emscripten.cmake -DCMAKE_CROSSCOMPILING_EMULATOR="D:/workspace/_work/1/s/src/mono/wasm/emsdk/node/12.18.1_64bit/bin/node.exe" -G Ninja
      Traceback (most recent call last):
        File "D:\workspace\_work\1\s\src\mono\wasm\emsdk\upstream\emscripten\\emcmake.py", line 33, in <module>
          sys.exit(run())
        File "D:\workspace\_work\1\s\src\mono\wasm\emsdk\upstream\emscripten\\emcmake.py", line 26, in run
          building.configure(sys.argv[1:])
        File "D:\workspace\_work\1\s\src\mono\wasm\emsdk\upstream\emscripten\tools\building.py", line 339, in configure
          run_process(args, stdout=stdout, stderr=stderr, env=env, **kwargs)
        File "D:\workspace\_work\1\s\src\mono\wasm\emsdk\upstream\emscripten\tools\shared.py", line 94, in run_process
          ret = subprocess.run(cmd, check=check, input=input, *args, **kw)
        File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\subprocess.py", line 472, in run
        File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\subprocess.py", line 775, in __init__
        File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\subprocess.py", line 1178, in _execute_child
      FileNotFoundError: [WinError 2] The system cannot find the file specified
    D:\workspace\_work\1\s\src\mono\mono.proj(410,5): error MSB3073: The command "call D:\workspace\_work\1\s\src\mono\wasm\emsdk\emsdk_env.bat && emcmake cmake -DENABLE_WERROR=1 -DCMAKE_INSTALL_PREFIX=D:\workspace\_work\1\s\artifacts\obj\mono\Browser.wasm.Debug\out -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Debug -DGC_SUSPEND=preemptive -DENABLE_MINIMAL=jit,portability,sgen_major_marksweep_conc,sgen_split_nursery,sgen_gc_bridge,sgen_toggleref,sgen_debug_helpers,sgen_binary_protocol,logging,shared_perfcounters,interpreter,threads,eventpipe,qcalls -DENABLE_INTERP_LIB=1 -DDISABLE_ICALL_TABLES=1 -DDISABLE_CRASH_REPORTING=1 -DENABLE_ICALL_EXPORT=1 -DENABLE_LAZY_GC_THREAD_CREATION=1 -DENABLE_LLVM_RUNTIME=1 -DENABLE_METADATA_UPDATE=1 -DCMAKE_C_FLAGS=" -fexceptions -ID:\workspace\_work\1\s\.packages\microsoft.netcore.runtime.icu.transport\6.0.0-preview.3.21151.1/runtimes/browser-wasm/native/include" -DCMAKE_CXX_FLAGS=" -fexceptions"  D:\workspace\_work\1\s\src\mono\" exited with code 1.
    ##[error]src\mono\mono.proj(410,5): error MSB3073: (NETCORE_ENGINEERING_TELEMETRY=Build) The command "call D:\workspace\_work\1\s\src\mono\wasm\emsdk\emsdk_env.bat && emcmake cmake -DENABLE_WERROR=1 -DCMAKE_INSTALL_PREFIX=D:\workspace\_work\1\s\artifacts\obj\mono\Browser.wasm.Debug\out -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Debug -DGC_SUSPEND=preemptive -DENABLE_MINIMAL=jit,portability,sgen_major_marksweep_conc,sgen_split_nursery,sgen_gc_bridge,sgen_toggleref,sgen_debug_helpers,sgen_binary_protocol,logging,shared_perfcounters,interpreter,threads,eventpipe,qcalls -DENABLE_INTERP_LIB=1 -DDISABLE_ICALL_TABLES=1 -DDISABLE_CRASH_REPORTING=1 -DENABLE_ICALL_EXPORT=1 -DENABLE_LAZY_GC_THREAD_CREATION=1 -DENABLE_LLVM_RUNTIME=1 -DENABLE_METADATA_UPDATE=1 -DCMAKE_C_FLAGS=" -fexceptions -ID:\workspace\_work\1\s\.packages\microsoft.netcore.runtime.icu.transport\6.0.0-preview.3.21151.1/runtimes/browser-wasm/native/include" -DCMAKE_CXX_FLAGS=" -fexceptions"  D:\workspace\_work\1\s\src\mono\" exited with code 1.

* Try use newer cmake

* Revert "Try use newer cmake"

This reverts commit bd95f346f9a3c5828924201c79df3b356043c11c.

* Normalize path

* Remove excessive space char

* Try newer emscripten version

To try if it helps with the cmake issue

* Try trim end '\' from directory passed to cmake

Also revert emscripten version back

* Provision emscripten only when targeting wasm

* Do not set $os, it is already set above

* Revert "Remove excessive space char"

This reverts commit b1c4da12a0c39e78b0cf02d1da1332a55cedf772.

* Provision emscripten only on windows

Co-authored-by: Steve Pfister <steve.pfister@microsoft.com>
Co-authored-by: Radek Doulik <radekdoulik@gmail.com>
3 years agoFix nested Multipart when generating MailMessage (#47403)
Ely [Wed, 17 Mar 2021 15:57:49 +0000 (16:57 +0100)]
Fix nested Multipart when generating MailMessage (#47403)

* Fix nested Multipart when generating MailMessage

When sending a mail with alternate views and attachments, attachments were nested a second time. Doing so made the generated mail unintelligible for some clients (Like Outlook).

Fix dotnet#47379

* Add test for MailMessage serialization

Co-authored-by: MihaZupan <mihazupan.zupan1@gmail.com>
3 years agoFix card marking stealing for regions (#49704)
Peter Sollich [Wed, 17 Mar 2021 15:46:33 +0000 (16:46 +0100)]
Fix card marking stealing for regions (#49704)

Essentially the problem was that for regions, we have several lists of segments, one for each generation. Thus, the card_marking_enumerator logic needs provisions to restart enumerating with another segment list.

The changes fall into 3 categories:

- new method switch_to_segment to start enumerating a new segment list - called for a new generation
- changes to make the enumerator state consistent across one segment list ending and another starting
- added dprintf instrumentation so we can later reconstruct how different threads enumerated chunks.

3 years agoRemove kTLSProtocol13_ForwardDef (#48762)
Kevin Jones [Wed, 17 Mar 2021 15:04:43 +0000 (11:04 -0400)]
Remove kTLSProtocol13_ForwardDef (#48762)

3 years agoUse a single approach to detect presence of pseudo handle support. (#48623)
Kevin Jones [Wed, 17 Mar 2021 14:02:59 +0000 (10:02 -0400)]
Use a single approach to detect presence of pseudo handle support. (#48623)

3 years agoUpdate Microsoft.DotNet.Helix.Sdk to 6.0.0-beta.21166.5 (#49747)
Alexander Köplinger [Wed, 17 Mar 2021 14:02:12 +0000 (15:02 +0100)]
Update Microsoft.DotNet.Helix.Sdk to 6.0.0-beta.21166.5 (#49747)

Includes https://github.com/dotnet/arcade/pull/7103

3 years agoAdd obsolete attribute to DisablePrivateReflectionAttribute (#49550)
Annchous [Wed, 17 Mar 2021 13:42:19 +0000 (16:42 +0300)]
Add obsolete attribute to DisablePrivateReflectionAttribute (#49550)

* Add obsolete attribute to DisablePrivateReflectionAttribute

* Attribute added to ref file

* fix ref file and attribute

* Add new diagnostic ID

* Fix obsolete attribute

* Fix obsolete attribute in ref file

* Add new obsoletion ID to documentation

* Removed all references of DisablePrivateReflection in src/coreclr

* Fixed error message of obsoletion

* Fixed documentation

* Removed reference of DisablePrivateReflection

* Add NoWarn for new obsoletion ID

* Add pragma to tests

* Fix error message of new obsoletion

* Fix new obsoletion description in documentation

3 years agoBig-endian fixes for ilasm/ildasm (#49685)
Ulrich Weigand [Wed, 17 Mar 2021 13:35:31 +0000 (14:35 +0100)]
Big-endian fixes for ilasm/ildasm (#49685)

* Add byte swap when accessing PublicKeyBlob in AsmMan::EndAssembly

* Fix access beyond end of pszString in DumpUnicodeString

* Remove unneccessary assert in _FillMDDefaultValue

3 years agoAdd msbuild task to generate binary runtimeconfig format (#49544)
Fan Yang [Wed, 17 Mar 2021 11:39:54 +0000 (07:39 -0400)]
Add msbuild task to generate binary runtimeconfig format (#49544)

* Add msbuild task to generate binary runtimeconfig format

* Update property name due to naming conversion.

* Fixed more formatting issue

* Fixed one more naming convention

* Update src/tasks/RuntimeConfigParser/RuntimeConfigParser.cs

Co-authored-by: Ryan Lucia <ryan@luciaonline.net>
* Update src/tasks/RuntimeConfigParser/RuntimeConfigParser.cs

Co-authored-by: Ryan Lucia <ryan@luciaonline.net>
* Update src/tasks/RuntimeConfigParser/RuntimeConfigParser.cs

Co-authored-by: Ryan Lucia <ryan@luciaonline.net>
* Fixed comments

* Update src/tasks/RuntimeConfigParser/RuntimeConfigParser.cs

Co-authored-by: Dan Moseley <danmose@microsoft.com>
* Fix error handling

Co-authored-by: Ryan Lucia <ryan@luciaonline.net>
Co-authored-by: Dan Moseley <danmose@microsoft.com>
3 years ago[QUIC] Fix TestConnect (#49660)
Natalia Kondratyeva [Wed, 17 Mar 2021 11:21:40 +0000 (12:21 +0100)]
[QUIC] Fix TestConnect (#49660)

* Mark all failing tests with ActiveIssue

* Fix TestConnect

3 years agoBetter windows only guard which can be removed by linker (#48594)
Marek Safar [Wed, 17 Mar 2021 11:20:52 +0000 (12:20 +0100)]
Better windows only guard which can be removed by linker (#48594)

Also, remove superfluous test poking into an internal state to mimic
non-Windows test environment

3 years agoSimplify ASCIIUtility test utility class (#49720)
Michal Strehovský [Wed, 17 Mar 2021 11:17:34 +0000 (12:17 +0100)]
Simplify ASCIIUtility test utility class (#49720)

* Simplify ASCIIUtility test utility class

The existing code seems to be just an elaborate way to do the same thing.

* Update ASCIIUtilityTests.cs

3 years agoHandle RsaVerificationPrimitive failure (non-internal error) (#49741)
Elinor Fung [Wed, 17 Mar 2021 11:16:08 +0000 (04:16 -0700)]
Handle RsaVerificationPrimitive failure (non-internal error) (#49741)

3 years agoUpdate dependencies from https://github.com/dotnet/xharness build 20210315.2 (#49745)
dotnet-maestro[bot] [Wed, 17 Mar 2021 11:13:51 +0000 (11:13 +0000)]
Update dependencies from https://github.com/dotnet/xharness build 20210315.2 (#49745)

[main] Update dependencies from dotnet/xharness

3 years agoFileStream rewrite part II (#48813)
Adam Sitnik [Wed, 17 Mar 2021 10:55:35 +0000 (11:55 +0100)]
FileStream rewrite part II (#48813)

* introduce WindowsFileStreamStrategy

* introduce SyncWindowsFileStreamStrategy

* introduce AsyncWindowsFileStreamStrategy

* only DerivedFileStreamStrategy needs to have a reference to FileStream

remove finalizer from FileStream, keep it only in DerivedFileStreamStrategy and LegacyFileStreamStrategy

* use the new strategies when buffering is not enabled

* introduce BufferedFileStreamStrategy

* use the Legacy strategy by default for now, add tests for the other implementation

* Apply suggestions from code review

Co-authored-by: David Cantú <dacantu@microsoft.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
3 years agoFix stress-http and stress-ssl builds on Linux (#49706)
Anton Firszov [Wed, 17 Mar 2021 10:49:39 +0000 (11:49 +0100)]
Fix stress-http and stress-ssl builds on Linux (#49706)

3 years agoCollectionsMarshal.GetValueRef(Dictionary) (#49388)
Ben Adams [Wed, 17 Mar 2021 10:43:48 +0000 (10:43 +0000)]
CollectionsMarshal.GetValueRef(Dictionary) (#49388)

3 years agoBig-endian fix for JsonClassInfo.GetKey (#49708)
Ulrich Weigand [Wed, 17 Mar 2021 10:42:35 +0000 (11:42 +0100)]
Big-endian fix for JsonClassInfo.GetKey (#49708)

* Big-endian fix for JsonClassInfo.GetKey

* Skip assertion in JsonClassInfo.GetKey on big-endian
  (code will not ensure the properties tested here)

* Update src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonClassInfo.Cache.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
3 years agoFix build on platforms without gsharedvt (#49710)
Alexander Köplinger [Wed, 17 Mar 2021 10:34:25 +0000 (11:34 +0100)]
Fix build on platforms without gsharedvt (#49710)

A `MonoMemoryManager*` parameter was added to `mono_arch_get_gsharedvt_call_info()` in https://github.com/dotnet/runtime/commit/34c68c7edf6d61c8ff3d2631003ed86353415479 that was missed in arch-stubs.c

3 years agoReadOnlySequence: Don't leak the flags that are on _startInteger and _endInteger...
Kuinox [Wed, 17 Mar 2021 09:16:30 +0000 (10:16 +0100)]
ReadOnlySequence: Don't leak the flags that are on _startInteger and _endInteger. (#47969)

* ReadOnlySequence: Don't leak the flags that are on _startInteger and _endInteger.

* Typo fix.

* Added more tests + review fixes.

3 years agoSystem.IO.Pipelines.PipeReader: Fix TryRead summary (#49603)
Michael Croes [Wed, 17 Mar 2021 06:18:30 +0000 (07:18 +0100)]
System.IO.Pipelines.PipeReader: Fix TryRead summary (#49603)

Add missing 'from' to the summary for TryRead.

3 years agoUnify corerun test runner (#49529)
Aaron Robinson [Wed, 17 Mar 2021 05:55:58 +0000 (22:55 -0700)]
Unify corerun test runner (#49529)

* Remove unused files.

* Rewrite corerun so that it runs on all platforms.
Remove the unixcorerun implementation but fold in
those its features.

Attach debugger is supported on Windows and macOS.
CORE_ROOT can now be set the same way on all platforms:
  --clr-path, CORE_ROOT, corerun dir.

* Dump the computed configuration for runtime if a failure to
  initialize or execute the entry assembly occurs.
Remove -v flag.

* Add debugger attach support for systems with procfs.

* Remove the corerun option for setting System.Globalization.Invariant.

3 years agorework ProxySetViaEnvironmentVariable_DefaultProxyCredentialsUsed test (#49348)
Tomas Weinfurt [Wed, 17 Mar 2021 04:28:45 +0000 (21:28 -0700)]
rework ProxySetViaEnvironmentVariable_DefaultProxyCredentialsUsed test (#49348)

3 years agoPort hosting tests from extensions to runtime (#49716)
Anirudh Agnihotry [Wed, 17 Mar 2021 04:09:59 +0000 (21:09 -0700)]
Port hosting tests from extensions to runtime  (#49716)

* port hosting tests

* add nrt461 to test matrix and net6.0 -> netcoreappcurrent

* update the license header

Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
3 years agoAnonymousPipeStreams.Linux, Process.Unix Streams: perform async I/O by using Socket...
Tom Deseyn [Wed, 17 Mar 2021 02:03:36 +0000 (03:03 +0100)]
AnonymousPipeStreams.Linux, Process.Unix Streams: perform async I/O by using Socket implementation  (#44647)

* experiment: use read/write for socket operations instead of recvmsg/sendmsg

* AnonymousPipeStreams: perform async I/O by using Socket implementation

* PipeStream.Unix: use sync/async functions on Socket

* Refactor Socket creation

* Cleanup

* Fix broken comment

* Allow passing pipe fd to Socket/SafeSocketHandle public ctor

* macOS: Handle EPIPE on registration

* Refactor IsPipe to IsSocket

* Move registration error handling in to single method

* Process: use AnonymousPipeClientStream for redirected streams.

* Remove unneeded BufferedStream

* PR feedback

* PipeStream.Unix: enable cancelation tests

* Add back Ctor_SafeHandle_Invalid_ThrowsException test

* SysRead/SysWrite: Assert not used for socket-type handle

3 years agoUse new VS detection script in DacTableGen (#49729)
Anton Lapounov [Wed, 17 Mar 2021 01:35:25 +0000 (18:35 -0700)]
Use new VS detection script in DacTableGen (#49729)

3 years agoBig-endian test case fixes: System.Reflection (#49693)
Ulrich Weigand [Wed, 17 Mar 2021 00:33:19 +0000 (01:33 +0100)]
Big-endian test case fixes: System.Reflection (#49693)

* Fix endian assumptions in tests operating on PE headers / IL metadata
  (this is always encoded in little-endian byte order)

* Fix expected result for BlobReader test (always little-endian)

* Fix expected results for GUID tests

3 years agoBig-endian fix: Marvin hash (#49707)
Ulrich Weigand [Wed, 17 Mar 2021 00:31:16 +0000 (01:31 +0100)]
Big-endian fix: Marvin hash (#49707)

* Fix endian assumptions in Marvin.ComputeHash32OrdinalIgnoreCase
  (use the same logic that already exists in Marvin.ComputeHash32)

3 years agoPut tests that depend on non-zero lower bounds arrays behind condition (#49721)
Michal Strehovský [Wed, 17 Mar 2021 00:30:54 +0000 (01:30 +0100)]
Put tests that depend on non-zero lower bounds arrays behind condition (#49721)

I assume these are new.

3 years agoArmel support in crossgen2 (#43706)
David Wrighton [Wed, 17 Mar 2021 00:28:48 +0000 (17:28 -0700)]
Armel support in crossgen2 (#43706)

This change adds support for armel target compilation in crossgen2

To use the feature compile an application using the --targetos Linux and --targetarch armel flags.

Summary of changes
- To avoid bloating the compilation matrix, the #ifdefs used in the JIT that were conditional on ARM_SOFTFP behavior have been changed in to variable checks. To avoid perf penalties, this dynamic behavior is only enabled for the jit intended for compiling using crossgen2.
- Armel abi processing was integrated into the various parts of the managed crossgen2 codebase that correspond to components with special handling in the coreclr codebase
  - HFA support is disabled for Armel targets
  - Floating point registers are not used when passing arguments

With this change it becomes possible to run crossgen2 on a Windows or Linux machine and target a Linux Armel target.

3 years agoFix AppHost Save From MemoryMappedFile. (#49730)
Brian Robbins [Wed, 17 Mar 2021 00:24:08 +0000 (17:24 -0700)]
Fix AppHost Save From MemoryMappedFile. (#49730)

3 years agoCondition new tests depending on Ref.Emit on Ref.Emit support (#49722)
Michal Strehovský [Tue, 16 Mar 2021 23:48:42 +0000 (00:48 +0100)]
Condition new tests depending on Ref.Emit on Ref.Emit support (#49722)

3 years ago[mono] Prefix bundle loads with culture if applicable (#49534)
Ryan Lucia [Tue, 16 Mar 2021 23:10:57 +0000 (19:10 -0400)]
[mono] Prefix bundle loads with culture if applicable (#49534)

3 years ago[AndroidCrypto] Fix remaining Algorithms test failures. (#49501)
Jeremy Koritzinsky [Tue, 16 Mar 2021 21:47:03 +0000 (14:47 -0700)]
[AndroidCrypto] Fix remaining Algorithms test failures. (#49501)

3 years agoBig-endian test case fixes: System.Runtime (#49691)
Ulrich Weigand [Tue, 16 Mar 2021 21:39:35 +0000 (22:39 +0100)]
Big-endian test case fixes: System.Runtime (#49691)

* Byte-swap input/output for BitConverter tests

* Update byte index for GetByte/SetByte tests on big-endian systems

3 years agoadd STRESS_PROMOTE_LESS_STRUCTS mode. (#49084)
Sergey Andreenko [Tue, 16 Mar 2021 21:33:38 +0000 (14:33 -0700)]
add STRESS_PROMOTE_LESS_STRUCTS mode. (#49084)

* add STRESS_PROMOTE_LESS_STRUCTS mode.

* add comment

* Disable failing tests.

* review

* fix build break

3 years agoDo not pin free object for STRESS_REGIONS (#49547)
Andrew Au [Tue, 16 Mar 2021 19:34:56 +0000 (12:34 -0700)]
Do not pin free object for STRESS_REGIONS (#49547)

3 years agoMove dotnet-sdk snaps into the installer repo (#49697)
Viktor Hofer [Tue, 16 Mar 2021 18:59:44 +0000 (19:59 +0100)]
Move dotnet-sdk snaps into the installer repo (#49697)

3 years agoPrevent unbounded lock holds in BufferManager of EventPipe (#48435)
John Salem [Tue, 16 Mar 2021 17:36:07 +0000 (10:36 -0700)]
Prevent unbounded lock holds in BufferManager of EventPipe (#48435)

3 years ago[mono][debugger] Disable by default the generation of mscordbi (#49596)
Thays Grazia [Tue, 16 Mar 2021 17:17:59 +0000 (14:17 -0300)]
[mono][debugger] Disable by default the generation of mscordbi (#49596)

* Disable by default compilation of mscordbi, it will be generated by default only on CI.
To generate it use /p:MonoMsCorDbi=true
Fixes #49590

* Changing what was suggested by @jkotas and @akoeplinger.
Thanks @directhex for your help.

* Update eng/Subsets.props

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>