platform/upstream/dotnet/runtime.git
3 years agoAdded additional LoggerMessage.DefineScope() overloads, with more type parameters...
Jake Meiergerd [Tue, 11 Aug 2020 18:14:52 +0000 (13:14 -0500)]
Added additional LoggerMessage.DefineScope() overloads, with more type parameters (up to 6 like .Define()). (#40568)

3 years agoExtensions.Logging: JsonConsoleFormatter serializes scope and state properties using...
Alessio Franceschelli [Tue, 11 Aug 2020 18:13:47 +0000 (19:13 +0100)]
Extensions.Logging: JsonConsoleFormatter serializes scope and state properties using native json type (#40067)

3 years agoAdd feed for Nodejs 12.x (#40667)
Drew Scoggins [Tue, 11 Aug 2020 17:44:28 +0000 (10:44 -0700)]
Add feed for Nodejs 12.x (#40667)

3 years agoHTTP/2 Continuation test (#40533)
Marie Píchová [Tue, 11 Aug 2020 17:33:44 +0000 (19:33 +0200)]
HTTP/2 Continuation test (#40533)

3 years agoICommand CanExecuteChanged should be nullable (#40648)
Buyaa [Tue, 11 Aug 2020 16:57:28 +0000 (09:57 -0700)]
ICommand CanExecuteChanged should be nullable (#40648)

3 years agoImprove error details on DNS Telemetry test failure (#40665)
Miha Zupan [Tue, 11 Aug 2020 16:47:36 +0000 (18:47 +0200)]
Improve error details on DNS Telemetry test failure (#40665)

3 years agoFix: FileStream.Dispose silently fails on Dispose when disk has run out of space...
Carlos Sanchez [Tue, 11 Aug 2020 16:39:56 +0000 (09:39 -0700)]
Fix: FileStream.Dispose silently fails on Dispose when disk has run out of space (#38742)

* Save last error info in SafeFileHandle.ReleaseHandle and read it in FileStream.Dispose

* Add manual test

* Remove Debug.Fail from SafeFileHandle, automate the drive filling step in the manual test, add suggested comments, make threadstatic field static.

* Address suggestions

* Update src/libraries/System.IO.FileSystem/tests/ManualTests/ManualTests.cs

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Co-authored-by: carlossanlop <carlossanlop@users.noreply.github.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
3 years agoFixed XML docs for ILoggingBuilder AddProvider extension method (#40649)
Alessio Franceschelli [Tue, 11 Aug 2020 16:22:02 +0000 (17:22 +0100)]
Fixed XML docs for ILoggingBuilder AddProvider extension method (#40649)

The description of the parameter was reversed.

3 years agoRemove unused locals in System.Security namespaces
Matt Kotsenas [Tue, 11 Aug 2020 16:02:41 +0000 (09:02 -0700)]
Remove unused locals in System.Security namespaces

3 years agoAdd additional Windows-specific APIs (#40610)
Adam Sitnik [Tue, 11 Aug 2020 14:18:34 +0000 (16:18 +0200)]
Add additional Windows-specific APIs (#40610)

* mark System.Data.OleDb assembly as Windows-specific

* mark System.Windows.Extensions assembly as Windows-specific

* mark System.IO.FileInfo Encrypt and Decrypt methods as Windows-specific

* System.Runtime.InteropServices

* VB

* mark entire ComWrappers type as Windows-specific

* mark CspParameters class as Windows-specific

3 years agoRemove max header length check from WebHeaderCollection (#40529)
Natalia Kondratyeva [Tue, 11 Aug 2020 12:26:25 +0000 (15:26 +0300)]
Remove max header length check from WebHeaderCollection (#40529)

Removed conditional max header length check from
System.Net.WebHeaderCollection as it is redundant and produces
puzzling behavior. Removed unused values of WebHeaderCollectionType
enum.

Contributes to #1486

3 years agoFix versionless UCRT probing path (#40642)
Juan Hoyos [Tue, 11 Aug 2020 06:43:58 +0000 (23:43 -0700)]
Fix versionless UCRT probing path (#40642)

3 years agoFix ref counting in ComWrappers tests (#40636)
Elinor Fung [Tue, 11 Aug 2020 03:26:19 +0000 (20:26 -0700)]
Fix ref counting in ComWrappers tests (#40636)

3 years agoEnsure Http Telemetry correctness (#40338)
Miha Zupan [Tue, 11 Aug 2020 02:41:35 +0000 (04:41 +0200)]
Ensure Http Telemetry correctness (#40338)

* Ensure Http Telemetry correctness

* Remove unnecessary GC.SuppressFinalize call

* Add another Telemetry.IsEnabled() check

* Rename MessageShouldEmitTelemetry to MessageAlreadySent_StopNotYetCalled

* Improve Telemetry tests

* Log Aborted instead of Stopped on Connection Dispose

* Ensure request is canceled after a connection is established

3 years agoSuppress GS cookie checks in method epilogs (#40637)
Jan Kotas [Tue, 11 Aug 2020 01:22:13 +0000 (18:22 -0700)]
Suppress GS cookie checks in method epilogs (#40637)

The information about end of GS cookie scope recorded in GC info is not accurate and it cannot even be made accurate without redesign that is not worth it. Detect end of GS cookie scope by comparing it with current SP instead.

Fixes #13041

3 years agoPath change for ryujit-overview.md (#40611)
symphony [Tue, 11 Aug 2020 01:14:37 +0000 (09:14 +0800)]
Path change for ryujit-overview.md (#40611)

3 years agoadd eventsource doc (#40630)
David Mason [Tue, 11 Aug 2020 01:13:14 +0000 (18:13 -0700)]
add eventsource doc (#40630)

3 years agoFix concurrent collections CA1836 rule violations (#40629)
David Cantu [Tue, 11 Aug 2020 01:12:52 +0000 (18:12 -0700)]
Fix concurrent collections CA1836 rule violations (#40629)

* Fix concurrent collections CA1836 rule violations

* Update dogfood analyzer version

3 years agoInline underlying array into ImmutableArray<T>.IsEmpty (#40635)
David Cantu [Tue, 11 Aug 2020 00:35:30 +0000 (17:35 -0700)]
Inline underlying array into ImmutableArray<T>.IsEmpty (#40635)

3 years agoType.IsAssignableTo (#40326)
Ben Adams [Tue, 11 Aug 2020 00:09:14 +0000 (01:09 +0100)]
Type.IsAssignableTo (#40326)

* IsAssignableTo

* ifdef mono C change

* Add Jit optimization

* Add [Intrinsic] attribute

* Add tests

* More tests

* Add null test

3 years agoRemove unused locals in System.ServiceProcess.ServiceController (#39640)
Matt Kotsenas [Tue, 11 Aug 2020 00:02:26 +0000 (17:02 -0700)]
Remove unused locals in System.ServiceProcess.ServiceController (#39640)

Remove unused locals and private methods in
System.ServiceProcess.ServiceController.

This fixes a part of #30457.

3 years ago[runtime] If the initial pinvoke lookup fails, emit some code inside the managed...
Zoltan Varga [Mon, 10 Aug 2020 23:54:22 +0000 (19:54 -0400)]
[runtime] If the initial pinvoke lookup fails, emit some code inside the managed-to-native wrapper to retry to lookup on every call until it succeeds.  (#40153)

* [runtime] If the initial pinvoke lookup fails, emit some code inside the managed-to-native wrapper to
retry to lookup on every call until it succeeds. Add a cache to prevent further lookups.
This is needed on netcore where pinvoke resolver callbacks can be added any time.

* Fix AOT support.

* Remove debug printf.

* Fix test failures.

* Fix a c++-ism.

3 years agoWiden ascii to utf16 (#39510)
Prashanth Govindarajan [Mon, 10 Aug 2020 23:48:35 +0000 (16:48 -0700)]
Widen ascii to utf16 (#39510)

* WidenAsciiToUtf16

* sq

* Address nits

3 years agoUpdate using-dotnet-cli.md (#40580)
Austin Wise [Mon, 10 Aug 2020 22:55:00 +0000 (15:55 -0700)]
Update using-dotnet-cli.md (#40580)

Fixes "error NU1102: Unable to find package Microsoft.WindowsDesktop.App.Runtime.win-x64 with version (= 5.0.0-dev)"

3 years agoDon't call user operator for null check of HttpMethod value (#40306)
Marek Safar [Mon, 10 Aug 2020 22:34:31 +0000 (00:34 +0200)]
Don't call user operator for null check of HttpMethod value (#40306)

3 years agoFix DelayPromise constructor race condition (#40356)
Ben Adams [Mon, 10 Aug 2020 22:34:07 +0000 (23:34 +0100)]
Fix DelayPromise constructor race condition (#40356)

3 years agoDisable SB test (#40628)
Dan Moseley [Mon, 10 Aug 2020 22:12:58 +0000 (15:12 -0700)]
Disable SB test (#40628)

3 years agoSync Microsoft.Extensions ref assembiles for new linker attributes. (#40621)
Eric Erhardt [Mon, 10 Aug 2020 21:19:13 +0000 (16:19 -0500)]
Sync Microsoft.Extensions ref assembiles for new linker attributes. (#40621)

* Sync Microsoft.Extensions ref assembiles for new linker attributes.

* Suppress two linker warnings in DependencyInjection.

These warnings are safe since they are calling Array.Empty<T> through reflection.

3 years agoFixing debugger hang that would occur when inspecting a field that ha… (#40455)
monojenkins [Mon, 10 Aug 2020 21:18:13 +0000 (17:18 -0400)]
Fixing debugger hang that would occur when inspecting a field that ha… (#40455)

…s a Debugger.Break in it's accessor.

fixes mono/mono#20209

<!--
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: UnityAlex <UnityAlex@users.noreply.github.com>
3 years ago[browser][file system] Tests System.IO.FileSystem (#39768)
Kenneth Pouncey [Mon, 10 Aug 2020 20:35:25 +0000 (22:35 +0200)]
[browser][file system] Tests System.IO.FileSystem (#39768)

* [browser][file system] Tests System.IO.FileSystem

* Remove FileSystem from test project exclusions.

* [browser][filesystem] Comment on skipped tests due to IO.Pipes not supported

* [browser][filesystem] Comment on skipped tests due to monitor not supported

* Address review comments

* Address review comments on how to handle monitor PNSE

* Update src/libraries/System.IO.FileSystem/tests/File/GetSetTimes.cs

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* Add ActiveIssue for browser platform

```
        [ActiveIssue("https://github.com/dotnet/runtime/issues/39955", TestPlatforms.Browser)]
        public void NotFoundErrorIsExpected()
```

* Simplify test case with `PlatformDetection.IsSuperUser` as per review comment

* Remove unused variable from tests

* Browser platform volume does not limit each component of the path to a total of 255 characters.

- Remove the test `DirectoryWithComponentLongerThanMaxComponentAsPath_ThrowsException` for Browser platform.
- Add new test `DirectoryWithComponentLongerThanMaxComponentAsPath_BrowserDoesNotThrowsException` for Browser platform in case this check is added in the future.

* Fix windows tests

* Add ActiveIssue to test System.IO.Tests.DirectoryInfo_Name.CurrentDirectory

- System.IO.Tests.DirectoryInfo_Name.CurrentDirectory does not pass because it is using Path.GetFileName on the current directory of "/".
- See issue https://github.com/dotnet/runtime/issues/39998 for more information

* Add active issue for tests that need to support file locking.

* Add active issue for tests that need to support file locking.

* Browser volume does not have a limit on segments

* Remove browser platform test

* Remove active issue for NotFoundErrorIsExpected

* Remove platform specific from SkippingHiddenFiles

* Fix enumeration test errors failing from `HiddenFilesAreReturned`.

- WebAssembly (BROWSER) has dirent d_type but is not identifying correctly but by returning UNKNOWN the managed code properly stats the file to detect if entry is directory or not.

* Fix enumeration test errors failing from `HiddenFilesAreReturned`.

- WebAssembly (BROWSER) has dirent d_type but is not identifying correctly but by returning UNKNOWN the managed code properly stats the file to detect if entry is directory or not.

* Fix build for TARGET_WASM not defined

* Address review comment by add check for IsWindows to IsSuperUser.

* Address review comment by add check for IsWindows to IsSuperUser.

* Platform Specific test for hidden files no longer needed.

* Platform Specific test fno longer needed.

* Use active issue for rename issue

* ActiveIssue no longer needed

- PR https://github.com/dotnet/runtime/pull/40310 works around the issue for now while waiting for fix https://github.com/emscripten-core/emscripten/issues/11804 / https://github.com/emscripten-core/emscripten/pull/11812

* Use ActiveIssue for SettingUpdatesProperties

* Use ActiveIssue for TimesIncludeMillisecondPart

* Use ActiveIssue for ErrorHandlingTests failures

* Use ActiveIssue for SetUptoNanoseconds

* Use ActiveIssue for GetSetTimes test failures

* Use ActiveIssue for tests failing with DirectoryNotFoundException

* Use ActiveIssue for tests failing with UnauthorizedAccessException

* Remove debugging statement from pal_io

* Address type in CreateDirectory method name

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
3 years agoRemove unused local in System.Configuration.ConfigurationManager (#40583)
wooooooood [Mon, 10 Aug 2020 20:09:20 +0000 (05:09 +0900)]
Remove unused local in System.Configuration.ConfigurationManager (#40583)

3 years agofix certificate ctx on windows and macOS (#39818)
Tomas Weinfurt [Mon, 10 Aug 2020 19:02:08 +0000 (12:02 -0700)]
fix certificate ctx on windows and macOS (#39818)

* fix certificate ctx on windows

* fix linux

* fix osx pal

* feedback from review

* feedback from review

3 years agoFixing an issue with the CPUID check for BMI1/BMI2 (#40615)
Tanner Gooding [Mon, 10 Aug 2020 18:20:34 +0000 (11:20 -0700)]
Fixing an issue with the CPUID check for BMI1/BMI2 (#40615)

3 years agoFix #33948 by decreasing number of tests per group (#40491)
Egor Chesakov [Mon, 10 Aug 2020 18:10:53 +0000 (11:10 -0700)]
Fix #33948 by decreasing number of tests per group (#40491)

3 years agoRun dotnet-format on the debugger source (#40618)
Larry Ewing [Mon, 10 Aug 2020 17:23:50 +0000 (12:23 -0500)]
Run dotnet-format on the debugger source (#40618)

3 years agoUpdate LSRA Doc (#39492)
Carol Eidt [Mon, 10 Aug 2020 17:23:11 +0000 (10:23 -0700)]
Update LSRA Doc (#39492)

* Update LSRA Doc

3 years agoRemove unused variable assignments in CapiHelper
Key Kim [Mon, 10 Aug 2020 16:51:35 +0000 (01:51 +0900)]
Remove unused variable assignments in CapiHelper

3 years agoSystem.Diagnostics Tracing APIs additions (#40534)
Tarek Mahmoud Sayed [Mon, 10 Aug 2020 16:27:24 +0000 (09:27 -0700)]
System.Diagnostics Tracing APIs additions (#40534)

3 years agouse new OperatingSystem APIs in test projects that target NetCoreAppCurrent only...
Adam Sitnik [Mon, 10 Aug 2020 15:50:42 +0000 (17:50 +0200)]
use new OperatingSystem APIs in test projects that target NetCoreAppCurrent only (#40522)

* use new OperatingSystem APIs in test projects that target NetCoreAppCurrent only

* use `||` instead of `|`

3 years agoSupport extra compiler flags during building (#39191)
Omair Majid [Mon, 10 Aug 2020 13:43:39 +0000 (09:43 -0400)]
Support extra compiler flags during building (#39191)

Many Linux distributions like to use an extra set of compiler flags (via
`CFLAGS`, `CXXFLAGS` and `LDFLAGS`) to produce builds that are hardened
against vulnerabilities and exploits. The flags sometimes also enable
extra warnings to inform packagers about potential memory issues.

This pach adds support for that to dotnet/runtime.

The obvious method to make this work is to just export the `CFLAGS`,
`CXXFLAGS`, and `LDFLAGS` directly. This, however, enables those flags
during configure-time (aka `cmake` without `--build` too). That means
several cmake configure tests get executed with unexpected compiler
flags. These configure tests can then report incorrect results.

For example, https://bugzilla.redhat.com/show_bug.cgi?id=1712158
demonstrates an issue where the check for `strerror_r` in the runtime
comes to the wrong conclusion because `-Wall` is enabled and a variable
is unused.

A slightly longer fix is to support another set of environment
variables, and use them to set `CFLAGS`, `CXXFLAGS`, `LDFLAGS`, but only
for the invocation of `cmake --build`/`make`.

See #35727 for the complete details.

Fixes #35727

3 years ago[aot] Fix the handling of r4/r8 parameter types with attributes during generic sharin...
monojenkins [Mon, 10 Aug 2020 12:31:04 +0000 (08:31 -0400)]
[aot] Fix the handling of r4/r8 parameter types with attributes during generic sharing. (#40498)

The attributes need to be ignored as with the other types, otherwise gsharedvt wrappers for signatures with
parameters like double f = default will not be found.

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

Co-authored-by: vargaz <vargaz@users.noreply.github.com>
3 years agoUse new OS checks in src (#40520)
Adam Sitnik [Mon, 10 Aug 2020 11:05:30 +0000 (13:05 +0200)]
Use new OS checks in src (#40520)

* use new OperatingSystem APIs in System.Net.Ping and remove dependency from System.Runtime.InteropServices.RuntimeInformation

* use new OperatingSystem APIs in System.Security.Cryptography.Algorithms

* use new OperatingSystem APIs in System.ComponentModel.Composition and improve perf..

* use new OperatingSystem APIs in System.Net.Http and remove dependency from System.Runtime.InteropServices.RuntimeInformation

* Apply suggestions from code review

* there is no need to cache the results anymore

3 years agoFix typo in docs/workflow/building/libraries (#40600)
Key Kim [Mon, 10 Aug 2020 03:40:09 +0000 (12:40 +0900)]
Fix typo in docs/workflow/building/libraries (#40600)

build command does not exist, it should be build.cmd

3 years agoRedefine signal for architecture mips (#40513)
SUN Guoyun [Mon, 10 Aug 2020 03:20:04 +0000 (11:20 +0800)]
Redefine signal for architecture mips (#40513)

define SIGSTOP 19 is just ok for architecture x86、arm、s390、powerpc and so on.
but others architecture has different values.

Co-authored-by: Sunguoyun <sunguoyun@loongson.cn>
Co-authored-by: hev <wangrui@loongson.cn>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
3 years agocheck for Null returned from Assembly.GetEntryAssembly (#40598)
Manish Godse [Mon, 10 Aug 2020 03:00:59 +0000 (20:00 -0700)]
check for Null returned from Assembly.GetEntryAssembly (#40598)

Fixes 40588

3 years agomake ssl tests more portable (#40303)
Tomas Weinfurt [Mon, 10 Aug 2020 01:46:16 +0000 (18:46 -0700)]
make ssl tests more portable (#40303)

* make ssl tests more portable

* feedback from review

* fix build

* fix http broken by one previous commits

* feedback from review

* fix tests with old ssl versions.S

* more ssl fixes

3 years ago[wasm][debugger] Add support for invoking getters on ValueTypes (#40548)
Ankit Jain [Sun, 9 Aug 2020 16:36:16 +0000 (12:36 -0400)]
[wasm][debugger] Add support for invoking getters on ValueTypes (#40548)

* [wasm][debugger][tests] Fix negative pointer tests

* [wasm][debugger][tests] Fix test to correctly check the valuetype local

test: `CheckUpdatedValueTypeFieldsOnResume`

* [wasm][debugger][tests] Make value checks consistent

- In some places we weren't checking for the `description` property
- and this hid a bug where sometimes that property wasn't added (eg. for
numbers)
- Instead, we were working around that by "fixing it up" later

- Now, we use the same checks for `Check{Number,String,*}` API, and the
`CheckValue/CheckProps` API used with `TNumber` etc.

- So, this commit:
- fixes the checks, and the tests
- and fixes the bug

* [wasm][debugger] Add new `id` types, which have associated properties

- these are of the form `dotnet:${scheme}:{id-args-object}`
- Examples:
    - `dotnet:valuetype:{ containerId: 4 }`
    - `dotnet:valuetype:{ num: 2 }` - the `num` field is
    autogenerated if no id-args are provided. This gets used when
    valuetypes are expanded.

- `this._id_table [id-string]` has associated property objects for every
`id`
    - This might contain, for example, `klass` pointer, and base64
    representation of a valuetype

* [wasm][debugger] Update valuetype code to use the new `id`s

* [wasm][debugger] Simplify array API in `mini-wasm-debugger.c`

.. to use a single function to get details of the full array, and
individual elements.

* [wasm][debugger] library_mono.js: improvements to valuetype code

- Allow `_new_id` to update properties for existing objectIds
- Extract valuetype id assigment code to a separate function

* [wasm][debugger] mini-wasm-debugger.c- extract object id lookup into a function

* [wasm][debugger][tests] Rename method param to be self descriptive

* [wasm][debugger][tests] Rework cfo test for getters

- add some new getters to the test classes
- this will become useful in subsequent commits that add support for
invoking getters on valuetypes

* [wasm][debugger][tests] Improve valuetype locals/method args tests

- this also becomes useful in subsequent commits which enable invoking
getters on valuetypes

* [wasm][debugger] Add support for invoking getters on valuetypes

- keep a copy of the value bytes, and the klass pointer
- this allows being able to invoke getters on such a valuetype, at a
later point
- This allows getters like `DateTime.Date`, which has the type
`DateTime`

* [wasm][debugger] mono.js: fix warnings

.. and replace `var` with `let`, or `const`, where appropriate.

* [wasm][debugger] mono.js: _split_object_id -> _parse_object_id

* [wasm][debugger] Streamline accessing exported debugger.c functions

.. especially the ones that return data in `MONO.var_info`.

To use:

1. `this._register_c_var_fn ('mono_wasm_get_object_properties', 'bool', [ 'number', 'bool' ]);`
2. Now, this function can be called as `this.mono_wasm_get_object_properties_info (.. )`
    - returns `res` which has the contents of `MONO.var_info`, after running
    `_fixup_name_value_objects` on it.

* [wasm][debugger] Return errors from debugger.c's details functions

- functions like those for getting object/vt properties, can fail, for
example, if the objectId is invalid.
- We now return that bool result, and that gets surfaced to the caller

- This will also help to differentiate the case where the result of such
a function was a failure vs just an empty result

* [wasm][debugger] Small checks on inputs, and some negative tests

- These tests don't actually depend on the error message, and we don't
have another to way to differentiate why a command might have failed
with an exception. So, right now, they will pass as long as the commands
fail as expected.

- Future TODO: return `error`, instead of exception details for issues
in `mono.js`, like incorrect input, invalid id etc, and update these
tests accordingly.

* Update src/mono/mono/mini/mini-wasm-debugger.c

Co-authored-by: Larry Ewing <lewing@microsoft.com>
* Remove description checking from TString

Co-authored-by: Larry Ewing <lewing@microsoft.com>
3 years agoUpdate Microsoft.CodeAnalysis.NetAnalyzers to 3.3.0-beta3.20407.4 (#40560)
Stephen Toub [Sun, 9 Aug 2020 09:32:44 +0000 (05:32 -0400)]
Update Microsoft.CodeAnalysis.NetAnalyzers to 3.3.0-beta3.20407.4 (#40560)

3 years agoUpdate linux-requirements.md (#40576)
Key Kim [Sun, 9 Aug 2020 01:56:21 +0000 (10:56 +0900)]
Update linux-requirements.md (#40576)

append -y option and add ``` around command code

3 years agofix flaky test (#40565)
Geoff Kizer [Sat, 8 Aug 2020 18:12:58 +0000 (11:12 -0700)]
fix flaky test (#40565)

Co-authored-by: Geoffrey Kizer <geoffrek@windows.microsoft.com>
3 years agoinclude more details in exception if remote certificate validation fails (#40110)
Tomas Weinfurt [Sat, 8 Aug 2020 17:36:52 +0000 (10:36 -0700)]
include more details in exception if remote certificate validation fails (#40110)

* include more details in exception if remote certificate validation fails

* fix unit test linking

* feedback from review

* update exception message

3 years agoMinimal fix for Issue 620 (#40535)
Brian Sullivan [Sat, 8 Aug 2020 16:50:41 +0000 (09:50 -0700)]
Minimal fix for Issue 620 (#40535)

* Minimal fix for Issue 620
Added test case: Runtime_620.cs
Added lvForceLoadNormalize

* Changed conditional to "else if"

3 years agoSuperpmi: adjust relocations (#40563)
Carol Eidt [Sat, 8 Aug 2020 15:08:42 +0000 (08:08 -0700)]
Superpmi: adjust relocations (#40563)

Fix #39908

3 years agoReenable the test. (#40515)
Sergey Andreenko [Sat, 8 Aug 2020 04:24:05 +0000 (21:24 -0700)]
Reenable the test. (#40515)

3 years agoDisable EOL Target Frameworks check in newer SDKs (#40552)
Santiago Fernandez Madero [Sat, 8 Aug 2020 01:53:35 +0000 (20:53 -0500)]
Disable EOL Target Frameworks check in newer SDKs (#40552)

3 years ago[Arm64] Treat methods of non-generic Vector64 and Vector128 classes as intrinsics...
Egor Chesakov [Sat, 8 Aug 2020 00:51:23 +0000 (17:51 -0700)]
[Arm64] Treat methods of non-generic Vector64 and Vector128 classes as intrinsics (#40441)

3 years agoWhen returning a SIMD value use v0 register as the candidate for source operand of...
Egor Chesakov [Sat, 8 Aug 2020 00:28:41 +0000 (17:28 -0700)]
When returning a SIMD value use v0 register as the candidate for source operand of GT_RETURN in case when it is a single-register local variable

3 years agoUpdate using-dotnet-cli.md (#40504)
Austin Wise [Fri, 7 Aug 2020 23:50:22 +0000 (16:50 -0700)]
Update using-dotnet-cli.md (#40504)

* Update using-dotnet-cli.md

Update the First Run section for .NET 5.

* more renames

* typo

Co-authored-by: danmosemsft <danmose@microsoft.com>
3 years agoContinue updating previous generic dictionaries after expansion (#40355)
Tomáš Rylek [Fri, 7 Aug 2020 23:17:32 +0000 (01:17 +0200)]
Continue updating previous generic dictionaries after expansion (#40355)

Fix perf regression after introduction of expandable generic
dictionaries. When we expand a generic dictionary, we should back
propagate the change to previously allocated shorter versions of
the same dictionary, otherwise already running JITted code may
continue referring to the "old version" of the dictionary implying
repeated slow path generic lookups.

Thanks

Tomas

3 years agoFix StringBuilder AV (#40500)
Dan Moseley [Fri, 7 Aug 2020 23:10:58 +0000 (16:10 -0700)]
Fix StringBuilder AV (#40500)

* Fix StringBuilder AV

* OOME

3 years ago[wasm] [debugger] Support Exception Break on Debugger (handled and unhandled) (#40480)
Thays Grazia [Fri, 7 Aug 2020 23:07:48 +0000 (20:07 -0300)]
[wasm] [debugger] Support Exception Break on Debugger (handled and unhandled) (#40480)

* Support Exception Break on Debugger (handled and unhandled)

Co-authored-by: Ankit Jain <radical@gmail.com>
3 years agoRemove perf CI runs (#40540)
Drew Scoggins [Fri, 7 Aug 2020 22:23:13 +0000 (15:23 -0700)]
Remove perf CI runs (#40540)

3 years agoSign and add entitlements to createdump and host binaries (#40485)
Mike McLaughlin [Fri, 7 Aug 2020 22:21:30 +0000 (15:21 -0700)]
Sign and add entitlements to createdump and host binaries (#40485)

Sign and add entitlements to createdump and host binaries

Enables createdump on MacOS.

Part of issue #https://github.com/dotnet/runtime/issues/34916.

Don't attempt to sign in a public PR job

3 years agoReduced code size and optimized name key creation for JSON properties and parameters...
Yoh Deadfall [Fri, 7 Aug 2020 22:18:28 +0000 (01:18 +0300)]
Reduced code size and optimized name key creation for JSON properties and parameters (#40136)

3 years ago[mono] Allow creating `TypedReference *` and `TypedReference &` via reflection. ...
imhameed [Fri, 7 Aug 2020 21:55:57 +0000 (14:55 -0700)]
[mono] Allow creating `TypedReference *` and `TypedReference &` via reflection. (#40472)

CoreCLR gained support for creating`TypedReference *` and `TypedReference &` via `MakePointerType` and `MakeByRefType` in https://github.com/dotnet/coreclr/pull/25817.

Reenable byref System.Void-related reflection tests.

Fixes https://github.com/dotnet/runtime/issues/31713.
Fixes https://github.com/dotnet/runtime/issues/37489.

3 years agoWASM: Add pkgproj for the browser debug proxy/host transport package (#40494)
Alexander Köplinger [Fri, 7 Aug 2020 20:52:31 +0000 (22:52 +0200)]
WASM: Add pkgproj for the browser debug proxy/host transport package (#40494)

* WASM: Add pkgproj for the browser debug proxy/host transport package

* Update src/mono/wasm/debugger/BrowserDebugProxy/MonoProxy.cs

Co-authored-by: Larry Ewing <lewing@microsoft.com>
Co-authored-by: Larry Ewing <lewing@microsoft.com>
3 years agoFix covariant override disassembly (#40502)
David Wrighton [Fri, 7 Aug 2020 20:26:55 +0000 (13:26 -0700)]
Fix covariant override disassembly (#40502)

- This introduces a new path where ildasm must generate a full token description instead of relying on ilasm to produce the signature from the method body

3 years ago[Wasm] Add simple browser sample (#40460)
Steve Pfister [Fri, 7 Aug 2020 19:46:47 +0000 (15:46 -0400)]
[Wasm] Add simple browser sample (#40460)

3 years agoMake Extensions linker friendly. (#40431)
Eric Erhardt [Fri, 7 Aug 2020 19:35:53 +0000 (14:35 -0500)]
Make Extensions linker friendly. (#40431)

* Make Extensions linker friendly.

Annotating the rest of the Microsoft.Extensions libraries.

Fix #40396

* Disable parallelism in trimming tests to fix race condition.

3 years agoUpdate Equals method from ActivityContext (#40465)
Eddy Nakamura [Fri, 7 Aug 2020 18:58:32 +0000 (15:58 -0300)]
Update Equals method from ActivityContext (#40465)

3 years agoFix Issue #877 - Use GT_OBJ when copying a struct (#40483)
Brian Sullivan [Fri, 7 Aug 2020 18:08:34 +0000 (11:08 -0700)]
Fix Issue #877 - Use GT_OBJ when copying a struct (#40483)

3 years ago[JsonSerializer] Prevent arbitrary properties from being cached when deserializing...
Layomi Akinrinade [Fri, 7 Aug 2020 17:52:37 +0000 (10:52 -0700)]
[JsonSerializer] Prevent arbitrary properties from being cached when deserializing with parameterized ctors (#40495)

* [JsonSerializer] Prevent arbitrary properties from being cached when deserializing with parameterized ctors

* Address review feedback

* Correct check on when to grow property pool in sync code paths

3 years agoadd NetworkException (#40344)
Geoff Kizer [Fri, 7 Aug 2020 16:52:30 +0000 (09:52 -0700)]
add NetworkException (#40344)

* add NetworkException

3 years agoFix Japanese Abbreviated Era Names (#40300)
Tarek Mahmoud Sayed [Fri, 7 Aug 2020 16:18:40 +0000 (09:18 -0700)]
Fix Japanese Abbreviated Era Names (#40300)

3 years agoAdd -y to apt-get install commands (#40492)
Drew Scoggins [Fri, 7 Aug 2020 16:16:38 +0000 (09:16 -0700)]
Add -y to apt-get install commands (#40492)

3 years agoHandle 16 byte HFA fields in arm64 profiler (#40482)
Andy Ayers [Fri, 7 Aug 2020 16:05:39 +0000 (09:05 -0700)]
Handle 16 byte HFA fields in arm64 profiler (#40482)

Fixes #40277.

3 years agoDisable formatting for outerloop. (#40517)
Sergey Andreenko [Fri, 7 Aug 2020 15:56:52 +0000 (08:56 -0700)]
Disable formatting for outerloop. (#40517)

3 years agoAdd code to preserve public fields of input types to JsonSerializer (#40508)
Layomi Akinrinade [Fri, 7 Aug 2020 15:44:54 +0000 (08:44 -0700)]
Add code to preserve public fields of input types to JsonSerializer (#40508)

3 years ago[JsonSerializer] Verify null can't be assigned to non-nullable structs (#40446)
Layomi Akinrinade [Fri, 7 Aug 2020 15:36:19 +0000 (08:36 -0700)]
[JsonSerializer] Verify null can't be assigned to non-nullable structs (#40446)

3 years agoUse T? for unconstrained nullable types (#40197)
Stephen Toub [Fri, 7 Aug 2020 15:25:42 +0000 (11:25 -0400)]
Use T? for unconstrained nullable types (#40197)

* Temporarily upgrade compiler version for T? support

* Use T? for unconstrained nullable types

3 years agoIncrease multiple HTTP/2 connections test timeouts again (#40464)
Alexander Nikolaev [Fri, 7 Aug 2020 15:19:33 +0000 (17:19 +0200)]
Increase multiple HTTP/2 connections test timeouts again (#40464)

Fixes #40115
Fixes #40436

3 years agoAddress additional feedback from #40172 (#40505)
Layomi Akinrinade [Fri, 7 Aug 2020 15:18:09 +0000 (08:18 -0700)]
Address additional feedback from #40172 (#40505)

3 years agofix nullable annotation for ImmutableInterlocked.Update methods (#40459)
Eirik Tsarpalis [Fri, 7 Aug 2020 14:09:56 +0000 (15:09 +0100)]
fix nullable annotation for ImmutableInterlocked.Update methods (#40459)

3 years ago[Wasm] Rename System.Runtime.InteropServices.JavaScript to System.Private.Runtime...
Steve Pfister [Fri, 7 Aug 2020 13:45:17 +0000 (09:45 -0400)]
[Wasm] Rename System.Runtime.InteropServices.JavaScript to System.Private.Runtime.InteropServices.JavaScript (#40478)

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

3 years ago[Wasm] Ensure monovm_initialize is called on startup and address other startup items...
Steve Pfister [Fri, 7 Aug 2020 13:30:15 +0000 (09:30 -0400)]
[Wasm] Ensure monovm_initialize is called on startup and address other startup items (#39446)

This PR addresses:

- Calling monovm_initialize matches how other mono platforms init themselves (Fixes https://github.com/dotnet/runtime/issues/39074)
- Set the entry assembly (Fixes https://github.com/dotnet/runtime/issues/38994)
- Make sure the assembly location is set to empty for assemblies that are loaded from memory (Fixes https://github.com/dotnet/runtime/issues/39650)

3 years ago[mono][interp] Optimize box+unbox to no-op (#40017)
Egor Bogatov [Fri, 7 Aug 2020 13:07:56 +0000 (16:07 +0300)]
[mono][interp] Optimize box+unbox to no-op (#40017)

3 years agoEnable CBOR property tests in CI runs (#40135)
Eirik Tsarpalis [Fri, 7 Aug 2020 10:52:56 +0000 (11:52 +0100)]
Enable CBOR property tests in CI runs (#40135)

* enable cbor property tests in CI runs

* address feedback

3 years agoRemove new platform members from OSPlatform (#40373)
Adam Sitnik [Fri, 7 Aug 2020 10:18:34 +0000 (12:18 +0200)]
Remove new platform members from OSPlatform (#40373)

* Remove new platform members from OSPlatform

* remove IsOSPlatformEarlierThan and IsOSPlatformOrLater methods

* remove unused resource and dependency

* delegate RuntimeInformation.IsOSPlatform to call OperatingSystem.IsOSPlatform. it won't compile now as the new guards have not been merged yet (#40457)

* remove OSPlatform.Browser and it's usage

3 years agoTrim async debugging when debugging feature is disabled (#40400)
Marek Safar [Fri, 7 Aug 2020 09:03:27 +0000 (11:03 +0200)]
Trim async debugging when debugging feature is disabled (#40400)

3 years agoImplement platform guards in OperatingSystem class (#40457)
Adam Sitnik [Fri, 7 Aug 2020 07:16:19 +0000 (09:16 +0200)]
Implement platform guards in OperatingSystem class (#40457)

* add Is$OsName methods to OperatingSystem class

* add OperatingSystem.*VersionAtLeast methods

* add IsOSPlatform and IsOSPlatformVersionAtLeast

* add xml comments

* address code review suggestions

* move TARGET_* defines to a common file

3 years agoFix caching EH clause type handle problem in a conservative fashion (#40493)
David Wrighton [Fri, 7 Aug 2020 03:56:25 +0000 (20:56 -0700)]
Fix caching EH clause type handle problem in a conservative fashion (#40493)

This caching was intended to improve performance of repeatedly catching exceptions. As it happens, the critical section that was being used to protect the cache could trigger a GC, and cause a failure under stress. However, some years ago, the eh clause as operated on by the ResolveEHClause method was changed to be a copy of the EHClause stored during the JIT operation, and thus the caching efforts done in this function did not provide value, and in fact are a minor source of multithread scaling concerns.

- Remove the dynamic caching. (Note, the TypeHandle member variable and the HasCachedTypeHandle function, are still used for LCG dynamic methods.)
- Rename the critical section used to protect the cache, as it is now only used to protect from loading multiple copies of the JIT.

3 years agoAdd DesignerAttribute to types that had it in full framework (#40425)
Santiago Fernandez Madero [Fri, 7 Aug 2020 03:03:19 +0000 (22:03 -0500)]
Add DesignerAttribute to types that had it in full framework (#40425)

* Add DesignerAttribute to types that had it in full framework

* Move DesignerAttributeTests to Primitives and fix test errors

* Remove DesignerAttribute.cs from TypeConverter

3 years agoMake ComponentModel intrinsic TypeConverters linker-safe (#39973)
Layomi Akinrinade [Fri, 7 Aug 2020 00:35:14 +0000 (17:35 -0700)]
Make ComponentModel intrinsic TypeConverters linker-safe (#39973)

* Make ComponentModel intrinsic TypeConverters linker-safe

* Avoid reflection in converter func lookup

* Re-add code path that supports editors

* Consolidate intrinsic converter caches, move converter-specific code to new method, add trimming tests

* Address feedback

* Revert change to GetIntrinsicTypeEditor method

* Handle inheritance with Uri and CultureInfo types

* Add heirarchy-related comments to cache docs

3 years agoAdd nullability annotations for *XPath* files in Xml/Dom and Xml/Xsl (#40295)
David Cantu [Fri, 7 Aug 2020 00:00:09 +0000 (17:00 -0700)]
Add nullability annotations for *XPath* files in Xml/Dom and Xml/Xsl (#40295)

* Add nullability annotations for *XPath* files in Xml/Dom and Xml/Xsl

* Fix build issues

* Address feedback

* Add TODO for replacing MaybeNull attributes

3 years agoFix gc stress coverage handling of epilogs on X86 (#40432)
David Wrighton [Thu, 6 Aug 2020 23:48:52 +0000 (16:48 -0700)]
Fix gc stress coverage handling of epilogs on X86 (#40432)

Epilog checking relies on precise control of when instrumentation for the  first prolog
instruction is enabled or disabled. In particular, if a function has multiple epilogs, or
the first execution of the function terminates via an exception, and subsequent completions
do not, then the function may trigger a false stress fault if epilog checks are not disabled.

This fix makes it so that if the first instruction is hit during a GC coverage in a situation where
the epilog could be examined in the future, that the epilog verification is disabled.

Also an opportunistic fix for a probably unimportant race condition around checking the
callerThread during epilog processing.

3 years agoRemove workaround in DefaultValueAttributeCtorTest trimming test (#40448)
Layomi Akinrinade [Thu, 6 Aug 2020 23:44:35 +0000 (16:44 -0700)]
Remove workaround in DefaultValueAttributeCtorTest trimming test (#40448)

3 years agoimport array access as OBJ for structs. (#40488)
Sergey Andreenko [Thu, 6 Aug 2020 23:08:09 +0000 (16:08 -0700)]
import array access as OBJ for structs. (#40488)

3 years agoAllow execution of R2R code in singlefile app on windows. (#40104)
Vladimir Sadov [Thu, 6 Aug 2020 22:00:33 +0000 (15:00 -0700)]
Allow execution of R2R code in singlefile app on windows. (#40104)

* Keep executable PE sections executable in LayoutILOnly.

* Install unwind handlers if present

* do not do RtlAddFunctionTable on x86

* Check for Cor header before checking for R2R header.

* Delete function table in image dtor

* Avoid PAGE_EXECUTE_READWRITE, we should not need writeable for R2R

* Do relocations in ConvertedImageLayout only if the file is in a bundle. (otherwise R2R stays disabled)

3 years ago[Arm64] Treat Math/MathF.FusedMultiplyAdd as intrinsics (#40124)
Egor Chesakov [Thu, 6 Aug 2020 21:56:56 +0000 (14:56 -0700)]
[Arm64] Treat Math/MathF.FusedMultiplyAdd as intrinsics (#40124)

* Transform Math{F}.FusedMultiplyAdd(x,y,z) into

AdvSimd.FusedMultiplyAddScalar(
  Vector64.CreateScalarUnsafe(z),
  Vector64.CreateScalarUnsafe(y),
  Vector64.CreateScalarUnsafe(x)).ToScalar() on Arm64 in importer.cpp

* Add containment analysis for AdvSimd_FusedMultiplyAddScalar in lower.h lowerarmarch.cpp

* Set tgtPrefOp1 for intrinsics with SIMD-to-SIMD move semantics in lsraarm64.cpp

3 years agoQUIC and HTTP/3 fixes (#40468)
Cory Nelson [Thu, 6 Aug 2020 19:43:49 +0000 (12:43 -0700)]
QUIC and HTTP/3 fixes (#40468)

Update/fix MsQuic P/invoke layer.
Fix a race condition in MsQuicListener setting MsQuicConnection.Connected.
Some MsQuic cleanup.
Remove (un-reviewed) HttpVersion.Version30 and SslApplicationProtocol.Http3 APIs.
Fix Alt-Svc support.
Make Alt-Svc tests timeout properly.