platform/upstream/dotnet/runtime.git
3 years agoAdd MemoryMappedFile tests involving AcquirePointer (#42800)
Stephen Toub [Tue, 6 Oct 2020 23:14:03 +0000 (19:14 -0400)]
Add MemoryMappedFile tests involving AcquirePointer (#42800)

3 years agoStart stopwatch immediately before sending http request (#41537)
Anas Mazioudi [Tue, 6 Oct 2020 22:36:11 +0000 (00:36 +0200)]
Start stopwatch immediately before sending http request (#41537)

* Start stopwatch immediately before sending http request

* Remove extra line

* Remove trailing white space

3 years agoJit: Remove bounds checks with tests against length. (#40180)
nathan-moore [Tue, 6 Oct 2020 20:36:08 +0000 (16:36 -0400)]
Jit: Remove bounds checks with tests against length. (#40180)

* Introduce a concept of minimum array length into range check

* Some cleanup

* fix potential underflow

* bug fix and cleanup

* Revert string changes

* Allow elimination of arr[0] with  len != 0 test

* Revert "Revert string changes"

This reverts commit 6f77bf8c8acce1f5382bb704875384c6f8e2f984.

* Fix up tests

* reverting lower bound merging as it may be unsound

* Fix CI exposed bug and add a couple of test cases

* code review feedback

* comment nit

* feedback

* Add missing break

3 years agoRoslyn update response (#43056)
Aaron Robinson [Tue, 6 Oct 2020 20:11:35 +0000 (13:11 -0700)]
Roslyn update response (#43056)

* Update function pointer syntax usage to official.

* Fix warnings with new Roslyn

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
3 years agoLock CoreDisTools package version to 1.0.1-prerelease-00005 in stress_dependencies...
Egor Chesakov [Tue, 6 Oct 2020 19:41:28 +0000 (12:41 -0700)]
Lock CoreDisTools package version to 1.0.1-prerelease-00005 in stress_dependencies.csproj (#42968)

3 years agoCoreDisTools and R2RDump support Arm Thumb2 disassembling (#42964)
Egor Chesakov [Tue, 6 Oct 2020 19:27:20 +0000 (12:27 -0700)]
CoreDisTools and R2RDump support Arm Thumb2 disassembling (#42964)

* Clear the low bit of "Function Start RVA" on Arm Thumb2 machines in ReadyToRunMethod.cs

* Remove restrictions on InputArchitecture in ReadyToRunReader.cs and R2RDump.cs

3 years agoSmall optimization in LSRA for RMW intrinsics (#42564)
Egor Chesakov [Tue, 6 Oct 2020 18:58:34 +0000 (11:58 -0700)]
Small optimization in LSRA for RMW intrinsics (#42564)

RMW intrinsic operands doesn't have to be marked as "delay-free" when they can be assigned the same register as op1Reg (i.e. read-modify-write operand) and one of them is the last use.

3 years agoChanging the free list from singly linked to doubly linked (#43021)
Maoni Stephens [Tue, 6 Oct 2020 18:53:50 +0000 (11:53 -0700)]
Changing the free list from singly linked to doubly linked (#43021)

One of the problems with BGC sweep is it zeros out the gen2 FL at the beginning which means we might need to increase gen2 size before it builds up enough FL to accommodate gen1 survivors. To lift this limitation I'm changing this to a doubly linked list so we can easily take items off and thread new ones back on.

Note that this is the initial checkin for the feature - there needs to be more stress testing and perf testing done on this so I'm checking in with the feature DOUBLY_LINKED_FL undefined. I've done some stress testing but not a whole lot.

This is only used for gen2 FL, not UOH - we already don't allow UOH allocations while we are sweeping UOH (which should be quite quick). In the future we will make it work so UOH allocs are allowed while it's being swept but that's beyond the scope of this feature (it would require work in the synchronization between the allocator and BGC sweep).

2 new bits were introduced -

Previously we didn't need to care about bgc mark bits at all since we can't possibly compact into the part of the heap that hasn't been swept. But now we can. So if we compact into a free item that hasn't been swept, we need to set the mark bits correctly. So we introduce a new bit:

// This bit indicates that we'll need to set the bgc mark bit for this object during an FGC.
// We only do this when we decide to compact.

Also now we don't have the luxury to allocate a min obj in the plan phase if what's allocated in this alloc context is too short. Previously we have this situation:

SB|MT|L|N

and if we plan allocated a min obj in this free item, we can allocate a min free obj right after it because the min free obj will not overwrite anything of that free item:

SB|MT|L|N
min free:
        SB|MT|Payload

since we don't touch SB. But now we have this:

SB|MT|L|N|P

and if we only allocated 3 ptr size into this free item, and if we want to allocate a min free obj, we'd be over writing P (previous pointer of this free item):

SB|MT|L|N |P
        SB|MT|Payload

One note on this is that we check the "allocated size" with (alloc_ptr - start_region), but start_region is updated every time we pad in the same free item. And it's really only necessary for the actual alloc context start (because we just need to preserve that free item's prev). But this is saved by the fact that in gen2 we don't pad. If we do pad in gen2 it would be good to handle this.

This is handled by set_free_obj_in_compact_bit (which sets the new MAKE_FREE_OBJ_IN_COMPACT bit) in adjust_limit where we set the bit and record the size of the "filler object". and we'll actually make the filler obj in gcmemcopy. This means this feature is as of now ONLY FOR 64-bit as the bit we use to do this means we are taking up 3 bits in MT to do our bookkeeping. We could make it work for 32-bit by finding bits in the gap - I haven't done that.

Major areas changed were -
+ allocate_in_older_generation - this also has a complication wrt repair and commit. I introduced the new added list concept so we can repair and commit quickly, with one exception for bucket 0. For b0 since we do discard items, we do need to set prev of discarded items to PREV_EMPTY because we need to indicate that it's not the freelist anymore. However, we can still recover by going through the original head and set the prev of the discarded items one by one which wouldn't be fast so I choose to not do it - the discarded items are generally very small anyway.

+ gcmemcopy - this needs to care about the bits we added.

+ background_sweep - this takes items off of the FL and thread new ones back on. Since this never happens at the same time as the gen1 GCs using these items we don't need synchronization here.

+ allocator class - obviously this needs to care about the prev field now. The principle is we don't touch the prev field in unlink_item (except for the special b0 case) so when we repair we don't need to go repair the prev fields. When we commit, we do need to set the new prev field accordingly (unless for the added list which we would have already set the prev correctly).

---

Fixed some existing bugs -

The refactor change stopped updating next_sweep_obj but it's incorrect because it's used by the verification code in sos so brought that back.

More accounting to count free_list/obj spaces correctly.

---

TODO

Optimizations we can do in background_sweep -

+ Don't need to actually take items off if we are just going to thread back on the same one (and others from my design notes);

+ If there's a big item we may not want to remove, imagine this simplied scenario - we have 1 2-mb free item on the list and we just removed it. Now current_num_objs happens to be big enough so we left an FGC happen and this FGC is gen1 and now it doesn't find any free space and would have to grow gen2.

It's actually beneficial to switch to using the added list even for singly linked list so we could consider enabling it even when the feature is not on.

3 years agoCorrectly report struct types in asCorInfoType for normalized structs (#43068)
David Wrighton [Tue, 6 Oct 2020 18:50:58 +0000 (11:50 -0700)]
Correctly report struct types in asCorInfoType for normalized structs (#43068)

- Fix last issue causing significant misbehavior in X86 Crossgen2 testing
  - Correctly report struct types in asCorInfoType for normalized structs
  - Previous efforts would not report the struct if it was normalized, where the correct behavior was to normalize, and report the struct if it isn't an enum

3 years agoRemove pr: none clause from several CoreCLR pipelines (#42933)
Tomáš Rylek [Tue, 6 Oct 2020 17:51:17 +0000 (19:51 +0200)]
Remove pr: none clause from several CoreCLR pipelines (#42933)

3 years agoRemove unneeded licenses ingested from dotnet/diagnostics repo (#43064)
Nikola Milosavljevic [Tue, 6 Oct 2020 17:32:00 +0000 (10:32 -0700)]
Remove unneeded licenses ingested from dotnet/diagnostics repo (#43064)

3 years agoFix for 'not fully instantiated' Crossgen2 issue bucket (#43054)
Tomáš Rylek [Tue, 6 Oct 2020 17:31:06 +0000 (19:31 +0200)]
Fix for 'not fully instantiated' Crossgen2 issue bucket (#43054)

Around September 25 several dozens of Crossgen2 tests started
failing with a runtime error around incomplete instantiation of
GetArrayDataReference. I believe that for generic methods we
should skip the METHOD_ENTRY_DEF_TOKEN shortcut, otherwise we
lose the instantiation information and cause the runtime problem.

I originally thought this may be related to JanK's function
pointer changes but I no longer believe it is the case
(my apologies to Jan for the false accusation). I rather think
that some ambient code change caused a subtle difference in IL
encoding of access to the method that started tripping the
"shortcut" code path.

Thanks

Tomas

3 years agoExpose BackgroundService.ExecuteTask (#42981)
Eric Erhardt [Tue, 6 Oct 2020 17:23:31 +0000 (12:23 -0500)]
Expose BackgroundService.ExecuteTask (#42981)

* Expose BackgroundService.ExecuteTask

Expose the task that executes the background service, so consumers can check if it is running and/or has ran to competition or faulted.

Use the new ExecuteTask to log exceptions when a BackgroundService fails after await, instead of appearing to hang.

Fix #35991
Fix #36017

3 years agoChanged mono exception type from execution engine to not supported (#43009)
Shreyas Jejurkar [Tue, 6 Oct 2020 17:15:35 +0000 (22:45 +0530)]
Changed mono exception type from execution engine to not supported (#43009)

3 years agoIntegrate changes in shared files from dotnet/runtimelab:NativeAOT (#43075)
Jan Kotas [Tue, 6 Oct 2020 13:51:56 +0000 (06:51 -0700)]
Integrate changes in shared files from dotnet/runtimelab:NativeAOT (#43075)

3 years agoImprove detection of unsupported OS in resource updater (#43080)
Vitek Karas [Tue, 6 Oct 2020 13:43:57 +0000 (06:43 -0700)]
Improve detection of unsupported OS in resource updater (#43080)

Per https://github.com/dotnet/runtime/pull/43058#discussion_r499896492

3 years agoAdd dac apis for comwrappers style ccws/rcws (#42942)
David Mason [Tue, 6 Oct 2020 07:39:15 +0000 (00:39 -0700)]
Add dac apis for comwrappers style ccws/rcws (#42942)

3 years agofix async logic in MultipleConnectAsync to avoid lock reentrancy issues (#42919)
Geoff Kizer [Tue, 6 Oct 2020 04:51:10 +0000 (21:51 -0700)]
fix async logic in MultipleConnectAsync to avoid lock reentrancy issues (#42919)

* fix async logic in MultipleConnectAsync to avoid lock reentrancy issues

* Update src/libraries/System.Net.Sockets/src/System/Net/Sockets/MultipleConnectAsync.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Geoffrey Kizer <geoffrek@windows.microsoft.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
3 years agoUse correct size_t when determining if a value fits in a byte (#42987)
David Wrighton [Tue, 6 Oct 2020 00:20:42 +0000 (17:20 -0700)]
Use correct size_t when determining if a value fits in a byte (#42987)

- Use target_size_t when determining if a value fits in a byte when value is represented in the function as a ssize_t or cnssval_ssize_t. This drops the upper 32bits of a possibly 64bit size_t when performing the comparison on TARGET_X86 platforms. Those bits are uninitialized if the value not a reloc.

3 years agoDistinguish when we SPMI R2R compilation. (#42995)
Sergey Andreenko [Tue, 6 Oct 2020 00:04:45 +0000 (17:04 -0700)]
Distinguish when we SPMI R2R compilation. (#42995)

Don't try to stash field values because in R2R case Jit does not try to read them. It happens only in CoreRun for static readonly fields.

3 years agoenable superpmi collection pipeline (#43040)
Kunal Pathak [Mon, 5 Oct 2020 22:42:11 +0000 (15:42 -0700)]
enable superpmi collection pipeline (#43040)

* enable superpmi collection pipeline

In #42053, I forgot to push a change to enable the superpmi pipeline.
This change will trigger it every Sunday at 9:00 AM PST.

* fix space changes

3 years agoUpdate Helix SDK manually (#43011)
Viktor Hofer [Mon, 5 Oct 2020 22:24:14 +0000 (00:24 +0200)]
Update Helix SDK manually (#43011)

* Update Helix SDK manually

For follow up / if you see 504s

3 years agoimprove detection of TLS13 on Windows (#42937)
Tomas Weinfurt [Mon, 5 Oct 2020 20:36:20 +0000 (13:36 -0700)]
improve detection of TLS13 on Windows (#42937)

3 years agoFix SPMI dump. (#42867)
Sergey Andreenko [Mon, 5 Oct 2020 20:22:05 +0000 (13:22 -0700)]
Fix SPMI dump. (#42867)

* Fix SPMI dump.

* add a message when we have collisions.

3 years agoAdd other openssl path to PKG_CONFIG_PATH (#43041)
Alexander Köplinger [Mon, 5 Oct 2020 18:21:27 +0000 (20:21 +0200)]
Add other openssl path to PKG_CONFIG_PATH (#43041)

Follow-up to https://github.com/dotnet/runtime/pull/43037#discussion_r499726268

3 years agobuild-commons.sh: check for OpenSSL 1.1 on macOS (#43037)
Alexander Köplinger [Mon, 5 Oct 2020 17:04:13 +0000 (19:04 +0200)]
build-commons.sh: check for OpenSSL 1.1 on macOS (#43037)

We're installing openssl@1.1 from Homebrew so we should check that version.
It looks like CI Macs don't set the /usr/local/opt/openssl symlink anymore.

3 years agoHandle libunwind_xdac partial C11 support (#42997)
Steve MacLean [Mon, 5 Oct 2020 16:40:00 +0000 (12:40 -0400)]
Handle libunwind_xdac partial C11 support (#42997)

For newer Windows SDKs, the stdalign.h header is present, but the alignas macr is not
defined unless the compiler adds the std:c11 or newer.

Until we can set the std:c11 flag, work around the missing alignas macro using cmake config.

3 years agoFix various typos in comments (#43019)
John Doe [Mon, 5 Oct 2020 16:05:56 +0000 (09:05 -0700)]
Fix various typos in comments (#43019)

* accross -> across

* additionaly -> additionally

* adddress -> address

* addrees -> address

* addresss -> address

* aligment -> alignment

* Alignement -> Alignment

* alredy -> already

* argment -> argument

* Argumemnts -> Arguments

3 years ago[sdb] Add support for function pointers. (#42936)
monojenkins [Mon, 5 Oct 2020 13:59:38 +0000 (09:59 -0400)]
[sdb] Add support for function pointers. (#42936)

Co-authored-by: vargaz <vargaz@users.noreply.github.com>
3 years agoReenable MUSL ARM tests (#42202)
Jan Vorlicek [Mon, 5 Oct 2020 12:40:57 +0000 (14:40 +0200)]
Reenable MUSL ARM tests (#42202)

* Reenable MUSL ARM tests

The packages for MUSL ARM should now be available, so reenable the
libraries tests in the CI

* Update DotnetHost and DotnetHostPolicy versions

* Add Linux arm musl to libraries queues

* Reenabling the arm32 queue in the coreclr templates queues

* Updated versions by darc tool, reverted libraries/helix-queues-setup.yml

3 years agoImprove WASM test output via xharness (#42860)
Alexander Köplinger [Mon, 5 Oct 2020 10:37:49 +0000 (12:37 +0200)]
Improve WASM test output via xharness (#42860)

With https://github.com/dotnet/xharness/pull/315 we can now make the test output similar to the regular xunit desktop runner.
It no longer prints the passed tests by default, only failing tests. To get the old behavior, add the `-v` flag back to xharness in tests.mobile.targets or check the new wasm-console.log file in the xharness-output folder.

```
  XHarness command issued: wasm test --app=. --engine=V8 --engine-arg=--stack-trace-limit=1000 --js-file=runtime.js --output-directory=/Users/alexander/dev/runtime/artifacts/bin/System.Runtime.Handles.Tests/net5.0-Release/browser-wasm/AppBundle/xharness-output -- --run WasmTestRunner.dll System.Runtime.Handles.Tests.dll -notrait category=OuterLoop -notrait category=failing
  info: 21:57:45.3244690 v8 --expose_wasm --stack-trace-limit=1000 runtime.js -- --run WasmTestRunner.dll System.Runtime.Handles.Tests.dll -notrait category=OuterLoop -notrait category=failing
  info: Arguments: --run,WasmTestRunner.dll,System.Runtime.Handles.Tests.dll,-notrait,category=OuterLoop,-notrait,category=failing
  info: console.debug: MONO_WASM: Initializing mono runtime
  info: console.debug: MONO_WASM: ICU data archive(s) loaded, disabling invariant mode
  info: console.debug: mono_wasm_runtime_ready fe00e07a-5519-4dfe-b35a-f867dbaf2e28
  info: Initializing.....
  info: Discovering: System.Runtime.Handles.Tests.dll (method display = ClassAndMethod, method display options = None)
  info: Discovered:  System.Runtime.Handles.Tests.dll (found 14 of 15 test cases)
  info: Starting:    System.Runtime.Handles.Tests.dll
  fail: [FAIL] SafeWaitHandleTests.SafeWaitHandle_False
  info: Assert.False() Failure
  info: Expected: False
  info: Actual:   True
  info:    at SafeWaitHandleTests.SafeWaitHandle_False()
  info:    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
  info: Finished:    System.Runtime.Handles.Tests.dll
  info:
  info: === TEST EXECUTION SUMMARY ===
  info: Total: 14, Errors: 0, Failed: 1, Skipped: 0, Time: 0.097211s
  info:
  info: 21:57:46.3323620 Process exited with 1
```

3 years agoPR handling port of Diagnostic Server C++ library from CoreCLR into a C (#41872)
Johan Lorensson [Mon, 5 Oct 2020 07:23:38 +0000 (09:23 +0200)]
PR handling port of Diagnostic Server C++ library from CoreCLR into a C (#41872)

library that can be shared between Mono as well as CoreCLR runtime.

Port follows same guidelines setup for event pipe port #34600.
Diagnostic server library is currently hosted as part of event pipe
library but hosting its own runtime shim as well as source files
(so could be split into separate library if ever make sense).
Diagnostic Server have dependencies on event pipe library
(and reuse part of event pipe runtime shim from its how shim).

This is the first PR getting the code from diagnostic server codebase
over to C library.

3 years agoJSON Escape the strings used in test before comparing for non-English locales (#42982)
Ganbarukamo41 [Sun, 4 Oct 2020 22:25:36 +0000 (07:25 +0900)]
JSON Escape the strings used in test before comparing for non-English locales (#42982)

3 years agomake BrowserHttpMessage.Send throw PNSE (#42990)
Larry Ewing [Sun, 4 Oct 2020 19:44:53 +0000 (14:44 -0500)]
make BrowserHttpMessage.Send throw PNSE (#42990)

* Throw PNSE on sync version of BrowserHttpHandler.Send

* Mark HttpClientHandler.Send as unsupported on browser

* Update reference source

3 years agoR2RDump cleanup (#42996)
Andrew Au [Sat, 3 Oct 2020 16:57:17 +0000 (09:57 -0700)]
R2RDump cleanup (#42996)

3 years agoRyuJIT: Optimize -X and MathF.Abs(X) for floats (#42164)
Egor Bogatov [Fri, 2 Oct 2020 23:30:22 +0000 (02:30 +0300)]
RyuJIT: Optimize -X and MathF.Abs(X) for floats (#42164)

* Optimize -X and MathF.Abs(X) for floats
Co-authored-by: Tanner Gooding <tagoo@outlook.com>
3 years ago[mono] Fix constant folding for Math.Round (#42951)
Egor Bogatov [Fri, 2 Oct 2020 22:19:06 +0000 (01:19 +0300)]
[mono] Fix constant folding for Math.Round (#42951)

3 years agoCrossgen2 cross target testing (#42663)
David Wrighton [Fri, 2 Oct 2020 20:35:46 +0000 (13:35 -0700)]
Crossgen2 cross target testing (#42663)

Add cross compilation testing for crossgen2.

The goal here is to cover cross compilation for the framework libraries, with support for testing cross compilation behavior between across the large swath of possible cross target possibilities.

This testing is added to the crossgen2 outerloop and is based on the work that @echesakovMSFT built for crossgen1 for cross target support for Linux X64 to Linux Arm. (The testing model has been tweaked to allow for general purpose cross target testing.)

Important details.

There is now a cross targeting build job, which builds (on either X64 Windows or X64 Linux) the framework dlls for a given target architecture, and captures their SHA1 hashes.

Then there is a comparison job which will run crossgen2 on an arbitrary set of platforms targetting a specific OS/Architecture pair.

The current state is that is known that the x86 compiler does not quite produce identical output when varied between 64 and 32 bit, there are significant issues compiling arm32 code, and arm64 code is nearly perfect with cross compilation.

3 years agoUpdate THIRD-PARTY-NOTICES file (#41851)
Nikola Milosavljevic [Fri, 2 Oct 2020 19:44:03 +0000 (12:44 -0700)]
Update THIRD-PARTY-NOTICES file (#41851)

* Introduce THIRD-PARTY-NOTICES file for deployment with shared host package

* Update of THIRD-PARTY-NOTICES for .NET 5.0 release

* Update src/installer/pkg/THIRD-PARTY-NOTICES.TXT

Co-authored-by: Adeel Mujahid <adeelbm@outlook.com>
* Update libunwind name in root TPN file to prevent regression in future updates

* Update libunwind license

* Updates based on review comments

Co-authored-by: Adeel Mujahid <adeelbm@outlook.com>
3 years agoFixes dotnet/runtime issue #12446 ILDASM - constants printed with the wrong endian...
Brian Sullivan [Fri, 2 Oct 2020 19:13:01 +0000 (12:13 -0700)]
Fixes dotnet/runtime issue #12446  ILDASM - constants printed with the wrong endian (#42848)

When the Disassembler prints 4-byte and 8-byte values it should print them in little endian format

3 years agoMoves ConfigurationRootTest to common (#42788)
Maryam Ariyan [Fri, 2 Oct 2020 18:47:28 +0000 (11:47 -0700)]
Moves ConfigurationRootTest to common (#42788)

- used by two test projects

3 years ago[metadata] Getting the element size of array of fnptr types is ok (#42920)
Aleksey Kliger (λgeek) [Fri, 2 Oct 2020 18:42:36 +0000 (14:42 -0400)]
[metadata] Getting the element size of array of fnptr types is ok (#42920)

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

3 years agoCleanly split BinDir to RuntimeBinDir and TestBinDir (#42829)
Tomáš Rylek [Fri, 2 Oct 2020 16:46:04 +0000 (18:46 +0200)]
Cleanly split BinDir to RuntimeBinDir and TestBinDir (#42829)

3 years agoAdd a few useful links, and move doc as requested (#42965)
Jo Shields [Fri, 2 Oct 2020 14:14:12 +0000 (10:14 -0400)]
Add a few useful links, and move doc as requested (#42965)

3 years agoUse constants instead of instance call for http handlers predefined values (#42941)
Marek Safar [Fri, 2 Oct 2020 13:55:02 +0000 (15:55 +0200)]
Use constants instead of instance call for http handlers predefined values (#42941)

3 years agoAdd `Crossgen2JitPath` to R2R test. (#42939)
Sergey Andreenko [Fri, 2 Oct 2020 09:09:28 +0000 (02:09 -0700)]
Add `Crossgen2JitPath` to R2R test. (#42939)

3 years agoAddress JSON test failures on Mono + Windows (#42960)
Layomi Akinrinade [Fri, 2 Oct 2020 03:58:42 +0000 (23:58 -0400)]
Address JSON test failures on Mono + Windows (#42960)

3 years agoAdd single-file app's dir to NATIVE_DLL_SEARCH_DIRECTORIES (#42876)
Mateo Torres-Ruiz [Fri, 2 Oct 2020 00:44:36 +0000 (17:44 -0700)]
Add single-file app's dir to NATIVE_DLL_SEARCH_DIRECTORIES (#42876)

Add two directories to NATIVE_DLL_SEARCH_DIRECTORIES to single-file bundles:

1. The bundle exe directory
2. If the bundle extracts any files, the extraction directory

Fixes #42772

3 years agoDisabled GC.TotalBytesAllocated test. (#42921)
Nathan Ricci [Thu, 1 Oct 2020 21:55:29 +0000 (17:55 -0400)]
Disabled GC.TotalBytesAllocated test. (#42921)

3 years ago[wasm][crypto] RandomNumberGenerator mapped to Web Crypto getRandomValues (#42728)
Kenneth Pouncey [Thu, 1 Oct 2020 21:44:56 +0000 (23:44 +0200)]
[wasm][crypto] RandomNumberGenerator mapped to Web Crypto getRandomValues (#42728)

* [wasm][crypto] RandomNumberGenerator mapped to Web Crypto getRandomValues

- Uses Web Crypto API [`getRandomValues`](https://www.w3.org/TR/WebCryptoAPI/#Crypto-method-getRandomValues) if available.
- Falls back to `/dev/urandom` as default if the crypto library is missing.

* Remove the emscripten interface code from the driver.c.

* remove extraneous code comment

* Move emscripten definition around.

* Address review comment

* Add javascript bridge implementation library to Native source tree.

- Javascript checks for crypto interface and uses `crypto.getRandomValues`
- Add api bridge call when building for emscripten browser.
- separate out into browser subdirectory
- If we couldn't find a proper implementation, as Math.random() is not suitable we will abort.

```

ABORT: no cryptographic support found getRandomValues. Consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: function(array) { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };

```

* Change tests to set random values of the buffer instead of return a single value.

* Remove old test code

* Remove testing code

* Incorporate the PAL bridge layer into the `--js-library` build process

* Address review comments about directory structure and naming

* Update src/mono/wasm/runtime-test.js

Co-authored-by: Ryan Lucia <ryan@luciaonline.net>
* Add note about insecure code for testing purposes

* Formatting

* Return -1 if crypto does not exist instead of aborting from js.  This allows the managed code exception flow to continue as normal.

Co-authored-by: Ryan Lucia <ryan@luciaonline.net>
3 years agoAdd server core testing (#41701)
Santiago Fernandez Madero [Thu, 1 Oct 2020 21:35:25 +0000 (16:35 -0500)]
Add server core testing (#41701)

* Add server core testing to Windows x64

* Add server core testing

* Use 20h1 queue instead

* Remove runtime testing until we get more capacity on 20H1 queue

* Use 2004 image

* Skip tests on Server core

* PR Feedback and fix build

* Disable more server core tests

* Disable more tests on Server Core

* Attempt fixing failing process test in server core

address feedback

* Fix PlatformDetection.IsInContainer for windows and feedback from Eirik's change

* PR Feedback

* Don't run server core on PRs yet until we get more capacity

Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
3 years agoSome style clean-up in HttpClient.cs (#42956)
Stephen Toub [Thu, 1 Oct 2020 19:30:32 +0000 (15:30 -0400)]
Some style clean-up in HttpClient.cs (#42956)

3 years agoFix race condition in GetAppdomainStaticAddress test (#42437)
David Mason [Thu, 1 Oct 2020 19:06:14 +0000 (12:06 -0700)]
Fix race condition in GetAppdomainStaticAddress test (#42437)

3 years agoAdd log for ILLinkSharedFramework target running in libraries build (#42910)
Layomi Akinrinade [Thu, 1 Oct 2020 18:38:46 +0000 (14:38 -0400)]
Add log for ILLinkSharedFramework target running in libraries build (#42910)

* Add log for ILLinkSharedFramework target running in libraries build

* Address feedback -express that the operation is ongoing

Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
3 years agoCreate a SuperPMI collection pipeline (#42053)
Bruce Forstall [Thu, 1 Oct 2020 18:19:11 +0000 (11:19 -0700)]
Create a SuperPMI collection pipeline (#42053)

* Create a SuperPMI collection pipeline

Start with a clone of jitstress.yml, and go from there.

* Only build Windows_NT_x64, disable test builds and runs

* TEMPORARY: disable normal PR triggered jobs

* some template files for superpmi

* Little trial error# 1

* fix the superpmi-setup.ps1

* Disable CoreClrTestBuildHost, fix the project path in superpmi-send-to-helix

* Skip build, download, create core_root

* Just copy superpmi scripts, import pipeline-logging-functions

* add a dummy step

* add missing space before message

* Replace message with script

* Temporarily disable dependsOn

* disable another dependsOn

* Pass superpmi.proj file

* logging around send-to-helix

* fix superpmi.proj to include ItemGroup

* have placeholder.txt in WorkItem folder

* fix workitem folder creation, script name

* Re-enable build coreclr, libraries, download, core_root

* fix superpmi.py path

* clone jitutils, build and copy pmi.dll

* Pass Core_Root as payload

* Use hardcoded checked

* Use .dotnet from runtime repo
- Build jitutils before and send the payload to helix

* Fix the pmi.dll location and add  -output_mch_path

* fix the output path

* Try publishing SourcesDirectory

* Upload to HELIX_WORKITEM_UPLOAD_ROOT

* Include test in collection and partition core_root and test

* Enable CoreClrTestBuildHost

* Add dependsOn P1 test

* Add DownloadFilesFromResults

* Properly copy the Tests

* Workaround for https://github.com/dotnet/arcade/pull/6179

* Disable test run, SuperPMI just system.web.dll

* Fix the mch path

* Comment partition for test

* Remove commented code

* Increase timeout to 12 hours

* fast pass

- Comment build coreclr/libraries job
- Instead just download coreclr from some previous run, and tell that it is core_root

* Update the machine pool

* Add a dummy step

* Use SuperPMI_Min.zip that contains all the required files

* Another way of Extracting cab

* download in powershell, extract files separately

* fix the zip path

* Another logic of download zip

* fix path

* fix newdir path

* more fixes

* fix extract step

* add test python script and modify creator

* Map secret to env

* decrease timeout, fix superpmi path in proj, print unzipped contents

* Add a step to download and dir artifacts

* Attempt to call super_pmi upload

* list all contents

* Also dir SourcesDir\artifacts

* Use DownloadPipelineArtifact

* Use the right key

* Upload from helixresults

* cleanup run-superpmi-job.yml

* Re-enable superpmi for CORE_ROOT

* fix the dependsOn

* Replace checked with $(BuildConfig)

* Replace checked with $(BuildConfig)
Comment download artifacts

* change helix queue for windows and add for arm64

* Use FileSeparateChar in superpmi.proj

* Add Linux x64

* Fix the helix queue, property erroro

* logging in shell

* Fix PayloadDir and CorrelationPayloadDir

* Make timeout to 5 hours

* Print workitem contents

* fix WorkItemDirectory

* Just copy pmi.dll

* fix the pmi_assemblies path

* disable reporter

* pop put JitUtilsDirectory before deleting it

* chmod for superpmi-setup.sh

* just copy pmi.dll for unix

* fix the parameter to unix

* Add logging to understand -pmi_assemblies issue

* Add "binaries" folder where payload is present
fix unit script that initializes array

* remove precommand

* Pass Core_Root as CorrelationPayload

- Pass Core_Root as CorrelationPayload
- Pass tag to name .mch file with
- Changes to .ps1 and .sh to copy Core_Root directly

* Add back the workaround for https://github.com/dotnet/arcade/pull/6179

Also, rename 'checked' -> 'Checked'

* fix checked for Linux

* mkdir for linux

* fix path in HelixResultsDestinationDir

* Enable Windows x86/arm64

* fix the python path

* First version of superpmi-setup.py

* Attempt to use superpmi-setup.py

* Fix spelling of LibrariesArtifacts, set python path

* TestArtifacts commented

* superpmi-setup script for linux

* Enable Linux_x64

* Added pydocs

* Add option for exclude_directories

* Moved all the logic to superpmi-setup.py

* Replace superpmi-setup.ps1 and superpmi-setup.sh with superpmi-setup.py

* Fix up in superpmi-setup.py

* fix display name

* add missing spacE

* Use differnet conditional

* ignore PermissionError while cleaning up temp folder

* fix workitem copy for linux

* fix copy for unix

* Publish logs

* Print LibrariesArtifacts

* remove space in front of publish logs desc

* Add missing quotes for LibrariesArtifacts

* Download x64 coreclr to make upload work

* Enable Windows x86/arm64, Linux arm/arm64

* Delete superpmi-setup.ps1, superpmi-setup.sh

* Fix space around LibrariesArtifacts

* Download real coreclr x64

* ignore native dlls

* Make superpmi.py Python3.6 friendly

* Minor cleanup

* Cleanup superpmi-send-to-helix to use helix-inner-step

* Remove redundant steps

* Merge mch files

* Pass osGroup

* Make superpmi-setup script takes tests_directory

* Enable SPMI collection for P1

* General cleanup

* fix merge_mch pattern for OS

* Log the SPMI collection output and put it in upload_root folder

* Replace robocopy/rsync with shutil.copy2

Note that shutil.copy2 is very slow specially on Linux as compared to rsync.
But I think we are ok to have slowness in return of simpler code.

* fix path of pmi.dll to be copied

* Include linux .so and file_exe files in copy_directories

* Try publishing just .mch file

* Revert "Try publishing just .mch file"

This reverts commit a5312c05f9502c7c2f2c5a28125f75f8d824b869.

* Disable tests SPMI collection on 42053

- Tests run times out on Windows
- Some of the partition's collection failed for tests because reply was not clean
- Here are the details when libraries/tests were run:
  https://dev.azure.com/dnceng/internal/_build/results?buildId=832814&view=results
- Hence, disable tests run and just have libraries run for now.
- I didn't remove the test run part but commented the portion of tests collection with
  TODO intentionally so when I have to enable it, I will know what to enable.

* Review feedback

Co-authored-by: Kunal Pathak <Kunal.Pathak@microsoft.com>
3 years agoUse same code to DetectCiphersuiteConfiguration for portable and non-portable builds
Tom Deseyn [Thu, 1 Oct 2020 16:31:40 +0000 (18:31 +0200)]
Use same code to DetectCiphersuiteConfiguration for portable and non-portable builds

3 years agoUpdate cross-platform-cryptography.md for CFB mode.
Kevin Jones [Thu, 1 Oct 2020 14:58:25 +0000 (10:58 -0400)]
Update cross-platform-cryptography.md for CFB mode.

3 years agoAdd Environment.ProcessPath (#42768)
Jan Kotas [Thu, 1 Oct 2020 14:21:30 +0000 (07:21 -0700)]
Add Environment.ProcessPath (#42768)

Fixes #40862

Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Ryan Lucia <ryan@luciaonline.net>
3 years agoFix HttpClient.CancelAllPending/Timeout handling for GetString/ByteArrayAsync (#42346)
Stephen Toub [Thu, 1 Oct 2020 11:45:12 +0000 (07:45 -0400)]
Fix HttpClient.CancelAllPending/Timeout handling for GetString/ByteArrayAsync (#42346)

* Fix HttpClient.CancelAllPending/Timeout handling for GetString/ByteArrayAsync

When GetStringAsync and GetByteArrayAsync are reading the response body, they're only paying attention to the provided CancellationToken; they're not paying attention to the HttpClient's CancelAllPending or Timeout.

* Address PR feedback

3 years agoAdd test to validate HttpResponseMessage.RequestMessage (#42844)
Stephen Toub [Thu, 1 Oct 2020 10:42:58 +0000 (06:42 -0400)]
Add test to validate HttpResponseMessage.RequestMessage (#42844)

3 years ago[System.Private.CoreLib] Methods with no instance access can be made static (#42805)
Marek Safar [Thu, 1 Oct 2020 09:55:57 +0000 (11:55 +0200)]
[System.Private.CoreLib] Methods with no instance access can be made static (#42805)

3 years agomake CancelConnectAsync thread safe (#42935)
Tomas Weinfurt [Thu, 1 Oct 2020 05:57:04 +0000 (22:57 -0700)]
make CancelConnectAsync thread safe (#42935)

* make CancelConnectAsync thread safe

* replace var with MultipleConnectAsync

3 years agoFix build errors on GCC. (#42834)
hev [Thu, 1 Oct 2020 05:28:58 +0000 (13:28 +0800)]
Fix build errors on GCC. (#42834)

* Fix build errors on GCC.

* Enable PGO on Clang.

* Fix build errors on GCC 10 and later.

3 years agoAdd an option to keep native debug symbols (#39203)
Omair Majid [Thu, 1 Oct 2020 05:28:11 +0000 (01:28 -0400)]
Add an option to keep native debug symbols (#39203)

When packaging .NET for Linux distributions, the package builders
generally use a different workflow for shipping symbols to users:

1. The package maintainer builds code with the debug flags (such as
   `-g`) to generate full native debug info and symbols.

2. Nothing is stripped from build by the package maintainer.

3. The build system (`rpmbuild`, `debuild`) removes the debug
   info (or debug symbols) from the code and creates separate
   `-debuginfo` or `-debug` packages that contain just the debug
   symbols.

4. These debug packages are then distributed along with the normal
   packages using the normal Linux distribution mechanisms. This lets
   users install the exact set of debug symbols matching their other
   package.

To support this workflow in dotnet/runtime, we need to add optional
support for not stripping debug symbols. I used it has follows:

    CFLAGS=-g CXXFLAGS=-g ./build.sh --keepnativesymbols true

After this build, the built binaries include all debug symbols.

I can then rely on the distro package build system to identify, strip,
package and ship the debug info/symbols separately.

See https://github.com/dotnet/runtime/issues/3781 and
https://github.com/dotnet/source-build/issues/267 for more details on
the background and motivation.

For some related fixes, see:

- https://github.com/dotnet/coreclr/pull/3445
- https://github.com/dotnet/corefx/pull/24979

3 years ago[mono] Fix HelloWorld sample for OSX (#42916)
Aleksey Kliger (λgeek) [Thu, 1 Oct 2020 02:35:45 +0000 (22:35 -0400)]
[mono] Fix HelloWorld sample for OSX (#42916)

OSX `uname` doesn't have a `-o`

3 years agoJit preparation for arm64 apple: Use bytes in `fgArgTabEntry`. (#42503)
Sergey Andreenko [Thu, 1 Oct 2020 02:19:11 +0000 (19:19 -0700)]
Jit preparation for arm64 apple: Use bytes in `fgArgTabEntry`. (#42503)

* fix a dumping error introduced in my recent ref PR.

* add a pinvoke test with many small stack arguments.

It will fail on arm64 apple.

* Add get/set for lclVar::lvStkOffs.

* Change some types from `size_t` to `unsigned` when working with stack offsets.

* Rename `stackSize` to `GetStackSize`.

* Do not run stack level setter for arm64 apple.

* Use bytes in `fgArgTabEntry`.

* fix comments/rename vars.

* Add en explanation about `GetStackSlotsNumber`.

* Rename `DEBUG_NOT_OSX_ARM64` to `DEBUG_ARG_SLOTS`.

3 years ago[metadata] Use MONO_PROFILER_API on MonoClass getters in checked builds (#42819)
monojenkins [Thu, 1 Oct 2020 02:07:49 +0000 (22:07 -0400)]
[metadata] Use MONO_PROFILER_API on MonoClass getters in checked builds (#42819)

In normal builds, the getters are `static inline` functions, so the profiler doesn't reference the symbols - it just accesses the fields by offset.

In checked builds with `--enable-checked-build=private_types`, the getters are not inlined, so the profiler shared libraries need the symbols to be visible.

Co-authored-by: lambdageek <lambdageek@users.noreply.github.com>
3 years agoFix error in code comment (#42931)
Andrew Arnott [Thu, 1 Oct 2020 01:55:28 +0000 (19:55 -0600)]
Fix error in code comment (#42931)

The error led to the comment expressing the opposite of its otherwise obvious intent.

3 years agoUpdate DataContractSerialization ILLink.Suppressions.xml (#42930)
Eric Erhardt [Thu, 1 Oct 2020 01:49:09 +0000 (20:49 -0500)]
Update DataContractSerialization ILLink.Suppressions.xml (#42930)

Changes #40691 and #42824 conflicted. One added a new ILLink suppress warnings file, while the other added more warnings. This causes the build to break.

The fix is to regenerate the suppressions file with the latest code.

Fix #42926

3 years agoFix nullable annotation on ISite.Container (#42918)
Stephen Toub [Thu, 1 Oct 2020 00:58:04 +0000 (20:58 -0400)]
Fix nullable annotation on ISite.Container (#42918)

3 years agoExtract bundled files when IncludeAllContentForSelfExtract is set (#42435)
Mateo Torres-Ruiz [Wed, 30 Sep 2020 23:54:10 +0000 (16:54 -0700)]
Extract bundled files when IncludeAllContentForSelfExtract is set (#42435)

* Extract bundled files when IncludeAllContentForSelfExtract is set

* Don't pass bundle probe to the runtime for netcoreapp3 compat mode

* Bundle probe should not report extracted files

This also means we can still pass bundle probe to the runtime even in full-extract case as all files will be marked as extracted in that situation (so the probe should return false all the time).
This might be benefitial as the runtime will still "know" it's single-file (we don't really use that knowledge today though).

Improve the test to actually validate locally built binaries and add validation of TPA and framework assembly loading.

* CodeBaseThrows should fail

* Normalize app base path

* Search for CoreLib in TPA

* PR feedback

* Fix bundle tests to actually test single-file bundles

The tests were basically running everything using apphost.exe - the reason the tests worked is basically a weird coincidence (the bundle was always self-contained so it had everything managed in it and all the native dlls were beside the .exe) - so from host's point of view this looked like a self-contained app - and then hostpolicy/hostfxr noticed it's also a bundle and treated it as such.

This change introduces new test baseclass to reduce duplication and standardizes the tests to mostly use self-contained publish then bundled with singlefilehost.exe. Currently they do leave hostpolicy.dll and hostfxr.dll next to the exe (they're written in .deps.json so they must exist on disk) but at runtime they won't be used since the singlefilehost.exe has them bundled in itself.

* Don't use Microsoft.NETCore.App.Internal package

From 3.0+, Microsoft.NETCore.App just chains in the appropriate runtime
packs. The .Internal package was necessary for tests to use when we were
building with a older SDK, but targeting 3.0+. We should be able to get
rid of the workaround now.

This actually causes problems with the full extraction single-file mode
because pre-5.0 and in the .Internal package, System.Private.CoreLib.dll
was not listed as a runtime assembly (only under native). As a result,
it would not end up in the TPA for a single-file bundle.

* AppWithSubDirs: add back RuntimeIdentifier, don't use .Internal package

The test assets are all restored - passing in TestTargetRid - before
the test runs. Since we do a rid-specific publish later, it needs to
be restored with the approriate rid.

Stop using .Internal package. This resulted in host binaries getting
published even for framework-dependent publishes.

* Rework the single-file API tests for better coverage

The tests now validate behavior of all of the interesting APIs in both single-file and backcompat mode.
Added the AppContext.BaseDirectory to the tests.

* Fix the reported path to .deps.json for back compat mode

The path must point to the extraction folder and not use the "fake" in-bundle path.

* Fix a test bug on Linux

Actually we should be using path separator char in the APP_CONTEXT_DEPS_FILES, but that's something we won't be able to change really (too much chance of breaking something without too much value).

Co-authored-by: vitek-karas <vitek.karas@microsoft.com>
Co-authored-by: Elinor Fung <elfung@microsoft.com>
3 years agoJIT: show profile data for dot flowgraph dumps (#42657)
Andy Ayers [Wed, 30 Sep 2020 23:16:45 +0000 (16:16 -0700)]
JIT: show profile data for dot flowgraph dumps (#42657)

Also, tweak layout a bit, and update so that if a method is jitted
multiple times the files don't overwrite one another. Instead a
suffix is added to indicate the kind of jit codegen.

3 years agodo not call RemoteCertificateValidationCallback on the same certificate again (#42836)
Tomas Weinfurt [Wed, 30 Sep 2020 22:37:23 +0000 (15:37 -0700)]
do not call RemoteCertificateValidationCallback on the same certificate again (#42836)

* do not call RemoteCertificateValidationCallback on the same certificate agin

* feedback from review

* feedback from review

* make sure we do not use Linq

3 years agoDataContractSerialization doesn't work with TrimMode - link (#42824)
Eric Erhardt [Wed, 30 Sep 2020 20:29:12 +0000 (15:29 -0500)]
DataContractSerialization doesn't work with TrimMode - link (#42824)

DataContractSerialization has some Reflection "shim" methods that the ILLinker can't see through. This causes critical methods to be trimmed and applications to fail. These methods were put in place in .NET Core 1.0 when the full Reflection API wasn't available.

The fix is to remove these "shim" Reflection APIs and use Reflection directly.

Fix #41525
Fix #42754

3 years agoTest fixes for casing (#42879)
Lakshan Fernando [Wed, 30 Sep 2020 19:24:35 +0000 (12:24 -0700)]
Test fixes for casing (#42879)

Fixed #42334

3 years agoSuppress linker analysis warnings on GetImmutableDictionaryCreateRangeMethod (#42905)
Layomi Akinrinade [Wed, 30 Sep 2020 17:46:24 +0000 (13:46 -0400)]
Suppress linker analysis warnings on GetImmutableDictionaryCreateRangeMethod (#42905)

3 years agoFix xml doc comment for SimpleConsoleFormatterOptions.SingleLine (#42896)
Alexander Köplinger [Wed, 30 Sep 2020 17:07:08 +0000 (19:07 +0200)]
Fix xml doc comment for SimpleConsoleFormatterOptions.SingleLine (#42896)

Setting it to `true` forces the single line, not `false` :)

3 years agoOptimize Type.IsPrimitive (#42891)
Egor Bogatov [Wed, 30 Sep 2020 15:09:46 +0000 (18:09 +0300)]
Optimize Type.IsPrimitive (#42891)

3 years agoFix test framework crossgening (#42874)
Jan Vorlicek [Wed, 30 Sep 2020 14:36:25 +0000 (16:36 +0200)]
Fix test framework crossgening (#42874)

The recent change that replaced direct invocation of crossgen and
crossgen2 for crossgening framework assemblies for coreclr tests by
r2rtest tool usage has ommited the --release and --large-bubble
arguments. These correspond to the former -O and --inputbubble crossgen2
commands and should be present.

This also fixes failures in running tests with the crossgened runtime.
Many tests were failing with the error `Could not execute the method
because either the method itself or the containing type is not fully
instantiated.`

So while there is a problem to investigate related to debug flavor of
crossgening, this PR fixes the options.

3 years agoAdd granular suppressions for linker warnings (#40691)
Layomi Akinrinade [Wed, 30 Sep 2020 14:06:25 +0000 (10:06 -0400)]
Add granular suppressions for linker warnings (#40691)

* Add granular suppressions for linker warnings

* Add suppressions for mono SPC

* Misc additions

* Add suppressions for Debug config

* Fix Android xml file

* Include System.ComponentModel.Annotations suppressions

* Add suppressions for System.Security.Cryptography.X509Certificates on Linux

* Fix TargetOs exists check

* Add IL2077 to System.Security.Cryptography.X509Certificates on Android

* Generalize some System.Security.Cryptography.X509Certificates suppressions to 'NonWindows'

* Remove ref to catch-all System.Security.Cryptography.X509Certificates file

* Misc clean up and some feedback

* Use ILLinkDirectory in CreateRuntimeRootILLinkDescriptorFile.targets

* Update paths for directories

* Set TargetPath as part of include

* Delete bin-placing TODO

* Include more xml files during per-library run

* Include more xml files during per-library run, pt 2

* Include more xml files during per-library run, pt 3

* Try including System.ComponentModel.Annotations based on BuildingNETCoreAppVertical

* Switch to BuildAllConfigurations

* Include xml extension in file paths

* Remove version number from assembly suppression files

* Delete ILLink.Suppressions.xml

* Try removing IL2035 nowarn

* Remove version from Microsoft.VisualBasic.Core assemly name

3 years agoFlow rid in yml jobs (#37652)
Viktor Hofer [Wed, 30 Sep 2020 12:21:53 +0000 (14:21 +0200)]
Flow rid in yml jobs (#37652)

3 years ago[mono] Retarget HelloWorld sample to in-tree runtime pack (it used to use ".dotnet...
Egor Bogatov [Wed, 30 Sep 2020 10:53:40 +0000 (13:53 +0300)]
[mono] Retarget HelloWorld sample to in-tree runtime pack (it used to use ".dotnet-mono" hack) (#42851)

3 years agofix android sample (#42859)
Egor Bogatov [Wed, 30 Sep 2020 09:44:55 +0000 (12:44 +0300)]
fix android sample (#42859)

3 years agomake sure we process PhysicalAddress on Linux (#42878)
Tomas Weinfurt [Wed, 30 Sep 2020 04:55:37 +0000 (21:55 -0700)]
make sure we process PhysicalAddress on Linux (#42878)

3 years agoFix InvalidCastException when deserializing some dictionary types (#42835)
Layomi Akinrinade [Wed, 30 Sep 2020 03:42:36 +0000 (23:42 -0400)]
Fix InvalidCastException when deserializing some dictionary types (#42835)

3 years ago[RyuJIT] Add "rorx" instruction (BMI2) and emit it instead of "rol" when possible...
Egor Bogatov [Tue, 29 Sep 2020 23:35:44 +0000 (02:35 +0300)]
[RyuJIT] Add "rorx" instruction (BMI2) and emit it instead of "rol" when possible (#41772)

* Use rorx instead of rol when possible

3 years agoCheck for null in OptionsFactory (#41047)
Taylor Southwick [Tue, 29 Sep 2020 20:59:26 +0000 (13:59 -0700)]
Check for null in OptionsFactory (#41047)

If an IValidateOptions<TOptions> returns null, then an error occurs that can be difficult to track down. This change checks for null before checking if it failed.

3 years agoAdd additional ALC assertions and test (#42765)
Ryan Lucia [Tue, 29 Sep 2020 20:27:01 +0000 (16:27 -0400)]
Add additional ALC assertions and test (#42765)

3 years agoAdd Wasm testing in Chromium, not just command-line `v8` (#40786)
Jo Shields [Tue, 29 Sep 2020 19:34:39 +0000 (15:34 -0400)]
Add Wasm testing in Chromium, not just command-line `v8` (#40786)

This should give us a better idea of any cases where browser and JS engine behaviour diverge.

* Uses WebSockets to write pipe console messages to the test runner.

* Skip System.Net.Http FunctionalTests depending on X509 certificates, tests discovery fails on `System.Net.Http.Functional.Tests.HttpClientEKUTest..cctor()` which ends up throwing PNSE

* Added environment variable to help platform detect when we're running in the browser vs v8

* System.Net.Http LoopbackServer: fix NullReferenceException because we were trying to dispose a Socket instance that threw PNSE in the constructor

Co-authored-by: Ankit Jain <radical@gmail.com>
Co-authored-by: Steve Pfister <steve.pfister@microsoft.com>
Co-authored-by: Larry Ewing <lewing@microsoft.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
3 years agoFix DefaultContext test on wasm (#42764)
Ryan Lucia [Tue, 29 Sep 2020 19:27:15 +0000 (15:27 -0400)]
Fix DefaultContext test on wasm (#42764)

3 years ago[runtime] sync parameter name in tramp-s390x.c (#42804)
monojenkins [Tue, 29 Sep 2020 18:29:09 +0000 (14:29 -0400)]
[runtime] sync parameter name in tramp-s390x.c (#42804)

s390x uses 'method' as parameter name in mono_arch_get_unbox_trampoline()
in mono/mini/tramp-s390x.c, rename to 'm' to be in sync with other arches.

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

Co-authored-by: sharkcz <sharkcz@users.noreply.github.com>
3 years ago[browser][http] Set HttpResponseMessage.RequestMessage (#42822)
campersau [Tue, 29 Sep 2020 18:00:40 +0000 (20:00 +0200)]
[browser][http] Set HttpResponseMessage.RequestMessage (#42822)

3 years ago[Android] Make AndroidAppBuilder "dotnet build" friendly (#42597)
Egor Bogatov [Tue, 29 Sep 2020 16:00:16 +0000 (19:00 +0300)]
[Android] Make AndroidAppBuilder "dotnet build" friendly (#42597)

3 years agoReplace VerifyWithRevocation test with DynamicRevocationTests
Kevin Jones [Tue, 29 Sep 2020 15:35:03 +0000 (11:35 -0400)]
Replace VerifyWithRevocation test with DynamicRevocationTests

* Test offline revocation checking as a DynamicRevocationTest, shutting down the responder between the cache populate and the offline build.

* Remove flaky VerifyWithRevocation test, as it no longer provides unique value.

3 years agoEnable Unsafe.As NotNullIfNotNull on .NET Std. 2.0 (#42827)
Sergio Pedri [Tue, 29 Sep 2020 14:33:31 +0000 (16:33 +0200)]
Enable Unsafe.As NotNullIfNotNull on .NET Std. 2.0 (#42827)

3 years agoPhysically remove the folder src/coreclr/tests (#42828)
Tomáš Rylek [Tue, 29 Sep 2020 13:57:45 +0000 (15:57 +0200)]
Physically remove the folder src/coreclr/tests (#42828)

This change removes the last few files from src/coreclr/tests
under src/tests and finally depletes the folder. One change of note
is rename of src/coreclr/tests/runtest.py to src/tests/run.py
in accordance with the previous renames.

I have put the runparallel.sh script to src/tests as it seems
to have general usability, I moved the rest of the scripts to
src/tests/Common/scripts. I haven't actually tried to make it
work. I managed to catch one reference from arm32_ci_script /
arm_ci_test.sh to bringup_runtest.sh that I fixed but again
without actually testing them.

I am not too familiar with these scripts, I haven't found
references to them anywhere in the infra, some of them seem
related to the JIT team, adding Bruce to the PR to confirm.
I have no idea whether they are used at all, any insights into
what obsolete scripts we can get rid of is more than welcome.

Thanks

Tomas

3 years agoMake ContentType(string) constructor throw FormatException instead of IndexOutOfRange...
Avani Gupta [Tue, 29 Sep 2020 11:30:55 +0000 (04:30 -0700)]
Make ContentType(string) constructor throw FormatException instead of IndexOutOfRangeException (#39529)

3 years agoFix bad configure tests (#42756)
Jan Vorlicek [Tue, 29 Sep 2020 10:31:44 +0000 (12:31 +0200)]
Fix bad configure tests (#42756)

There was an extra -c in the CMAKE_REQUIRED_FLAGS set for testing
HAVE_UNW_GET_ACCESSORS and HAVE_UNW_GET_SAVE_LOC that was breaking
build of coreclr under homebrew. The option was somehow making
these checks behave on ARM Linux, eveb though it is not clear to
me why, as it was just causing this option to be passed to the
compiler twice at different positions of the command line of
the cmake tests.
This change fixes it by using check_symbol_exists instead of
check_c_source_compiles, since just removing the duplicite -c
was resulting in the check failing on ARM / ARM64 Linux due
to a missing symbol from libunwind during linking.

3 years agoRename references of protononjit to clrjit_ (#42133)
Kunal Pathak [Tue, 29 Sep 2020 06:49:06 +0000 (23:49 -0700)]
Rename references of protononjit to clrjit_ (#42133)

* wip: rename protononjit

* Rename protononjit to clrjit_

* revert changes in run-pmi-diffs.py

* revert superpmi.py changes

* fix variable name

3 years ago[master] Update dependencies from Microsoft/vstest dotnet/runtime-assets dotnet/llvm...
dotnet-maestro[bot] [Tue, 29 Sep 2020 01:23:14 +0000 (01:23 +0000)]
[master] Update dependencies from Microsoft/vstest dotnet/runtime-assets dotnet/llvm-project dotnet/xharness dotnet/icu dotnet/arcade mono/linker (#42619)

[master] Update dependencies from Microsoft/vstest dotnet/runtime-assets dotnet/llvm-project dotnet/xharness dotnet/icu dotnet/arcade mono/linker