platform/upstream/dotnet/runtime.git
4 years ago[runtime] Make the code which handles pinvoke lookup retries netcore only. (#41201)
monojenkins [Sat, 22 Aug 2020 09:19:50 +0000 (05:19 -0400)]
[runtime] Make the code which handles pinvoke lookup retries netcore only. (#41201)

Co-authored-by: vargaz <vargaz@users.noreply.github.com>
4 years agoRemove memset in EventPipeBuffer allocation (#41194)
Sung Yoon Whang [Sat, 22 Aug 2020 08:49:17 +0000 (01:49 -0700)]
Remove memset in EventPipeBuffer allocation (#41194)

4 years ago[runtime] Ongoing work on mono cmake build (#41055)
Zoltan Varga [Sat, 22 Aug 2020 05:30:29 +0000 (01:30 -0400)]
[runtime] Ongoing work on mono cmake build (#41055)

* [runtime] Ongoing work on cmake build.

* Install libraries
* Add more configure options
* Add wasm support

* Fix the build.

* Remove unused defines, reformat.

* Install headers.

4 years agoRollback noopt change (llvm-backend) (#41186)
Egor Bogatov [Sat, 22 Aug 2020 02:31:14 +0000 (05:31 +0300)]
Rollback noopt change (llvm-backend) (#41186)

4 years agoSwitch over managed test component build to run on Linux x64 (#41169)
Tomáš Rylek [Sat, 22 Aug 2020 01:07:37 +0000 (03:07 +0200)]
Switch over managed test component build to run on Linux x64 (#41169)

4 years agoCast cache Add should handle odd entry versions as inconsistent/taken. (#41109)
Vladimir Sadov [Sat, 22 Aug 2020 00:46:55 +0000 (17:46 -0700)]
Cast cache Add should handle odd entry versions as inconsistent/taken. (#41109)

* Cast cache Add should handle odd entry versions as inconsistent/taken

* PR feedback

4 years agoUpdate Mono runtime NativeLibrary test exclusions (#41181)
Ryan Lucia [Sat, 22 Aug 2020 00:29:21 +0000 (20:29 -0400)]
Update Mono runtime NativeLibrary test exclusions (#41181)

4 years agoFix category exclusion (#41192)
Drew Scoggins [Sat, 22 Aug 2020 00:01:38 +0000 (17:01 -0700)]
Fix category exclusion (#41192)

4 years agoFix pythonpath and internal parameter (#41190)
Olivia Chen [Fri, 21 Aug 2020 23:57:40 +0000 (16:57 -0700)]
Fix pythonpath and internal parameter (#41190)

* update helixprecommands order

* update internal param

4 years agoImprove condition for generating test execution scripts (#41151)
Tomáš Rylek [Fri, 21 Aug 2020 23:35:13 +0000 (01:35 +0200)]
Improve condition for generating test execution scripts (#41151)

I have received heads-up from two sources - @naricc's work on Mono webassembly
testing and @gbalykov's recent PR

#40979

that there's something weird going on in the execution script creation logic.
I have investigated the exact purpose of the condition referring to
_CopyNativeProjectBinaries. I believe the intent of the condition
was to suppress the creation of execution scripts during managed test build
once we switched over to building managed test components only once.

The problem is that the common build of managed test components reused by
runs on all OS'es and architectures uses the allTargets specification
to build all test projects including those that only work on some platforms. This is
one of the reasons why we cannot emit the execution scripts at managed test
component build time - we would emit them even for tests that later on in the
pipeline turn out to be disabled for a particular platform or build configuration.
The other reason is practical - today the CLRTest.*.targets scripts only generate
one version of the script (cmd vs. sh) - but that would be easy to fix.

Based on these findings I propose modifying the condition to check the 'allTargets'
flag instead. In local builds (where we typically build managed test components
for just a single target platform using the src/coreclr/build-test script) the option
allTargets is not set and so the execution script can be easily created as part of
the managed build. In the runtime pipeline case, the execution scripts end up
getting emitted during the copynativeonly step before sending
the tests to Helix as by this time the targeting platform and configuration for the
run is completely resolved.

Thanks

Tomas

4 years ago[coop] Add handles for some SRE scenarios (#40925)
Vlad Brezae [Fri, 21 Aug 2020 22:38:53 +0000 (01:38 +0300)]
[coop] Add handles for some SRE scenarios (#40925)

* [coop] Pin fields of structure

Ideally ReflectionMethodBuilder should contain coop handles fields. That approach is less practical since it requires a lot of code change.

* [coop] Pin object stored on stack and passed over calls

4 years agoAdd blazor job in runtime (#40863)
Olivia Chen [Fri, 21 Aug 2020 21:27:00 +0000 (14:27 -0700)]
Add blazor job in runtime (#40863)

* add blazor job in runtime

* nit fixes

* turn on PR runs for testing;PR fix

* update wasm configurations arg

* unpack wasm to correct location

* disable PR trigger

4 years agoReturn host's file path when using Environment.GetCommandLineArgs()[0] in single...
Mateo Torres-Ruiz [Fri, 21 Aug 2020 20:40:18 +0000 (13:40 -0700)]
Return host's file path when using Environment.GetCommandLineArgs()[0] in single-file apps (#41019)

* Return host's path when using GetCommandLineArgs from within a single-file app

4 years agoHandle windows shutdown event (#41101)
Sven Boemer [Fri, 21 Aug 2020 20:39:15 +0000 (13:39 -0700)]
Handle windows shutdown event (#41101)

* Handle windows logoff and shutdown events

By doing a clean EEShutdown, including calling ProcessExit handlers.
This allows ProcessExit to respond to 'docker stop', which sends
CTRLSHUTDOWN_EVENT to windows containers.

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

* Don't handle logoff event

4 years agoAdd a method GetRequiredSection on Configuration (#40976)
Cédric Michel [Fri, 21 Aug 2020 18:24:01 +0000 (20:24 +0200)]
Add a method GetRequiredSection on Configuration (#40976)

* Add a method GetRequiredSection

* Adapt to use GetRequiredSection as Extension method to avoid External Implmenter breaking change

* clean csproj remove local path

* clean not used using

* remove empty line

* remove unused designer of resources file

* add test on sub section (GetRequiredSection)

* Update src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/ConfigurationExtensions.cs

Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
* add unit test case if confiuration root is null

* Use command to auto generate ref

Co-authored-by: cmichel <cmichel@interparking.com>
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
4 years agoImprove Windows error handling in Diagnostics IPC (#41008)
John Salem [Fri, 21 Aug 2020 18:03:58 +0000 (11:03 -0700)]
Improve Windows error handling in Diagnostics IPC (#41008)

4 years agoAdd missing exception checkpoint (#41098)
Fan Yang [Fri, 21 Aug 2020 17:33:59 +0000 (13:33 -0400)]
Add missing exception checkpoint (#41098)

* Add missing exception checkpoint

* Enable failed test

4 years agoAllow Windows dbgshim to support Linux targets (#41116)
Steve MacLean [Fri, 21 Aug 2020 17:02:20 +0000 (13:02 -0400)]
Allow Windows dbgshim to support Linux targets (#41116)

4 years agoRe-enable ImplementedInterfaces tests on Mono (#41136)
Ryan Lucia [Fri, 21 Aug 2020 16:57:07 +0000 (12:57 -0400)]
Re-enable ImplementedInterfaces tests on Mono (#41136)

4 years agodon't run "NoMono" benchmarks for Mono runtime: (#41148)
Adam Sitnik [Fri, 21 Aug 2020 16:52:23 +0000 (18:52 +0200)]
don't run "NoMono" benchmarks for Mono runtime: (#41148)

* Mono does not implement Utf8String ctor yet
* we want to run Utf8String benchmarks for CoreCLR

4 years agoUpdate to 6.0.0 for mono and reset timeouts (#41132)
Drew Scoggins [Fri, 21 Aug 2020 16:02:45 +0000 (09:02 -0700)]
Update to 6.0.0 for mono and reset timeouts (#41132)

4 years ago[wasm] Mark System.ComponentModel APIs as unsupported on Browser (#41094)
Mitchell Hwang [Fri, 21 Aug 2020 13:20:40 +0000 (09:20 -0400)]
[wasm] Mark System.ComponentModel APIs as unsupported on Browser (#41094)

* [wasm] System.ComponentModel enable platform attributes

* [wasm] Mark ExtendedProtectionPolicyTypeConverter.ConvertTo as unsupported

* [wasm] Mark System.ComponentModel.TypeDescriptor.CreateInstance as unsupported

* [wasm] Mark System.ComponentModel.TypeDescriptionProvider.CreateInstance as unsupported

* [wasm] Mark System.ComponentModel.LicenseManager.CreateWithContext as unsupported

* [wasm] Mark System.ComponentModel.MaskedTextProvider.Clone as unsupported

Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
4 years agoFix memory ordering issue in StressHeap
Peter Sollich [Fri, 21 Aug 2020 09:56:22 +0000 (11:56 +0200)]
Fix memory ordering issue in StressHeap

StressHeap contains a hack where we chop off the end of a string allocated for that purpose and make a new free object out of the chopped of piece. We also reduce the size of the string, so the GC sees the free object when walking the heap - the idea is to force compaction.

On processors with weak memory ordering semantics, we need a memory barrier to make sure the write to the new free object is seen before the write to the string length, otherwise the heap won't be walkable, leading to an AV in background_sweep.

It looks like this will fix most of the ARM64 stress issues we've seen (notably the AV in gc_heap::background_sweep), we'll see what remains.

4 years agoAnnotate DbDataReader.GetSchemaTable as nullable (#41082)
Shay Rojansky [Fri, 21 Aug 2020 09:38:54 +0000 (12:38 +0300)]
Annotate DbDataReader.GetSchemaTable as nullable (#41082)

Reverts decision made in #509

4 years agoAdd dependencies for BrowserDebugHost into Microsoft.NETCore.BrowserDebugHost.Transpo...
Alexander Köplinger [Fri, 21 Aug 2020 08:45:54 +0000 (10:45 +0200)]
Add dependencies for BrowserDebugHost into Microsoft.NETCore.BrowserDebugHost.Transport nupkg (#41111)

Before we were only packaging the host and proxy assemblies, but we need their dependencies as well.
Moved the `CopyLocalLockFileAssemblies=true` to BrowserDebugHost.csproj to make sure we get all dependencies there.

4 years agoModify the test case Runtime_40444.cs (#40951)
Brian Sullivan [Fri, 21 Aug 2020 02:31:02 +0000 (19:31 -0700)]
Modify the test case Runtime_40444.cs (#40951)

* Modify the test case Runtime_40444.cs
1) Increase the maximum loop count for failure to 1000 million
2) Added additional computation inside of loop
3) Add addition message when the loop executes to the limit and the test case fails

Updated test case and insured that it fails on JITS without the fix
Test now checks it the other thread set t2_finished

* Re-enable the Runtime_40444 test

* Fix typos

4 years agoFix an over-constrained use of a byte reg (#41004)
Carol Eidt [Fri, 21 Aug 2020 01:37:09 +0000 (18:37 -0700)]
Fix an over-constrained use of a byte reg (#41004)

* Fix an over-constrained use of a byte reg

Fix #40963

* PR Feedback

4 years agoUpdate Mono building docs with wasm-specific advice (#41122)
Ryan Lucia [Thu, 20 Aug 2020 23:45:49 +0000 (19:45 -0400)]
Update Mono building docs with wasm-specific advice (#41122)

4 years agoUpdate dotnet_support.js (#41058)
Mackinnon Buck [Thu, 20 Aug 2020 23:42:19 +0000 (16:42 -0700)]
Update dotnet_support.js (#41058)

4 years agoFix propagation of target parameters in helixpublishwitharcade (#40959)
Tomáš Rylek [Thu, 20 Aug 2020 20:54:22 +0000 (22:54 +0200)]
Fix propagation of target parameters in helixpublishwitharcade (#40959)

Nathan discovered this inconsistency in his work on standing up
web assembly CI testing; the top three target parameters don't
match the equivalent 'env' properties in send-to-helix-step.yml.
To achieve consistency I have removed the target properties
from the 'env' set and instead I added logic to pass these
properties explicitly to msbuild via command line options.

Thanks

Tomas

4 years ago[Browser] Update ICU (#40981)
Egor Bogatov [Thu, 20 Aug 2020 19:00:46 +0000 (22:00 +0300)]
[Browser] Update ICU (#40981)

4 years ago[wasm] Skip EnsureThrowWhenCopyToNonSharedFile on Browser (#41048)
Mitchell Hwang [Thu, 20 Aug 2020 18:52:45 +0000 (14:52 -0400)]
[wasm] Skip EnsureThrowWhenCopyToNonSharedFile on Browser (#41048)

* [wasm] Skip EnsureThrowWhenCopyToNonSharedFile on Browser

* Provide context for skipping Copy.cs test on Browser

Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
4 years agoFix OS version check and testhost copying in stress tests (#40980)
Alexander Nikolaev [Thu, 20 Aug 2020 18:04:45 +0000 (20:04 +0200)]
Fix OS version check and testhost copying in stress tests (#40980)

SslStress also fails due to OperatingSystem.IsWindows() call which is not available on the public SDK yet.

4 years agoDetect read-only Oid at runtime.
Kevin Jones [Thu, 20 Aug 2020 17:39:10 +0000 (13:39 -0400)]
Detect read-only Oid at runtime.

The compile-time approach doesn't work because Pkcs is shipped as a standalone package, so if the new asset runs on .NET Core 3.1 or 2.1 it would assume immutable Oids when they were still mutable.

4 years agoAddress warnings for possibly null array elements (#41046)
Charles Stoner [Thu, 20 Aug 2020 17:11:00 +0000 (10:11 -0700)]
Address warnings for possibly null array elements (#41046)

4 years agoRemove Makefile from gitignore (#41075)
wooooooood [Thu, 20 Aug 2020 16:41:30 +0000 (01:41 +0900)]
Remove Makefile from gitignore (#41075)

4 years agoFix assembly name due to rename of assembly. (#41037)
Kenneth Pouncey [Thu, 20 Aug 2020 13:56:26 +0000 (15:56 +0200)]
Fix assembly name due to rename of assembly. (#41037)

4 years ago[wasm] Skip Assert.InRange in Copy.cs for Browser (#41000)
Mitchell Hwang [Thu, 20 Aug 2020 12:40:12 +0000 (08:40 -0400)]
[wasm] Skip Assert.InRange in Copy.cs for Browser (#41000)

* Revert "[Wasm] Enable CopyWithData FileSystem test (#40663)"

This reverts commit 1821567ab60e156101f2a5bdcd5dab6d96dc3c71.

* Provide context for skipping Assert in Copy.cs

Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
4 years ago[mono] Add MethodImplOptions.NoOptimization support (#40990)
Egor Bogatov [Thu, 20 Aug 2020 11:10:46 +0000 (14:10 +0300)]
[mono] Add MethodImplOptions.NoOptimization support (#40990)

4 years agoChange nullability of public IXmlNamespaceResolver parameters where appropriate ...
David Cantú [Thu, 20 Aug 2020 09:56:50 +0000 (02:56 -0700)]
Change nullability of public IXmlNamespaceResolver parameters where appropriate (#41079)

4 years agoMark some System.Net.* APIs as unsupported on Browser WASM (#40924)
Maxim Lipnin [Thu, 20 Aug 2020 09:23:21 +0000 (12:23 +0300)]
Mark some System.Net.* APIs as unsupported on Browser WASM (#40924)

4 years agoAdd nullability annotations to System.Private.Xml.Linq project (#40744)
David Cantú [Thu, 20 Aug 2020 08:56:14 +0000 (01:56 -0700)]
Add nullability annotations to System.Private.Xml.Linq project (#40744)

* Add nullability annotations to Xml.Linq project

* Fix misplaced assertion

* Address feedback

* Add missing NotNullIfNotNull attributes to operators

4 years agoCoreRT support for ARM64&Unix (#41023)
RalfKornmannEnvision [Thu, 20 Aug 2020 08:06:34 +0000 (10:06 +0200)]
CoreRT support for ARM64&Unix (#41023)

* Update codegenarm64.cpp

* ARM64 CFI unwind Data

4 years agoFix NativeBinDir for individual projects when BuildTargetFramework is not set (#41074)
Santiago Fernandez Madero [Thu, 20 Aug 2020 07:55:38 +0000 (00:55 -0700)]
Fix NativeBinDir for individual projects when BuildTargetFramework is not set (#41074)

4 years agoFix Mono LLVMJIT official build to produce the right package (#41049)
Santiago Fernandez Madero [Thu, 20 Aug 2020 06:00:40 +0000 (23:00 -0700)]
Fix Mono LLVMJIT official build to produce the right package (#41049)

4 years agoEnable nullability on System.Xml.XPath (#41060)
David Cantú [Thu, 20 Aug 2020 05:41:41 +0000 (22:41 -0700)]
Enable nullability on System.Xml.XPath (#41060)

* Enable nullability on System.Xml.XPath

* Switch XPathException ctor's message parameter to string?

4 years agoremove dead code (#41064)
Anirudh Agnihotry [Thu, 20 Aug 2020 03:06:05 +0000 (20:06 -0700)]
remove dead code (#41064)

4 years ago[Pipelines] Noop Writes when Reader completed (#40905)
Brennan [Thu, 20 Aug 2020 02:42:27 +0000 (19:42 -0700)]
[Pipelines] Noop Writes when Reader completed (#40905)

4 years agoCleaning up unused TargetsBrowser conditions (#41062)
Anirudh Agnihotry [Thu, 20 Aug 2020 02:35:23 +0000 (19:35 -0700)]
Cleaning up unused TargetsBrowser conditions (#41062)

* minor cleanup

* remove unused string

4 years agoDelete redundant or no longer necessary build properties (#41051)
Jan Kotas [Thu, 20 Aug 2020 00:35:21 +0000 (17:35 -0700)]
Delete redundant or no longer necessary build properties (#41051)

4 years agoFix trailing whitespaces (#40891)
Youssef Victor [Thu, 20 Aug 2020 00:29:01 +0000 (02:29 +0200)]
Fix trailing whitespaces (#40891)

* Trim trailing whitespaces

* Match raw with rendered

* Delete extra asterisks and |

* Update ELT Hooks - tail calls.md

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
4 years agoupdate product version to 6.0.0 (#40950)
Anirudh Agnihotry [Thu, 20 Aug 2020 00:23:04 +0000 (17:23 -0700)]
update product version to 6.0.0 (#40950)

* update to net6

* adding comment

4 years agoDisable System.IO.Tests.FileStream_SafeFileHandle.ThrowWhenHandlePositionIsChanged_as...
Maxim Lipnin [Wed, 19 Aug 2020 22:49:56 +0000 (01:49 +0300)]
Disable System.IO.Tests.FileStream_SafeFileHandle.ThrowWhenHandlePositionIsChanged_async test on Browser wasm (#40920)

4 years agoFix Memory Leak in System.DirectoryServices.Protocols caused by not freeing native...
Jose Perez Rodriguez [Wed, 19 Aug 2020 22:36:17 +0000 (15:36 -0700)]
Fix Memory Leak in System.DirectoryServices.Protocols caused by not freeing native memory (#41053)

4 years agoRemove semicolon from WASM config (#41017)
Drew Scoggins [Wed, 19 Aug 2020 21:20:12 +0000 (14:20 -0700)]
Remove semicolon from WASM config (#41017)

4 years agoAdd Designer attributes to types that had it in full framework (part 2) (#40966)
Santiago Fernandez Madero [Wed, 19 Aug 2020 19:08:39 +0000 (12:08 -0700)]
Add Designer attributes to types that had it in full framework (part 2) (#40966)

* Move DesignerSerializerAttribute to S.CM.Primitives and add to StringDictionary

* Add TolboxItemAttribute to types that had it in Desktop

* Remove TypeDescriptionProviderAttribute from DefaultGenApiDocIds

* PR Feedback, fix build

4 years agoConfiguration Json provider: adds empty objects to configuration (#40829)
Alessio Franceschelli [Wed, 19 Aug 2020 16:51:12 +0000 (17:51 +0100)]
Configuration Json provider: adds empty objects to configuration (#40829)

4 years agoDisable default non-portable build for armel (#41031)
Gleb Balykov [Wed, 19 Aug 2020 15:18:48 +0000 (18:18 +0300)]
Disable default non-portable build for armel (#41031)

4 years agoAdd GitHub Action for backporting PRs to branches (#40955)
Alexander Köplinger [Tue, 18 Aug 2020 22:44:50 +0000 (00:44 +0200)]
Add GitHub Action for backporting PRs to branches (#40955)

This adds an action that can be triggered with a special comment on a PR: `/backport to <some branch>`.
The action then creates a new PR to the target branch with the commits from the source PR applied.

4 years agoFix bad quoting (#41002)
Drew Scoggins [Tue, 18 Aug 2020 22:41:18 +0000 (15:41 -0700)]
Fix bad quoting (#41002)

4 years agoFix packaging for the browser (#40814)
Anirudh Agnihotry [Tue, 18 Aug 2020 20:36:55 +0000 (13:36 -0700)]
Fix packaging for the browser (#40814)

* Fix packaging for the browser

* fix wasm leg

* remove unused resource

4 years agoAdd parsing of zero port for unknown Uri scheme (#40986)
Natalia Kondratyeva [Tue, 18 Aug 2020 18:48:56 +0000 (21:48 +0300)]
Add parsing of zero port for unknown Uri scheme (#40986)

Fixes #37865

4 years ago[aot] Fix the lookup of jit info for WASM. On wasm, methods have no size, so only...
monojenkins [Tue, 18 Aug 2020 18:24:07 +0000 (14:24 -0400)]
[aot] Fix the lookup of jit info for WASM. On wasm, methods have no size, so only the method address can be looked up, jinfo->code_size is set to 1. (#40969)

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

Co-authored-by: vargaz <vargaz@users.noreply.github.com>
4 years agoDisable System.Xml.Tests.SameInstanceXslTransformWriter.Variations under JitStress...
Egor Chesakov [Tue, 18 Aug 2020 17:58:41 +0000 (10:58 -0700)]
Disable System.Xml.Tests.SameInstanceXslTransformWriter.Variations under JitStress (#40964)

4 years agoFix index adjustments for Get/Set/Address called on 1 dim arrays. (#35008)
Johan Lorensson [Tue, 18 Aug 2020 16:48:50 +0000 (18:48 +0200)]
Fix index adjustments for Get/Set/Address called on 1 dim arrays. (#35008)

Enable tests failing due to missing array ctor and lbound index checks.

Fix interpreter Get/Set/Address using lbound.

Add missing OP_FCONV_TO_I on Arm64, causing test errors.

Fix interpreter arrray index and lower bound when using negative values.

Add branch checking array->bounds for NULL.

4 years agoIncrease timeout for yaml as well (#40987)
Drew Scoggins [Tue, 18 Aug 2020 15:58:47 +0000 (08:58 -0700)]
Increase timeout for yaml as well (#40987)

4 years agoFix duplicate --runtime-path in generated helix command (#40975)
Alexander Köplinger [Tue, 18 Aug 2020 15:32:56 +0000 (17:32 +0200)]
Fix duplicate --runtime-path in generated helix command (#40975)

While looking at some helix debug logs I noticed we pass the `--runtime-path` option twice:

```
Executed on dci-mac-build-083.local
+ ./RunTests.sh --runtime-path /tmp/helix/working/A68F0925/p --runtime-path /tmp/helix/working/A68F0925/p
```

Looks like this was an oversight from https://github.com/dotnet/runtime/pull/35606, it's harmless but I thought I'd clean it up :)

4 years agoFix Runtime_40444 test exclusion in issues.targets (#40973)
Tomáš Rylek [Tue, 18 Aug 2020 11:57:21 +0000 (13:57 +0200)]
Fix Runtime_40444 test exclusion in issues.targets (#40973)

After I noticed that the test Runtime_40444 is still failing in PR
runs after I disabled it in issues.targets, I found out that
I had missed the extra folder level in the exclusion spec.

Thanks

Tomas

4 years agoFix EventActivityIdControl test on MonoVM. (#39178)
Johan Lorensson [Tue, 18 Aug 2020 11:00:27 +0000 (13:00 +0200)]
Fix EventActivityIdControl test on MonoVM. (#39178)

Make EventSource call static version of EventActivityIdControl in
EventPipeEventProvider instead of direct calling low level
EventPipeInternal (now only called from EventPipe* sources). Doing
it that way will also keep EventPipeEventProvider.EventActivityIdControl
in S.P.C meaning that tests like eventactivityidcontrol won't risk
of using methods that has been trimmed away by linker.

Added missing case into Mono's EventPipeInternal::EventActivityIdControl
implementations.

Enabled eventactivityidcontrol test on Mono runtime. Adjusted test to
use static EventPipeEventProvider.EventActivityIdControl version.

4 years ago[wasm][debugger] Support deep member accesses for EvaluteOnCallFrame (#40836)
Ankit Jain [Tue, 18 Aug 2020 02:13:35 +0000 (22:13 -0400)]
[wasm][debugger]  Support deep member accesses for EvaluteOnCallFrame (#40836)

* [wasm][debugger] Support deep member accesses for EvaluteOnCallFrame

Eg. `obj.Property.X`, or `obj.Y + obj.Z.p`

Each of the member access expressions (like `a.b.c`) must be of only
primitive types. Though if the expression is a single member access (and
nothing else, like `"a.b.c"`), then that can be a non-primitive type.

This works by sending the expression to the browser, where it gets
resolved by `library_mono.js`. And that takes an easy route for doing
this, essentially just fetching the list of locals/properties, and using
that.

There are better ways to do this, that will be explored later.

* [wasm][debugger][tests] Remove some debug spew

* [wasm][debugger] fix formatting with dotnet-format

4 years agoUse Roslyn apis to generate Platform Not Supported Assemblies (#40296)
Anirudh Agnihotry [Tue, 18 Aug 2020 00:01:27 +0000 (17:01 -0700)]
Use Roslyn apis to generate Platform Not Supported Assemblies (#40296)

* fixes on the runtime side

* address feedback

* update arcade version

* merge conflicts

* update the version

4 years agoOrdinal Ignore Case Optimization (#40910)
Tarek Mahmoud Sayed [Mon, 17 Aug 2020 23:53:47 +0000 (16:53 -0700)]
Ordinal Ignore Case Optimization (#40910)

4 years agoDeduplicate Helix environment setup in send-to-helix-step.yml (#40909)
Tomáš Rylek [Mon, 17 Aug 2020 23:39:41 +0000 (01:39 +0200)]
Deduplicate Helix environment setup in send-to-helix-step.yml (#40909)

4 years ago[mono] Loader improvements: bundle optimization and logging (#40819)
Ryan Lucia [Mon, 17 Aug 2020 22:53:53 +0000 (18:53 -0400)]
[mono] Loader improvements: bundle optimization and logging (#40819)

* Delay bundle loading until after checking the ALC cache

This avoids having to create and destroy MonoImage objects over and over when looking for already-loaded assemblies, which should cut down on overall load time a bit.

* Improve loader algorithm logging

4 years agoretire TLS1.0/1.1 ciphers from default list (#40746)
Tomas Weinfurt [Mon, 17 Aug 2020 22:31:59 +0000 (15:31 -0700)]
retire TLS1.0/1.1 ciphers from default list (#40746)

* retire TLS1.0/1.1 ciphers from default list

* fix build with 1.0

* feedback from review

* add compat bio_st

* don't enforce cipher default on openssl 1.0

* fix ServerAsyncAuthenticate_MismatchProtocols_Fails

* call ERR_clear_error after protocol det:w!ection

* feedback from review

* add missing Using

4 years agoMake RegexParseException and RegexParseError public, rename enum fields (#40902)
Abel Braaksma [Mon, 17 Aug 2020 22:25:22 +0000 (00:25 +0200)]
Make RegexParseException and RegexParseError public, rename enum fields (#40902)

* RegexParseException, RegexParseError public, rename enum fields

* Add Unknown field to RegexParseError

* Add definitions to ref file

* Satisfy NET48 tests

* Some nits to resolve review comments

* Add default message and Unknown message

* Added doc comments

* Fix nit in auto-layout change of csproj file

* Simplify message for RegexParseException ctor overload

* Remove PlatformDetection.IsNetFramework in RegexParserTests.cs

* Rename resource names to match the enum names

* Use partial class and methods to separate netfx and core

* Add offset tests

* Apply suggestions from code review

Nits

* Add remaining test offsets. Verify all offsets.

* Nit and TFM

* Update src/libraries/System.Text.RegularExpressions/tests/RegexParserTests.netcoreapp.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Update src/libraries/System.Text.RegularExpressions/tests/RegexParserTests.netfx.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Update src/libraries/System.Text.RegularExpressions/tests/RegexParserTests.netfx.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Code review: properly test for deserialized type of exn

* Code review: fix doc comments

* Code review: fix doc comments

* Code review: offset gt zero

* Code review: add some tests, remove redundant whiteline

* Code review: add doc comment as suggested

* Code review: fix doc comments

* ref edits with tool

* Code review: some nits

* Remove using

* Rename unknown

* Incorrect edit in AssertExtensions

* Cherry-pick #d4090296

* Fix naming, ref file, resource strings

Co-authored-by: Dan Moseley <danmose@microsoft.com>
Co-authored-by: Prashanth Govindarajan <prgovi@microsoft.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
4 years ago[mono] Add `X86Base` support. (#40861)
imhameed [Mon, 17 Aug 2020 22:21:31 +0000 (15:21 -0700)]
[mono] Add `X86Base` support. (#40861)

Implement `BitScanForward` and `BitScanReverse` as intrinsics.

Implement `__cpuidex` as a netcore-only icall. Rename `cpuid` (in
mono-hwcap-x86.c) to `mono_cpuidex`, give it extern linkage, and add
support for extended CPUID.

Related: https://github.com/dotnet/runtime/pull/40167

Co-authored-by: imhameed <imhameed@users.noreply.github.com>
4 years agoAdd support for the InnerException in Json formatter using ToString() (#40852)
Maryam Ariyan [Mon, 17 Aug 2020 22:16:20 +0000 (15:16 -0700)]
Add support for the InnerException in Json formatter using ToString() (#40852)

* Support InnerException(s) on JsonConsoleFormatter

Fix #40507

Co-authored-by: Werner Mairl <werner.mairl@gmail.com>
4 years agoDon't load assemblies inside bundle when using LoadFrom (#40826)
Mateo Torres-Ruiz [Mon, 17 Aug 2020 22:00:34 +0000 (15:00 -0700)]
Don't load assemblies inside bundle when using LoadFrom (#40826)

* Don't use bundler's probe in LoadFromPath

4 years agoExtend timeouts in revocation timeout tests.
Kevin Jones [Mon, 17 Aug 2020 21:58:49 +0000 (17:58 -0400)]
Extend timeouts in revocation timeout tests.

Extends the amount of time that the delay has to give the build servers
more wiggle room to fetch and process revocation.

Improve assertion output.

4 years agoDo not include extensions sequence if there are no extensions.
Kevin Jones [Mon, 17 Aug 2020 21:58:02 +0000 (17:58 -0400)]
Do not include extensions sequence if there are no extensions.

When encoding an X509 certificate, omit the extensions sequence if
the effective number of extensions is zero. Per RFC 5280, this sequence
is "one or more certificate extensions".

4 years agoThrow when reference cannot be assigned to converter.TypeToConvert (#39015)
David Cantú [Mon, 17 Aug 2020 21:54:43 +0000 (14:54 -0700)]
Throw when reference cannot be assigned to converter.TypeToConvert (#39015)

* Throw when reference cannot be assigned to converter.TypeToConvert

* Throw InvalidOperationException instead of JsonException since the cause for this error would be an error in the user code rather than in the JSON payload

* Use try-catch instead of IsAssignableFrom

* Alternatively validate reference can be assigned as T at the time is fetch

* Add suggested comment

4 years agoRemove ObsoletedInOSPlatformAttribute (#40945)
Jeff Handley [Mon, 17 Aug 2020 21:53:18 +0000 (14:53 -0700)]
Remove ObsoletedInOSPlatformAttribute (#40945)

4 years agoFix patch skip + emulation on ARM64 (#40941)
Juan Hoyos [Mon, 17 Aug 2020 21:52:17 +0000 (14:52 -0700)]
Fix patch skip + emulation on ARM64 (#40941)

* Fix patch skip + emulation on ARM64

4 years agouse port in SPN calculation if not default (#40860)
Tomas Weinfurt [Mon, 17 Aug 2020 21:43:26 +0000 (14:43 -0700)]
use port in SPN calculation if not default (#40860)

* use port in SPN calculation if not default

* remove extra line

* fix internal error test failure

4 years ago[aot] Avoid emitting generic instances with vtype arguments on wasm to save space...
monojenkins [Mon, 17 Aug 2020 21:15:40 +0000 (17:15 -0400)]
[aot] Avoid emitting generic instances with vtype arguments on wasm to save space. (#40854)

Co-authored-by: vargaz <vargaz@users.noreply.github.com>
4 years agoPass length to PathCharString.Append on SunOS (#40928)
Adeel Mujahid [Mon, 17 Aug 2020 21:10:39 +0000 (00:10 +0300)]
Pass length to PathCharString.Append on SunOS (#40928)

4 years agoDo not build Targeting pack in source-build (#40870)
Nikola Milosavljevic [Mon, 17 Aug 2020 20:33:33 +0000 (13:33 -0700)]
Do not build Targeting pack in source-build (#40870)

* Do not build Targeting pack in source-build

* Update src/installer/pkg/projects/Directory.Build.targets

Co-authored-by: Davis Goodin <dagood@users.noreply.github.com>
Co-authored-by: Davis Goodin <dagood@users.noreply.github.com>
4 years agoTest concurrent calls to CallSite.AddRule() and MoveRule() (#40858)
Charles Stoner [Mon, 17 Aug 2020 19:59:34 +0000 (12:59 -0700)]
Test concurrent calls to CallSite.AddRule() and MoveRule() (#40858)

4 years agoNot all object converters return a JsonElement (#40921)
devsko [Mon, 17 Aug 2020 19:46:24 +0000 (21:46 +0200)]
Not all object converters return a JsonElement (#40921)

Co-authored-by: devsko <stefan.kohlmeister@outlook.de>
4 years agoCreate dump in utility thread after m_LastThrownObjectHandle has been set (#40915)
Mike McLaughlin [Mon, 17 Aug 2020 18:59:06 +0000 (11:59 -0700)]
Create dump in utility thread after m_LastThrownObjectHandle has been set (#40915)

The previous Windows stack overflow createdump trigger fix generated the dump before the m_LastThrownObjectHandle in the thread was set. This breaks SOS's !pe command.

4 years agoNormalize directory separator of paths in FileSpec (#40699)
Mateo Torres-Ruiz [Mon, 17 Aug 2020 18:53:38 +0000 (11:53 -0700)]
Normalize directory separator of paths in FileSpec (#40699)

4 years agoIntrinsicify SpanHelpers.IndexOfAny(char,...) (#40729)
Ben Adams [Mon, 17 Aug 2020 18:24:15 +0000 (19:24 +0100)]
Intrinsicify SpanHelpers.IndexOfAny(char,...) (#40729)

* Intrinsicify IndexOfAny(char,char)

* Intrinsicify IndexOfAny(char,char,char)

* Intrinsicify IndexOfAny(char,char,char,char)

* Intrinsicify IndexOfAny(char,char,char,char,char)

* Avoid movsx

* Feedback

* Super nit

4 years agoReenable crossgen2smoke under GC stress (#40849)
Tomáš Rylek [Mon, 17 Aug 2020 18:23:38 +0000 (20:23 +0200)]
Reenable crossgen2smoke under GC stress (#40849)

This change removes the open-coded Crossgen2 execution
from the crossgen2smoke test project and switches it over
to use the normal CLRTest.Crossgen.targets logic for Crossgen2
invocation.

As the CLRTest.Crossgen.targets script already contains my fix
for the underlying issue - we were inadvertently running the
Crossgen2 compiler itself in GC stress mode and timing out
due to the long compilation times - we can now reenable
this test in GC stress mode.

Thanks

Tomas

4 years agoFix GC liveness check in ByRefLocals test (#40857)
Carol Eidt [Mon, 17 Aug 2020 18:12:26 +0000 (11:12 -0700)]
Fix GC liveness check in ByRefLocals test (#40857)

Fix #40751

4 years agoMake the buffer size configurable for generational aware analysis (#40918)
Andrew Au [Mon, 17 Aug 2020 18:08:35 +0000 (11:08 -0700)]
Make the buffer size configurable for generational aware analysis (#40918)

4 years agoBlock out the Runtime_40444 test failing in PR's + alpha-ordering (#40907)
Tomáš Rylek [Mon, 17 Aug 2020 17:55:22 +0000 (19:55 +0200)]
Block out the Runtime_40444 test failing in PR's + alpha-ordering (#40907)

4 years agoFix IndexOutOfRangeException in CallSite.MoveRule. (#39159)
asmichi [Mon, 17 Aug 2020 17:12:08 +0000 (02:12 +0900)]
Fix IndexOutOfRangeException in CallSite.MoveRule. (#39159)

Because synchronization of AddRule is omitted for performance,
concurrent invocations of AddRule may cause Rules to revert back to
an older (smaller) version, making i out of bounds.
Add a guard against that.

The reasoning behind no synchronization is that Rules is just a cache
after all. As long as the cache is in a consistent state, wrong updates
will only cause more cache misses or longer lookup time.
This performance loss is fine if we get more performance gain by
omitting synchronization.

Fix #36983

4 years agoUpdate linker warning numbers (#40865)
Sven Boemer [Mon, 17 Aug 2020 16:50:31 +0000 (09:50 -0700)]
Update linker warning numbers (#40865)

* Update linker warning numbers

In response to https://github.com/mono/linker/pull/1385.
This replaces the global suppressions for IL2006 with the warnings that it was split into.

* Add suppressions for linker tests

4 years agoMake Enumerable.Cast<T> and friends return IEnumerable<T?> (#40929)
Eirik Tsarpalis [Mon, 17 Aug 2020 15:48:40 +0000 (16:48 +0100)]
Make Enumerable.Cast<T> and friends return IEnumerable<T?> (#40929)

* Make IEnumerable.Cast<TResult>() annotation admit nullable elements

* Make ImmutableArray cast method annotations report nullable elements

* fix System.Data nullability warnings