Allan Targino [Tue, 28 Sep 2021 15:56:47 +0000 (12:56 -0300)]
Removing unused CallSiteKind items from Dependency Injection (#59687)
Removing Scope, Transient and Singleton from enum CallSiteKind.
Their CallSites were removed by
8e8650f9
Pavel Ivanov [Tue, 28 Sep 2021 15:56:20 +0000 (20:56 +0500)]
Prevent cache from being resized (#59607)
Eric StJohn [Tue, 28 Sep 2021 15:43:00 +0000 (08:43 -0700)]
Fix race condition in ServiceProcess tests (#59676)
N0D4N [Tue, 28 Sep 2021 15:29:58 +0000 (18:29 +0300)]
Reduce allocations in VersionConverter (#55564)
* Add more test cases for VersionConverter
* Reduce allocations in VersionConverter.Read method
* Remove allocations from VersionConverter.Write method
* Parse Version from chars, instead of parsing individual components. Assert successful formatting on write.
* Allow escaping, disallow leading and trailing whitespaces
* Hopefully fix tests for .NET Framework, add few more test cases that should fail
* Assume whitespaces can be only on the start, or only at the end, add one more test case that should fail
* Remove redundant return statements
* Elaborate on comment regarding leading and trailing whitespaces. Copy it to .NetStandard2.0 target.
* Add another test case.
Johan Lorensson [Tue, 28 Sep 2021 15:25:32 +0000 (17:25 +0200)]
Update MonoVM diagnostics-tracing doc with new features and scenarios. (#58620)
Pavel Ivanov [Tue, 28 Sep 2021 15:16:47 +0000 (20:16 +0500)]
Remove redundant checks (#59310)
* Remove useless if-else branch
* Try to change the absolute expiration only if the relative has value
Allan Targino [Tue, 28 Sep 2021 15:14:15 +0000 (12:14 -0300)]
Dependency Injection support for ValueTypes as Services (#59625)
* Dependency Injection support for ValueTypes as Services
The only that was thing missing to support ValueTypes as Services
was box the result when visiting constructors call sites.
I am also fixing several tests that were building the ServiceProvider
using the default engine, instead of relying on each specific engine.
fix #42160
* addressing pr feedback regarding tests
Allan Targino [Tue, 28 Sep 2021 15:01:15 +0000 (12:01 -0300)]
Using optimized ILGenerator.Emit function in Dependency Injection (#59680)
We were doing some local optimizations with MSIL’s Stloc and Ldloc,
but the very same ones are already present in an override of the
ILGenerator.Emit function, so we can remove them.
This PR also fixes the use of Ldloca that was generating additional
nop operations.
fix #59624
Zoltan Varga [Tue, 28 Sep 2021 14:08:52 +0000 (16:08 +0200)]
[mono][jit] Eliminate some type comparisons in gshared methods. (#59543)
* [mono][jit] Make MONO_INS_HAS_NO_SIDE_EFFECT () into a function.
* [mono][jit] Eliminate some type comparisons in gshared methods.
Comparisons of the form
```
internal static void ThrowForUnsupportedIntrinsicsVectorBaseType<T>() where T : struct
{
if (typeof(T) != typeof(byte) && typeof(T) != typeof(sbyte) &&
...
}
```
are very common in BCL code. They are compiled to:
```
IL_0001: ldtoken !!T
IL_0006: call [System.Runtime]System.Type [System.Runtime]System.Type::GetTypeFromHandle([System.Runtime]System.RuntimeTypeHandle)
IL_000b: ldtoken [System.Runtime]System.Byte
IL_0010: call [System.Runtime]System.Type [System.Runtime]System.Type::GetTypeFromHandle([System.Runtime]System.RuntimeTypeHandle)
IL_0015: call bool [System.Runtime]System.Type::op_Inequality([System.Runtime]System.Type,
[System.Runtime]System.Type)
IL_001a: brfalse IL_015a
```
In gshared code, !!T is usually constrained to be a reference, or to have a primitive base type.
Use this fact to eliminate some of the Type::op_Equality/op_Inequality () calls.
Fixes https://github.com/dotnet/runtime/issues/54849.
Stephen Toub [Tue, 28 Sep 2021 13:28:27 +0000 (09:28 -0400)]
Disabling Match_ExcessPrefix until the attribute is fixed
Sergey Andreenko [Tue, 28 Sep 2021 12:45:36 +0000 (05:45 -0700)]
Fewer AddressExposedReason::TOO_CONSERVATIVE (#59429)
Delete some too_conservative addrExposed reasons.
Thays Grazia [Tue, 28 Sep 2021 00:14:07 +0000 (21:14 -0300)]
Remove log message when closing browser while debugging. (#59664)
Steve Pfister [Mon, 27 Sep 2021 23:06:01 +0000 (19:06 -0400)]
Skip ExportPkcs7_Empty test on mobile platforms
* Skip ExportPkcs7_Empty test on mobile platforms
The test made it through and was failing on CI. PKCS#7 export is not supported on mobile platforms.
* PKCS7_Empty was failing on android b/c 0 length was not allowed.
Co-authored-by: Steve Pfister <steve.pfister@microsoft.com>
dotnet bot [Mon, 27 Sep 2021 21:28:48 +0000 (14:28 -0700)]
Localized file check-in by OneLocBuild Task (#59662)
Alexander Radchenko [Mon, 27 Sep 2021 19:24:18 +0000 (02:24 +0700)]
Add checking SpeechRecognitionEngine Culture to GrammarBuilder test (#59516)
* Add checking SpeechRecognitionEngine Culture to GrammarBuilder test.
* Update GrammarTests.cs
Co-authored-by: Dan Moseley <danmose@microsoft.com>
Ankit Jain [Mon, 27 Sep 2021 18:10:07 +0000 (18:10 +0000)]
forward-port from `release/6.0-rc2`: MonoAOTCompiler: detect when nothing has changed, a… (#59597)
…nd skip any precompiling (#58979)
Refactor to allow fast-path
implement fast-path for MonoAOTCompiler when nothing has changed
re-enable some tests that got disabled by mistake
(cherry picked from commit 9fd17b1)
Bruce Forstall [Mon, 27 Sep 2021 17:50:04 +0000 (10:50 -0700)]
Change loop cloning condition blocks flow graph (#59233)
Currently, the loop choice condition blocks are created in a way that creates
a confusing flow graph. Restructure them to be simpler, and lay the path for
future work.
The simpler layout (and, hopefully, code and logic to create them) also
lays the groundwork to potentially put the slow path loop in the loop table,
if desired, as it creates a "standard" loop header layout.
While the flow graph has an extra block or two, there are almost no diffs,
as subsequent phases clean up any extras.
There are a few diffs where the new layout enables some downstream optimization
phases that were stymied by the old layout, but mostly in cases where we leave
around dead code slow cloned blocks (a known issue). Also, there are a couple
trivial CSE changes.
Bruce Forstall [Mon, 27 Sep 2021 17:47:14 +0000 (10:47 -0700)]
Add superpmi.exe option to break to the debugger on exception. (#59234)
If you use `-box` (similar to pre-existing `-boa`, `-boe`), then
an exception with invoke a `DebugBreak`, which will stop in the
debugger when an exception is thrown during replay. This is helpful
when debugging (without needing to configure the debugger to catch
a specific exception).
Eric StJohn [Mon, 27 Sep 2021 15:59:51 +0000 (08:59 -0700)]
Add InstallLocation component to host (#59537)
Jakob Botsch Nielsen [Mon, 27 Sep 2021 15:39:34 +0000 (17:39 +0200)]
Write SPMI download progress in MB (#59647)
Maxim Lipnin [Mon, 27 Sep 2021 14:55:54 +0000 (17:55 +0300)]
Add argument check (#59634)
Krzysztof Wicher [Mon, 27 Sep 2021 13:41:32 +0000 (15:41 +0200)]
update area-owners to account for pod change (#59635)
Radek Doulik [Mon, 27 Sep 2021 13:33:09 +0000 (15:33 +0200)]
[mono] Improve Makefile's dotnet.js dependencies (#59603)
* [mono] Improve Makefile's dotnet.js dependencies
* Pass _MSBUILD_WASM_BUILD_ARGS properly
* And add $(MSBUILD_ARGS) as well
Ankit Jain [Mon, 27 Sep 2021 09:47:26 +0000 (09:47 +0000)]
[wasm] windows: Fail the build if provisioning fails (#59560)
Pavel Savara [Mon, 27 Sep 2021 07:45:23 +0000 (09:45 +0200)]
[draft][wasm] introduce typescript modules (#59392)
- refactor wasm javascript as typescript
- use nodeJs from EMSDK
- use rollup.js for packing code as ES6 IFFE for emcc consumption
- incremental build:
Co-authored-by: Radek Doulik <radekdoulik@gmail.com>
- types:
Co-authored-by: Daniel Genkin <genkind@gmail.com>
* linker feedback
Kunal Pathak [Mon, 27 Sep 2021 04:57:36 +0000 (21:57 -0700)]
Pipeline to run Exploratory fuzzing tool to catch codegen issues (#59489)
* Exploratory tool pipeline
Add pipeline to run exploratory tools and return back the result
* Use public Antigen repo
* Add RunDuration
* Rename some of the files to antigen
* TOREVERT: download specific artifacts
* Trigger nightly and on PRs
* Adjust the duration
* Exit on fail for Antigen
* Rename yml files
* Add Antigen.md
* Temporarily run for 10 minutes
* Remove non-x64 build download and helix workaround
* Add back HelixResultsDestinationDir
* Change to net6.0
* extra ,
* Antigen is still on net5.0
* Default framework net6.0
* Run for 3 hours
* Run full build
* fix space
* Make the schedule weekly Sun@6am
* Reduce duration to 2 hours
Eric Erhardt [Mon, 27 Sep 2021 03:15:51 +0000 (22:15 -0500)]
Remove invalid test exclusions. (#59608)
These exclusions are pointing to non-existing files. So they are not doing anything.
Jason Pugsley [Sun, 26 Sep 2021 05:37:11 +0000 (15:37 +1000)]
FreeBSD12 version cleanup and process and thread enhancements (#59339)
* Set FreeBSD 12 as minimum version
This is a small clean-up to remove reliance on FreeBSD versions
prior to 12 and more specifically 12.2 which is the lowest currently
supported version of FreeBSD. 11.4 becomes unsupported as of
October 2021. See https://www.freebsd.org/releases/
* Add functionality for FreeBSD process and threads
Added support for naming native threads, the process disambiguation
key and detecting if the process is running under a debugger.
Changed references to thr_self to pthread_getthreadid_np already
used elsewhere - it returns the same value.
Egor Bogatov [Sat, 25 Sep 2021 22:54:28 +0000 (01:54 +0300)]
JIT: Convert Interlocked intrinsics to NamedIntrinsics (#55170)
Aleksey Kliger (λgeek) [Sat, 25 Sep 2021 13:55:34 +0000 (09:55 -0400)]
[tests] Fix PlatformDetection.IsMonoInterpreter for mobile (#59587)
* [tests] Correctly detect the Mono interpreter
Checking for MONO_ENV_OPTIONS is not reliable for the mobile test runners
because they use the embedding API to enable the interpreter, rather than
setting an environment option.
Instead detect the interpreter by checking the values of the
IsDynamicCodeSupported and IsDynamicCodeCompiled runtime features.
* [tests] Run System.Threading.Tasks.Dataflow.Tests on Apple platforms
* Only check RuntimeFeature on netcoreapp. Otherwise return false
these tests are not running on mono if they're running on .NET Framework
Tomas Weinfurt [Fri, 24 Sep 2021 23:12:27 +0000 (16:12 -0700)]
enable client certificate test for QUIC on Linux (#59544)
github-actions[bot] [Fri, 24 Sep 2021 22:52:40 +0000 (15:52 -0700)]
[main] [Release/6.0] Throw error if assembly version for ref pack assemblies doesnot match assembly version shipped in 6.0.0 (#59583)
* throw errow if assembly version in the ref pack doesnot match last released version
* Fix the condition
* Update eng/Versions.props
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
Co-authored-by: Anirudh Agnihotry <anagniho@microsoft.com>
Co-authored-by: Anirudh Agnihotry <anirudhagnihotry098@gmail.com>
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
Jan Kotas [Fri, 24 Sep 2021 22:02:33 +0000 (15:02 -0700)]
Delete unused file (#59585)
Vladimir Sadov [Fri, 24 Sep 2021 21:36:13 +0000 (14:36 -0700)]
Some more cleanups in Assembly/Binder area (#59288)
* Reducing BINDER_SPACE::Assembly closer to what it represents
* make GCC happy
* Removed `Binder[AddRef/Release]PEImage`. Can just use `AddRef/Release`
* moved IsValidArchitecture helper to bindercommon
* Removed the notion of PEModule - it does not exist
* some more unused code
* fix for GCC
* associate System lib with DefaultBinder - makes things simpler
* PR feedback
Jeff Handley [Fri, 24 Sep 2021 21:21:21 +0000 (17:21 -0400)]
Add a note about rerunning the license/cla check (#59440)
Juan Hoyos [Fri, 24 Sep 2021 20:35:09 +0000 (13:35 -0700)]
Fix behavior ObjectCollection for single item contains (#59547)
* Fix behavior ObjectCollection for single item contains
* Address PR feedback
Steve Harter [Fri, 24 Sep 2021 20:06:33 +0000 (15:06 -0500)]
Fix ArrayPool leak with JsonDocument (#59540)
Radek Doulik [Fri, 24 Sep 2021 19:16:01 +0000 (21:16 +0200)]
[mono] Add link dependencies for dotnet.js (#59470)
This fixes incremental build in cases where the js libraries are changed
or the response file.
Eric StJohn [Fri, 24 Sep 2021 17:55:59 +0000 (10:55 -0700)]
Add execute bit to postinstall script (#59552)
Egor Bogatov [Fri, 24 Sep 2021 17:44:48 +0000 (20:44 +0300)]
JIT: Return multiple likely classes in getLikelyClass (for better GDV) (#58984)
Co-authored-by: Jakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com>
Co-authored-by: Bruce Forstall <brucefo@microsoft.com>
Co-authored-by: Andy Ayers <andya@microsoft.com>
Andrew Au [Fri, 24 Sep 2021 17:01:10 +0000 (10:01 -0700)]
Improve ReliabilityFramework (#59384)
Kevin Jones [Fri, 24 Sep 2021 16:31:35 +0000 (12:31 -0400)]
Fix PKCS7 export quirks.
On macOS, exporting an empty X509Certificate2Collection to PKCS7 would
produce an exception. Instead, we return a pre-encoded empty PKCS7
result.
On Windows, the PKCS7 export would include trailing zeros in PKCS7
export. This occured because the first calls to CertSaveStore would
return a size that is at least big enough, but not exact. This trims the
result to the actual amount written on the second call.
Krzysztof Wicher [Fri, 24 Sep 2021 15:03:37 +0000 (17:03 +0200)]
disable System.SpanTests.SpanTests.FillNativeBytes (#59563)
Jakob Botsch Nielsen [Fri, 24 Sep 2021 13:47:15 +0000 (15:47 +0200)]
Remove unused emitter call types and improve INS_tail_i_jmp handling (#59495)
The size estimation for INS_tail_i_jmp instructions was working by
accident: we were always regarding these as requiring rex.w
prefixes, even when they did not. Fix the logic so that rex.w is not
considered required for 8-byte tail jumps, but add it manually for the
forms where it is really necessary.
There were also a lot of unused emitter call types that I have removed.
Jan Kotas [Fri, 24 Sep 2021 13:14:29 +0000 (06:14 -0700)]
Rewrite Enum.HasFlags and Enum.Equals in C# (#59514)
Jan Vorlicek [Fri, 24 Sep 2021 12:51:32 +0000 (14:51 +0200)]
Fix krb5 library SO name in the gcc api shim (#59526)
The library name used in the shim is a name of the build time library which
is usually installed only for development purposes. We should use
libgssapi_krb5.so.2 which is the underlying runtime library.
Dan Moseley [Fri, 24 Sep 2021 04:36:59 +0000 (22:36 -0600)]
Update area owners to include new owners of S.DS.* (#59357)
@jay98014 @grubioe @BRDPM
Aaron Robinson [Fri, 24 Sep 2021 03:41:33 +0000 (20:41 -0700)]
Add a no-cache backed CLRConfig lookup mechanism (#59513)
* Add a no cache backed CLRConfig lookup mechanism
Remove remaining locations that had a hardcoded COMPlus_ prefix.
The new no cache CLRConfig is usable from within the PAL.
Alex Covington [Thu, 23 Sep 2021 22:56:30 +0000 (15:56 -0700)]
Issue 59415 (#59497)
* Undo shift-back with AVX register for block copy, use GPR for remainder. Results in better perf
* Cleanup
* Use GPR instead of SIMD for block init remainder
* JIT formatting
* More JIT formatting
* Fixed local jit-format.bat, formatting should be correct now
* Using older jit-format.bat on backup machine
* Revert "Using older jit-format.bat on backup machine"
This reverts commit
b0e081714cab85aa9fd5cec53375745fa5c68fb2.
* Revert "Fixed local jit-format.bat, formatting should be correct now"
This reverts commit
39c3f2ff22e8c7abfa7108b2506ecb10c249c320.
* Revert "More JIT formatting"
This reverts commit
237ce3122294201abbcfd2c52cbb1ebccc4f4462.
* Revert "JIT formatting"
This reverts commit
3191bd4075fc1c93ac9eeb0af08e367702d3d804.
* Undo weird JIT formatting, add note for YMM->XMM step down
Jeremy Koritzinsky [Thu, 23 Sep 2021 21:34:00 +0000 (14:34 -0700)]
Move clang-format download into dotnet/runtime and add docs for setting up auto-formatting in the repository (#59374)
Jeremy Koritzinsky [Thu, 23 Sep 2021 21:28:42 +0000 (14:28 -0700)]
Remove unused crossIBC.ps1 script (#59530)
Prashanth Govindarajan [Thu, 23 Sep 2021 21:26:42 +0000 (14:26 -0700)]
Revert "Fix incorrect handling of character range and capitalization … (#59425)
* Minimal change
* Nit
* Use the new Regex engine infra properly
Andy Gocke [Thu, 23 Sep 2021 21:17:09 +0000 (14:17 -0700)]
Prevent racing on installer shared props/targets (#59276)
Aleksey Kliger (λgeek) [Thu, 23 Sep 2021 18:54:23 +0000 (14:54 -0400)]
[docs] macOS: add note about Xcode command line tools (#59477)
Tom Deseyn [Thu, 23 Sep 2021 16:25:49 +0000 (18:25 +0200)]
File preallocationSize: align Windows and Unix behavior. (#59338)
* File preallocationSize: align Windows and Unix behavior.
This aligns Windows and Unix behavior of preallocationSize for the
intended use-case of specifing the size of a file that will be written.
For this use-case, the expected FileAccess is Write, and the file should be
a new one (FileMode.Create*) or a truncated file (FileMode.Truncate).
Specifing a preallocationSize for other modes, or non-writable files throws ArgumentException.
The opened file will have a length of zero, and is ready to be written to by the user.
If the requested size cannot be allocated, an IOException is thrown.
When the OS/filesystem does not support pre-allocating, preallocationSize is ignored.
* fix pal_io preprocessor checks
* pal_io more fixes
* ctor_options_as.Windows.cs: fix compilation
* Update tests
* tests: use preallocationSize from all public APIs
* pal_io: add back FreeBSD, fix OSX
* tests: check allocated is zero when preallocation is not supported.
* Only throw for not enough space errors
* Fix compilation
* Add some more tests
* Fix ExtendedPathsAreSupported test
* Apply suggestions from code review
Co-authored-by: David Cantú <dacantu@microsoft.com>
* Update System.Private.CoreLib Strings.resx
* PR feedback
* Remove GetPathToNonExistingFile
* Fix compilation
* Skip checking allocated size on mobile platforms.
Co-authored-by: David Cantú <dacantu@microsoft.com>
Alexander Radchenko [Thu, 23 Sep 2021 16:07:12 +0000 (23:07 +0700)]
Fix QuotedNumbers_Deserialize test (#59399)
Jakob Botsch Nielsen [Thu, 23 Sep 2021 15:17:45 +0000 (17:17 +0200)]
Fix underestimation of temps size (#58969)
It was possible for us to underestimate the size of temps required. This
happened because we used the state of the frame layout to check if the
size of temps was computed and that check was wrong. This could lead us
to make different decisions about which registers needed to be saved in
the prolog and epilog on ARM32. In particular, if the frame size was
around the size where a stack probe is necessary, this could be
possible.
There are also other comments that suggest that this could result in
failure while encoding instructions that reference the stack locals.
Fix #58293
Anton Firszov [Thu, 23 Sep 2021 12:48:47 +0000 (14:48 +0200)]
Disable more SendPacketsElement tests on Win11 (#59359)
imhameed [Thu, 23 Sep 2021 08:30:06 +0000 (04:30 -0400)]
[mono] Build system quality of life tweaks (#59511)
On a Linux machine that has a copy of LLVM installed in /usr, along with
a copy of ICU also installed in /usr and registered with `pkg-config`,
`ICU_LDFLAGS` will be populated with `-L/usr/lib`, which will later
cause this flag to be prepended to several targets' linker flags,
causing the linker to fail when attempting to link against the global
copy of LLVM rather than the copy of LLVM supplied by the user.
Work around this by using absolute paths to each LLVM static archive
file.
Additionally, prepend the LLVM include directory to the list of include
directories for every target defined in mono/mini/CMakeLists.txt,
instead of relying on `CMAKE_C_FLAGS` and `CMAKE_CXX_FLAGS` for this,
for improved support in IDEs.
Zoltan Varga [Thu, 23 Sep 2021 07:30:07 +0000 (09:30 +0200)]
[mono] Remove support for llvm versions < 9.0. (#59512)
Jan Kotas [Thu, 23 Sep 2021 07:00:05 +0000 (00:00 -0700)]
Move Type equality operators to shared CoreLib partition (#59499)
Eric Erhardt [Thu, 23 Sep 2021 01:10:40 +0000 (19:10 -0600)]
XmlSerializer support for IsDynamicCodeSupported=false (#59386)
* XmlSerializer support for IsDynamicCodeSupported=false
Add more checks to XmlSerializer to check the SerializationMode. Don't try to use Reflection.Emit if the SerializationMode is ReflectionOnly.
These changes were ported from
* https://github.com/dotnet/runtimelab/pull/593
* https://github.com/dotnet/runtimelab/pull/600
Fix #59167
* Fix a bug in XmlSerializer.CanDeserialize when in ReflectionOnly mode.
* Port UAP code for CanDeserialize
* PR feedback
* Add a linker test to ensure linker option '--enable-opt sealer' works when IsDynamicCodeSupported==false.
Chad Nedzlek [Thu, 23 Sep 2021 01:05:58 +0000 (18:05 -0700)]
Setup retry for System.Net.* tests (#57370)
The Helix SDK in arcade supports test retries in Helix by reading this file, "test-configuration.json" if it's present.
This sets up any test who's assembly name starts with System.Net.* to have 3 attempts (2 reruns) locally.
Huo Yaoyuan [Thu, 23 Sep 2021 00:48:59 +0000 (08:48 +0800)]
Fix xmldoc of TypeGenerationSpec (#59361)
* Fix xmldoc of TypeGenerationSpec
* Apply suggestions from code review
Co-authored-by: Carlos Sanchez <1175054+carlossanlop@users.noreply.github.com>
Co-authored-by: Carlos Sanchez <1175054+carlossanlop@users.noreply.github.com>
Stephen Toub [Wed, 22 Sep 2021 23:57:52 +0000 (19:57 -0400)]
Fix buffering bugs in TextFieldParser (#59487)
Three bugs being fixed here:
1. The SlideCursorToStartOfBuffer method is incorrectly assuming that the buffer is filled to its end (that m_Buffer.Length = m_CharsRead). As a result, two things happen. First, we copy more data than is needed to the temporary buffer; that's just unnecessary but not harmful. But second, when it issues a read to fill the remainder of the buffer, it does so at the wrong position, both leaving zeros in the buffer that end up getting parsed as real data and losing real data from the end.
2. IncreaseBufferSize assumes m_CharsRead = m_Buffer.Length, which may not be the case. As with (1), this can result in it reading into the wrong part of the array and leaving garbage that gets processed.
3. IncreaseBufferSize is always increasing the buffer size, even if only a small portion of the buffer is used. This can then result in the whole operation failing when it repeatedly increases the buffer size and ends up failing due to ticking over the max buffer threshold.
(1) doesn't exist in .NET Framework 4.8 but (2) and (3) do. (1) is easily triggered by a stream that sporadically doesn't produce all the data requested; (2) and (3) end up needing a stream that frequently produces much less than requested. This PR fixes all three.
Adeel Mujahid [Wed, 22 Sep 2021 21:06:41 +0000 (00:06 +0300)]
Update FileStatus field names in HostModel tests (#59482)
In https://github.com/dotnet/runtime/commit/
6a81cfa4e84ab55c26abb25d82ed7355c134a602, we changed `FileSystem._fileStatus._fileStatus.Mode` to `FileSystem._fileStatus._fileCache.Mode` and https://github.com/dotnet/runtime/commit/
159a01acabc79bfeb77d8c0b28de2d5fdb7773d0 adapted the change in test code during the infra update. This PR is updating field and type names along with exception message, that reflects current state.
Andrew Au [Wed, 22 Sep 2021 20:46:51 +0000 (13:46 -0700)]
Mark time trigger (#58261)
github-actions[bot] [Wed, 22 Sep 2021 20:43:23 +0000 (13:43 -0700)]
[main] [Release/6.0] Add uploading of intermediate package assets (#59490)
* add uploading of intermediate package assets
* dont push or sign sourcebuild packages in normal leg to avoid duplication
* add comments
Co-authored-by: Anirudh Agnihotry <anagniho@microsoft.com>
Del Myers [Wed, 22 Sep 2021 20:31:56 +0000 (13:31 -0700)]
Set *isMapped to false to satisfy 'out' semantics (#59430)
CordbModule::IsMappedLayout was not setting the out
parameter *isMapped to false before returning. The
function could therefore have a successful return code
(S_FALSE) without satisfying the constraint that out
parameters be set before return, resulting in undefined
behavior for code that merely checks for a successful
return, rather than S_OK.
This fix updates the function to set *isMapped to false
as soon as it has been verified. It also updates the
documentation of ICorDebugModule4::IsMappedLayout
to indicate that the value of pIsMapped cannot be assumed
to be valid when S_FALSE is returned.
Fixes #59393
Jan Kotas [Wed, 22 Sep 2021 20:11:17 +0000 (13:11 -0700)]
Integrate changes from NativeAOT branch (#59478)
Stephen Toub [Wed, 22 Sep 2021 17:52:02 +0000 (13:52 -0400)]
Add initial regex source generator (#59186)
* Add RegexGeneratorAttribute
Adds the new RegexGenerator attribute that's a signal to the regex
generator to generate code for the specified regex.
* Implement RegexGenerator
Add a source generator for generating C# code for Regex. This is
primarily a port of RegexCompiler.cs, generating C# code instead of
MSIL.
* Add generator test project
Adds tests dedicated to the mechanics of the source generator, e.g. that
appropriate diagnostics are issued for improper use of RegexGenerator.
* Integrate source generator into many regex tests
Start integrating the source generator into the regex test suite, so
that many existing tests also validate the generated code.
* Address PR feedback
* Improve cachability of source generator
Changing the generator to not collect all regexes together means we don't need to reprocess/regenerate all regexes every time any one of them is changed.
* Use closest matching ctor from GetRegexAsync
To better test the appropriate ctor usage.
* Improve a few of the polyfills
* Address PR feedback
* Fully qualify types and remove unnecessary $s
Also fixed one place where the IL we were generating wasn't as good as the reflection emit code.
* Suppress a couple more warnings
* Fix stray !
* Fix TODO about unrolling multi comparisons
Also clean up generated code in a few places to make it more readable / concise.
* Update resources per PR feedback
* Add more tests, clean up parser code, and allow instance/interface methods
* Fix test suppression on mobile
Vitek Karas [Wed, 22 Sep 2021 17:04:00 +0000 (10:04 -0700)]
Split install_location to file-per-architecture (#59404)
On non-Windows we used install_location file with multiple lines which contained locations per-architecture (and the default).
This changes the host to use separate file for each architecture:
* `install_location_<arch>` for the architecture specific
* `install_location` for the "legacy" file
This is a much easier format for installers to handle (and it also simplifies the apphost code a little bit).
Adapted tests to the new behavior. Removed some tests which don't make sense anymore. Some small test cleanup to deduplicate code.
Changed the test-only env. variable to point to the directory with configuration files instead of to the configuration file itself.
Eric StJohn [Wed, 22 Sep 2021 17:03:25 +0000 (10:03 -0700)]
Set install_location arch specific (#59441)
Also don't write to paths when running translated (rosetta)
Jan Kotas [Wed, 22 Sep 2021 14:31:29 +0000 (07:31 -0700)]
Delete Type.GetTypeHandleInternal (#59459)
Never-overriden virtual method forwarding to virtual property.
Marie Píchová [Wed, 22 Sep 2021 14:10:08 +0000 (14:10 +0000)]
Retrieve dumps from stress pipeline (#58860)
* Removed parts of stress to make the test loop faster.
* Dump collection and artifacts publish
* Chown dumps
* Removed Windows build for tests
* Bringing windows on par with linux
* Fixed windows paths.
* reverted testing changes
* feedback
* Update eng/pipelines/libraries/stress/http.yml
Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
* feedback renames
* feedback newlines
Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
Jan Kotas [Wed, 22 Sep 2021 13:36:09 +0000 (06:36 -0700)]
Cleanup reflection RuntimeType checks (#59457)
* Delete IsRuntimeImplemented helper method
No longer necessary
* Use compact syntax for RuntimeType checks
Thays Grazia [Wed, 22 Sep 2021 12:44:03 +0000 (09:44 -0300)]
[wasm][debugger] Fix concurrent access to cache. (#59412)
* Fix concurrent access to cache.
* Fixing test case.
* Changing what was suggested by @radical.
Peter Sollich [Wed, 22 Sep 2021 10:30:57 +0000 (12:30 +0200)]
Fix brick table issue due to race condition in adjust_limit_clr (#59411)
With regions, we had observed AVs due to 0 brick table entries.
As it turns out, this is due to a race condition in adjust_limit_clr where ephemeral_region may change before we check it to determine whether we need to set bricks.
The fix is simply to fetch ephemeral_region into a local before we release the more space lock.
This PR also contains the code checking the brick table for 0 entries - I propose leaving this code enabled even in retail until we are confident the race condition mentioned above is the only cause.
Jan Jahoda [Wed, 22 Sep 2021 09:11:21 +0000 (02:11 -0700)]
CI matrix change: ubuntu (#58987)
* Remove ubuntu 16.04
* Remove another occurence
Jan Jahoda [Wed, 22 Sep 2021 08:37:12 +0000 (01:37 -0700)]
CI matrix change: drop OSX 10.13 (#59084)
* Drop OSX 10.13 from CI matrix
* Drop OSX 10.14 from PR CI matrix
Peter Sollich [Wed, 22 Sep 2021 06:22:18 +0000 (08:22 +0200)]
We should not call distribute_free_regions at the end of background GC - then it may run concurrently with user threads allocating and getting regions from the free lists. (#59413)
Ankit Jain [Wed, 22 Sep 2021 04:36:35 +0000 (04:36 +0000)]
[wasm] Enable System.Text.Json.SourceGeneration.Tests (#59396)
Layomi Akinrinade [Wed, 22 Sep 2021 02:29:35 +0000 (19:29 -0700)]
Add notes about not calling src-gen APIs directly and make them non-browsable (#59385)
Ulrich Weigand [Wed, 22 Sep 2021 02:21:13 +0000 (04:21 +0200)]
Big-endian fixes: PDB creation by ilasm (#59422)
* Fix byte order of debug directory fields
* Fix byte order of PDB stream data (PdbHeap::SetData)
Maryam Ariyan [Wed, 22 Sep 2021 00:09:23 +0000 (17:09 -0700)]
update xunit version (#59275)
Sergey Andreenko [Tue, 21 Sep 2021 23:18:38 +0000 (16:18 -0700)]
Delete a legacy local for arm32. (#59380)
Kunal Pathak [Tue, 21 Sep 2021 22:33:24 +0000 (15:33 -0700)]
Arm: Use correct form of store instruction when data is float (#59187)
* use the correct src type for str operation
* Add test case
* Proper fix
* Extend to arm64
* remove unnecessary property from csproj
* Update the test case
* restore the assert
* jit format
* Use ins_StoreFromSrc
* jit format
Thays Grazia [Tue, 21 Sep 2021 20:43:01 +0000 (17:43 -0300)]
Fixing memory corruption. (#59419)
Andrii Kurdiumov [Tue, 21 Sep 2021 19:59:53 +0000 (01:59 +0600)]
First round of converting System.Data.OleDb to COMWrappers (#54822)
* First round of converting System.Data.OleDb to COMWrappers
This change just remove warning from ILLink and do not make attempt
to convert other COM object creation to use ComWrappers
Also I have to add target net5.0-windows where ComWrappers would be
used. Same concerns regarding testing as in
https://github.com/dotnet/runtime/pull/54636
Two calls inside OleDbDataAdapter call GetErrorInfo but do not do anything with results. That's probably mistake from previous refactoring. These parts does not touched and left as is. Need advice on that specific parts how to proceed.
* Update src/libraries/System.Data.OleDb/src/OleDbComWrappers.cs
Co-authored-by: Aaron Robinson <arobins@microsoft.com>
* Update src/libraries/System.Data.OleDb/src/OleDbComWrappers.cs
Co-authored-by: Aaron Robinson <arobins@microsoft.com>
* Apply PR recommendations
* Make closer to original
* One more change
* Apply PR feedback
* Update src/libraries/System.Data.OleDb/src/System.Data.OleDb.csproj
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
* Update src/libraries/System.Data.OleDb/src/System.Data.OleDb.csproj
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
* Fix compilation errors
* Fix errors
* Consolidate code
* Fix compilation warnings
* Fix compilation error
* Fix compilation error
* Address PR feedback
* Update PR feedback
* Address PR feedback
* Direct cast
* Ask wrapper to implement IDisposable
* Update src/libraries/System.Data.OleDb/src/OleDbConnection.COMWrappers.cs
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
* Update src/libraries/System.Data.OleDb/src/OleDbComWrappers.cs
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
* Update src/libraries/System.Data.OleDb/src/OleDbComWrappers.cs
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
* Update src/libraries/System.Data.OleDb/src/DbPropSet.COMWrappers.cs
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
* Restore changes in OnInfoMessage
* Consolidate different part of code
* Remove junk (probably from merge)
* Found that last commit was a mess
* Remove no longer needed annotations
* Apply suggestions from code review
Co-authored-by: Aaron Robinson <arobins@microsoft.com>
* Update src/libraries/System.Data.OleDb/src/OleDbComWrappers.cs
Co-authored-by: Aaron Robinson <arobins@microsoft.com>
* Free BSTR
* Remove reference to no longer used files in this PR
* Add data
* Fix compilation errors
* Last blow to compiler
Co-authored-by: Aaron Robinson <arobins@microsoft.com>
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
Natalia Kondratyeva [Tue, 21 Sep 2021 19:41:14 +0000 (21:41 +0200)]
[HTTP/3] Fix NullReferenceException on Timeout when streaming request body (#59204)
Brings the logic for canceling streaming request body from HTTP/2 to HTTP/3.
The problem was that cancellation token was not applied to SendContentAsync, which resulted in Http3WriteStream not being disposed properly.
Fixes #57619
David Wrighton [Tue, 21 Sep 2021 19:27:00 +0000 (12:27 -0700)]
Fix issues where the module index GUID table isn't properly computed (#59375)
* Fix issues where the module index GUID table isn't properly computed
- Since there are two possible places where the module indices must be up to date, ensure that they are finalized before either Node writes its data
- Ensure that module indices are precomputed when needed from inlinee data and the InstanceEntryPointTableNode
t-mustafin [Tue, 21 Sep 2021 19:15:34 +0000 (22:15 +0300)]
[unix x86] Fix GCMemoryInfoData size assertion (#59417)
Andrew Au [Tue, 21 Sep 2021 18:33:23 +0000 (11:33 -0700)]
Update Unloadability documentation (#59383)
David Wrighton [Tue, 21 Sep 2021 17:55:38 +0000 (10:55 -0700)]
Fix gtCloneExpr when cloning during R2R compilation a GT_ALLOCOBJ node (#59395)
* Fix gtCloneExpr when cloning during R2R compilation a GT_ALLOCOBJ node
- Without this fix cloned expressions with allocations will fail
- This is most common in profile guided code around devirtualization, but I believe it can occur in other where gtCloneExpr is used
- Symptom of the failure is a compilation failure during crossgen2
github-actions[bot] [Tue, 21 Sep 2021 17:27:35 +0000 (10:27 -0700)]
[main] [Release/6.0]fix the package version for non-shipping csproj packages (#59388)
* fix the package version for non-shipping package
* use version prefix
Co-authored-by: Anirudh Agnihotry <anagniho@microsoft.com>
Mikhail Kurinnoi [Tue, 21 Sep 2021 17:14:36 +0000 (20:14 +0300)]
[x86/Linux] Fix SIGSEGV on Debugger.Break() during debugging. (#59350)
SIGSEGV occur in src/vm/i386/cgenx86.cpp `HelperMethodFrame::UpdateRegDisplay()` at line `pRD->pCurrentContext->Eip = pRD->ControlPC = m_MachState.GetRetAddr();`, since `pRD->pCurrentContext` is NULL.
The point of issue - wrong code block compilation in DebuggerWalkStack() in case of Linux x86.
Anton Firszov [Tue, 21 Sep 2021 16:31:52 +0000 (19:31 +0300)]
<EnablePreviewFeatures> for HttpStress (#59410)
Aaron Robinson [Tue, 21 Sep 2021 15:01:38 +0000 (08:01 -0700)]
Check if External Object Context is still active after a possible GC (#59285)
* Handle a possible GC after allocating an array by iterating over the hash again.
Co-authored-by: Elinor Fung <elfung@microsoft.com>
Jostein Kjønigsen [Tue, 21 Sep 2021 14:42:56 +0000 (16:42 +0200)]
Fix crossgen for FreeBSD by adding FreeBSD RID. (#59331)
* Fix crossgen for FreeBSD by adding FreeBSD RID.
Fix implemented as described by @Thefrank in this thread:
https://github.com/dotnet/runtime/issues/14537#issuecomment-
922546527
* Add FreeBSD platform-support to crossgen2.
Jakob Botsch Nielsen [Tue, 21 Sep 2021 13:52:50 +0000 (15:52 +0200)]
Allow contained indirections in tailcalls on x64 (#58686)
This adds support for contained indirections in tailcalls on x64. The
significant diff of this change is refactoring to be able to reuse the
code for generating call instructions when generating tailcalls as well.
Other than that, the main change is to allow contained indirs in
lowering and to ensure LSRA uses volatile registers for the addressing
mode so that the registers are not overridden by the epilog sequence.
To be sure we insert rex. prefix correctly I also refactored the emitter
to base the decision on a new instruction (INS_i_jmp) and emit it when
necessary. The rex. prefix is necessary because the unwinder uses it to
determine that a tail jmp is non-local and thus part of the epilog.
Finally, unlike the OS unwinder our unwinder needs to compute the size
of the epilog. This computation was wrong for jmp [foo] for addressing
modes/rip-relative addressing, so fix this as well. Presumably that has
not been a problem before since we did not generate these instructions
in managed code (although native code may have had these instructions --
not sure if we use that unwinder for native code).