platform/upstream/dotnet/runtime.git
3 years agoArm32 Crossgen2 initial support (#43243)
David Wrighton [Thu, 15 Oct 2020 00:13:50 +0000 (17:13 -0700)]
Arm32 Crossgen2 initial support (#43243)

- Fix type layout bugs
  - Sequential or Explicit layout classes without explicit field offsets on arm32 should align their fields based on the start of the field list of the object
  - The field base offset used for R2R calculation on Arm32 should respect the RequiresAlign8 flag
  - Computing true for requiresAlign8 in auto field layout should set the alignment of a class to 8 during auto layout
  - if a class derives from an type which requires 8 byte alignment, set the derived to require higher alignment
- Align the EH info table on 4 byte boundaries
- Set the thumb bit on the arm32 personality routine RVA in XData
- Enable Crossgen2 smoke test for arm
- Adjust architecture specific type layout tests to match CoreCLR behavior
- Fix alignment of Export functions within PE file

3 years ago[.NET 5.0] Add support for libicu67 and several more higher versions (#43420)
Nikola Milosavljevic [Wed, 14 Oct 2020 23:40:36 +0000 (16:40 -0700)]
[.NET 5.0] Add support for libicu67 and several more higher versions (#43420)

* Add support for libicu67

* Add libicu68

* Adding libicu versions 69 to 72

3 years agoAdd TargetOS=Android back into the sample run. This caused TargetsMobile not to...
Steve Pfister [Wed, 14 Oct 2020 21:38:08 +0000 (17:38 -0400)]
Add TargetOS=Android back into the sample run.  This caused TargetsMobile not to be set (#43394)

Co-authored-by: Steve Pfister <steve.pfister@microsoft.com>
3 years agoImplemented clock_gettime_nsec_np in libraries for Apple Silicon support (#43343)
Jeremy Sinclair [Wed, 14 Oct 2020 21:22:37 +0000 (17:22 -0400)]
Implemented clock_gettime_nsec_np in libraries for Apple Silicon support (#43343)

* Replaced mach_absolute_time instances with clock_gettime_nsec_np

* Removed GetTimestampResolution method and replaced with 10^9

3 years agoImprove ArrayBufferWriter re-alloc perf when size is > int.MaxSize / 2 (#42950)
Steve Harter [Wed, 14 Oct 2020 19:55:42 +0000 (14:55 -0500)]
Improve ArrayBufferWriter re-alloc perf when size is > int.MaxSize / 2 (#42950)

3 years agoDisable NamedPipeTests CurrentUserOnly on server core (#43381)
Santiago Fernandez Madero [Wed, 14 Oct 2020 19:43:15 +0000 (12:43 -0700)]
Disable NamedPipeTests CurrentUserOnly on server core (#43381)

3 years agoClean up CG2 section in issues.targets by removing closed issues (#43055)
Tomáš Rylek [Wed, 14 Oct 2020 19:32:29 +0000 (21:32 +0200)]
Clean up CG2 section in issues.targets by removing closed issues (#43055)

3 years agoadd better handling of SECBUFFER_EXTRA during TLS handshake on Windows (#42427)
Tomas Weinfurt [Wed, 14 Oct 2020 18:17:12 +0000 (11:17 -0700)]
add better handling of SECBUFFER_EXTRA during TLS handshake on Windows (#42427)

* add better handling of SECBUFFER_EXTRA during TLS handshake on Windows

* fix boundery check

* fix spelling

3 years agoAddress PR feedback from #42578 (#43362)
Eric Erhardt [Wed, 14 Oct 2020 15:51:08 +0000 (10:51 -0500)]
Address PR feedback from #42578 (#43362)

3 years agoValidate input string passed to LogValuesFormatter (#43238)
Eugene Shcherbo [Wed, 14 Oct 2020 15:26:04 +0000 (18:26 +0300)]
Validate input string passed to LogValuesFormatter (#43238)

Add validation of a format string passed to LogValuesFormatter
to throw `ArgumentNullException` if the string is `null`
so that all the methods of the `LogMessage.Define` group
depending on that class doesn't throw `NullReferenceException`
when configuring a logger.

Fix #36565

3 years agoAdd ReadOnlySpan<char> overloads to JsonSerializer.Deserialize (#41957)
Huo Yaoyuan [Wed, 14 Oct 2020 15:19:24 +0000 (23:19 +0800)]
Add ReadOnlySpan<char> overloads to JsonSerializer.Deserialize (#41957)

* Add char span overloads to JsonSerializer.Deserialize.

* Add new methods to ref source.

* Fix ambiguous call in test.

* Fix documentation issue.

* Guard and test for empty span.

* Add span in deserialization test wrapper.

* Apply doc suggestions

Co-authored-by: Layomi Akinrinade <layomia@gmail.com>
* Treat default span as empty, and cover returnType in test.

* Apply doc suggestions

Co-authored-by: Ahson Khan <ahkha@microsoft.com>
* Add exception doc for null returnType.

Co-authored-by: Layomi Akinrinade <layomia@gmail.com>
Co-authored-by: Ahson Khan <ahkha@microsoft.com>
3 years agoRemoved unnecessary WINHTTPHANDLER_DLL compiler constant. (#43393)
Marie Píchová [Wed, 14 Oct 2020 15:05:55 +0000 (17:05 +0200)]
Removed unnecessary WINHTTPHANDLER_DLL compiler constant. (#43393)

3 years agoOptimize the Linguistic String Search Operations (#43065)
Tarek Mahmoud Sayed [Wed, 14 Oct 2020 13:46:37 +0000 (06:46 -0700)]
Optimize the Linguistic String Search Operations (#43065)

3 years agoFix aot compiler execute_system on all HOST_WIN32. (#43358)
monojenkins [Wed, 14 Oct 2020 09:18:26 +0000 (05:18 -0400)]
Fix aot compiler execute_system on all HOST_WIN32. (#43358)

HAVE_SYSTEM is not defined on all HOST_WIN32 where building the AOT compiler makes sense (like cygwin). Make sure this works on all HOST_WIN32 independent of HAVE_SYSTEM.

Co-authored-by: lateralusX <lateralusX@users.noreply.github.com>
3 years agoAdd mprof-report.exe into msvc build. (#43220)
monojenkins [Wed, 14 Oct 2020 06:55:45 +0000 (02:55 -0400)]
Add mprof-report.exe into msvc build. (#43220)

Co-authored-by: lateralusX <lateralusX@users.noreply.github.com>
3 years agoReplace ReusableTextReader with shared ArrayPool (#43365)
Adeel Mujahid [Wed, 14 Oct 2020 04:24:02 +0000 (07:24 +0300)]
Replace ReusableTextReader with shared ArrayPool (#43365)

3 years agouse globalThis instead of varying global scope names (#43266)
Larry Ewing [Wed, 14 Oct 2020 04:10:55 +0000 (23:10 -0500)]
use globalThis instead of varying global scope names (#43266)

3 years agoAdd back the full config string for mono runs (#43309)
Drew Scoggins [Wed, 14 Oct 2020 00:49:04 +0000 (17:49 -0700)]
Add back the full config string for mono runs (#43309)

3 years agoFixes failures in the diagnostics MacOS createdump testing (#43364)
Mike McLaughlin [Tue, 13 Oct 2020 22:38:19 +0000 (15:38 -0700)]
Fixes failures in the diagnostics MacOS createdump testing  (#43364)

Fixes failures in the diagnostics MacOS createdump testing

The triage or heap MacOS coredumps generated with createdump can have the managed assembly
PE headers missing because they are artifically added to the module list but the header
may not end up in the coredump (except for full dumps).

The fix is to explicitly add the first page of the assemblies in ReplaceModuleMapping.
 ReadProcessMemory returns properly returns partial reads successfully

ReadProcessMemory casting changes

DataTarget::ReadVirtual tracing on error

Replace vm_read with ReadProcessMemory temp

Apply same fixes to PAL_ReadProcessMemory

Add check to native unwind to limit endless loop issue (https://github.com/dotnet/runtime/issues/42980)

3 years agoDelete a few rudiments (#43069)
Sergey Andreenko [Tue, 13 Oct 2020 21:26:04 +0000 (14:26 -0700)]
Delete a few rudiments (#43069)

* Delete `compRegSetCheckLevel`.

* Delete an old workaround for an old Jit.

3 years agoRemove MetadataLoadContext dependency from AndroidAppBuilder (#43339)
Steve Pfister [Tue, 13 Oct 2020 20:21:41 +0000 (16:21 -0400)]
Remove MetadataLoadContext dependency from AndroidAppBuilder (#43339)

This will allow AndroidAppBuilder to be packaged without having unnecessary dependencies.

3 years agoFix the android build. (#43369)
Zoltan Varga [Tue, 13 Oct 2020 19:43:43 +0000 (15:43 -0400)]
Fix the android build. (#43369)

3 years agoChange default FeedbackSize for TripleDES internal implementation
Kevin Jones [Tue, 13 Oct 2020 19:11:46 +0000 (15:11 -0400)]
Change default FeedbackSize for TripleDES internal implementation

In .NET Framework, TripleDESCryptoServiceProvider defaults to a feedback
size of 8, and TripleDESCng defaults to a feedback size of 64. The
static Create by default would return TripleDESCryptoServiceProvider,
thus the TripleDES from Create would have a default feedback size of 8.

This changes the default sizes of TripleDES to behave more
similarly to .NET Framework to make porting CFB code from Framework
easier.

The internal 3DES implementation (and thus
TripleDESCryptoServiceProvider, since that is a wrapper around the
internal implementation) now defaults to a feedback size of 8.
TripleDESCng and user-derived classes from TripleDES will continue to
use a feedback size of 64.

3 years agoAdd osx/arm64 build support. (#43354)
Zoltan Varga [Tue, 13 Oct 2020 18:42:36 +0000 (14:42 -0400)]
Add osx/arm64 build support. (#43354)

* Add osx/arm64 build support.

* Update src/mono/Directory.Build.props

Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
3 years agoFix PAL test threading/WaitForMultipleObjectsEx/test2 (#43356)
Jan Vorlicek [Tue, 13 Oct 2020 18:21:57 +0000 (20:21 +0200)]
Fix PAL test threading/WaitForMultipleObjectsEx/test2 (#43356)

This test was failing intermittently in the CI and I've been able
to reproduce the failure locally too in about 1 out of 2000 runs.
The problem was an incorrectly reverse subtraction in a condition
checking if the time after which a wait for interrupted by
APC matched the expected time with some tolerance.

3 years agoFix WinHttpHandler outerloop tests for deflate (#43305)
Stephen Toub [Tue, 13 Oct 2020 17:58:22 +0000 (13:58 -0400)]
Fix WinHttpHandler outerloop tests for deflate (#43305)

3 years ago[mono] Turn methods with no instance access to static (#43228)
Marek Safar [Tue, 13 Oct 2020 17:37:07 +0000 (19:37 +0200)]
[mono] Turn methods with no instance access to static (#43228)

* [mono] Turn methods with no instance access to static

* Review feedback

3 years agoFaster Dictionary clone (#41944)
Ben Adams [Tue, 13 Oct 2020 16:33:39 +0000 (17:33 +0100)]
Faster Dictionary clone (#41944)

3 years agoFix stack overflow in BsdIPGlobalProperties (#43294)
mafo23 [Tue, 13 Oct 2020 16:24:43 +0000 (03:24 +1100)]
Fix stack overflow in BsdIPGlobalProperties (#43294)

Both the GetTcpConnections and GetActiveUdpListeners functions were
using stackalloc on unbounded arrays. As the objects in these arrays
are quite large, removed the stackalloc so the arrays are always on
the heap.

Fix #43286

3 years agoUnsafe code replaced by ReadOnlyMemory<> equivalent (#43214)
Yoh Deadfall [Tue, 13 Oct 2020 15:55:23 +0000 (18:55 +0300)]
Unsafe code replaced by ReadOnlyMemory<> equivalent (#43214)

* Unsafe code replaced by ReadOnlyMemory<> equivalent

* Returned back Length property

* Replaced StringOrCharArray by ReadOnlyMemory and comparer

* Addressed review

3 years agoUse unbounded connected streams in System.Net.Security tests (#43327)
Stephen Toub [Tue, 13 Oct 2020 15:15:06 +0000 (11:15 -0400)]
Use unbounded connected streams in System.Net.Security tests (#43327)

Recently there's been a rash of sporadic timeouts/hangs in System.Net.Security tests.  I don't _think_ it's related to hitting the maximum buffer size in ConnectedStreams (e.g. if the test is written in a way that it assumes a write will always complete synchronously and won't proceed to read until it does), but I'm removing the bound to see if that helps.  We can put it back later if desired: it's not what the tests are validating, and previous to my ConnectedStream change there was no bound, either.

3 years agoAdditional fixes to Windows log profiler. (#43170)
monojenkins [Tue, 13 Oct 2020 14:46:45 +0000 (10:46 -0400)]
Additional fixes to Windows log profiler. (#43170)

* Disable popen/pclose.
* Disable reporting using |mprof-report on Windows due to limited piping support.
* Switch to inet_pton instead of deprecated inet_addr.
* Fix Windows socket server since FD is handle and can be bigger than FD_SETSIZE.

Co-authored-by: lateralusX <lateralusX@users.noreply.github.com>
3 years agoBuild armv7+armv7s for ios. (#43350)
Zoltan Varga [Tue, 13 Oct 2020 13:35:36 +0000 (09:35 -0400)]
Build armv7+armv7s for ios. (#43350)

3 years agoFix ArrayList.GetRange().GetRange().ToArray() (#43223)
Stephen Toub [Tue, 13 Oct 2020 13:18:30 +0000 (09:18 -0400)]
Fix ArrayList.GetRange().GetRange().ToArray() (#43223)

The range created by the second GetRange call has an empty _items array that should be ignored, but ToArray on it was trying to copy from that _items directly rather than going through the source's CopyTo method.

3 years agomake AsyncFlowControl implement IEquatable<AsyncFlowControl> (#43232)
hrrrrustic [Tue, 13 Oct 2020 13:00:34 +0000 (09:00 -0400)]
make AsyncFlowControl implement IEquatable<AsyncFlowControl> (#43232)

* make AsyncFlowControl implement IEquatable<AsyncFlowControl>, fixes #31996

* remove test

* remove extra space

3 years agoRemove EBS.Never from CipherMode.CFB. (#43310)
Kevin Jones [Tue, 13 Oct 2020 12:53:13 +0000 (08:53 -0400)]
Remove EBS.Never from CipherMode.CFB. (#43310)

This was removed from src/ but ref/ was not updated to match.

3 years agoAllow passing entrypoint assembly to Android test app (#43333)
Alexander Köplinger [Tue, 13 Oct 2020 12:33:36 +0000 (14:33 +0200)]
Allow passing entrypoint assembly to Android test app (#43333)

This allows packaging multiple assemblies with an entrypoint into the same app and select which one to run by passing an argument via adb/xharness.
Includes xharness bump for getting the expected exit code feature: https://github.com/dotnet/xharness/pull/331

3 years agoSimplify enabling profiler support for embedders. (#43173)
monojenkins [Tue, 13 Oct 2020 12:13:45 +0000 (08:13 -0400)]
Simplify enabling profiler support for embedders. (#43173)

Adding --profile argument to mono_jit_parse_options. Can be used when
embedding and not using parsing in driver.c.

Add env variable MONO_PROFILE adding another possibility to pass profiler
arguments to runtime.

Co-authored-by: lateralusX <lateralusX@users.noreply.github.com>
3 years agoFix parse error in mprof-report image load event. (#43217)
monojenkins [Tue, 13 Oct 2020 10:57:02 +0000 (06:57 -0400)]
Fix parse error in mprof-report image load event. (#43217)

Version 16 of log profiler data format added mvid to image load event and mprof-report was never aligned to handle that since it assumed all events for TYPE_IMAGE included mvid.

Fix makes sure to correctly read pass mvid only for event actually including the field.

Co-authored-by: lateralusX <lateralusX@users.noreply.github.com>
3 years agoAdd support for the cmake build to mono.proj. (#43317)
Zoltan Varga [Tue, 13 Oct 2020 10:19:32 +0000 (06:19 -0400)]
Add support for the cmake build to mono.proj. (#43317)

* Fix CMake symbol name for HAVE_GNU_LIB_NAMES_H

* Fix pthread function checks on linux.

* Add support for the cmake build to mono.proj.

* Enable the cmake build by default on wasm/osx/android.

Co-authored-by: Filip Navara <filip.navara@gmail.com>
3 years ago[master] Update dependencies from mono/linker (#43296)
dotnet-maestro[bot] [Tue, 13 Oct 2020 08:52:39 +0000 (08:52 +0000)]
[master] Update dependencies from mono/linker (#43296)

[master] Update dependencies from mono/linker

3 years agoParallelize card table copy/clear in minor GC. (#43167)
monojenkins [Tue, 13 Oct 2020 08:33:58 +0000 (04:33 -0400)]
Parallelize card table copy/clear in minor GC. (#43167)

Currently, when using overlapped card table, each minor GC will do a copy/clear of all marked cards into a temporary card table used during minor scan. In order to find marked cards, major heap blocks + LOS is scanned. This is currently done serial and could take significant time of total minor GC depending on platform/hardware.

On hardware with multiple cores it is possible to parallelize the copy/clear of card table, decreasing the minor GC pause times. As an example, a major heap of ~3 GB and a LOS of 600 MB, went from 5 ms minor GC down to 3 ms where most objects didn't have any references (just byte arrays). Increasing the number of objects with references will benefit event more. Before switching
over LOS to a SgenArrayList, similar scenario took 8 ms and was reduced to 3 ms, and those numbers are close to what you would get if sample included more objects with references, since then, you will need to visit more objects, causing more cache misses. Parallelizing that will significantly reduce minor GC pause times.

As with most optimizations the gain is platform/hardware dependent, that's why the parallelization is currently an opt-in feature, that needs to be explicitly enabled (remset-copy-clear-par) on platforms/hardware where similar performance gains can
be identified.

Replacing mono/mono#17689

Co-authored-by: lateralusX <lateralusX@users.noreply.github.com>
3 years agoAdd back superpmi pipeline files (#43323)
Kunal Pathak [Tue, 13 Oct 2020 05:39:00 +0000 (22:39 -0700)]
Add back superpmi pipeline files (#43323)

* Add back superpmi pipeline files

* add the missing import

* add another missing import

I am not sure how this worked in the past with missing imports.

* remove the workaround for a bug

* Revert "remove the workaround for a bug"

This reverts commit 5c674210cc8f20fda3e73704c7f72d6e168c68d9.

3 years agoSimplify winsock initialization (#43284)
Jan Kotas [Tue, 13 Oct 2020 04:25:37 +0000 (21:25 -0700)]
Simplify winsock initialization (#43284)

* Initialize winsock directly

* Delete test that is not relevant anymore

* Add tests for methods the require initialized winsock

Co-authored-by: Stephen Toub <stoub@microsoft.com>
3 years agoReplace a couple Thread.CurrentThread.ManagedThreadIds (#43270)
Stephen Toub [Tue, 13 Oct 2020 00:17:45 +0000 (20:17 -0400)]
Replace a couple Thread.CurrentThread.ManagedThreadIds (#43270)

* Replace a few Thread.CurrentThread.ManagedThreadIds

* Update some library tests as well

3 years agoRemove reflection from Environment.WorkingSet prop (#43154)
Adeel Mujahid [Mon, 12 Oct 2020 23:40:13 +0000 (02:40 +0300)]
Remove reflection from Environment.WorkingSet prop (#43154)

3 years agoAdd test coverage for AttributeCollection, fix bugs and nullable annotate (#36118)
Hugh Bellamy [Mon, 12 Oct 2020 23:36:41 +0000 (00:36 +0100)]
Add test coverage for AttributeCollection, fix bugs and nullable annotate (#36118)

* Add test coverage for AttributeCollection and fix bugs

* PR Feedback

3 years agoBump Intellisense version for RTM (#43235)
Carlos Sanchez [Mon, 12 Oct 2020 19:17:01 +0000 (12:17 -0700)]
Bump Intellisense version for RTM (#43235)

Co-authored-by: Carlos Sanchez Lopez <carlossanlop@users.noreply.github.com>
3 years ago[Crossgen2] Improve compilation throughput for types with many fields (#43195)
Simon Nattress [Mon, 12 Oct 2020 19:05:47 +0000 (12:05 -0700)]
[Crossgen2] Improve compilation throughput for types with many fields (#43195)

`IsLayoutFixedInCurrentVersionBubble` is a fairly expensive algorithm and can be called very frequently for the same type during JIT compilation. Store the computed result so future lookups are fast.

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

3 years agoFix codegen for multi-reg EH vars (#42871)
Carol Eidt [Mon, 12 Oct 2020 18:25:16 +0000 (11:25 -0700)]
Fix codegen for multi-reg EH vars (#42871)

* Fix codegen for multi-reg EH vars

Multi-reg EH vars were not properly being stored at each def.
Fix the dumping of multi-reg nodes with register assignments.
Temporarily enable EHWriteThru to get CI testing with it on.

Fix #41232

3 years agoEnsure that iOS builds get correct library identity for native libraries (#43302)
Filip Navara [Mon, 12 Oct 2020 17:44:28 +0000 (19:44 +0200)]
Ensure that iOS builds get correct library identity for native libraries (#43302)

Need to bump iOS device min version to 8.0 to avoid linker error: "embedded dylibs/frameworks only run on iOS 8 or later"

Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
3 years agoGet modules information using proc_pidinfo() on macOS (#42900)
Ilia [Mon, 12 Oct 2020 17:07:27 +0000 (20:07 +0300)]
Get modules information using proc_pidinfo() on macOS (#42900)

Previously CreateProcessModules() parsed the output of vmmap command to get
modules addresses/paths on macOS, but on some Macs with latest macOS 10.15.6
vmmap hides full paths to some process modules (.dylibs in non-system folders),
replacing some parts with *:
```
__TEXT                 000000010d8bd000-000000010ddce000 [ 5188K  5188K     0K     0K] r-x/rwx SM=COW          /Users/USER/*/libcoreclr.dylib
```

In particular, it breaks the debugger functionality due to invalid path
`/Users/USER/*/libmscordbi.dylib`, and error code
CORDBG_E_DEBUG_COMPONENT_MISSING is returned.

Now we get modules information by iterating over regions using proc_pidinfo()
in CreateProcessModules().

Fixes #42888

3 years agoAdd configuration for issue mover bot (#43279)
Marek Safar [Mon, 12 Oct 2020 12:34:53 +0000 (14:34 +0200)]
Add configuration for issue mover bot (#43279)

https://github.com/dessant/move-issues

3 years agoDon't autoupgrade homebrew formula in install-native-dependencies.sh (#43299)
Alexander Köplinger [Mon, 12 Oct 2020 11:08:36 +0000 (13:08 +0200)]
Don't autoupgrade homebrew formula in install-native-dependencies.sh (#43299)

Should workaround an issue we're seeing on AzDO while upgrading openssl@1.1 1.1.1g -> 1.1.1h: 'Error: Not a directory @ dir_s_rmdir - /usr/local/Cellar/openssl'

3 years agoAdd JitDasmWithAddress switch to print the process address of every instruction ...
Kunal Pathak [Mon, 12 Oct 2020 06:04:15 +0000 (23:04 -0700)]
Add JitDasmWithAddress switch to print the process address of every instruction (#43120)

* Add COMPlus_JitDasmWithAddress to print the address

* Remove dspEmit variable

* remove the square brackets

* review comments

* always display offset

* fix the reference of JitDasmWithAddress

3 years agoBuild globalization lib (#42166)
Vladimir Sadov [Mon, 12 Oct 2020 04:01:11 +0000 (21:01 -0700)]
Build globalization lib (#42166)

* Build static lib for System.Globalization.Native

* link libSystem.Globalization.Native into the static host

3 years agoRevert "Fixed failing build with -allconfigurations by adding dependency to .vsconfig...
Viktor Hofer [Sun, 11 Oct 2020 17:00:40 +0000 (19:00 +0200)]
Revert "Fixed failing build with -allconfigurations by adding dependency to .vsconfig (#37555)" (#43278)

This reverts commit c57dffd69a7aa305b24728c84ae6b0b5b33701f8.

3 years agoFix composite Crossgen2 runs on Windows and clean up R2R pipelines (#43261)
Tomáš Rylek [Sun, 11 Oct 2020 16:54:29 +0000 (18:54 +0200)]
Fix composite Crossgen2 runs on Windows and clean up R2R pipelines (#43261)

Some time ago I introduced a new option "crossgenframeworkonly"
in the test build scripts and I modified the CoreCLR pipeline
to use it. Turns out it was never fully functional, crossgenning
framework continued taking place in the CORE_ROOT population phase
(generatelayoutonly) and only on Windows it got duplicated in the
subsequent "crossgen framework" step. This duplication moreover
uncovered a bug in the R2RTest tool - when compiling the framework
in composite mode twice in a row, the tool was incorrectly
manipulating the composite file "framework-r2r.dll", causing an
error in the second framework crossgenning step.

I believe that it's completely logical to crossgen the framework
as part of populating CORE_ROOT. In light of this fact I have just
deleted the separate "crossgen framework" step and the corresponding
build script options. I have also fixed the described bug in R2RTest
related to repeated framework crossgenning in composite mode to
restore the invariant that framework crossgenning should be idempotent.

Thanks

Tomas

3 years agoMove Internal.Console to shared CoreLib & port to Unix (#42983)
Michal Strehovský [Sun, 11 Oct 2020 16:01:54 +0000 (18:01 +0200)]
Move Internal.Console to shared CoreLib & port to Unix (#42983)

3 years agoOngoing work on the cmake build system. (#43264)
Zoltan Varga [Sun, 11 Oct 2020 07:22:44 +0000 (03:22 -0400)]
Ongoing work on the cmake build system. (#43264)

* Update source lists.

* Add android support.

3 years agoEnable linker substitutions for more architectures. (#42578)
Marek Safar [Sun, 11 Oct 2020 06:45:49 +0000 (08:45 +0200)]
Enable linker substitutions for more architectures. (#42578)

3 years agoAdd new resource string with correct bounds (#42349)
Shaun McFall [Sun, 11 Oct 2020 03:21:15 +0000 (23:21 -0400)]
Add new resource string with correct bounds (#42349)

Use new resource string in MathF.Round

3 years agoFixed failing build with -allconfigurations by adding dependency to .vsconfig (#37555)
Benjamin Bartels [Sun, 11 Oct 2020 02:00:45 +0000 (03:00 +0100)]
Fixed failing build with -allconfigurations by adding dependency to .vsconfig (#37555)

3 years agoPipeline performance tweaks (follow-up) (#37065)
Nicolas Portmann [Sun, 11 Oct 2020 01:39:37 +0000 (03:39 +0200)]
Pipeline performance tweaks (follow-up) (#37065)

3 years agoAdd fast paths to WhenAny(IEnumerable) (#38896)
Bond-009 [Sun, 11 Oct 2020 01:21:05 +0000 (03:21 +0200)]
Add fast paths to WhenAny(IEnumerable) (#38896)

* Add fast paths to WhenAny(IEnumerable)

Adds fast paths in case `tasks` is an array or an `ICollection`

* Remove cast from slow path for WhenAll and WhenAny

3 years ago[wasm][tests][browser] Http - FunctionalTests - mark failing tests (#42866)
Ankit Jain [Sun, 11 Oct 2020 00:31:09 +0000 (20:31 -0400)]
[wasm][tests][browser] Http - FunctionalTests - mark failing tests (#42866)

* [wasm][tests][browser] Http - FunctionalTests - mark failing tests

- Most of these are failing due to LoopbackServer
- some others are due to monitors not being supported

This brings the result to zero failures:

`Tests run: 439, Errors: 0, Failures: 0, Skipped: 18. Time: 2.128495s`

* Mark LoopbackServer issues with active issue

* fix the exclusion on browser

Co-authored-by: Larry Ewing <lewing@microsoft.com>
3 years agoCleaned up unused CLRConfig code (#42422)
Ivan Diaz Sanchez [Sat, 10 Oct 2020 22:27:30 +0000 (15:27 -0700)]
Cleaned up unused CLRConfig code (#42422)

3 years agoKeep response files used for crossgenning the framework (#43183)
Tomáš Rylek [Sat, 10 Oct 2020 19:13:25 +0000 (21:13 +0200)]
Keep response files used for crossgenning the framework (#43183)

Response files are a very useful artifact for reproing various
Crossgen / Crossgen2 compilation errors. I propose modifying the
test build scripts to retain these artifacts by using the --nocleanup
option and by skipping deletion of the entire output folder upon
the end of framework compilation. The Crossgen output folder is not
listed among the artifacts transferred to Helix so it should be a
non-concern w.r.t. Helix throughput. I have also put the cmd and sh
versions of the script in sync by adding "large-bubble" and "release"
flags to the Unix version.

Thanks

Tomas

3 years agoRemove alpine arm64 from mono outerloop build (#43245)
Santiago Fernandez Madero [Sat, 10 Oct 2020 15:59:15 +0000 (10:59 -0500)]
Remove alpine arm64 from mono outerloop build (#43245)

3 years agoFix official build (#159) (#43240)
Santiago Fernandez Madero [Sat, 10 Oct 2020 12:20:07 +0000 (07:20 -0500)]
Fix official build (#159) (#43240)

3 years agoFix various typos (#43073)
Adeel Mujahid [Sat, 10 Oct 2020 05:54:53 +0000 (08:54 +0300)]
Fix various typos (#43073)

* Fix various typos
* `occurence`, `occurance` -> `occurrence`
* `accross` -> `across`
* `adddress`, `addresss` -> `address`
* `alignement`, `aligment` -> `alignment`
* Remove `c` from triple c.
* Remove `s` from triple s.
  * In palsuite, `Successs` (with triple s) was in commented out
    `Trace()` message, removed all commented out `Trace()` calls
    from such files.
* Fix invalid markdown in `unix-test-instructions.md`.

* Revert event source change

3 years agoUnpin Roslyn compiler (#43241)
Jan Kotas [Sat, 10 Oct 2020 02:38:12 +0000 (19:38 -0700)]
Unpin Roslyn compiler (#43241)

3 years agoRemove OSX arm64 from libraries outerloop build (#43242)
Santiago Fernandez Madero [Sat, 10 Oct 2020 01:35:05 +0000 (20:35 -0500)]
Remove OSX arm64 from libraries outerloop build (#43242)

3 years agoDelete VirtualNetwork{Stream} test code (#43155)
Stephen Toub [Sat, 10 Oct 2020 00:40:02 +0000 (20:40 -0400)]
Delete VirtualNetwork{Stream} test code (#43155)

* Delete VirtualNetwork{Stream} test code

Replace it with a CreateConnectedStream helper.

* Address PR feedback

* Fix test I must have gotten interrupted while fixing

3 years agoImplement RandomNumberGenerator.GetBytes(int)
Kevin Jones [Fri, 9 Oct 2020 23:23:54 +0000 (19:23 -0400)]
Implement RandomNumberGenerator.GetBytes(int)

3 years agoDifferentiate between IMPL_LIMITATION and NO_WAY (#43070)
David Wrighton [Fri, 9 Oct 2020 22:38:49 +0000 (15:38 -0700)]
Differentiate between IMPL_LIMITATION and NO_WAY (#43070)

Differentiate between `IMPL_LIMITATION` and `NO_WAY` in the JIT by making `IMPL_LIMITATION` return `CORJIT_IMPLLIMITATION` and handle that value such that crossgen2 behavior behaves better in the presence of an `IMPL_LIMITATION`.

Also, change a `NO_WAY` in the X86 JIT to `IMPL_LIMITATION` to better reflect the issue in code.

The effect of these changes is that a test which encounters an `IMPL_LIMITATION` while running crossgen2 in our test suite will not cause the test to fail, but instead will only cause it to fail if the limitation is also present at runtime. This addresses the last issue known to cause the Pri0 X86 Crossgen2 tests to fail.

3 years agoFix crossbuild on CentOS (#43189)
Jan Vorlicek [Fri, 9 Oct 2020 22:27:16 +0000 (00:27 +0200)]
Fix crossbuild on CentOS (#43189)

* Fix crossbuild on CentOS

This change fixes the crossbuilding to work on CentOS. Clang
frontend presets some of the compiler options based on the
host OS and I guess that's causing the need to add the
`--rpath-link`.
The ranlib change to use llvm ranlib fixed a problem where
cmake attempted to use ranlib from the rootfs for some
reason.

* Reflect PR feedback

3 years ago[master] Update dependencies from Microsoft/vstest mono/linker (#43224)
dotnet-maestro[bot] [Fri, 9 Oct 2020 22:19:34 +0000 (22:19 +0000)]
[master] Update dependencies from Microsoft/vstest mono/linker (#43224)

[master] Update dependencies from Microsoft/vstest mono/linker

3 years ago[wasm][debugger][tests] Make `dotnet test DebuggerTestSuite.csproj` work (#43158)
Ankit Jain [Fri, 9 Oct 2020 22:11:50 +0000 (18:11 -0400)]
[wasm][debugger][tests] Make `dotnet test DebuggerTestSuite.csproj` work (#43158)

* [wasm][debugger][tests] Simplify test project files

Now, the tests can be run with `dotnet test DebuggerTestSuite.csproj`.
and the existing `make run-debugger-tests` still works.

Changes:

- We don't need to use wasmAppBuilder for all the test projects, only
`debugger-test`.
- Other assemblies just get bundled with `debugger-test`

- Move common properties to `Directory.Build.*`
- And move the settings being used for debugger-test in the Makefile to
msbuild:
- RuntimeConfiguration defaults to Release, same as what the
Makefile did

- build all the debugger-tests in artifacts dir
- And instead of `TEST_SUITE_PATH`, determine the debugger-tests path
based on the testsuite itself.

- We can then remove `build-debugger-test-app`

* [wasm][debugger] add debugger.sln

* [wasm][debugger][tests] fix warnings - remove explicit xunit packageref

3 years agoEnable building .NET Core osx-arm64 in CI (#43187)
Steve MacLean [Fri, 9 Oct 2020 22:02:51 +0000 (18:02 -0400)]
Enable building .NET Core osx-arm64 in CI (#43187)

* Enable building .NET Core osx-arm64 in CI
* For osx-arm64 xcode-select xcode_12.2
* Use vmImage macOS-10.15 for all platforms

3 years agoAddress outstanding issues with System.Net MatchingRefApiCompatBaselines (#43230)
Stephen Toub [Fri, 9 Oct 2020 21:18:36 +0000 (17:18 -0400)]
Address outstanding issues with System.Net MatchingRefApiCompatBaselines (#43230)

3 years agoFix link to wasm build instructions (#43229)
Ryan Lucia [Fri, 9 Oct 2020 21:00:41 +0000 (17:00 -0400)]
Fix link to wasm build instructions (#43229)

* Fix link to wasm build instructions

* Update docs/workflow/building/mono/README.md

Co-authored-by: Dan Moseley <danmose@microsoft.com>
Co-authored-by: Dan Moseley <danmose@microsoft.com>
3 years agoUpdate TargetFramework.Sdk and react to changes (#43218)
Viktor Hofer [Fri, 9 Oct 2020 20:27:39 +0000 (22:27 +0200)]
Update TargetFramework.Sdk and react to changes (#43218)

3 years agoUpdate area-owners.md (#43233)
Dan Moseley [Fri, 9 Oct 2020 20:13:35 +0000 (13:13 -0700)]
Update area-owners.md (#43233)

@jeffschwMSFT I see @swaroop-sridhar left the team. Are these the correct edits?

3 years agoFix libraries jitstress jobs (#43191)
Bruce Forstall [Fri, 9 Oct 2020 17:13:57 +0000 (10:13 -0700)]
Fix libraries jitstress jobs (#43191)

leading to pipeline failures in the libraries jitstress jobs.
This fixes up the references.

3 years agoCleanup more EventSource calls in SPC to work better with illinker (#40539)
Marek Safar [Fri, 9 Oct 2020 17:00:27 +0000 (19:00 +0200)]
Cleanup more EventSource calls in SPC to work better with illinker (#40539)

Co-authored-by: Koundinya Veluri <kouvel@users.noreply.github.com>
3 years ago[master] Update dependencies from dotnet/arcade dotnet/llvm-project dotnet/icu mono...
dotnet-maestro[bot] [Fri, 9 Oct 2020 16:46:44 +0000 (18:46 +0200)]
[master] Update dependencies from dotnet/arcade dotnet/llvm-project dotnet/icu mono/linker (#43181)

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

Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk , Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.ApiCompat
 From Version 5.0.0-beta.20478.3 -> To Version 5.0.0-beta.20506.7

* Update dependencies from https://github.com/mono/linker build 20201008.4

Microsoft.NET.ILLink.Tasks
 From Version 6.0.0-alpha.1.20478.2 -> To Version 6.0.0-alpha.1.20508.4

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

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

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

Microsoft.NETCore.Runtime.ICU.Transport
 From Version 6.0.0-alpha.1.20505.1 -> To Version 6.0.0-alpha.1.20506.2

* Update dependencies from https://github.com/mono/linker build 20201009.2

Microsoft.NET.ILLink.Tasks
 From Version 6.0.0-alpha.1.20478.2 -> To Version 6.0.0-alpha.1.20509.2

* Update dependencies from https://github.com/mono/linker build 20201009.3

Microsoft.NET.ILLink.Tasks
 From Version 6.0.0-alpha.1.20478.2 -> To Version 6.0.0-alpha.1.20509.3

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
3 years ago[wasm][net] System.Net.Mail should not throw PNSE for full assembly. (#42974)
Kenneth Pouncey [Fri, 9 Oct 2020 13:09:46 +0000 (15:09 +0200)]
[wasm][net] System.Net.Mail should not throw PNSE for full assembly. (#42974)

* [wasm][net] System.Net.Mail should not throw PNSE for full assembly.

* Address review comment.  Remove comment line

* Address review comments.  Remove redundant defs

* Activate tests on CI

- SmtpClient relevant tests are not supported

* Add `[UnsupportedOSPlatform("browser")]` to SmtpClient

* Add back System.Net.Mail Unit tests

* Remove redundant $(TargetsBrowser) from ItemGroup

* Add `[UnsupportedOSPlatform("browser")]` to SmtpClient methods and properties

- It does not hurt to have this.

* Remove unnecessary Unsupported attribute at the method level

* Remove unnecessary Unsupported attribute at the method level

* Modify message on skipped test.

* Address review comments and remove string resource

* Remove redundant AssemblyInfo per review comment

* Remove condition attribute

* Attribute is needed

* Fix build issues

3 years agoFix some issues with background thread compilation (#42986)
Maryam Ariyan [Fri, 9 Oct 2020 11:52:46 +0000 (04:52 -0700)]
Fix some issues with background thread compilation (#42986)

- Resolve dependencies before counting to avoid the race
where its possible for the background thread to run before
the main thread resulting in singletons being resolved during
compilation (it's meant to be side effect free).

- We also avoid capturing the ExecutionContext on the background thread
to avoid capture of async locals.

Fixes dotnet/extensions#3566

Taken from https://github.com/dotnet/extensions/pull/3569/commits/07e4459b6e81d10c9b3a6561f4cc0fe5a6cbcf8b

3 years agoFix TypeBuilder's base type in ref (#42947)
Stephen Toub [Fri, 9 Oct 2020 10:14:22 +0000 (06:14 -0400)]
Fix TypeBuilder's base type in ref (#42947)

* Fix Type/Enum/GenericTypeParameterBuilders' base types in ref

* Fix mono's EnumBuilder.IsAssignableFrom implementation

With the ref change, a test started failing because the C# compiler started generating a call to TypeInfo's IsAssignableFrom(TypeInfo) rather than Type's IsAssignableFrom(TypeInfo).

3 years agouse new CancellationToken.UnsafeRegister overload in StreamBuffer (#43197)
Geoff Kizer [Fri, 9 Oct 2020 10:13:17 +0000 (03:13 -0700)]
use new CancellationToken.UnsafeRegister overload in StreamBuffer (#43197)

Co-authored-by: Geoffrey Kizer <geoffrek@windows.microsoft.com>
3 years agoImplement ZLibStream and fix SocketsHttpHandler deflate support (#42717)
Stephen Toub [Fri, 9 Oct 2020 10:12:47 +0000 (06:12 -0400)]
Implement ZLibStream and fix SocketsHttpHandler deflate support (#42717)

* Implement ZLibStream and fix SocketsHttpHandler deflate support

- Implements ZLibStream, exposes it in the ref, and add tests
- Fixes SocketsHttpHandler to use ZLibStream instead of DeflateStream

* Add comment about deflate content encoding

* Apply suggestions from code review

Co-authored-by: Carlos Sanchez <1175054+carlossanlop@users.noreply.github.com>
* Fix netfx build

Co-authored-by: Carlos Sanchez <1175054+carlossanlop@users.noreply.github.com>
3 years agoSimplify DynamicWinsockMethods (#43190)
Jan Kotas [Fri, 9 Oct 2020 05:20:48 +0000 (22:20 -0700)]
Simplify DynamicWinsockMethods (#43190)

Co-authored-by: Stephen Toub <stoub@microsoft.com>
3 years agoPublish all packages generated from the experiment branch when in runtimelab (#156...
Santiago Fernandez Madero [Fri, 9 Oct 2020 03:37:08 +0000 (22:37 -0500)]
Publish all packages generated from the experiment branch when in runtimelab (#156) (#43193)

* Publish all packages generated from the experiment branch

* Change publishing to follow installer publish infrastructure

* React to name suffix change in all configurations

3 years agominor quic improvements (#43151)
Geoff Kizer [Fri, 9 Oct 2020 01:59:38 +0000 (18:59 -0700)]
minor quic improvements (#43151)

* minor quic improvements

* address PR feedback

* more feedback

Co-authored-by: Geoffrey Kizer <geoffrek@windows.microsoft.com>
3 years agoAdd CancellationToken.Register with callback accepting token (#43114)
Stephen Toub [Fri, 9 Oct 2020 01:57:38 +0000 (21:57 -0400)]
Add CancellationToken.Register with callback accepting token (#43114)

* Add CancellationToken.Register with callback accepting token

* Address PR feedback

3 years agoUpdate analyzer versions (#43038)
Stephen Toub [Fri, 9 Oct 2020 01:56:53 +0000 (21:56 -0400)]
Update analyzer versions (#43038)

3 years ago[System.Drawing.Common] Work around libgdiplus use after free (#43074)
Aleksey Kliger (λgeek) [Thu, 8 Oct 2020 23:07:08 +0000 (19:07 -0400)]
[System.Drawing.Common] Work around libgdiplus use after free (#43074)

* [System.Drawing.Common] Work around libgdiplus use after free

On Windows, both of the following are legal

    Metafile mf = ... ; // get a metafile instance
    Graphics g = Graphics.FromImage(mf);
    g.Dispose(); mf.Dispose();

and

    Metafile mf = ... ; // get a metafile instance
    Graphics g = Graphics.FromImage(mf);
    mf.Dispose(); g.Dispose();

On Unix, libgdiplus has a use after free bug for the second form - the metafile
native image is disposed, but the graphics instance still has a pointer to the
memory that it will use during cleanup.  If the memory is reused, the graphics
instance will see garbage values and crash.

The workaround is to add a MetadataHolder class and to transfer responsibility
for disposing of the native image instance to it if the Metafile is disposed
before the Graphics.

Note that the following is not allowed (throws OutOfMemoryException on GDI+ on
Windows), so there's only ever one instance of Graphics associated with a
Metafile at a time.

    Graphics g = Graphics.FromImage(mf);
    Graphics g2 = Graphics.FromImage(mf); // throws

Addresses https://github.com/dotnet/runtime/issues/37838

* Formatting fixes

Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
* Address review feedback

* Inilne unhelpful helper

* formatting

Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
3 years agoPort ComWrappers 5.0 diagnostic changes back to master and add stowed exception array...
David Mason [Thu, 8 Oct 2020 21:09:12 +0000 (14:09 -0700)]
Port ComWrappers 5.0 diagnostic changes back to master and add stowed exception array to minidumps (#43164)

3 years agoDisable SetDateTimeMax test on Linux (#43178)
Stephen Toub [Thu, 8 Oct 2020 19:44:23 +0000 (15:44 -0400)]
Disable SetDateTimeMax test on Linux (#43178)