Zoltan Varga [Wed, 2 Jun 2021 13:28:24 +0000 (09:28 -0400)]
[mono][aot] Rework the code which handles llvmonly compilation failures and transition to the interpreter (#53485)
* [mono][aot] Rework the code which handles llvmonly compilation failures.
If llvm fails for a method, retry the compilation and emit
the interp entry code during the second try.
* Fix invalid llvm code generation in interp_entry_only mode, there is no need to create PHI nodes.
* Fix returning values from interp_entry_only methods.
Zoltan Varga [Wed, 2 Jun 2021 13:21:20 +0000 (09:21 -0400)]
[mono][aot] Pass the correct mtriple= argument to llc on android. (#53576)
Radek Doulik [Wed, 2 Jun 2021 10:21:53 +0000 (12:21 +0200)]
[wasm] Bump emscripten to 2.0.21 (#52870)
* Bump emscripten version
* Rename __padding to _padding to avoid warnings
And errors as we use `-Werror`:
error G94F6014A: identifier '__padding' is reserved because it starts with '__'
C99 and C++ standard defines indentifiers with `__` prefix as reserved.
* Fix cast warning/error
With latest emscripten we get this warning (and error as we use
`-Werror`):
src/libraries/Native/Unix/System.Native/pal_process.c(374,92): error G3DC5E52A: cast from 'void (*)(int, siginfo_t *, void *)' to 'void (*)(int)' converts to incompatible function type [-Werror,-Wcast-function-type]
void (*oldhandler)(int) = (((unsigned int)sa_old.sa_flags) & SA_SIGINFO) ? (void (*)(int))sa_old.sa_sigaction : sa_old.sa_handler;
* Add `-s DISABLE_EXCEPTION_CATCHING=0`
when building dotnet.js
* Use EMSDK_PYTHON
* Use delayed expansion
Before the `EMSDK_PYTHON` was evaluated before running
the `emsdk_env.bat` script.
* Replace deprecated EXTRA_EXPORTED_RUNTIME_METHODS
with EXPORTED_RUNTIME_METHODS
Build warning/error:
emcc : warning : EXTRA_EXPORTED_RUNTIME_METHODS is deprecated, please use EXPORTED_RUNTIME_METHODS instead [-Wdeprecated]
* Don't need to cast anymore
* 2.0.21 was just released, so try our luck ;-)
* Use new docker images with 2.0.21
* Use the sys includes fix on all platforms
* Remove deprecated --llvm-opts usage
Context: https://github.com/emscripten-core/emscripten/commit/
0691cc68eef89fe59f66eacdba245470bea2a113
* Update emscripten version in the workload manifest
* Update emscripten versions in the docs
* Update eng/ versions
* Add ActiveIssue attr in the MemoryCacheTest
* Add ActiveIssue attr to the FileSystem tests
* Update after merge
* Resolve one more conflict
* Add ActiveIssue to the MemoryMappedFiles tests
* Revert "Fix cast warning/error"
This reverts commit
0a1aa4a88c07bc48d3d35c68369d1dca4897d849.
* Unset HAVE_FORK for Browser
* Remove active issue
Fixed by https://github.com/dotnet/runtime/commit/
93cf5df65fc13bfbc29256acc8c9c0e102a1170b
* Set HAVE_FORK to 0
* Set HAVE_FORK to 0 instead if unsetting
* Remove -s DISABLE_EXCEPTION_CATCHING=0
It might not be needed anymore
Eirik Tsarpalis [Wed, 2 Jun 2021 05:56:50 +0000 (06:56 +0100)]
Fix MinBy and MaxBy handling of empty sources (#53544)
Addresses a bug where the empty source behaviour
is determined by the key type rather than the source type.
Tanner Gooding [Wed, 2 Jun 2021 05:23:01 +0000 (22:23 -0700)]
Ensure inst_Mov() is used rather than inst_RV_RV(ins_Copy()) (#53569)
hrrrrustic [Wed, 2 Jun 2021 05:05:20 +0000 (08:05 +0300)]
Some mixed missed Equals nullable annotations (#52166)
weilinwa [Wed, 2 Jun 2021 02:18:48 +0000 (19:18 -0700)]
Add support for AvxVnni instructions under Experimental. (#51998)
* Add support for AvxVnni instructions under Experimental.
* Add support for AvxVnni instructions
* Add preveiw feature attribute
* Handle operands in lsra
* Undo changes for Experimental
* Update JITEEVersionIdentifier and fix remaining issues
* Resolve Mono CI failure
* Disable tests
* Disable Vector128 tests
* Modify disable tests
Co-authored-by: Tanner Gooding <tagoo@outlook.com>
Jan Vorlicek [Wed, 2 Jun 2021 00:31:36 +0000 (02:31 +0200)]
Fix access ordering issue in Module::AllocateDynamicEntry on arm64 (#53556)
While stress testing runtime on Windows ARM64 to repro an issue, I have
hit an ordering issue in access to m_maxDynamicEntries and
m_pDynamicStaticsInfo in the Module::AllocateDynamicEntry.
In one of a few thousands of runs, I got a runtime crash when the
m_pDynamicStaticsInfo was NULL. I was able to repro this issue reliably
in the above mentioned number of runs. After the fix, it doesn't repro
anymore.
The newId was 1 at the time of the crash, the m_maxDynamicEntries was
around 128. So the crashing thread has got the id 1, then another thread
updated the m_maxDynamicEntries before the crashing thread executed the
`if (newId >= m_maxDynamicEntries)`, so the thread went right to the
`m_pDynamicStaticsInfo[newId].pEnclosingMT = pMT;`. The
m_pDynamicStaticInfo is written before the m_maxDynamicEntries, so it
was expected that it cannot be NULL, but the crashing thread has seen
the operations in an opposite order due to the CPU access reordering.
The fix is to add VolatileLoad for accessing the m_maxDynamicEntries and
VolatileStore to set it. That ensures that the writes will be visible in
the intended order.
Ulrich Weigand [Wed, 2 Jun 2021 00:11:49 +0000 (02:11 +0200)]
Add RID values for s390x (#52907)
* Add Linux on the s390x architecture to runtimeGroups.props
* Update generated files
Eric Erhardt [Wed, 2 Jun 2021 00:10:09 +0000 (19:10 -0500)]
Fully annotate JsonNode for trimmability (#53184)
Follow up to https://github.com/dotnet/runtime/pull/52934.
- Using JsonNode in dynamic statements is not trim compatible. Add a LibraryBuild warning since there isn't a direct API to put the warning on.
- Mark JsonValueNotTrimmable's ctor as unsafe
- Fix up a few warning messages
- minor doc fixup
Contributes to #45623
Stephen Toub [Tue, 1 Jun 2021 21:49:43 +0000 (17:49 -0400)]
Tweak overheads of Regex cache access (#53449)
dotnet-maestro[bot] [Tue, 1 Jun 2021 21:20:01 +0000 (21:20 +0000)]
Update dependencies from https://github.com/mono/linker build
20210531.4 (#53525)
[main] Update dependencies from mono/linker
Viktor Hofer [Tue, 1 Jun 2021 19:17:23 +0000 (21:17 +0200)]
Fix logging messages in ApiCompat.proj (#53531)
Jan Kotas [Tue, 1 Jun 2021 18:58:02 +0000 (11:58 -0700)]
Convert some uses of ArrayList to List<T> (#53515)
ArrayList.ToArray(Type) has to lookup the array type in the type loader structures. It makes it slow and potentially AOT unfriendly since the code required to support the array type may not exist.
Convert most uses of ArrayList.ToArray in libraries to use List<T> if possible, or ArrayList.CopyTo if the conversion to List<T> was not straightforward.
Simplified a few other places that created arrays while I was on it.
David Fowler [Tue, 1 Jun 2021 17:55:38 +0000 (10:55 -0700)]
Handle the case when zero byte reads are cancelled with an empty buffer (#53456)
- When there's no buffer allocated and the zero byte reads is cancelled, it'll try to make a read only sequence with the current buffer, if that buffer is null because it wasn't yet allocated, it'll end up throwing a null reference exception. This adds a check to make sure were return an empty ReadOnlySequence if the backing buffer is null.
- Added tests
Jan Vorlicek [Tue, 1 Jun 2021 17:45:55 +0000 (19:45 +0200)]
Revert "Disable flaky CodeDom tests (#53419)" (#53524)
This reverts commit
cb1f5ad3351205f70721b7a5b5fe54a06716a056.
dotnet-maestro[bot] [Tue, 1 Jun 2021 17:41:30 +0000 (17:41 +0000)]
[main] Update dependencies from dotnet/runtime dotnet/arcade dotnet/icu dotnet/xharness dotnet/llvm-project dotnet/hotreload-utils (#53423)
[main] Update dependencies from dotnet/runtime dotnet/arcade dotnet/icu dotnet/xharness dotnet/llvm-project dotnet/hotreload-utils
Zoltan Varga [Tue, 1 Jun 2021 16:50:24 +0000 (12:50 -0400)]
[mono][aot] Add a pass to remove empty finally clauses. (#53482)
This can remove the try-finally added for list iterators, i.e.:
var l = new List<int> ();
foreach (var i in l) {
}
Where the finally clause is:
IL_0040: ldloca.s V_3
IL_0042: constrained. [System.Collections]System.Collections.Generic.List`1/Enumerator<int32>
IL_0048: callvirt instance void [System.Runtime]System.IDisposable::Dispose()
IL_004d: endfinally
and the Dispose method for List`1/Enumerator is empty.
Ankit Jain [Tue, 1 Jun 2021 16:33:22 +0000 (12:33 -0400)]
[wasm] Add comments with linker fixes made for running aot tests in (#52006)
Zoltan Varga [Tue, 1 Jun 2021 16:20:52 +0000 (12:20 -0400)]
[mono] Add basic support for static virtual methods on interfaces (#53465)
* [mono] Add basic support for abstract static methods.
* Enable some static virtual methods tests on mono.
* Disable the tests they still fail on wasm.
* Fix interpreter support.
* Reenable some tests.
Andy Ayers [Tue, 1 Jun 2021 15:55:09 +0000 (08:55 -0700)]
JIT: add option to choose guarded devirt class randomly (#53399)
Add a config setting to randomly choose one of the observed classes for
guarded devirtualization, rather than the most likely class.
Viktor Hofer [Tue, 1 Jun 2021 14:40:41 +0000 (16:40 +0200)]
Remove WSL checks and platform detection (#53526)
WSL1 isn't a supported build or execution environment for dotnet/runtime.
Because of that removing the checks and platform detection for it as
that code path isn't necessary for WSL2 anymore as it contains a fully
featured kernel which behaves just a like a usual Linux distro.
Fixes https://github.com/dotnet/runtime/issues/18258
Geoff Kizer [Tue, 1 Jun 2021 14:00:25 +0000 (07:00 -0700)]
change exceptions from socks proxy failure to be HttpRequestExceptions (#53516)
Co-authored-by: Geoffrey Kizer <geoffrek@windows.microsoft.com>
dotnet-maestro[bot] [Tue, 1 Jun 2021 08:13:13 +0000 (08:13 +0000)]
Update dependencies from https://github.com/mono/linker build
20210528.2 (#53462)
[main] Update dependencies from mono/linker
Dong-Heon Jung [Tue, 1 Jun 2021 05:24:37 +0000 (14:24 +0900)]
Fix arm build fail with clang11 (#53511)
fix ```error: cast to smaller integer type 'unsigned int' from 'void *'```
Jan Vorlicek [Tue, 1 Jun 2021 04:59:48 +0000 (06:59 +0200)]
Fix StubLinkerCPU::EmitMovConstant (#53510)
The method has a bug that caused it to early out for constants with
lowest 16, 24 or 32 bit being zero. The checks are inverse.
This issue caused failures in System.CodeDom.Tests after my change that
changed code heaps and resulted in the allocations starting at 64kB
aligned address. The failure could happen even before my change, but
extremely rarely, depending on where the heap virtual memory is located.
This change fixes the problem.
Steve MacLean [Tue, 1 Jun 2021 00:21:12 +0000 (20:21 -0400)]
Fix42292 (#52463)
* Fix issue 42292
* Cleanup PAL issues.targets
Zoltan Varga [Mon, 31 May 2021 19:23:14 +0000 (15:23 -0400)]
[mono] Remove some obsolete emscripten flags. (#53486)
Artem Kliatchkine [Mon, 31 May 2021 19:21:27 +0000 (21:21 +0200)]
Fixed path to projects (#53435)
Tomas Weinfurt [Mon, 31 May 2021 18:28:16 +0000 (20:28 +0200)]
support ServerCertificateContext in quic (#53175)
Tom Deseyn [Mon, 31 May 2021 16:07:31 +0000 (18:07 +0200)]
Socket: delete unix local endpoint filename on Close (#52103)
Fixes #45537
Radek Doulik [Mon, 31 May 2021 14:17:45 +0000 (16:17 +0200)]
[mono] Fix sgen_gc_info.memory_load_bytes (#53364)
* [mono] Fix sgen_gc_info.memory_load_bytes
Set it to used memory size instead of available memory size
* Change the default size
For systems without information about available physical memory size
Also handle -1 return values from sysconf calls
* Scale the memory load by total_available/ram_size
Theodore Tsirpanis [Mon, 31 May 2021 10:00:15 +0000 (13:00 +0300)]
Refactor MsQuic's native IP address types. (#53461)
* Use fixed buffers in MsQuic's native IP address types.
And handle them more efficiently when moving between them and .NET's IPAddresses.
* Update the names of all SOCKADDR_IN6's fields.
* Remove a redundant switch in MsQuicAddressHelpers.SetPort.
SingleAccretion [Mon, 31 May 2021 08:25:23 +0000 (11:25 +0300)]
Re-enabled optimizations for gtFoldExprConst (#53347)
The method has been refactored and the code that was
causing problems for the optimizer no longer exists.
Johan Lorensson [Mon, 31 May 2021 07:46:02 +0000 (09:46 +0200)]
Add diagnostic support into sample app and AppBuilders on Mono. (#53361)
David Wrighton [Mon, 31 May 2021 07:36:24 +0000 (00:36 -0700)]
Fix issues with virtuals and mdarrays (#53400)
- Change up the definition of an MDArray which doesn't need a special descriptor in the embedded signature data to match the type of mdarray thay everyone always uses. This fixes the virtual function handling behavior for all reasonable cases. (All cases where the MDArray is used for a base type in the expected fashion.)
- Add a devirtualization test for this specific scenario
Fixes #52444
Andrii Kurdiumov [Sun, 30 May 2021 18:54:13 +0000 (00:54 +0600)]
Split Variant marshalling tests (#53035)
* Rework of variant tests split
* Fix testing of disabled built-in COM
Tanner Gooding [Sun, 30 May 2021 18:42:10 +0000 (11:42 -0700)]
Update clrjit.natvis to cover GT_SIMD and GT_HWINTRINSIC (#53470)
Geoff Kizer [Sun, 30 May 2021 11:28:37 +0000 (04:28 -0700)]
remove WSL checks in tests (#53475)
Co-authored-by: Geoffrey Kizer <geoffrek@windows.microsoft.com>
Stephen Toub [Sun, 30 May 2021 11:16:29 +0000 (07:16 -0400)]
Always spawn message loop thread for SystemEvents (#53467)
* Always spawn message loop thread for SystemEvents
* Update src/libraries/Microsoft.Win32.SystemEvents/tests/SystemEvents.InvokeOnEventsThread.cs
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Geoff Kizer [Sat, 29 May 2021 19:10:10 +0000 (12:10 -0700)]
add AcceptAsync cancellation overloads (#53340)
* add AcceptAsync cancellation overloads
* pass cancellationToken to AcceptAsync in Unix NamedPipe impl
* add TcpListener overloads too
* enable pipe cancellation test on Unix
Co-authored-by: Geoffrey Kizer <geoffrek@windows.microsoft.com>
Steve Pfister [Sat, 29 May 2021 16:16:02 +0000 (12:16 -0400)]
Remove unnecessary reference to iOS workload pack in the Mono workload (#53425)
The pack no longer exists and will cause an error when trying to import.
Stephen Toub [Sat, 29 May 2021 13:10:48 +0000 (09:10 -0400)]
Add CookieContainer.GetAllCookies (#53441)
Eric Erhardt [Sat, 29 May 2021 01:55:56 +0000 (20:55 -0500)]
Remove DynamicallyAccessedMembers on JsonSerializer (#53235)
* Remove DynamicallyAccessedMembers on JsonSerializer
Fix #52268
* Remove DynamicallyAccessedMembers from System.Net.Http.Json
These are no longer required since System.Text.Json doesn't have these annotations anymore.
* Update PreviousNetCoreApp baseline for attribute removal
* Fix trimming tests on browser-wasm
* Fix Json tests on EnableAggressiveTrimming leg
Ankit Jain [Sat, 29 May 2021 01:30:36 +0000 (21:30 -0400)]
[wasm] Re-enable Wasm.Build.Tests (#53433)
Mitchell Hwang [Sat, 29 May 2021 00:07:13 +0000 (20:07 -0400)]
[libraries] Move library tests Feature Switches defaults to Functional tests (#53253)
* [libraries] Remove UseSystemResourceKeys true default
* [libraries] Remove UseSystemResourceKeys for iOS
* [libraries] Resolve WebSockets System resource keys activeissue
* [tests] Move default feature switches from libraries to functional tests
* [tests] Move Browser wasm default switches into FuntionalTests scope
* Add Browser OS condition
* Move DefaultFeatureSwitches initialization to FunctionalTests project
* Consolidate trimming framework library features and condition for libraries with EnableAggressiveTrimming
* [testing][EAT] Revert trimming framework library features to browser defaults for enable aggressive trimming
* [tests] Add Xamarin Android, Xamarin Mac/iOS, and Wasm feature defaults to Functional tests
* Fixup tabs to spaces
* Add common feature switches, links, and cleanup
* Cleanup Xamarin Android link
Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
Bruce Forstall [Fri, 28 May 2021 23:47:12 +0000 (16:47 -0700)]
Fix SuperPMI collect with getIntConfigValue (#53442)
* Fix SuperPMI collect with getIntConfigValue
PR #52427 introduced a per-compilation call to getIntConfigValue
on "SuperPMIMethodContextNumber". This pseudo-config should not
be collected. It exposed a pre-existing multi-threading issue in
the superpmi collector shim. I got rid of the per-compilation
override of the jithost MethodContext, which is problematic, and
currently unneeded, but documented the considerations around collecting
per-compilation data.
Fixes #53440
* Update src/coreclr/ToolBox/superpmi/superpmi-shim-collector/jithost.cpp
Co-authored-by: Kunal Pathak <Kunal.Pathak@microsoft.com>
Co-authored-by: Kunal Pathak <Kunal.Pathak@microsoft.com>
Stephen Toub [Fri, 28 May 2021 22:40:53 +0000 (18:40 -0400)]
Use IsReferenceOrContainsReferences in ConcurrentQueue/Bag (#53438)
James Thomson [Fri, 28 May 2021 22:01:40 +0000 (23:01 +0100)]
Fix `Task.Delay()` `<exception>` XML comments (#53392)
* Fix `Task.Delay()` `<exception>` XML comments
Fix `ObjectDisposedException` comments to state that the exception is
thrown when the `CancellationTokenSource` of the `CancellationToken` is
disposed, and not the `CancellationToken` itself.
* Use suggested message
Co-authored-by: Sam Harwell <sam@tunnelvisionlabs.com>
* Use suggested message
Co-authored-by: Sam Harwell <sam@tunnelvisionlabs.com>
Vladimir Sadov [Fri, 28 May 2021 21:57:37 +0000 (14:57 -0700)]
Merged PR 13255: [5.0 MSRC] Ensure that extracted bundle does not use preexisting files. (#53374)
Changed location of the extraction root directory on Unix:
- from ` $TMPDIR\.net\ ` typical path is ` \var\tmp\.net\userName\AppName\App.ID\stuff `
- to ` $HOME\.net\ ` typical path is ` \home\userName\.net\AppName\App.ID\stuff `
Andy Ayers [Fri, 28 May 2021 19:00:01 +0000 (12:00 -0700)]
Add new devirt reason. (#53334)
Stephen Toub [Fri, 28 May 2021 18:46:46 +0000 (14:46 -0400)]
Enable recently added Microsoft.CodeAnalysis.NetAnalyzers rules (#53158)
Nikitin A. Kirill [Fri, 28 May 2021 18:42:44 +0000 (22:42 +0400)]
Fix GetLoadContextForDynamicAssembly GC Stress Fail (#53341)
Kunal Pathak [Fri, 28 May 2021 18:42:23 +0000 (11:42 -0700)]
Do not assume about another half regrec (#53412)
Nikitin A. Kirill [Fri, 28 May 2021 18:42:08 +0000 (22:42 +0400)]
Fix #48579 (#49387)
Tarek Mahmoud Sayed [Fri, 28 May 2021 17:46:02 +0000 (10:46 -0700)]
Fix Time Zone Id Conversion with Lowercased Regions (#53315)
Co-authored-by: Martin Costello <martin@martincostello.com>
dotnet-maestro[bot] [Fri, 28 May 2021 15:48:31 +0000 (15:48 +0000)]
[main] Update dependencies from mono/linker (#53144)
[main] Update dependencies from mono/linker
Tom Deseyn [Fri, 28 May 2021 15:09:13 +0000 (17:09 +0200)]
Console.Unix: fix, make CancelKeyPress work when input is redirected. (#52891)
* Console.Unix: fix, make SIGINT work when input is redirected.
* Fix misplaced s_initialized assignment
Juan Hoyos [Fri, 28 May 2021 12:44:27 +0000 (05:44 -0700)]
Disable flaky CodeDom tests (#53419)
Viktor Hofer [Fri, 28 May 2021 11:11:03 +0000 (13:11 +0200)]
Upgrading netcoreapp2.x and NCA3.0 to netcoreapp3.1 (#53358)
Upgrading the netcoreapp2.x and netcoreapp3.0 build configurations in
projects to netcoreapp3.1 and cleaning up conditions so that future
tfm upgrades require less project file changes.
Adding NETStandardError markers to prevent available netstandard2.0
assets being picked instead, same as already done for System.Speech
and others.
For more details please see the reasoning in the linked issue.
Contributes to #53282
Adam Sitnik [Fri, 28 May 2021 08:08:42 +0000 (10:08 +0200)]
Wasm.Build.Tests should not use local targeting runtime pack, fixes #53405 (#53410)
Pavel Savara [Fri, 28 May 2021 05:12:59 +0000 (07:12 +0200)]
[wasm][xharness] install development SSL certificate on Helix agent before xharness run via SDK or powershell (#53280)
Co-authored-by: Ankit Jain <radical@gmail.com>
Caused by #53180, #53225
- The original approach to install certificates didn't work because we don't have dotnet SDK, just runtime on Helix agents.
- dotnet dev-certs https needs user interaction with a dialog. Instead, using powershelgl to install certs
- Wasm.Build.Tests are being disabled here because of #53405
Fixes #53207
Levi Broderick [Fri, 28 May 2021 04:08:53 +0000 (21:08 -0700)]
Expose Array.Clear(Array) as public API (#53388)
Fan Yang [Fri, 28 May 2021 00:45:19 +0000 (20:45 -0400)]
Use HELIX_WORKITEM_UPLOAD_ROOT as the output dir (#53384)
Tarek Mahmoud Sayed [Fri, 28 May 2021 00:44:41 +0000 (17:44 -0700)]
Address the feedback left on the Introducing Metrics APIs PR (#53324)
dotnet-maestro[bot] [Fri, 28 May 2021 00:40:40 +0000 (20:40 -0400)]
[main] Update dependencies from dotnet/runtime dotnet/arcade dotnet/icu dotnet/xharness dotnet/runtime-assets dotnet/hotreload-utils (#53171)
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Ankit Jain <radical@gmail.com>
Co-authored-by: David Wrighton <davidwr@microsoft.com>
Ankit Jain [Fri, 28 May 2021 00:21:04 +0000 (20:21 -0400)]
[wasm] Use rsp file for emcc default flags, and a props file instead of txt (#52941)
Co-authored-by: Larry Ewing <lewing@microsoft.com>
`emcc-default.rsp`:
- this replaces `emcc-flags.txt` which was generated at wasm build time
as the default set of flags.
`Emcc.props`:
- this replaces `emcc-version.txt` which was generated at wasm build
time, and contained the output of `emcc --version`, eg:
`emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 2.0.12 (
d0e647bf266caad50943e78c9841e05e9c499a5d)`
- Instead of this, we now generate `Emcc.props`, which has:
`$(RuntimeEmccVersionRaw)` - full version string (`emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 2.0.12 (
d0e647bf266caad50943e78c9841e05e9c499a5d)`)
`$(RuntimeEmccVersion)` - parsed version (`2.0.12`)
`$(RuntimeEmccVersionHash)` - parsed hash (`
d0e647bf266caad50943e78c9841e05e9c499a5d`)
- these might be useful for nugets with native libraries for use with
wasm, for example
- Also, extracted `WasmApp.Native.targets` from `WasmApp.targets`
Aaron Robinson [Fri, 28 May 2021 00:07:07 +0000 (17:07 -0700)]
Show PID when using debug attach flag with corerun (#53385)
Fan Yang [Fri, 28 May 2021 00:03:20 +0000 (20:03 -0400)]
[Mono] Disable failing tests on Android (#53357)
This PR contians change disabling 3 failing tests and one long running tests, which fails sporadically. Long running tests will be marked correctly via #53386
Jan Kotas [Thu, 27 May 2021 23:42:12 +0000 (16:42 -0700)]
Marshal.PtrToStructure fixes (#53360)
- Fix reflection annotations. PtrToStructure calls private constructors.
- Move PtrToStructure overload that creates objects to shared CoreLib.
- Fix Mono implementation to call private constructor.
- Fix Mono error handling to match CoreCLR.
Jeremy Barton [Thu, 27 May 2021 21:47:21 +0000 (14:47 -0700)]
Add root store directory fallback on Linux/Unix.
When reading the root store directory for the first time, if
the read produced no data and the SSL_CERT_DIR environment
variable wasn't set, see if /etc/ssl/certs gives a different answer.
This change also changes the LastWriteTime model for caching
to not pin the symlink target on the first read, and support the
bundle file being a symlink (and the target being updated to
trigger refresh).
Eric Erhardt [Thu, 27 May 2021 20:25:17 +0000 (15:25 -0500)]
Remove System.Text.Json's DynamicDependencies on Collections.Immutable (#53317)
This saves roughly 28 KB compressed in a default blazor wasm app.
Fix #53256
Sergey Andreenko [Thu, 27 May 2021 20:20:11 +0000 (13:20 -0700)]
Check that 'lvDoNotEnregister' is set as necessary. (#52802)
* add a repro test.
* LclVar which addresses are taken should be marked as doNotEnreg.
Check that we don't have independently promoted LCL_VAR that are references after lowering.
Check that all LclVars that have ADDR() on top of them are marked as doNotEnreg.
In the past when we did not enregister structs we were allocating them on the stack even without doNotEnreg set.
Jakob Botsch Nielsen [Thu, 27 May 2021 19:20:59 +0000 (21:20 +0200)]
Remove a failing unnecessary test (#53342)
Immo Landwerth [Thu, 27 May 2021 19:11:46 +0000 (12:11 -0700)]
Area owners fixes (#53377)
* Fix indentation
* Fix casing
Jan Jahoda [Thu, 27 May 2021 18:05:35 +0000 (20:05 +0200)]
Disable FileSystemWatcher_DirectorySymbolicLink_TargetsFile_Fails (#53368)
Zoltan Varga [Thu, 27 May 2021 12:57:19 +0000 (08:57 -0400)]
Fix GC safety in mono_llvm_load_exceptions (). (#53318)
Adam Sitnik [Thu, 27 May 2021 10:56:30 +0000 (12:56 +0200)]
Fold System.IO.FileSystem into CoreLib (#53231)
* move Queue<T> to System.Private.CoreLib
* fold System.IO.FileSystem into System.Private.CoreLib
Layomi Akinrinade [Thu, 27 May 2021 06:38:01 +0000 (02:38 -0400)]
Add JSON source-gen mode that emits serialization logic (#53212)
* Add JSON source-gen mode that emits serialization logic
* Fix System.Net.Http.Json test issues
* Fix System.Text.Json test issues
* Make check to determine if fast-path can be used more efficient
* Address review feedback
* Improve derived-JsonSerializerContext detection and support
* Address review feedback; reenable tests, and simplify object metadata
init
* Fix formatting
Viktor Hofer [Thu, 27 May 2021 06:17:21 +0000 (08:17 +0200)]
Remove netframework assets older than net461 from builds and packaging (#53319)
Only a very few number of projects still built for net45-net46.
This PR trims out these assets from the build which of course
results in them not being packaged (as there is no harvesting
mechanism in the repository present anymore).
Suppressing the package warnings for the intentionally dropped
assets and cleaning up conditions in the project file as well.
For more details please see the reasoning in the linked issue.
Contributes to #53282
Geoff Kizer [Thu, 27 May 2021 05:58:37 +0000 (22:58 -0700)]
implement cancellation support for SendFileAsync and DisconnectAsync (#53062)
implement cancellation support for SendFileAsync and DisconnectAsync, and rework some internal async logic to support this and reduce code duplication
Jeff Handley [Thu, 27 May 2021 05:00:23 +0000 (22:00 -0700)]
Use Stopwatch.StartNew() in ImageAnimator (#53330)
Andy Ayers [Thu, 27 May 2021 03:01:30 +0000 (20:01 -0700)]
Add pgo testing to outerloop (#53301)
Also update jit-experimental to no longer run PGO or EH WriteThru.
Sergey Andreenko [Thu, 27 May 2021 02:24:01 +0000 (19:24 -0700)]
Remove phi nodes during rationalize. (#53269)
* Delete references to `GT_PHI_ARG/GT_PHI` after rat.
* Delete references after Rat.
* add check that we don't see them.
Kunal Pathak [Wed, 26 May 2021 23:58:20 +0000 (16:58 -0700)]
Rename superpmi tests collection names (#53108)
* Rename tests collection names
- Rename tests.pmi to coreclr_tests.pmi
- Rename tests_libraries.pmi to libraries_tests.pmi
* changes in superpmi.py
Drew Scoggins [Wed, 26 May 2021 22:03:58 +0000 (15:03 -0700)]
Add WebKit (javascriptcore) WASM runs (#53257)
* Add javascript engine selection and runs
* Fixup runs
* Testing
* Fix spacing
* Change jsc to javascriptcore
* Remove testing comments
* Add back V8 runs
Ulrich Weigand [Wed, 26 May 2021 20:06:54 +0000 (22:06 +0200)]
Build support for s390x: Fix a few paltests (#53288)
* Accommodate platforms (like s390x) where the SIGSEGV fault address
is only provided on a page granularity by the HW/OS
* All paltests now pass on s390x
Viktor Hofer [Wed, 26 May 2021 19:51:12 +0000 (21:51 +0200)]
Remove NS1.x assets from building and packaging (#53283)
* Remove NS1.x assets from build and packaging
These ten projects still built for netstandard1.x. This PR
trims out these assets from both the build which also results
in them not being packaged anymore as there is no harvesting
mechanism in the repository anymore.
Suppressing the package warnings for the intentionally dropped
assets and cleaning up conditions in the project file as well.
For more details please see the reasoning in the linked issue.
Contributes to https://github.com/dotnet/runtime/issues/53282
dotnet-maestro[bot] [Wed, 26 May 2021 19:39:37 +0000 (21:39 +0200)]
[main] Update dependencies from dnceng/internal/dotnet-optimization (#53222)
* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build
20210524.6
optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
From Version 1.0.0-prerelease.21273.4 -> To Version 1.0.0-prerelease.21274.6
* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build
20210525.7
optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
From Version 1.0.0-prerelease.21273.4 -> To Version 1.0.0-prerelease.21275.7
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Pranav K [Wed, 26 May 2021 18:33:58 +0000 (11:33 -0700)]
Use literals instead of static readonly for HostFactoryResolver.cs (#53295)
The type is internal + part of a source-only package, so there shouldn't be any harm in this change. Also lets us remove [a workaround](https://github.com/dotnet/aspnetcore/blob/main/.editorconfig#L100-L102) in the AspNetCore repo.
Stephen Toub [Wed, 26 May 2021 18:23:36 +0000 (14:23 -0400)]
Update XML comment for MetadataUpdateHandlerAttribute (#53262)
SingleAccretion [Wed, 26 May 2021 18:17:23 +0000 (21:17 +0300)]
"Fold overflow operations in value numbering" (second attempt after revert) (#51440)
* Added a missing license header
* Added a test verifying that checked arithmetic is correct
* Added a test verifying that checked casts are correct
* Disabled the test for checked casts on Mono
* Refactored VNEvalShouldFold
* Refactored gtFoldExprConst to use helpers and follow the common code style
* Fixed the comment stating TYP_BYREF has no zero value
* Moved checking of overflow for arithmetic operations from gtFoldExprConst into a separate namespace
* Implemented folding of overflow arithmetic in value numbering
* Fixed some typos in valuenum.cpp/h
* Added identity-based evaluation for overflow arithmetic
* Made the definition of var_types a standalone header so that it can be safely #included'ed in utils.h
* Refactored gtFoldExpr some more, moved the overflow checking logic to CheckedOps, implemented overflow checking for floating point -> integer casts
* Implemented folding of checked casts in value numbering
* Demote the tests to Tier1
They throw and catch quite a few exceptions.
* Fixed a comment
UINT32 -> UINT64
* Made arithmetic CheckedOps functions templated
Reduces code duplication and obviates the need for
some conditions and casts.
They use the implementation from the Long* variants of
the old functions, except for "SubOverflows", where some
instantiations, unreachable at runtime, were using "size_t" as the
type argument and causing warnings. The relevant part of "AddOverflows"
has been inlined into "SubOverflows".
* Move the locals under "if" to avoid shadowing
* Use ClrSafeInt instead of custom code
* Fix a copy and paste mistake
Co-authored-by: Anton Lapounov <anton.lapounov@microsoft.com>
* Update src/coreclr/jit/utils.cpp
* Apply suggestions from code review
Co-authored-by: Anton Lapounov <anton.lapounov@microsoft.com>
* Assert type != TYP_BYREF in VNEvalShouldFold
The method is not prepared to handle them.
Also add a note about that to the header.
Also delete TODO-Review about it.
Right now the only caller of VNEvalShouldFold guards against
TYP_BYREF folding, so this assert is a safety measure against
future callers not taking byrefs into account.
* Drop the MAX_ prefix from MIN
Co-authored-by: Anton Lapounov <anton.lapounov@microsoft.com>
David Wrighton [Wed, 26 May 2021 18:06:39 +0000 (11:06 -0700)]
Fix devirtualization in shared generic context
In circumstances where the JIT doesn't provide exact enough details about the impl type and interface method to identify exactly which method should be called
- In particular, when the impl class implements multiple copies of the target interface, and they are canonically compatible with the interface method that is to be called
- Simply disable devirtualization for these scenarios
Fixes #51982
Viktor Hofer [Wed, 26 May 2021 17:57:04 +0000 (19:57 +0200)]
Expose the UseLocalTargetingRuntimePack property (#53290)
* Expose the UseLocalTargetingRuntimePack property
and use it in the Microsoft.NETCore.Platforms package to avoid a dependency on the live built targeting and runtime pack / shared framework.
* Update Microsoft.NETCore.Platforms.csproj
Drew Scoggins [Wed, 26 May 2021 17:52:41 +0000 (10:52 -0700)]
Add different pgo data runs (#52780)
* Add different pgo data runs
* Fix if else formatting
* Update log artifact name
* Turn off failing tests for these runs
* Remove filter
* Fix config order
* Remove testing comments
Steve Pfister [Wed, 26 May 2021 17:16:59 +0000 (13:16 -0400)]
Remove -O=-float32 from Default AOT process arguments (#53209)
Addresses https://github.com/dotnet/runtime/issues/51992
Fan Yang [Wed, 26 May 2021 16:35:29 +0000 (12:35 -0400)]
Move Android x64 to normal pipeline (#53237)
Natalia Kondratyeva [Wed, 26 May 2021 16:08:25 +0000 (18:08 +0200)]
[QUIC] Handle connection abort in streams (#52776)
This leverages newly added flag to SHUTDOWN_COMPLETED event, which means that's not a user-initiated stream shutdown, but a connection abort.
Fixes #32050
Andy Ayers [Wed, 26 May 2021 15:56:09 +0000 (08:56 -0700)]
JIT: pgo/devirt diagnostic improvements (#53247)
Several changes to help better diagnose PGO and devirtualization issues:
* Report the source of the PGO data to the jit
* Report the reason for a devirtualization failure to the jit
* Add checking mode that compares result of devirtualization to class profile
* Add reporting mode to assess overall rates of devirtualization failure
when the jit has exact type information.
Also fix a loophole where in some case we'd still devirtualize if not
optimizing.
Note crossgen2 does not yet set devirtualization failure reasons.
Jan Vorlicek [Wed, 26 May 2021 15:19:57 +0000 (17:19 +0200)]
JIT into scratch buffer (#53173)
* Generate JITted code into a scratch buffer
Copy it to the final location after the JITing is done.
* Put also the code header and real code header into the buffer
* Disable the scratch buffer usage until we enable W^X