platform/upstream/dotnet/runtime.git
3 years agoRyuJIT: Remove redundant memory barrier for XAdd and XChg on arm (#45970)
Egor Bogatov [Mon, 28 Dec 2020 21:36:23 +0000 (00:36 +0300)]
RyuJIT: Remove redundant memory barrier for XAdd and XChg on arm (#45970)

* Remove redundant memory barrier for XAdd and XChg on arm

* Update codegenarm64.cpp

* Same for casal

3 years ago[master] Update dependencies from mono/linker (#46428)
dotnet-maestro[bot] [Mon, 28 Dec 2020 20:30:27 +0000 (20:30 +0000)]
[master] Update dependencies from mono/linker (#46428)

[master] Update dependencies from mono/linker

3 years agoAvoid deferred Arcade importing (#46397)
Viktor Hofer [Mon, 28 Dec 2020 16:33:57 +0000 (17:33 +0100)]
Avoid deferred Arcade importing (#46397)

* General cleanup and mono import Arcade in root

* More cleanup and coreclr import Arcade root

* Import Arcade root from libraries

* Set informationversion for corelib

* BuildArchitecture cleanup

* Fix property name

* Fix default target invocation of runtime.proj

* specify tfm correctly

* Remove unnecessary TestStrongNameKeyId

* Revert TestStrongNameKeyId removal

* Fix entrypoint target by using M.B.NoTargets

* Fix reference assembly paths

* PR feedback

* Set Platform correctly

* PR feedback and more cleanup

* Move BaselineMicrosoftNetCoreAppPackageVersion

* Fix reference to CoreLib

* Fix OS calculation

* Fix targets importing

* Remove *TargetOS

* Add RuntimeConfiguration doc

* Change conditions in root msbuild files

* installer test fixes

* Cleanup

* More cleanup because of well defined entrypoint

* Don't import D.B.* from installer tests at all

* Rename fix

* Include explicit reference to mscorlib in ilproj

* Update eng/restore/docs.targets

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* Revert some installer test changes

* Installer test fix again

* Disable EOL tfm check for installer tests

* Set platform later for installer

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
3 years agofix typo (#46423)
Weihan Li [Mon, 28 Dec 2020 09:32:42 +0000 (17:32 +0800)]
fix typo (#46423)

3 years ago[master] Update dependencies from mono/linker (#46385)
dotnet-maestro[bot] [Mon, 28 Dec 2020 07:52:10 +0000 (07:52 +0000)]
[master] Update dependencies from mono/linker (#46385)

[master] Update dependencies from mono/linker

3 years agoIntrinsify Object.MemberwiseClone() (#46243)
Egor Bogatov [Sun, 27 Dec 2020 17:26:29 +0000 (20:26 +0300)]
Intrinsify Object.MemberwiseClone() (#46243)

3 years agoDisable failing tests to clean-up JitStress runs. (#46350)
Sergey Andreenko [Sun, 27 Dec 2020 17:24:41 +0000 (09:24 -0800)]
Disable failing tests to clean-up JitStress runs. (#46350)

* disable coreroot_determinism with JitStress

* Disable Vector3Interop_r on arm64 windows.

https://github.com/dotnet/runtime/issues/46347

3 years ago[sgen] Use new MonoClassKind MONO_CLASS_GC_FILLER in mono_class_create_array_fill_typ...
Aleksey Kliger (λgeek) [Sun, 27 Dec 2020 16:41:25 +0000 (11:41 -0500)]
[sgen] Use new MonoClassKind MONO_CLASS_GC_FILLER in mono_class_create_array_fill_type (#46366)

The array fill type MonoClass is used to populate the vtable of sgen nursery
free space.

Previously we used a static MonoClass that was zero-initialized. To make it
easier to spot pointers to freed nursery memory, initialize the class_kind to a
new constant MONO_CLASS_GC_FILLER.

Check for the new value explicitly in class-accessors.c

3 years agoClean up managed dependencies for Mono's domain/loader context (#46323)
Marek Safar [Sun, 27 Dec 2020 08:10:59 +0000 (09:10 +0100)]
Clean up managed dependencies for Mono's domain/loader context (#46323)

Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
3 years agoFix ILVerify Default Method Verification (#46404)
Benjamin Bartels [Sun, 27 Dec 2020 07:35:21 +0000 (07:35 +0000)]
Fix ILVerify Default Method Verification (#46404)

3 years agoRespect PackAllLibraries property for all libraries packages (#46403)
Jan Kotas [Sat, 26 Dec 2020 08:23:02 +0000 (22:23 -1000)]
Respect PackAllLibraries property for all libraries packages (#46403)

A few libraries packages were still building even when PackAllLibraries was set to false

3 years agoFix Android sample (#46386)
Egor Bogatov [Fri, 25 Dec 2020 22:28:42 +0000 (01:28 +0300)]
Fix Android sample (#46386)

3 years agoMove few more methods to shared RuntimeType (#46383)
Marek Safar [Fri, 25 Dec 2020 04:56:36 +0000 (05:56 +0100)]
Move few more methods to shared RuntimeType (#46383)

3 years agoPartial rollback of #46244 to workaround #46389 (#46390)
Jan Kotas [Fri, 25 Dec 2020 04:51:17 +0000 (18:51 -1000)]
Partial rollback of #46244 to workaround #46389 (#46390)

3 years agoConsolidate packaging properties (#46331)
Viktor Hofer [Fri, 25 Dec 2020 02:02:42 +0000 (03:02 +0100)]
Consolidate packaging properties (#46331)

* Consolidate packaging properties

* Remove versions.txt file from packages

The versions.txt file was added to packages to know which SHA a package
was built against. As the nuspec now contains the SHA, the versions file
isn't necessary anymore.

3 years agoDon't include the CoreCLR cross targeting files when dumping to disk. (#46394)
Jeremy Koritzinsky [Fri, 25 Dec 2020 00:24:01 +0000 (16:24 -0800)]
Don't include the CoreCLR cross targeting files when dumping to disk. (#46394)

3 years agodisable MainWindow*_GetWithGui_ShouldRefresh_Windows tests for Windows Server Core...
Adam Sitnik [Thu, 24 Dec 2020 22:45:59 +0000 (23:45 +0100)]
disable MainWindow*_GetWithGui_ShouldRefresh_Windows tests for Windows Server Core (#46387)

* the MainWindowTitle might have already been initialized

* disable MainWindow*_GetWithGui_ShouldRefresh_Windows tests for Windows Server Core

3 years agoalways try to add the result of getegid to the list returned by getgroups (#46302)
Adam Sitnik [Thu, 24 Dec 2020 13:49:53 +0000 (14:49 +0100)]
always try to add the result of getegid to the list returned by getgroups (#46302)

* according to https://man7.org/linux/man-pages/man2/getgroups.2.html it's not specified if this group is included in the list returned by getgroups

3 years agoJIT: ensure pred lists stay in increasing bbNum order (#46351)
Andy Ayers [Thu, 24 Dec 2020 09:23:21 +0000 (01:23 -0800)]
JIT: ensure pred lists stay in increasing bbNum order (#46351)

Whenever blocks are renumbered or a block is swapped into an existing
pred list entry, ensure the pred list remains properly ordered.

Closes #8720.

3 years agoRemove ICustomMarshaler from linker descriptor linker can keep the type (#46333)
Marek Safar [Thu, 24 Dec 2020 08:22:54 +0000 (09:22 +0100)]
Remove ICustomMarshaler from linker descriptor linker can keep the type (#46333)

* Remove ICustomMarshaler from linker descriptor linker can keep the type
conditionally

* Add dependency link to runtime infrastructure code

3 years agoRefactor more of thread creation into shared CoreLib partition (#46244)
Jan Kotas [Thu, 24 Dec 2020 08:01:22 +0000 (22:01 -1000)]
Refactor more of thread creation into shared CoreLib partition (#46244)

3 years agoMake managed `enum_flag_HasTypeEquivalence` match value in methodtable.h (#45185)
Vladimir Sadov [Thu, 24 Dec 2020 07:55:38 +0000 (23:55 -0800)]
Make managed `enum_flag_HasTypeEquivalence` match value in methodtable.h (#45185)

* make managed enum_flag_HasTypeEquivalence match value in methodtable.h

* IsInstanceOfClass JIT helper does not need to check for type equivalence

3 years ago[master] Update dependencies from dotnet/runtime-assets dotnet/llvm-project dotnet...
dotnet-maestro[bot] [Wed, 23 Dec 2020 22:48:17 +0000 (22:48 +0000)]
[master] Update dependencies from dotnet/runtime-assets dotnet/llvm-project dotnet/icu dotnet/arcade (#46321)

[master] Update dependencies from dotnet/runtime-assets dotnet/llvm-project dotnet/icu dotnet/arcade

 - Merge branch 'master' into darc-master-00529095-a8ce-4967-9456-ad78bb3e877c

3 years agoRemove Mono.MonoDomain managed class (#46346)
Aleksey Kliger (λgeek) [Wed, 23 Dec 2020 22:42:46 +0000 (17:42 -0500)]
Remove Mono.MonoDomain managed class (#46346)

3 years agoFixes environment variable prefixes with double underscores preventing environment...
Mateusz Brawański [Wed, 23 Dec 2020 18:34:57 +0000 (19:34 +0100)]
Fixes environment variable prefixes with double underscores preventing environment variables from being parsed (#42932)

* Prevent envvar prefix normalization. Fixes #40911

The fix implementation works like so:
- The environment variable prefix is stripped from a variable name.
- The variable name is then normalized.
- The prefix is then prepended to the variable name.
- Additionally, the filtering now occurs at the same time as
parsing/transformation.

* Account for the fact that envPrefix is never null.

* Remove LINQ per #44923

* Fix bad tests resulting from misunderstanding how loader is supposed to work.

* Fixed merge conflicts

* Actually merge #44923 and fix conflicts.

Co-authored-by: Stephen Toub <stoub@microsoft.com>
3 years agoFix handling of Arm32 struct with 8-byte alignment and 12-byte rounded size. (#46320)
Sergey Andreenko [Wed, 23 Dec 2020 06:43:04 +0000 (22:43 -0800)]
Fix handling of Arm32 struct with 8-byte alignment and 12-byte rounded size. (#46320)

* Add a repro.

* Fix arm32 struct with 8-byte alignment and 12-byte rounded size.

* format fixes

* review

3 years agoa bit more cleanup for regions (#46348)
Maoni Stephens [Wed, 23 Dec 2020 06:12:13 +0000 (22:12 -0800)]
a bit more cleanup for regions (#46348)

got rid of the 2 fields related to plan_allocation_start since regions do not need them

3 years agoUpdate dependencies from https://github.com/mono/linker build 20201222.1 (#46336)
dotnet-maestro[bot] [Wed, 23 Dec 2020 01:27:49 +0000 (01:27 +0000)]
Update dependencies from https://github.com/mono/linker build 20201222.1 (#46336)

[master] Update dependencies from mono/linker

3 years agoReplace AWK with Bash scripts (#46313)
Adeel Mujahid [Wed, 23 Dec 2020 00:52:26 +0000 (02:52 +0200)]
Replace AWK with Bash scripts (#46313)

* Replace AWK with Bash scripts

* Replace awk usage with Bash or POSIX tr

* Simplify genmoduleindex.sh

3 years agoDon't include hostfxr or hostpolicy in the platform manifest. (#46342)
Jeremy Koritzinsky [Tue, 22 Dec 2020 23:52:11 +0000 (15:52 -0800)]
Don't include hostfxr or hostpolicy in the platform manifest. (#46342)

3 years agoSet IsPackable and validate PackageDescription (#46329)
Viktor Hofer [Tue, 22 Dec 2020 21:41:05 +0000 (22:41 +0100)]
Set IsPackable and validate PackageDescription (#46329)

* Set IsPackable and validate PackageDescription

3 years agoRemove unused macro CAPTURE_BUCKETS_AT_TRANSITION (#46326)
Jan Vorlicek [Tue, 22 Dec 2020 17:35:12 +0000 (18:35 +0100)]
Remove unused macro CAPTURE_BUCKETS_AT_TRANSITION (#46326)

The CAPTURE_BUCKETS_AT_TRANSITION macro is not used anywhere.

3 years agoBump emscripten to 2.0.11. (#46293)
Zoltan Varga [Tue, 22 Dec 2020 16:38:33 +0000 (11:38 -0500)]
Bump emscripten to 2.0.11. (#46293)

3 years agoInline package descriptions and remove descriptions.json files across the repo (...
Viktor Hofer [Tue, 22 Dec 2020 15:07:56 +0000 (16:07 +0100)]
Inline package descriptions and remove descriptions.json files across the repo (#46306)

* Support runtime package descriptions

* Update arcade Packaging pkg

* Inline pkg descriptions for coreclr

* Inline pkg descriptions for mono

* Inline pkg descriptions for installer

* Inline pkg descriptions for libraries

3 years agoBump Microsoft.DotNet.SharedFramework.Sdk version (#46319)
Alexander Köplinger [Tue, 22 Dec 2020 13:45:20 +0000 (14:45 +0100)]
Bump Microsoft.DotNet.SharedFramework.Sdk version (#46319)

Brings in https://github.com/dotnet/arcade/pull/6716 which is required to unblock https://github.com/dotnet/installer/pull/9172

3 years agoReplace remaining Environment.GetResourceString calls with SR properties (#46298)
Marek Safar [Tue, 22 Dec 2020 12:15:40 +0000 (13:15 +0100)]
Replace remaining Environment.GetResourceString calls with SR properties (#46298)

3 years agoAllow to override build date with SOURCE_DATE_EPOCH (#46311)
monojenkins [Tue, 22 Dec 2020 11:38:42 +0000 (06:38 -0500)]
Allow to override build date with SOURCE_DATE_EPOCH (#46311)

Allow to override build date with `SOURCE_DATE_EPOCH`
in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.

This date call works with different variants of the date command.

Also use UTC to be independent of timezone.

This helps a bit towards deterministic mono builds = issue mono/mono#20172

This PR was done while working on reproducible builds for openSUSE.

Co-authored-by: bmwiedemann <bmwiedemann@users.noreply.github.com>
3 years agoUpdate dependencies from https://github.com/mono/linker build 20201221.2 (#46297)
dotnet-maestro[bot] [Tue, 22 Dec 2020 09:29:24 +0000 (09:29 +0000)]
Update dependencies from https://github.com/mono/linker build 20201221.2 (#46297)

[master] Update dependencies from mono/linker

3 years agoDisable apphost tests on Linux (#45976)
Andy Gocke [Tue, 22 Dec 2020 07:10:32 +0000 (23:10 -0800)]
Disable apphost tests on Linux (#45976)

* Disable apphost tests on Linux

There is a race condition somewhere in these tests which is causing #44657

* Run disabled tests on staging pipeline

* Fix yml indentation

* Use continue on error on installer tests run

* Pass down restore as well

* Publish test results in global-build-job

* Remove not needed parameter

Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
3 years ago[master] Update dependencies from dotnet/runtime dotnet/xharness (#46269)
dotnet-maestro[bot] [Tue, 22 Dec 2020 02:27:21 +0000 (02:27 +0000)]
[master] Update dependencies from dotnet/runtime dotnet/xharness (#46269)

[master] Update dependencies from dotnet/runtime dotnet/xharness

 - Merge branch 'master' into darc-master-3b4c8896-59d5-4fc3-b24b-06a30a1e6c3d

3 years agoFix wrong XHARNESS_CLI_COMMAND in wasm README and simplify scripts (#46294)
Alexander Köplinger [Tue, 22 Dec 2020 00:28:25 +0000 (01:28 +0100)]
Fix wrong XHARNESS_CLI_COMMAND in wasm README and simplify scripts (#46294)

* Fix wrong XHARNESS_CLI_COMMAND in wasm README

The variable is actually `XHARNESS_CLI_PATH`. Also added it to the AppleRunnerTemplate.sh script since it was missing there.

* Add note about usage for Android/AppleRunnerTemplate.sh scripts

Also simplify the iOS/Android scripts a bit.

3 years agoFix publishing of special debugging assets under CLR key (#46242)
Juan Hoyos [Mon, 21 Dec 2020 23:21:42 +0000 (15:21 -0800)]
Fix publishing of special debugging assets under CLR key (#46242)

3 years agoEnable restore binlog generation (#46270)
Viktor Hofer [Mon, 21 Dec 2020 21:53:43 +0000 (22:53 +0100)]
Enable restore binlog generation (#46270)

3 years agoAdd test for System.Diagnostics.Process.Responding (#46142)
Adam Sitnik [Mon, 21 Dec 2020 20:45:46 +0000 (21:45 +0100)]
Add test for System.Diagnostics.Process.Responding (#46142)

* ensure that MainWindowHandle_GetWithGui_ShouldRefresh_Windows and MainWindowTitle_GetWithGui_ShouldRefresh_Windows tests are not ignored for CI, but only excluded for Nano

* give a clear error when Notepad is missing

* apply code review suggestion and use reflection to test all refreshable private fields

* be explicit about field names

Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
3 years agoUpdate testing.md (#46295)
Fan Yang [Mon, 21 Dec 2020 19:04:30 +0000 (14:04 -0500)]
Update testing.md (#46295)

The current framework relays on CoreCLR to create the Core_Root and then patch it with mono runtime. So building CoreCLR is required before building runtime tests for desktop Mono

3 years agoUpdate dependencies from https://github.com/mono/linker build 20201221.1 (#46288)
dotnet-maestro[bot] [Mon, 21 Dec 2020 18:24:53 +0000 (18:24 +0000)]
Update dependencies from https://github.com/mono/linker build 20201221.1 (#46288)

[master] Update dependencies from mono/linker

3 years agoFix for ilasm generating invalid blob heap index for empty body methods (#46124)...
Ivan Povazan [Mon, 21 Dec 2020 16:32:44 +0000 (17:32 +0100)]
Fix for ilasm generating invalid blob heap index for empty body methods (#46124) (#46289)

Co-authored-by: Ivan Povazan <ivan@raincode.com>
3 years ago[wasm] Disable the handling of MONO_PATCH_INFO_SWITCH, its not needed, and it keeps...
Zoltan Varga [Mon, 21 Dec 2020 16:30:11 +0000 (11:30 -0500)]
[wasm] Disable the handling of MONO_PATCH_INFO_SWITCH, its not needed, and it keeps the code manager code alive. (#46267)

3 years agoPreserve current directory in init-compiler-and-cmake.cmd (#46260)
Jan Kotas [Mon, 21 Dec 2020 15:49:46 +0000 (05:49 -1000)]
Preserve current directory in init-compiler-and-cmake.cmd (#46260)

3 years agoRe-enable disabled tests (#46258)
Jan Kotas [Sun, 20 Dec 2020 21:18:14 +0000 (11:18 -1000)]
Re-enable disabled tests (#46258)

3 years agoIgnore PLT and etext symbols during verification (#46221)
Adeel Mujahid [Sun, 20 Dec 2020 14:56:55 +0000 (16:56 +0200)]
Ignore PLT and etext symbols during verification (#46221)

3 years agoUpdate dependencies from https://github.com/dotnet/runtime build 20201220.2 (#46268)
dotnet-maestro[bot] [Sun, 20 Dec 2020 14:51:05 +0000 (15:51 +0100)]
Update dependencies from https://github.com/dotnet/runtime build 20201220.2 (#46268)

runtime.native.System.IO.Ports , Microsoft.NETCore.ILAsm , Microsoft.NETCore.DotNetHostPolicy , Microsoft.NET.Sdk.IL , Microsoft.NETCore.DotNetHost , System.Runtime.CompilerServices.Unsafe , System.Text.Json
 From Version 6.0.0-alpha.1.20618.13 -> To Version 6.0.0-alpha.1.20620.2

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
3 years ago[master] Update dependencies from dotnet/runtime (#46218)
dotnet-maestro[bot] [Sun, 20 Dec 2020 08:21:02 +0000 (08:21 +0000)]
[master] Update dependencies from dotnet/runtime (#46218)

[master] Update dependencies from dotnet/runtime

3 years agoUpdate dependencies from https://github.com/dotnet/arcade build 20201216.18 (#46217)
dotnet-maestro[bot] [Sun, 20 Dec 2020 03:05:14 +0000 (19:05 -0800)]
Update dependencies from https://github.com/dotnet/arcade build 20201216.18 (#46217)

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

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
3 years ago Fix for ilasm generation of malformed PDB files due to empty body methods (#46250)
Ivan Povazan [Sun, 20 Dec 2020 02:49:04 +0000 (03:49 +0100)]
 Fix for ilasm generation of malformed PDB files due to empty body methods (#46250)

* Fix malformed portable PDB generation for methods with empty body (#46124)

* Adding a test case for ilasm which verifies that the MethodDef and MethodDebugInformation tables have the same number of rows (#46124)

3 years agoAdd missing issue link (#45416)
Christopher Watford [Sat, 19 Dec 2020 22:47:59 +0000 (17:47 -0500)]
Add missing issue link (#45416)

3 years agoReplace XML descriptor with DynamicDependency for Array special methods (#46211)
Marek Safar [Sat, 19 Dec 2020 19:31:03 +0000 (20:31 +0100)]
Replace XML descriptor with DynamicDependency for Array special methods (#46211)

3 years ago[master] Update dependencies from mono/linker (#46229)
dotnet-maestro[bot] [Sat, 19 Dec 2020 19:29:30 +0000 (20:29 +0100)]
[master] Update dependencies from mono/linker (#46229)

Microsoft.NET.ILLink.Tasks
 From Version 6.0.0-alpha.1.20617.2 -> To Version 6.0.0-alpha.1.20618.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
3 years agoJIT: introduce redundant branch opt phase (#46237)
Andy Ayers [Sat, 19 Dec 2020 16:25:34 +0000 (08:25 -0800)]
JIT: introduce redundant branch opt phase (#46237)

Move the redundant branch elimination out of assertion prop into its
own phase, in anticipation of future enhancements. Run it a bit earlier
(before CSE).

3 years ago[mono] cd after calling init-compiler-and-cmake.cmd on Windows (#46223)
Aleksey Kliger (λgeek) [Sat, 19 Dec 2020 07:27:19 +0000 (02:27 -0500)]
[mono] cd after calling init-compiler-and-cmake.cmd on Windows (#46223)

The cmd file can change the working directory without restoring it.
Set the directory back to the MonoObjDir before calling cmake.

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

3 years agoImprove R2RTest diagnostics (#46232)
Tomáš Rylek [Sat, 19 Dec 2020 00:29:57 +0000 (01:29 +0100)]
Improve R2RTest diagnostics (#46232)

Log stdout / stderr transcript for failed compilations /
executions. This is intended to simplify triage / investigation
of lab failures involving R2RTest (framework compilation,
coreroot_determinism test).

Thanks

Tomas

3 years agoStart thread pool worker threads in the default execution context (#46181)
Koundinya Veluri [Sat, 19 Dec 2020 00:01:18 +0000 (16:01 -0800)]
Start thread pool worker threads in the default execution context (#46181)

Start thread pool worker threads in the default execution context

The execution context transfers to new threads, and this creates an extra stack frame on the thread and may cause AsyncLocal value change notifications to be sent unnecessarily. Added an internal `Thread.UnsafeStart` similarly to those on the `ThreadPool`, which would not capture the execution context, and used those for thread pool and timer threads.

3 years agoJIT: block some struct CSEs under returns (#46233)
Andy Ayers [Fri, 18 Dec 2020 23:16:12 +0000 (15:16 -0800)]
JIT: block some struct CSEs under returns (#46233)

Return lowering is able to handle struct sources that assignment lowering is
not yet prepared to handle. In particular, GT_OBJ.

If we CSE a struct under a return we introduce an assignment, and we don't remorph
the assignment because we don't want to mess up CSEs.

So we must block struct CSEs under assignments for now, until lowering is able
to handle the same sets of sources that returns can.

3 years agoDelete an unused definition (#46228)
Andrew Au [Fri, 18 Dec 2020 22:46:03 +0000 (14:46 -0800)]
Delete an unused definition (#46228)

3 years agoDelete a double folder separator in crossgen proj. (#46225)
Sergey Andreenko [Fri, 18 Dec 2020 21:27:37 +0000 (13:27 -0800)]
Delete a double folder separator in crossgen proj. (#46225)

3 years agoUpdate System.Reflection.Metadata in crossgen2 (#46183)
Jan Kotas [Fri, 18 Dec 2020 21:07:07 +0000 (13:07 -0800)]
Update System.Reflection.Metadata in crossgen2 (#46183)

3 years agoFix remaining deb package dependency versions. (#46227)
Jeremy Koritzinsky [Fri, 18 Dec 2020 19:43:08 +0000 (11:43 -0800)]
Fix remaining deb package dependency versions. (#46227)

3 years agoDisable generating exports file for System.IO.Compression.Native on mobile (#46222)
Alexander Köplinger [Fri, 18 Dec 2020 18:46:48 +0000 (19:46 +0100)]
Disable generating exports file for System.IO.Compression.Native on mobile (#46222)

https://github.com/dotnet/runtime/pull/45995 added this and it relies on this code in configuretools.cmake to detect which linker is used: https://github.com/dotnet/runtime/blob/4bc323242d43dda85d490c0630c4637ffc092469/eng/native/configuretools.cmake#L66-L86

However passing `-Wl,--version` to the compiler doesn't seem to work when using the clang provided by the Android NDK, it still uses the system linker in /usr/bin/ld.
On OSX that one doesn't support the `--version` option so we don't detect LD_GNU which we'd need for providing the correct `-Wl,--version-script` compiler option.

It looks like this only passed on the PR because we build Android on Linux there and the system linker _is_ GNU there so the check was successful.

Disable the generation of the exports file on mobile platforms since we don't use it there anyway.

3 years agoensure test TestUserCredentialsPropertiesOnWindows is run only by elevated accounts...
Adam Sitnik [Fri, 18 Dec 2020 18:27:42 +0000 (19:27 +0100)]
ensure test TestUserCredentialsPropertiesOnWindows is run only by elevated accounts (#46213)

3 years agoFix arm64 apple hfa<float>. (#46034)
Sergey Andreenko [Fri, 18 Dec 2020 17:19:05 +0000 (09:19 -0800)]
Fix arm64 apple hfa<float>. (#46034)

* Fix printing.

* Keep the aligned size in `fgArgInfo`.

There was no users that required the exact size, but keeping it required rounding all over the place.

* Fix float HFA stack passing.

Apple doesn't require struct alignment for it.

* Fix `lvaMapSimd12ToSimd16` for arm64 apple arguments.

* fix crossgen2 failure.

3 years agoRun Wasm browser sample on Helix (#46144)
Maxim Lipnin [Fri, 18 Dec 2020 17:02:12 +0000 (20:02 +0300)]
Run Wasm browser sample on Helix (#46144)

This is a continuation of #45768 for the browser sample.
Which sample to run depends on the Helix scenario:
- the console sample runs under normal scenario;
- the browser sample runs under WasmTestOnBrowser scenario.

Relates to #43865

3 years agoRemove EventPipe native test vcxproj build files. (#46194)
Johan Lorensson [Fri, 18 Dec 2020 14:19:53 +0000 (15:19 +0100)]
Remove EventPipe native test vcxproj build files. (#46194)

3 years agoGarbage collect CoreLib resource strings (#46121)
Michal Strehovský [Fri, 18 Dec 2020 13:26:28 +0000 (14:26 +0100)]
Garbage collect CoreLib resource strings (#46121)

Most seem to be orphaned after the deletion of Utf8String and built-in WinRT support.

3 years agoRemove the logic duplication for iOS case (#46189)
Maxim Lipnin [Fri, 18 Dec 2020 13:03:26 +0000 (16:03 +0300)]
Remove the logic duplication for iOS case (#46189)

Addresses  https://github.com/dotnet/runtime/issues/46156#issuecomment-746868381

3 years ago[tests] Accept GUIDs from .NET Framework in ccw-class-iface test. (#46150)
monojenkins [Fri, 18 Dec 2020 12:29:34 +0000 (07:29 -0500)]
[tests] Accept GUIDs from .NET Framework in ccw-class-iface test. (#46150)

The commit d5f338c088defdf81f4374f4e6fbff75c9b1e554 broke the ccw-class-iface test on Windows under .NET Framework. A couple of the tests expect Guid.Empty, but Mono only produces Guid.Empty because GUID generation isn't yet implemented for those classes.

This patch adds the values produced by .NET Framework as accepted values, while still accepting Guid.Empty for now.

Co-authored-by: madewokherd <madewokherd@users.noreply.github.com>
3 years ago[master] Update dependencies from mono/linker (#46035)
dotnet-maestro[bot] [Fri, 18 Dec 2020 11:04:06 +0000 (12:04 +0100)]
[master] Update dependencies from mono/linker (#46035)

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
3 years ago[sdb] Add ability to retrieve custom attributes on assemblies (#46164)
monojenkins [Fri, 18 Dec 2020 10:18:05 +0000 (05:18 -0500)]
[sdb] Add ability to retrieve custom attributes on assemblies (#46164)

This reuses the existing pattern in Mono.Debugger.Soft to retrieve custom attributes.

The only questionable thing is moving the `buffer_add_cattrs` function instead of adding a forward declaration.

Co-authored-by: jbevain <jbevain@users.noreply.github.com>
3 years agoDisable apphost in ILVerify (#45036)
Omair Majid [Fri, 18 Dec 2020 05:05:24 +0000 (00:05 -0500)]
Disable apphost in ILVerify (#45036)

It doesn't appear to be needed and ends up as a prebuilt for
source-build.

3 years agoMoving the rest of Unix libraries to the 'overrider' mechanism when linked into stati...
Vladimir Sadov [Fri, 18 Dec 2020 04:43:16 +0000 (20:43 -0800)]
Moving the rest of Unix libraries to the 'overrider' mechanism when linked into static host. (#45995)

* System.Net.Security.Native

* System.Native

* fix for OSX

* fix for wasm

* fix for IOS

* Fix for FreeBSD

* System.Security.Cryptography.Native.OpenSsl

* fix OSX

* Add script to validate entrypoints.c against dll entries

* add missing CryptoNative entries

* Added verification in more projects

* Add missing entries in other files

* System.Security.Cryptography.Native.Apple

* fix for IOS/TVOS

* Change .py verification script to bash

* Update the verify_entrypoints.sh to not to use awk and work on macOS

* PR feedback

* reduce exports of System.IO.Compression.Native.dll on Windows to what is actually used and to match Unix.

* unixexports for System.IO.Compression.Native

* trying to fix IOS/TVOS

* move awk and linker flavor detection to configuretools.cmake

Co-authored-by: Jan Vorlicek <janvorli@microsoft.com>
3 years agoUpdate dependencies from https://github.com/dotnet/arcade build 20201215.4 (#46190)
dotnet-maestro[bot] [Fri, 18 Dec 2020 00:48:43 +0000 (00:48 +0000)]
Update dependencies from https://github.com/dotnet/arcade build 20201215.4 (#46190)

[master] Update dependencies from dotnet/arcade

 - Merge branch 'master' into darc-master-7182afa7-4616-4185-bb0f-bf6d141d0210

3 years agoAdd variable lifetime update for GT_STOREIND for arm/arm64 (#46059)
Bruce Forstall [Fri, 18 Dec 2020 00:36:23 +0000 (16:36 -0800)]
Add variable lifetime update for GT_STOREIND for arm/arm64 (#46059)

Fix #45557 for arm/arm64

Fixes #46023

3 years agoCode cleanup (#45950)
Maoni Stephens [Fri, 18 Dec 2020 00:26:41 +0000 (16:26 -0800)]
Code cleanup (#45950)

Changed a bunch of dprintf levels, eg from 3 to 1 when they are for FATAL_GC_ERROR 'cause you'd always want them; from 1 to 2 in seg_mapping table functions 'cause there could be tons of these when there are many heaps.

Fixed a perf bug in commit_new_mark_array introduced by the refactor change (#1688). This doesn't cause functional problems - we are just calling the same commit_mark_array_with_check on new_heap_segment multiple times.

Got rid of keep_card_live - all it needs is just to increase the cross gen pointer count.

Got rid of useful empty lines/comments/a few vars.

Renamed a few vars to the actual meaning.

Renamed should_commit_mark_array to is_bgc_in_progress and modified a few places to call it instead of duplicated code.

Moved the decision of condemning 1 when bgc is in progress to joined_generation_to_condemn (should logically belong there anyway) which fixes the problem that GCToEEInterface::DiagGCStart was getting the wrong condemned gen in this case. It's also nicer to have all the code that makes the decision of which gen to condemn in only generation_to_condemn and joined_generation_to_condemn.

Make PARALLEL_MARK_LIST_SORT always defined and got rid of code when it's not.

Proper checks for FEATURE_LOH_COMPACTION in a few places.

Changed some really long lines (please try to keep lines under 110 chars in general).

3 years agoFix crash in SuperPMI getUnmanagedCallConv (#46202)
Bruce Forstall [Fri, 18 Dec 2020 00:21:43 +0000 (16:21 -0800)]
Fix crash in SuperPMI getUnmanagedCallConv (#46202)

Fix issue introduced in #45625

3 years agoApple Silicon fix FEATURE_WRITEBARRIER_COPY (#46201)
Steve MacLean [Thu, 17 Dec 2020 23:46:14 +0000 (18:46 -0500)]
Apple Silicon fix FEATURE_WRITEBARRIER_COPY (#46201)

Copy JIT_CheckedWriteBarrier & JIT_ByRefWriteBarrier with FEATURE_WRITEBARRIER_COPY

Fixes error in relative displacement lookup in JIT_CheckedWriteBarrier

Removes one level of indirection

3 years agoThrow MME exception instead of null crash when default ctor is missing (#45963)
Marek Safar [Thu, 17 Dec 2020 23:36:35 +0000 (00:36 +0100)]
Throw MME exception instead of null crash when default ctor is missing (#45963)

3 years agoOptimize the initialization of the OrdinalCasing::s_sCasingTable table. (#46061)
Zoltan Varga [Thu, 17 Dec 2020 23:02:51 +0000 (18:02 -0500)]
Optimize the initialization of the OrdinalCasing::s_sCasingTable table. (#46061)

3 years agodisable ConnectCallback_UseUnixDomainSocket_Success on Windows (#46198)
Tomas Weinfurt [Thu, 17 Dec 2020 21:55:10 +0000 (13:55 -0800)]
disable ConnectCallback_UseUnixDomainSocket_Success on Windows (#46198)

3 years agoImplement FlushProcessWriteBuffers for macos-arm64 (#44670)
Steve MacLean [Thu, 17 Dec 2020 21:01:46 +0000 (16:01 -0500)]
Implement FlushProcessWriteBuffers for macos-arm64 (#44670)

3 years agoTry to reenable tests that are marked as fixed. (#46162)
Sergey Andreenko [Thu, 17 Dec 2020 19:26:11 +0000 (11:26 -0800)]
Try to reenable tests that are marked as fixed. (#46162)

* Try to reenable tests that are marked as fixed.

* disable the failing tests with the new issue number.

3 years agoAdd Wasm AOT steps into WasmApp.targets (#46081)
Steve Pfister [Thu, 17 Dec 2020 18:52:47 +0000 (13:52 -0500)]
Add Wasm AOT steps into WasmApp.targets (#46081)

AOT can now be triggered through the libraries tests as well as the wasm samples.

Passing /p:RunAOTCompilation=true is all that is needed for the libraries test run. The property will be false (for now) by default.

3 years agoFix memory errors related to EventPipe setup with COMPlus_EventPipeConfig (#44068)
Gleb Balykov [Thu, 17 Dec 2020 18:28:45 +0000 (21:28 +0300)]
Fix memory errors related to EventPipe setup with COMPlus_EventPipeConfig (#44068)

- XplatEventLoggerConfiguration configuration owns strings passed to EventPipeProviderConfiguration pProviders, and configurations are freed before pProviders are copied to EventPipeSessionProvider
  - NewArrayHolder shoud be used for pProviders to fix memory leak (delete[] instead of delete)

3 years agoChange CookieParser to handle Expires as a UTC DateTime (#45558)
Michael Bisbjerg [Thu, 17 Dec 2020 18:08:36 +0000 (19:08 +0100)]
Change CookieParser to handle Expires as a UTC DateTime (#45558)

This changes the DateTime parsing to not convert the parsed Expires value to a Local datetime, potentially adding hours to it and making it invalid if it surpasses `DateTime.MaxValue`.

Fixes #45491

3 years agoFix invalid access of Target in SafeCredentialReference (#36875)
Jan Jahoda [Thu, 17 Dec 2020 17:13:49 +0000 (18:13 +0100)]
Fix invalid access of Target in SafeCredentialReference  (#36875)

* Fix invalid test of SafeCredentialReference

* Remove commented code

* fix csproj

* add forgot namespace

* Extract SafeCredentialReference to new file

* Clean up

* Apply suggestions from code review

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Fix nullable check

* Fix null ref exception when accessing SecuritySafeHandler in SslSessionSache

* Remove var

* Revert to back cache crearing mechanizm

* Revert "Removed nightly to workaround failing Kestrel init. (#41934)"

This reverts commit a84720cb68b940374e1955783ad55abb119e2fd3.

* Test invalid credentials

* fix windows test csproj

* Clean up cred cache shrink method

Co-authored-by: Stephen Toub <stoub@microsoft.com>
3 years ago[master] Update dependencies from dotnet/runtime (#46137)
dotnet-maestro[bot] [Thu, 17 Dec 2020 17:08:39 +0000 (17:08 +0000)]
[master] Update dependencies from dotnet/runtime (#46137)

[master] Update dependencies from dotnet/runtime

 - Merge branch 'master' into darc-master-9bfc901c-7973-42f0-ba43-44e57ffa6f96

3 years ago[metadata] If a static field fails while computing size, fail the class (#45918)
monojenkins [Thu, 17 Dec 2020 15:53:21 +0000 (10:53 -0500)]
[metadata] If a static field fails while computing size, fail the class (#45918)

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

Co-authored-by: lambdageek <lambdageek@users.noreply.github.com>
3 years ago[mono] Move noilgen marshaling functions to a separate file (#46046)
Ryan Lucia [Thu, 17 Dec 2020 09:48:39 +0000 (04:48 -0500)]
[mono] Move noilgen marshaling functions to a separate file (#46046)

3 years agoUse destType for size instead of srcType when writing a variable from a register...
Jeremy Koritzinsky [Thu, 17 Dec 2020 04:37:41 +0000 (20:37 -0800)]
Use destType for size instead of srcType when writing a variable from a register to the stack. (#46176)

3 years agoFix performance regression in Activator.CreateInstance on Mono (#46173)
Jan Kotas [Thu, 17 Dec 2020 04:22:22 +0000 (20:22 -0800)]
Fix performance regression in Activator.CreateInstance on Mono (#46173)

Fixes #46170

3 years agofix over-estimation for broadcast* instructions (#46108)
Kunal Pathak [Thu, 17 Dec 2020 03:41:51 +0000 (19:41 -0800)]
fix over-estimation for broadcast* instructions (#46108)

3 years ago[master] Update dependencies from dotnet/icu dotnet/arcade dotnet/xharness dotnet...
dotnet-maestro[bot] [Thu, 17 Dec 2020 03:28:15 +0000 (04:28 +0100)]
[master] Update dependencies from dotnet/icu dotnet/arcade dotnet/xharness dotnet/llvm-project (#46038)

* Update dependencies from https://github.com/dotnet/xharness build 20201214.1

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 1.0.0-prerelease.20611.1 -> To Version 1.0.0-prerelease.20614.1

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

runtime.osx.10.12-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.Sdk , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , 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.20607.1 -> To Version 9.0.1-alpha.1.20614.1

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

Microsoft.NETCore.Runtime.ICU.Transport
 From Version 6.0.0-alpha.1.20607.1 -> To Version 6.0.0-alpha.1.20614.1

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

Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Installers , 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.SharedFramework.Sdk , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.ApiCompat
 From Version 6.0.0-beta.20610.4 -> To Version 6.0.0-beta.20611.1

* Update dependencies from https://github.com/dotnet/xharness build 20201215.1

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 1.0.0-prerelease.20611.1 -> To Version 1.0.0-prerelease.20615.1

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

Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Installers , 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.SharedFramework.Sdk , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.ApiCompat
 From Version 6.0.0-beta.20611.1 -> To Version 6.0.0-beta.20614.8

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Marek Safar <marek.safar@gmail.com>