Santiago Fernandez Madero [Thu, 16 Dec 2021 05:03:12 +0000 (23:03 -0600)]
Fix Microsoft.VisualBasic.Core file version (#62848)
Michal Strehovský [Thu, 16 Dec 2021 04:38:12 +0000 (13:38 +0900)]
Enable NativeAOT in the CI (#62833)
SingleAccretion [Thu, 16 Dec 2021 02:15:16 +0000 (05:15 +0300)]
[TODO-List-Cleanup] Delete the quirks (#61876)
* Remove the VN quirk
* Delete the costing quirk
Maryam Ariyan [Thu, 16 Dec 2021 02:12:00 +0000 (18:12 -0800)]
Undo breaking change in 6.0 in environment variable configuration prefix support (#62819)
Michal Strehovský [Thu, 16 Dec 2021 01:35:54 +0000 (10:35 +0900)]
Add docs around NativeAOT workflows (#62837)
Maryam Ariyan [Wed, 15 Dec 2021 23:33:36 +0000 (15:33 -0800)]
Making user secrets optional by default (#62821)
Jan Vorlicek [Wed, 15 Dec 2021 23:14:14 +0000 (00:14 +0100)]
Unify the FlushProcessWriteBuffers mechanism for macOS arm64 / x64 (#62822)
The macOS arm64 was using a new mechanism to implement FlushProcessWriteBuffers
because the original one based on a wired memory page doesn't work on arm64.
We have seen people hitting problems with the wired memory page allocation on
x64 in the past due to the fact that wired memory is a scarce resource and
in some cases, e.g. in presence of apps that greedily grab all of the available
wired memory pages, we were unable to initialize coreclr and execute any .NET
application.
This change switches x64 to the same mechanism as arm64 to prevent that issue
from happening and updates the minimum supported x64 macOS to 10.14. That's the
version required for the new APIs the change is using. Apple stopped supporting
10.13 a year ago anyways.
Wei Zheng [Wed, 15 Dec 2021 22:13:53 +0000 (06:13 +0800)]
Add ConstantExpectedAttribute (#62436)
Theodore Tsirpanis [Wed, 15 Dec 2021 22:13:05 +0000 (00:13 +0200)]
Make `ControlFlowBuilder.Clear` public. (#62811)
Fan Yang [Wed, 15 Dec 2021 19:57:48 +0000 (14:57 -0500)]
Updated tracking issue (#62814)
Egor Chesakov [Wed, 15 Dec 2021 19:07:27 +0000 (11:07 -0800)]
Pass HFA/HVA in registers (#62623)
* Have more concise check for "HFAs should not be morphed to FieldList when they are not passed on SIMD registers" in src/coreclr/jit/morph.cpp
* Pass HFA/HVA arguments in registers in src/coreclr/jit/morph.cpp
Bruce Forstall [Wed, 15 Dec 2021 18:50:19 +0000 (10:50 -0800)]
Make emitAddrMode xarch only (#62830)
It is not used on arm32/arm64.
Jeremy Koritzinsky [Wed, 15 Dec 2021 18:20:37 +0000 (10:20 -0800)]
Change all "unmanaged" (no GC fields) sequential types to have sequential layout. (#61759)
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Jan Jahoda [Wed, 15 Dec 2021 17:28:05 +0000 (18:28 +0100)]
Add ubuntu 21.10 (#62783)
Jonathan Peppers [Wed, 15 Dec 2021 17:15:05 +0000 (11:15 -0600)]
[MonoAOTCompiler] more properties & custom WorkingDirectory (#62725)
Fixes: https://github.com/dotnet/runtime/issues/56163
PR #58523 fixed something on Windows, but it didn't actually address
our issues on Android.
A directory name like `foo Ümläüts` fails:
* `mkdir 'foo Ümläüts' ; cd 'foo Ümläüts'`
* `dotnet new android`
* `dotnet build -c Release -p:RunAOTCompilation=true` (adding
`-p:EnableLLVM=true` complicates further)
The error:
Precompiling failed for C:\src\foo Ümläüts\obj\Release\android-arm64\linked\System.Private.CoreLib.dll: Error: Loaded assembly 'C:\src\foo ├£ml├ñ├╝ts\obj\Release\android-arm64\linked\System.Private.CoreLib.dll' doesn't match original file name 'C:\foo ▄mlΣⁿts\obj\Release\android-arm64\linked\System.Private.CoreLib.dll'. Set MONO_PATH to the assembly's location.
Reviewing the existing AOT implementation in Xamarin.Android, I found
out *why* Xamarin.Android works:
[AOT] response file obj\Release\120\aot\arm64-v8a\App36.dll\response.txt: --llvm "--aot=temp-path=obj\Release\120\aot\arm64-v8a\App36.dll,llvm-path=C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Xamarin\Android,outfile=obj\Release\120\aot\arm64-v8a\libaot-App36.dll.so,msym-dir=obj\Release\120\aot\arm64-v8a,asmwriter,mtriple=aarch64-linux-android,tool-prefix=C:\Program Files (x86)\Android\android-sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\aarch64-linux-android-,ld-name=ld.EXE,ld-flags=\"-LC:\Program Files (x86)\Android\android-sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\lib\gcc\aarch64-linux-android\4.9.x\";\"-LC:\Program Files (x86)\Android\android-sdk\ndk-bundle\platforms\android-21\arch-arm64\usr\lib\";\"C:\Program Files (x86)\Android\android-sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\lib\gcc\aarch64-linux-android\4.9.x\libgcc.a\";\"C:\Program Files (x86)\Android\android-sdk\ndk-bundle\platforms\android-21\arch-arm64\usr\lib\libc.so\";\"C:\Program Files (x86)\Android\android-sdk\ndk-bundle\platforms\android-21\arch-arm64\usr\lib\libm.so\"" C:\Users\jopepper\source\repos\App36\App36\obj\Release\120\android\assets\shrunk\App36.dll
1. Xamarin.Android passes *relative* paths. The `foo Ümläüts`
directory name doesn't even come into play for some arguments.
2. With LLVM, `ld-flags` contains a `;`.
The existing code splits on `;` and joins on `,`:
https://github.com/dotnet/runtime/blob/
25c207351c4f57cf2daa98caaf327a8b8d83edb8/src/tasks/AotCompilerTask/MonoAOTCompiler.cs#L505-L509
So we lose any `;` delimiters for the `ld-flags` value, they get
replaced by `,`.
I think the solution here is:
1. Add several missing properties to `<MonoAOTCompiler/>` so we don't
have to rely on the `%(AotArguments)` item metadata. No splitting
on `;` would be required, `ld-flags` can be passed in and used as-is.
2. Add a new `WorkingDirectory` property. When this is set, assume
paths passed in might be relative -- and don't transform paths by
calling `Path.GetFullPath()`.
Lastly, I fixed a place where the UTF8 encoding wasn't passed when
MSBuild logging the response file.
These changes I tried to make in a way where this shouldn't break
other .NET workloads like wasm. If existing MSBuild targets call this
task (not using the new properties), the behavior should remain
unchanged.
I tested these changes by commiting a modified `MonoAOTCompiler.dll`:
https://github.com/xamarin/xamarin-android/pull/6562
I'm able to enable several AOT tests related to dotnet/runtime#56163.
Michal Strehovský [Wed, 15 Dec 2021 16:51:38 +0000 (01:51 +0900)]
Manifest DllImportSourceGenerator as a generator (#62836)
Adeel Mujahid [Wed, 15 Dec 2021 16:02:20 +0000 (18:02 +0200)]
Update libunwind to v1.6.2 (#62092)
* Update libunwind to v1.6.2
* Apply libunwind changes from 1b5719c
Co-authored-by: Jan Vorlicek <janvorli@microsoft.com>
* Suppress Wincompatible-pointer-types on arm64
* Fix remote unwinding on win-arm64
* Mark base as both input and output
Co-authored-by: Jan Vorlicek <jan.vorlicek@volny.cz>
Co-authored-by: Jan Vorlicek <janvorli@microsoft.com>
Co-authored-by: Jan Vorlicek <jan.vorlicek@volny.cz>
Thays Grazia [Wed, 15 Dec 2021 12:53:06 +0000 (09:53 -0300)]
[wasm][debugger] Fix source-link test (#62786)
* Fix 62551
* Addressing @radical comments.
* Adding comments to not forget what we were trying to test.
Indenting.
Alexander Köplinger [Wed, 15 Dec 2021 06:12:53 +0000 (07:12 +0100)]
Use 1ES pool instead of deprecated windows image in "Publish to Build Asset Registry" job (#62797)
Andrii Kurdiumov [Wed, 15 Dec 2021 05:44:19 +0000 (11:44 +0600)]
Add custom marshaller tests for delegates (#62691)
Will Smith [Wed, 15 Dec 2021 05:17:14 +0000 (21:17 -0800)]
Improve ARM64 JIT disassembly (#62557)
* Improved ARM64 disassembly by emitting the right register
* Assume INS_OPTS_NONE and INS_OPTS_LSL are 64bit when displaying an extended register
Michal Strehovský [Wed, 15 Dec 2021 03:44:07 +0000 (12:44 +0900)]
Use wildcards for NativeAOT libs (#62820)
Michal Strehovský [Wed, 15 Dec 2021 03:42:35 +0000 (12:42 +0900)]
Bring over NativeAOT smoke tests (#62763)
We'll probably want to spread these out to the appropriate categories (CoreMangLib, etc.) and enable them for non-NativeAOT scenarios eventually. For now, moving these as they were in runtimelab because being able to build them as a subtree (`build.sh tree nativeaot`) in one go makes things easy.
Nathan Ricci [Wed, 15 Dec 2021 01:51:09 +0000 (20:51 -0500)]
Revert removal of clr dependency from mono builds (#62788)
This partially reverts this change: https://github.com/dotnet/runtime/pull/62652
The problem is that although we no longer need to patch, we do need corerun from the clr.hosts subset. Corerun still ends up as part of the pubished clr product artifact, and not in the mono product artifact. And thus we still end up downloading clr, and still need this dependency for now.
Alexander Köplinger [Wed, 15 Dec 2021 01:49:39 +0000 (02:49 +0100)]
[mono] Fix types for arguments to printf calls (#62796)
* [mono] Fix types for arguments to printf calls
These came up while I was using a code scanning tool.
* Fix build
Tomáš Rylek [Wed, 15 Dec 2021 01:15:25 +0000 (02:15 +0100)]
IL cleanup - remove .module and make .assembly match source name (#62812)
github-actions[bot] [Wed, 15 Dec 2021 00:01:51 +0000 (13:01 +1300)]
Add SchemeHttp index to QPACK constants (#62800)
Co-authored-by: JamesNK <JamesNK@users.noreply.github.com>
Gleb Balykov [Tue, 14 Dec 2021 23:54:00 +0000 (02:54 +0300)]
Fix __SkipRestorePackages setup for msbuild (#62583)
Michal Strehovský [Tue, 14 Dec 2021 23:43:21 +0000 (08:43 +0900)]
Build NativeAOT flavor of clrcompression static lib (#62570)
This is similar in spirit to the static library for the single file host.
The main different from the single file host one is that we don't want `/GL` because the static library is going to be linked on end user machine and `/GL` is super version fragile.
We build two flavors - with control flow guard and without control flow guard. CFG is a compile time option for end users in NativeAOT and we need static libs that support both.
Jan Vorlicek [Tue, 14 Dec 2021 23:39:42 +0000 (00:39 +0100)]
Fix named mutex PAL test issue (#62655)
The issue seems to be caused by a bug in the test. The problematic call
to `TestCreateMutex` is passed `nullptr` as the `name` parameter. It
then calls `convert` helper on it to convert it to wide char. However,
the `convert` helper doesn't check whether it is `nullptr` or not and
ends up returning a pointer to a memory with possibly random data,
that is returned by `malloc(0)`. The returned pointer is then passed to
the CreateMutex PAL api that probably ends up attempting to get the
length of the name or something. And depending on the random data, it
sometimes fails.
The fix is to change the `convert` function to handle `nullptr` so that
it returns `nullptr` too.
Bruce Forstall [Tue, 14 Dec 2021 23:27:59 +0000 (15:27 -0800)]
Disable HardwareIntrinsics Pause tests (#62793)
Tracking: #62423
Jose Perez Rodriguez [Tue, 14 Dec 2021 23:25:55 +0000 (15:25 -0800)]
Fixing regression for AuthType.Anonymous which leads to a NullReferenceException be thrown. (#62807)
Tomáš Rylek [Tue, 14 Dec 2021 21:40:58 +0000 (22:40 +0100)]
Deduplicate JIT/Methodical/Boxing/xlang tests (#62753)
This group comprises a C# & IL main module and a C# & IL library
and tries all four pairings between them. The C# version of the
main module used to be shared but that's problematic with test
merging as distinguishing the two tests with an identical
namespace, class name and entry point would be hard. As this is
the only occurrence of this pattern in the runtime test source
tree, I'm proposing to duplicate the C# main module source and
adjust it for the two scenarios (targeting C# vs. IL version
of the dependent library).
Thanks
Tomas
Egor Bogatov [Tue, 14 Dec 2021 21:17:56 +0000 (00:17 +0300)]
JIT: Fix range checks for "i >= 0 && i < cns" patterns (#61569)
dotnet-maestro[bot] [Tue, 14 Dec 2021 20:11:14 +0000 (21:11 +0100)]
[main] Update dependencies from 7 repositories (#62718)
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Koundinya Veluri [Tue, 14 Dec 2021 19:32:53 +0000 (11:32 -0800)]
Fix named mutexes on OSX to work between arm64 and emulated x64 processes (#62764)
- The page size is different between arm64 processes and emulated x64 processes
- The shared memory file size is set to the page size and there was a strict check on the file size, leading to an exception from the second process of a different arch that tries to share the same mutex
- Made the file size check less strict, and allowed an arch to increase but not decrease the file size such that it can be mapped at page size granularity
- Fix for https://github.com/dotnet/runtime/issues/62140 in main
github-actions[bot] [Tue, 14 Dec 2021 18:48:18 +0000 (07:48 +1300)]
Rename IHttpHeadersHandler to IHttpStreamHeadersHandler (#62750)
Co-authored-by: James Newton-King <james@newtonking.com>
Tomáš Rylek [Tue, 14 Dec 2021 18:41:07 +0000 (19:41 +0100)]
Remove dummy project property IlasmRoundTrip (#62678)
I have identified 63 tests in the tree that set IlasmRoundTrip
to true in their MSBuild project scripts. I haven't found any place
in the scripts that would be looking at the value so I'm guessing
it may have been a predecessor to today property
IlasmRoundTripIncompatible and I'm proposing to delete the unused
property. Please let me know if you're aware of any test script logic
that queries it.
Thanks
Tomas
Adeel Mujahid [Tue, 14 Dec 2021 18:31:19 +0000 (20:31 +0200)]
Unify native file name props (#62724)
The top level `Directory.Build.props` imports eng/native/naming.props,
which defines platform specific naming conventions. Use that in places
where locally defined props are used and delete the redundant props.
Vladimir Sadov [Tue, 14 Dec 2021 18:23:57 +0000 (10:23 -0800)]
PE loader/image cleanups. No-copy mapping of R2R PEs on Windows. (#61938)
* removed IMAGE_MAPPED
* removed RawImageLayout
* delete MappedImageLayout
* use mem-mapping on Windows
* tweaks and touchups
* a few cleanups
* comments
* move EnsureLoaded into Assemby::Init
* A fix for IsDynamic() case.
* fix for preferred base, if used.
* disable failing scenario
* PR feedback
* Typo (CENTINEL --> SENTINEL)
* added a bug link to a disabled test scenario + couple comment tweaks
Pavel Savara [Tue, 14 Dec 2021 17:30:23 +0000 (18:30 +0100)]
[wasm] Make typescript and rollup build incremental (#62772)
- eliminate slow ArgsMarshalString
- make rollup build incremental
- exclude dotnet.d.ts from typescript inputs
Andrii Kurdiumov [Tue, 14 Dec 2021 17:21:50 +0000 (23:21 +0600)]
Remove AOT warnings for S.Drawing.Common (#61567)
* Remove AOT warnings for S.Drawing.Common
- `Marshal.SizeOf(Type)` replaced with `Marshal.SizeOt<T>()`
- `Marshal.PtrToStructure(IntrPtr, Type)` replaced with `Marshal.PtrToStructure<T>(IntPtr)`
* Use pointers where possible
* Ref return PRINTDLG
* Use GeneratedDllImport
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Thays Grazia [Tue, 14 Dec 2021 16:40:08 +0000 (13:40 -0300)]
[wasm][debugger] Avoiding assert on mono runtime (#62601)
* Avoiding assert on mono runtime
* Update src/mono/wasm/debugger/BrowserDebugProxy/DebugStore.cs
Co-authored-by: Ankit Jain <radical@gmail.com>
* Addressing @radical comments.
Removing unused fields in another test case.
Co-authored-by: Ankit Jain <radical@gmail.com>
Eirik Tsarpalis [Tue, 14 Dec 2021 16:27:28 +0000 (18:27 +0200)]
introduce automation rules aiding PR workflows (#62534)
Aleksey Kliger (λgeek) [Tue, 14 Dec 2021 15:13:01 +0000 (10:13 -0500)]
[tests] Re-enable some explicit layout tests on Mono (#62746)
* [tests] Re-enable some explicit layout tests on Mono
These were fixed by https://github.com/dotnet/runtime/pull/61467
Related to https://github.com/dotnet/runtime/issues/36112
* objref and non-objref overlap tests expected to fail AOT compilation
As well as the NestedStructs tests.
Resolves https://github.com/dotnet/runtime/issues/62567
Anton Firszov [Tue, 14 Dec 2021 14:38:49 +0000 (15:38 +0100)]
Use TempFile in SendPacketsAsync tests (#62726)
Pavel Savara [Tue, 14 Dec 2021 11:47:08 +0000 (12:47 +0100)]
[wasm] Fix imports: require, exit, quit (#62712)
- fix require, just capture require on top level, replace it later
- simplify exit, quit
- whitespace in *.lib.*
Katya Sokolova [Tue, 14 Dec 2021 09:58:41 +0000 (10:58 +0100)]
Removing trailing dot from a SNI host in TLS (#62540)
* Removing trailing dot from a SNI host in TLS
* Add SSL connection scenario for FQDN with trailing dot
* Removing http layer test for FQDN with trailing dot
* Removing null-forgiving for TargetHost
Michal Strehovský [Tue, 14 Dec 2021 08:01:03 +0000 (17:01 +0900)]
Add support for NativeAOT testing (#62704)
Adds support for running runtime tests in NativeAOT configuration. It's similar to crossgen2 testing, but there's small differences.
* A layout for the AOT compiler is generated into `CORE_ROOT`. This includes the AOT compiler, NativeAOT corelib, and framework/test dependencies we otherwise dump into `CORE_ROOT`.
* The test execution script is amended to first AOT compile the test using the AOT compiler in `CORE_ROOT` and then run the AOT compiled test.
* The test is compiled by running MSBuild on a generated project file. This is different from crossgen2 testing that directly invokes crossgen2. The extra project file is annoying, but also the NativeAOT compiler has more command line arguments and we also need to invoke the platform linker with another set of command line arguments. Having MSBuild do that for us (using the shipping .target/.props that ship with NativeAOT) saves a some trouble there.
* This also includes support for multimodule testing (where each managed .dll is compiled into a single .o/.obj that we link with the native linker). This needs an extra step during test build to precompile the entire framework into a .a/.lib file.
Bruce Forstall [Tue, 14 Dec 2021 07:02:51 +0000 (23:02 -0800)]
Generalize loop pre-header creation and loop hoisting (#62560)
* Generalize loop pre-header creation and loop hoisting
A loop pre-header is a block that flows directly (and only) to the loop entry
block. The loop pre-header is the only non-loop predecessor of the entry block.
Loop invariant code can be hoisted to the loop pre-header where it is
guaranteed to be executed just once (per loop entry).
Currently, a loop pre-header has a number of restrictions:
- it is only created for a "do-while" (top entry) loop, not for a mid-loop entry.
- it isn't created if the current loop head and the loop entry block are in
different EH try regions
Additionally, partially due those restrictions, loop hoisting has restrictions:
- it requires a "do-while" (top entry) loop
- it requires the existing `head` block to dominate the loop entry block
- it requires the existing `head` block to be in the same EH region as the entry block
- it won't hoist if the `entry` block is the first block of a handler
This change removes all these restrictions.
Previously, even if we did create a pre-header, the definition of a pre-header
was a little weaker: an entry predecessor could be a non-loop block and also
not the pre-header, if the predecessor was dominated by the entry block. This
is more complicated to reason about, so I change the pre-header creation to
force entry block non-loop predecessors to branch to the pre-header instead.
This case only rarely occurs, when we have what looks like an outer loop back
edge but the natural loop recognition package doesn't recognize it as an outer loop.
I added a "stress mode" to always create a loop pre-header immediately after
loop recognition. This is disabled currently because loop cloning doesn't
respect the special status and invariants of a pre-header, and so inserts
all the cloning conditions and copied blocks after the pre-header, triggering
new loop structure asserts. This should be improved in the future.
A lot more checking of the loop table and loop annotations on blocks has been
added. This revealed a number of problems with loop unrolling leaving things
in a bad state for downstream phases. Loop unrolling has been updated to fix
this, in particular, the loop table is rebuilt if it is detected that we unroll
a loop that contains nested loops, since there will now be multiple copies of
those nested loops. This is the first case where we might rebuild the loop
table, so it lays the groundwork for potentially rebuilding the loop table in
other cases, such as after loop cloning where we don't add the "slow path"
loops to the table.
There is some code refactoring to simplify the "find loops" code as well.
Some change details:
- `optSetBlockWeights` is elevated to a "phase" that runs prior to loop recognition.
- LoopFlags is simplified:
- LPFLG_DO_WHILE is removed; call `lpIsTopEntry` instead
- LPFLG_ONE_EXIT is removed; check `lpExitCnt == 1` instead
- LPFLG_HOISTABLE is removed (there are no restrictions anymore)
- LPFLG_CONST is removed: check `lpFlags & (LPFLG_CONST_INIT | LPFLG_CONST_LIMIT) == (LPFLG_CONST_INIT | LPFLG_CONST_LIMIT)` instead (only used in one place
- bool lpContainsCall is removed and replaced by LPFLG_CONTAINS_CALL
- Added a `lpInitBlock` field to the loop table. For constant and variable
initialization loops, code assumed that these expressions existed in the
`head` block. This isn't true anymore if we insert a pre-header block.
So, capture the block where these actually exist when we determine that
they do exist, and explicitly use this block pointer where needed.
- Added `fgComputeReturnBlocks()` to extract this code out of `fgComputeReachability` into a function
- Added `optFindAndScaleGeneralLoopBlocks()` to extract this out of loop recognition to its own function.
- Added `optResetLoopInfo()` to reset the loop table and block annotations related to loops
- Added `fgDebugCheckBBNumIncreasing()` to allow asserting that the bbNum
order of blocks is increasing. This should be used in phases that depend
on this order to do bbNum comparisons.
- Add a lot more loop table validation in `fgDebugCheckLoopTable()`
* Inline fgBuildBlockNumMap to allow using _alloca
* Fix BBJ_SWITCH output
1. Change `dspSuccs()` to not call code that will call `GetDescriptorForSwitch()`
2. Change `GetDescriptorForSwitch()` to use the correct max block number while
inlining. We probably don't or shouldn't call GetDescriptorForSwitch while inlining,
especially after (1), but this change doesn't hurt.
* Remove incorrect assertion
There was an assertion when considering an existing `head` block as
a potential pre-header, that the `entry` block have the `head`
block as a predecessor. However, we early exit if we find a non-head,
non-loop edge. This could happen before we encounter the `head` block,
making the assert incorrect. We don't want to run the entire loop just
for the purpose of the assert (at least not here), so just remove the
assert.
* Formatting
* Use `_alloca` instead of `alloca` name
* Convert fgBBNumMax usage
Change:
```
compIsForInlining() ? impInlineInfo->InlinerCompiler->fgBBNumMax : fgBBNumMax
```
to:
```
impInlineRoot()->fgBBNumMax
```
* Code review feedback
1. Added loop epoch concept. Currently set but never checked.
2. Added disabled assert about return blocks always being moved
out of line of loop body.
3. Fixed bug checking `totalIter` after it was decremented to zero
as a loop variable
4. Added more comments on incremental loop block `bbNatLoopNum`
setting.
* Add EH condition when converting head to pre-header
When considering converting an existing loop `head` block to a pre-header,
verify that the block has the same EH try region that we would create
for a new pre-header. If not, we go ahead and create the new pre-header.
Tomáš Rylek [Tue, 14 Dec 2021 06:38:55 +0000 (07:38 +0100)]
Rename 'excludemonofailures' to 'mono' (#62749)
Michal Strehovský [Tue, 14 Dec 2021 05:23:32 +0000 (14:23 +0900)]
Add NativeAOT to build (#62569)
Marek Safar [Tue, 14 Dec 2021 00:54:03 +0000 (01:54 +0100)]
Add more precise descriptor for RuntimeAssembly (#62737)
to remove more unused fields
Nathan Ricci [Tue, 14 Dec 2021 00:22:36 +0000 (19:22 -0500)]
Made mono runs stop depending on coreclr, and stop using patching. (#62652)
Jakob Botsch Nielsen [Tue, 14 Dec 2021 00:15:34 +0000 (01:15 +0100)]
Add explicit null-check for tailcalls to VSD (#62719)
There is already a comment that this is necessary, but it is only being
done for x86 tailcalls via jit helper. Do it for normal tailcalls to VSD
as well.
Fix #61486
Kunal Pathak [Mon, 13 Dec 2021 23:29:53 +0000 (15:29 -0800)]
Do not perform vector save/restore around call that will never return (#62662)
* Do not perform vector save/restore around call that will never return
* First check if tree is a call
* Use the IsNoReturn() method
Tomáš Rylek [Mon, 13 Dec 2021 23:19:25 +0000 (00:19 +0100)]
Unify naming style of dbg / rel-variant JIT projects (#62710)
Most JIT test projects use the _d, _do, _r and _ro name suffixes
to denote debug vs. non-debug ('release') and non-optimized vs.
optimized runs of the tests, however a smaller number of tests
use a different notation using the prefixes _dbg, _speed_dbg,
_rel and _speed_rel. I propose renaming these projects to
match the suffixes other test projects are using.
Thanks
Tomas
Dan Moseley [Mon, 13 Dec 2021 20:20:48 +0000 (13:20 -0700)]
Fix SC tests (#62698)
Kunal Pathak [Mon, 13 Dec 2021 18:35:57 +0000 (10:35 -0800)]
Do not promote struct locals with holes (#62645)
* Make sure the combined field size matches the struct size
* Fix the condition
* Update test and include containHoles condition
Andrew Au [Mon, 13 Dec 2021 18:05:58 +0000 (10:05 -0800)]
Enable building StressLogAnalyzer for Alpine (#62703)
Maxim Lipnin [Mon, 13 Dec 2021 17:32:39 +0000 (20:32 +0300)]
Disable X509StoreTests.RemoveReadOnlyNonExistingDoesNotThrow test on Android (#62717)
It disables System.Security.Cryptography.X509Certificates.Tests.X509StoreTests.RemoveReadOnlyNonExistingDoesNotThrow until #62713 is addressed.
SingleAccretion [Mon, 13 Dec 2021 16:58:24 +0000 (19:58 +0300)]
Stop marking volatile indirections as NO_CSE (#62043)
It is unnecessary - we model volatile indirections as mutating
the global heap in value numbering and thus they can only ever
be CSE defs, which is legal in our model (only volatile operations
serve as mutators as per ECMA).
We get some good small diffs this way.
However, the real purpose of this change is making fixing the
incorrect assertions for L-value indirections, which will be
identified by the presence of the GTF_NO_CSE flag, as that is
the only reliable way to detect L-values in the compiler, mostly
zero-diff.
We could venture and add something like a GTF_LVALUE flag (I
think we had one with that very name at some point...), but that
seems very risky - how many a place today forgets about GTF_NO_CSE,
certainly plumbing the new flag through will not be a pleasant, or
good, long-term solution. The proper solution is to delete GT_ASG,
but that, of course, is not something done in one weekend :), and
it seems bad to leave known silent bad codegen bugs hanging around
in the meantime.
SingleAccretion [Mon, 13 Dec 2021 14:15:49 +0000 (17:15 +0300)]
Fix invalid IR in span indexer import (#62709)
* Fix invalid IR in Span[] import
* Re-enable disabled tests
Semyon A. Chertkov [Mon, 13 Dec 2021 13:43:16 +0000 (16:43 +0300)]
Fix XmlSchema does not correctly validate xs:NMTOKENS type restrictions with enumeration (#60544)
* ListFacetsChecker fix
* Added Issue_60543 unit test
* retrigger checks
* Added more unit tests
* Update XmlSchemaSet.Tests.csproj
* TC_SchemaSet_NmTokens enhanced
* TC_SchemaSet_NmTokens test refactoring
Co-authored-by: semyon.chertkov <ngkKNG#xf3>
SingleAccretion [Mon, 13 Dec 2021 12:46:56 +0000 (15:46 +0300)]
Do not contain zeroes for STOREIND(CLS_VAR_ADDR) (#62686)
There is no good reason for this special case, it seems, and
removing it is a CQ improvement across the board.
Ivan Zlatanov [Mon, 13 Dec 2021 12:41:42 +0000 (14:41 +0200)]
Fixing a possible null reference error in WebSocket deflate. (#62428)
Fixes #62422
dotnet-maestro[bot] [Mon, 13 Dec 2021 12:35:20 +0000 (13:35 +0100)]
[main] Update dependencies from dotnet/linker (#62393)
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
dotnet-maestro[bot] [Mon, 13 Dec 2021 09:36:41 +0000 (10:36 +0100)]
[main] Update dependencies from dotnet/arcade (#62671)
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Adam Sitnik [Sun, 12 Dec 2021 23:41:20 +0000 (00:41 +0100)]
Don't create multiple large files at the same time (#62519)
* move existing large file tests into a separate type (no code changes)
* don't run the large file tests in parallel
* use FileOptions.DeleteOnClose to ensure that each test removes it's own file
use single large file to test File.ReadAllBytes and ile.ReadAllBytesAsync for both limits
Kevin Jones [Sun, 12 Dec 2021 23:39:07 +0000 (18:39 -0500)]
Unify the namespaces of HashProviderDispenser. (#62590)
Ali Yousefi [Sun, 12 Dec 2021 23:38:12 +0000 (23:38 +0000)]
Cleanup, use camel case name conventions of method parameters (#62633)
* Cleanup, use camel case name conventions of method parameters
* Cleanup, use camel case name conventions of method parameters #62633
Adeel Mujahid [Sun, 12 Dec 2021 21:25:44 +0000 (23:25 +0200)]
Workaround clang crash due to large array assignment (#62675)
Adeel Mujahid [Sun, 12 Dec 2021 18:25:32 +0000 (20:25 +0200)]
Fix gcc warnings in mono (#62684)
* Fix gcc warnings in mono
* Cleanup trailing whitespace in changeset files
```sh
# git remote add dotnet https://github.com/dotnet/runtime && git pull --rebase dotnet main
if uname 2>/dev/null | grep -q Darwin; then
space=" "
fi
git show --name-only --pretty="" HEAD...dotnet/main |\
xargs -I{} sh -c "test -f {} && sed -i$space'' 's/[[:space:]]*$//' {}"
```
* Enable warn-as-error by default; protect good state
Adeel Mujahid [Sun, 12 Dec 2021 17:25:36 +0000 (19:25 +0200)]
Replace CorInfoIntrinsics with NamedIntrinsic (#62639)
* Replace CorInfoIntrinsics with NamedIntrinsic
* Implement NI_ARRAY_* intrinsics
* Rename IsJitIntrinsic to IsIntrinsic
Adeel Mujahid [Sun, 12 Dec 2021 16:27:38 +0000 (18:27 +0200)]
Move a few vendor libraries to src/native/external (#62673)
* Move brotli to src/native/external
* Move rapidjson to src/native/external
* Move zlib to src/native/external
* Move zlib-intel to src/native/external
* Cleanup trailing whitespace in changeset files
Andrii Kurdiumov [Sun, 12 Dec 2021 14:48:19 +0000 (20:48 +0600)]
Fix errors in Clang 13 (#62685)
Without that patch, I was having this errors
```
error: implicit conversion changes signedness: 'long' to 'uintptr_t' (aka 'unsigned long') [-Werror,-Wsign-conversion]
```
Tomáš Rylek [Sun, 12 Dec 2021 10:22:14 +0000 (11:22 +0100)]
Two small fixes for the recently merged in merged wrapper logic (#62683)
1. When running the entire Pri1 test file I noticed that xUnit
sometimes generates an empty <assembly /> entry that was crashing
the new logic in run.py. I have added a check to harden the script
against this eventuality.
2. My logic to disable merged test wrapper build in BuildAsStandalone
mode wasn't completely correct - I used the CLRTestTargetUnsupported
property but that's ignored when CLRTestBuildAllTargets is set to
'allTargets'. I have changed it to DisableProjectBuild.
Thanks
Tomas
Adeel Mujahid [Sat, 11 Dec 2021 13:59:29 +0000 (15:59 +0200)]
Dedup addprefix & delete unused defines from cmake (#62528)
Katya Sokolova [Sat, 11 Dec 2021 09:13:13 +0000 (10:13 +0100)]
Added missed penultimate bytes in SniHelper_TruncatedData_Fails scenario (#62641)
github-actions[bot] [Sat, 11 Dec 2021 05:27:24 +0000 (18:27 +1300)]
HTTP/2: Improve incoming header performance (#62614)
Co-authored-by: JamesNK <JamesNK@users.noreply.github.com>
Dan Moseley [Sat, 11 Dec 2021 04:42:23 +0000 (21:42 -0700)]
Fix setting timestamp on Windows on readonly files (#62638)
Adeel Mujahid [Sat, 11 Dec 2021 04:02:59 +0000 (06:02 +0200)]
Exclude DNNE based test project from armel builds (#62486)
Andy Ayers [Sat, 11 Dec 2021 02:43:32 +0000 (18:43 -0800)]
Update spmi asp.net script to collect some osr method contexts (#62635)
Collect both non-pgo and pgo cases. For non-pgo, set OSR to trigger immediately
when any patchpoint is hit to maximize number of cases collected. For PGO, set
OSR to trigger once we've got a bit of profile data gathered by the Tier0 method.
Tomáš Rylek [Sat, 11 Dec 2021 01:15:06 +0000 (02:15 +0100)]
Skip native composite ReadyToRun images as inputs to Crossgen2 (#62537)
According to the issue https://github.com/dotnet/runtime/issues/49247
a known pre-existing Crossgen2 bug is that it fails when presented
with the components of a previous Crossgen2 compilation in the
composite mode. This is because Crossgen2 lacks proper logic to
recognize the composite images and mistakes them for currently
unsupported managed C++ MSIL assemblies. This change adds the extra
check; I have also unified it between Crossgen2 and R2RDump.
Thanks
Tomas
Tomáš Rylek [Sat, 11 Dec 2021 00:26:40 +0000 (01:26 +0100)]
Switch over Loader/classloader/TypeGeneratorTests to use merged wrappers (#61942)
This change introduces test infra changes supporting new-style merged test wrappers.
As a first step in the test conversion the change switches over 1501 tests under the path
Loader/classloader/TypeGeneratorTests.
Andrew Au [Fri, 10 Dec 2021 23:15:15 +0000 (15:15 -0800)]
Mark overflow fix for regions (#60646)
Jan Kotas [Fri, 10 Dec 2021 22:50:43 +0000 (14:50 -0800)]
Cleanup name of CreateThread shim (#62648)
Andrii Kurdiumov [Fri, 10 Dec 2021 22:34:43 +0000 (04:34 +0600)]
Make tests pass on AVX only host again (#62544)
Just anotate couple other methods which I need, based on https://github.com/dotnet/runtime/pull/61259 methodology
Stephen Toub [Fri, 10 Dec 2021 22:13:59 +0000 (17:13 -0500)]
Fix double-negatives with MatchCharacterClass (#62636)
Also add missing set description rendering for \d, \D
Stephen Toub [Fri, 10 Dec 2021 21:29:48 +0000 (16:29 -0500)]
Fix describing concatenations in alternations (#62646)
I was previously too aggressive in getting rid of concatenations in the comment rendering. We would end up flattening concatenations into alternations erroneously.
dotnet-maestro[bot] [Fri, 10 Dec 2021 21:22:11 +0000 (13:22 -0800)]
[main] Update dependencies from dotnet/runtime-assets dotnet/arcade dotnet/xharness dotnet/icu dotnet/hotreload-utils dotnet/llvm-project (#62582)
* Update dependencies from https://github.com/dotnet/runtime-assets build
20211203.1
Microsoft.DotNet.CilStrip.Sources , System.ComponentModel.TypeConverter.TestData , System.Drawing.Common.TestData , System.IO.Compression.TestData , System.IO.Packaging.TestData , System.Net.TestData , System.Private.Runtime.UnicodeData , System.Runtime.Numerics.TestData , System.Runtime.TimeZoneData , System.Security.Cryptography.X509Certificates.TestData , System.Text.RegularExpressions.TestData , System.Windows.Extensions.TestData
From Version 7.0.0-beta.21602.1 -> To Version 7.0.0-beta.21603.1
* Update dependencies from https://github.com/dotnet/llvm-project build
20211206.1
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-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools
From Version 11.1.0-alpha.1.21579.1 -> To Version 11.1.0-alpha.1.21606.1
* Update dependencies from https://github.com/dotnet/icu build
20211206.1
Microsoft.NETCore.Runtime.ICU.Transport
From Version 7.0.0-alpha.1.21579.1 -> To Version 7.0.0-alpha.1.21606.1
* Update dependencies from https://github.com/dotnet/xharness build
20211209.1
Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Xunit
From Version 1.0.0-prerelease.21607.3 -> To Version 1.0.0-prerelease.21609.1
* Update dependencies from https://github.com/dotnet/arcade build
20211209.2
Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.GenFacades , Microsoft.DotNet.GenAPI , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SharedFramework.Sdk
From Version 7.0.0-beta.21602.3 -> To Version 7.0.0-beta.21609.2
* Update dependencies from https://github.com/dotnet/hotreload-utils build
20211206.2
Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
From Version 1.0.2-alpha.0.21579.1 -> To Version 1.0.2-alpha.0.21606.2
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Stephen Toub [Fri, 10 Dec 2021 20:28:32 +0000 (15:28 -0500)]
Fix lazy-initialization of Trace.s_correlationManager to be thread-safe (#62640)
If two threads race to initialize it, one may end up overwriting the others, which means state pushed onto the losing thread's stack might end up disappearing.
Santiago Fernandez Madero [Fri, 10 Dec 2021 20:05:05 +0000 (14:05 -0600)]
Add IsPackable to RateLimiting package and cleanup packaging TODOs (#62612)
Stephen Toub [Fri, 10 Dec 2021 19:17:23 +0000 (14:17 -0500)]
Add \w helper function to RegexCompiler / source generator (#62620)
Eirik Tsarpalis [Fri, 10 Dec 2021 18:17:43 +0000 (18:17 +0000)]
Fix custom JsonConverterFactories not working with transitive type/property declarations. (#62595)
Pavel Savara [Fri, 10 Dec 2021 16:13:11 +0000 (17:13 +0100)]
[wasm] Decrease the startup ceremony (#62587)
* new API MONO.mono_run_main_and_exit and MONO.mono_run_main
* default onAbort
* console-v8-cjs sample
* reduced setup ceremony
Miha Zupan [Fri, 10 Dec 2021 15:50:23 +0000 (07:50 -0800)]
Enforce HTTP request Content-Length correctness (#62541)
* Enforce HTTP request Content-Length correctness
* Skip test on Browser
* Test that subsequent HTTP/1.1 requests can still succeed on a new connection
* Be consistent about exception nesting
Fan Yang [Fri, 10 Dec 2021 15:38:15 +0000 (10:38 -0500)]
Add instructions to skip restoring nuget packages (#62634)
Add build instructions to skip restoring nuget packages, when you only made change to mono.
Pavel Savara [Fri, 10 Dec 2021 15:37:59 +0000 (16:37 +0100)]
[wasm] Reduce number of calls to setTimer (#62433)
* Reduce number of calls to setTimer (#62433)
* unit test
Co-authored-by: Marek Fišera <mara@neptuo.com>
Pavel Savara [Fri, 10 Dec 2021 13:04:27 +0000 (14:04 +0100)]
[wasm] Allow the main.js file to keep it's name (#62576)
* allow the main.js file to keep it's name
Co-authored-by: Ankit Jain <radical@gmail.com>