Swift Kim [Thu, 23 Jan 2020 08:32:19 +0000 (17:32 +0900)]
Add missing RIDs for Tizen (5.5.0, 6.0.0) (#2003)
Elinor Fung [Thu, 23 Jan 2020 08:02:53 +0000 (00:02 -0800)]
Unused strings in mscorrc.rc (#2020)
Maher Jendoubi [Thu, 23 Jan 2020 06:41:34 +0000 (07:41 +0100)]
Contributing: fixed some typos (#2061)
Andrew Au [Thu, 23 Jan 2020 06:09:44 +0000 (22:09 -0800)]
Remove gc_lh_block_event (#2059)
David Wrighton [Thu, 23 Jan 2020 00:27:27 +0000 (16:27 -0800)]
Refactor compilation module group (#1889)
- Our CompilationModule groups used for single method compilation and general compilation had diverged substantially, reducing the effectiveness of single method compilation substantially
- The profiler guided optimization logic also needs to use the VersionWithCode logic to identify which methods are interesting to consider, this will happen in a future change
- The VersionsWith logic in CompilationModuleGroup did not correctly model versionable logic.
- Methods with generic parameters were not handled correctly. Method generic parameters did not contribute to the VersionsWith logic.
- The newer ideas in our recent work on upcoming enhancements to crossgen2 driven compilation enhancements are aligned with this effort
- Add support for the concept of considering instantiations over primitive types to be legal even if the primitive types aren't part of the version bubble. (Only if there are no constraints in the generic)
- Also a bonus determinism fix. In cases where MemberRef's were being used in combination with ENCODE_FIELD_SIG_OwnerType, we could possibly emit multiple different choices for the token emitting in a signature.
Jeremy Koritzinsky [Thu, 23 Jan 2020 00:23:04 +0000 (16:23 -0800)]
Change HostPolicyMock to use CharSet.Auto now that it correctly switches to Ansi (aka Utf8) on non-Windows. (#2031)
Jeremy Koritzinsky [Thu, 23 Jan 2020 00:22:09 +0000 (16:22 -0800)]
Don't block non-blittable pointer types in P/Invokes. (#1866)
* Don't block non-blittable pointer types in P/Invokes.
Don't block non-blittable pointer types in P/Invokes. If you're using pointers in interop you're already using unsafe code so we're going to assume you know what you're doing. C# won't let you form a pointer to a reference, so there's no risk of passing an object reference directly to native unless you're writing IL directly.
Fixes dotnet/coreclr#27800
* Delete unused resources.
* Apply fix to managed type system as well.
* Add positive test for nonblittable pointers. Remove negative tests that were in GenericTest.
Steve MacLean [Thu, 23 Jan 2020 00:01:53 +0000 (19:01 -0500)]
Rename PAL_CMAKE_* CLR_CMAKE_* (#1984)
* Rename PAL_CMAKE_* CLR_CMAKE_*
Remove separatation between CLR_CMAKE and PAL_CMAKE defines
Revise PAL_CMAKE_PLATFORM* defines to use CLR_CMAKE_HOST* defines
Revise other PAL_CMAKE_* defines to use CLR_CMAKE_* equivalents.
Remove redundant compiler configuration
Leandro A. F. Pereira [Wed, 22 Jan 2020 23:29:04 +0000 (15:29 -0800)]
host: Allow comments in JSON files (#1070)
host: Allow comments in JSON files
Jan Vorlicek [Wed, 22 Jan 2020 22:27:31 +0000 (23:27 +0100)]
Fix System.Net.Quick.csproj configurations (#1675)
The Configurations.props file was modified to have $(NetCoreAppCurrent)-Linux and
$(NetCoreAppCurrent)-OSX instead of $(NetCoreAppCurrent)-Unix in a recent PR #427,
but the Configurations in the System.Net.Quic.csproj were not updated accordingly.
Marco Rossignoli [Wed, 22 Jan 2020 22:09:18 +0000 (23:09 +0100)]
Add asynchronous overload of WindowsIdentity.RunImpersonated (#1152)
* add RunImpersonateAsync overloads
* skip on full framework
* run test netcoreapp only
* skip tests on nanoserver
* address PR feedback
* address PR feedback
* address PR feedback
* address PR feedback
* Update WindowsIdentity.cs
update comment
* Update WindowsIdentity.cs
update comment
* Update WindowsIdentity.cs
Fix comment
* Update WindowsIdentity.cs
fix comment
* Fix comment
Marek Safar [Wed, 22 Jan 2020 22:08:45 +0000 (23:08 +0100)]
configure.ac: remove AC_SEARCH_LIBS for libintl (#2027)
configure.ac: remove AC_SEARCH_LIBS for libintl
Adeel Mujahid [Wed, 22 Jan 2020 21:26:37 +0000 (23:26 +0200)]
Enable NetworkAddressChange on FreeBSD (#1602)
Jan Kotas [Wed, 22 Jan 2020 21:02:12 +0000 (13:02 -0800)]
Protect multi-threaded access to Module.m_GenericParamToDescMap. (#1907)
Same type can be loaded by multiple threads in parallel in rare situations
Fixes #1847
dotnet-maestro[bot] [Wed, 22 Jan 2020 21:00:56 +0000 (22:00 +0100)]
[master] Update dependencies from dotnet/arcade mono/linker Microsoft/vstest (#1804)
* Update dependencies from https://github.com/dotnet/arcade build
20200115.5
- Microsoft.DotNet.XUnitExtensions - 5.0.0-beta.20065.5
- Microsoft.DotNet.VersionTools.Tasks - 5.0.0-beta.20065.5
- Microsoft.DotNet.ApiCompat - 5.0.0-beta.20065.5
- Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.20065.5
- Microsoft.DotNet.Build.Tasks.Configuration - 5.0.0-beta.20065.5
- Microsoft.DotNet.Build.Tasks.Feed - 5.0.0-beta.20065.5
- Microsoft.DotNet.Build.Tasks.Packaging - 5.0.0-beta.20065.5
- Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk - 5.0.0-beta.20065.5
- Microsoft.DotNet.CodeAnalysis - 5.0.0-beta.20065.5
- Microsoft.DotNet.GenAPI - 5.0.0-beta.20065.5
- Microsoft.DotNet.GenFacades - 5.0.0-beta.20065.5
- Microsoft.DotNet.Helix.Sdk - 5.0.0-beta.20065.5
- Microsoft.DotNet.RemoteExecutor - 5.0.0-beta.20065.5
- Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.20065.5
* Update dependencies from https://github.com/dotnet/arcade build
20200116.1
- Microsoft.DotNet.XUnitExtensions - 5.0.0-beta.20066.1
- Microsoft.DotNet.VersionTools.Tasks - 5.0.0-beta.20066.1
- Microsoft.DotNet.ApiCompat - 5.0.0-beta.20066.1
- Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.20066.1
- Microsoft.DotNet.Build.Tasks.Configuration - 5.0.0-beta.20066.1
- Microsoft.DotNet.Build.Tasks.Feed - 5.0.0-beta.20066.1
- Microsoft.DotNet.Build.Tasks.Packaging - 5.0.0-beta.20066.1
- Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk - 5.0.0-beta.20066.1
- Microsoft.DotNet.CodeAnalysis - 5.0.0-beta.20066.1
- Microsoft.DotNet.GenAPI - 5.0.0-beta.20066.1
- Microsoft.DotNet.GenFacades - 5.0.0-beta.20066.1
- Microsoft.DotNet.Helix.Sdk - 5.0.0-beta.20066.1
- Microsoft.DotNet.RemoteExecutor - 5.0.0-beta.20066.1
- Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.20066.1
* Update dependencies from https://github.com/microsoft/vstest build
20200116-01
- Microsoft.NET.Test.Sdk - 16.5.0-preview-
20200116-01
* Update dependencies from https://github.com/dotnet/arcade build
20200117.2
- Microsoft.DotNet.XUnitExtensions - 5.0.0-beta.20067.2
- Microsoft.DotNet.VersionTools.Tasks - 5.0.0-beta.20067.2
- Microsoft.DotNet.ApiCompat - 5.0.0-beta.20067.2
- Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.20067.2
- Microsoft.DotNet.Build.Tasks.Configuration - 5.0.0-beta.20067.2
- Microsoft.DotNet.Build.Tasks.Feed - 5.0.0-beta.20067.2
- Microsoft.DotNet.Build.Tasks.Packaging - 5.0.0-beta.20067.2
- Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk - 5.0.0-beta.20067.2
- Microsoft.DotNet.CodeAnalysis - 5.0.0-beta.20067.2
- Microsoft.DotNet.GenAPI - 5.0.0-beta.20067.2
- Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.20067.2
- Microsoft.DotNet.GenFacades - 5.0.0-beta.20067.2
- Microsoft.DotNet.Helix.Sdk - 5.0.0-beta.20067.2
- Microsoft.DotNet.RemoteExecutor - 5.0.0-beta.20067.2
* Update dependencies from https://github.com/dotnet/arcade build
20200118.1
- Microsoft.DotNet.XUnitExtensions - 5.0.0-beta.20068.1
- Microsoft.DotNet.VersionTools.Tasks - 5.0.0-beta.20068.1
- Microsoft.DotNet.ApiCompat - 5.0.0-beta.20068.1
- Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.20068.1
- Microsoft.DotNet.Build.Tasks.Configuration - 5.0.0-beta.20068.1
- Microsoft.DotNet.Build.Tasks.Feed - 5.0.0-beta.20068.1
- Microsoft.DotNet.Build.Tasks.Packaging - 5.0.0-beta.20068.1
- Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk - 5.0.0-beta.20068.1
- Microsoft.DotNet.CodeAnalysis - 5.0.0-beta.20068.1
- Microsoft.DotNet.GenAPI - 5.0.0-beta.20068.1
- Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.20068.1
- Microsoft.DotNet.GenFacades - 5.0.0-beta.20068.1
- Microsoft.DotNet.Helix.Sdk - 5.0.0-beta.20068.1
- Microsoft.DotNet.RemoteExecutor - 5.0.0-beta.20068.1
* Update dependencies from https://github.com/microsoft/vstest build
20200120-01
- Microsoft.NET.Test.Sdk - 16.5.0-preview-
20200120-01
* Update dependencies from https://github.com/dotnet/arcade build
20200121.3
- Microsoft.DotNet.XUnitExtensions - 5.0.0-beta.20071.3
- Microsoft.DotNet.VersionTools.Tasks - 5.0.0-beta.20071.3
- Microsoft.DotNet.ApiCompat - 5.0.0-beta.20071.3
- Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.20071.3
- Microsoft.DotNet.Build.Tasks.Configuration - 5.0.0-beta.20071.3
- Microsoft.DotNet.Build.Tasks.Feed - 5.0.0-beta.20071.3
- Microsoft.DotNet.Build.Tasks.Packaging - 5.0.0-beta.20071.3
- Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk - 5.0.0-beta.20071.3
- Microsoft.DotNet.CodeAnalysis - 5.0.0-beta.20071.3
- Microsoft.DotNet.GenAPI - 5.0.0-beta.20071.3
- Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.20071.3
- Microsoft.DotNet.GenFacades - 5.0.0-beta.20071.3
- Microsoft.DotNet.Helix.Sdk - 5.0.0-beta.20071.3
- Microsoft.DotNet.RemoteExecutor - 5.0.0-beta.20071.3
Stephen Toub [Wed, 22 Jan 2020 20:55:23 +0000 (15:55 -0500)]
Add a Sockets test to validate undesired blocking of continuations (#1973)
We go out of our way (e.g. on Unix queueing work off of the epoll threads) to ensure that arbitrary user code running as part of socket continuations doesn't block those threads and potentially deadlock. Add a test to help validate this.
Bruce Forstall [Wed, 22 Jan 2020 20:48:33 +0000 (12:48 -0800)]
Don't do STRESS_PROFILER_CALLBACKS when pre-JITing (#2016)
This leads us to generate an illegal relocation fixup.
Fixes #1789
Leandro Pereira [Thu, 19 Dec 2019 21:00:55 +0000 (13:00 -0800)]
host: Allow comments in JSON files
Although JSON doesn't support comments, a common extension is to enable
JavaScript-style comments. By default, RapidJSON will error out if
comments are found in the input data, but it can be configured to
ignore them.
This is useful especially when testing out changes in
runtimeconfig.json files.
Fixes http://github.com/dotnet/core-setup/5661
Stephen Toub [Wed, 22 Jan 2020 20:32:16 +0000 (15:32 -0500)]
Tweak codegen for Regex's FindFirstChar (#1996)
* Avoid extra field loads / comparisons in FindFirstChar
If we've already compared the current pos to the end pos as part of a minimum length check, we don't need to repeat it again later. We can also read from locals rather than fields more than we are to save redundant field reads.
* Reduce branches in Boyer-Moore negative switch table
It's often the case that lots of negative branches have the same value. We can coalesce them.
* Address PR feedback
Kevin Jones [Wed, 22 Jan 2020 20:30:35 +0000 (15:30 -0500)]
Prohibit null key on HMAC. (#2018)
* Validate key on HMAC classes.
A refactoring in HMACCommon caused null keys to be implicitly converted
in to empty spans. This lead to a null key being used as an empty key.
* Use assertion helper to test parameter name.
monojenkins [Wed, 22 Jan 2020 20:28:45 +0000 (20:28 +0000)]
configure.ac: remove AC_SEARCH_LIBS for libintl
This causes an additional dependency of mono on libintl which we didn't have before.
Reported by a user on gitter, it's problematic on macOS since it makes the mono binary depend on the libintl we ship in the Mono .pkg.
It was introduced in Mono 6.6 by https://github.com/mono/mono/commit/
18e0ebfe89be0a175d2f904b9bb1ec6816daa318
Alexander Köplinger [Wed, 22 Jan 2020 20:20:13 +0000 (21:20 +0100)]
Enable Mono build in CI (#1934)
* Enable Mono in default build
* Integrate Mono into the build system
* Fix System.Private.CoreLib build in Mono
Broken by https://github.com/dotnet/runtime/commit/
9c82a36c23235c4d50954cb33a4d5d89b787a1aa
* Disable Windows test runs
Fails due to https://github.com/dotnet/runtime/issues/1933
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
Vladimir Sadov [Wed, 22 Jan 2020 19:02:56 +0000 (11:02 -0800)]
Moving fast parts of cast FCALLs to managed code. (#1068)
* Exposed casting cache to managed code
* Implemented a managed version of cache lookup
* Moved `JIT_IsInstanceOfAny` and `JIT_ChkCastAny` to managed code as the first ones to move.
* Skip managed JIT helpers in exception stack traces and debugger
* Managed `JIT_IsInstanceOfInterface`
* All other cast helpers are managed.
Fixes:https://github.com/dotnet/coreclr/issues/27931
Stephen Toub [Wed, 22 Jan 2020 18:06:30 +0000 (13:06 -0500)]
Improve error messages for invalid WebSocket headers (#1962)
And add tests.
Jeremy Barton [Wed, 22 Jan 2020 16:16:39 +0000 (08:16 -0800)]
Split AsnReader into a class and a ref struct (AsnValueReader)
Largely, the intent of this change was to reduce the number of temporary readers required for deeply structured payloads (`ReadSequence` returns a new reader), while still maintaining the better usability of the class; and, frankly, to understand what the impact of splitting functionality into "bare metal" and "more usable" pieces was.
```
foreach (file in AsnReader.*)
{
Copy/paste the entirety of the `partial class AsnReader`;
Change the top version to say ref partial struct AsnValueReader;
Replace all AsnReader calls in the top version to say AsnValueReader.
Replace all ReadOnlyMemory in the top portion with ReadOnlySpan;
Remove ArraySegment overloads from the top portion (when present);
Rewrite the bottom portion to open a ref reader at the state the memory is tracking and defer work into the ref reader;
Run all the existing tests to ensure that nothing broke in that piece;
}
```
Once that was done, I changed the asn.xslt to generate all of the decoding in terms of AsnValueReader. This didn't change field generation from ReadOnlyMemory to ReadOnlySpan (and the types from struct to ref struct)--a change that could be done later--but instead added a new ReadOnlyMemory input parameter so it can use Overlaps to slice the memory as appropriate (with a fallback of ToArray()).
While I was editing asn.xslt I fixed probably all of the whitespace errors it generated. I still left the "stylecop, have no opinion about whitespace" pragma since the generator isn't run as part of most people's (or the official) builds. This also turns on the nullability checks in all of the generated structs.
Bruce Forstall [Wed, 22 Jan 2020 15:20:02 +0000 (07:20 -0800)]
Fix script errors in mainv1, mainv2 tests (#1997)
* Add additional error checking for mainv1, mainv2 tests
These have been silently failing due to mainv1.exe and mainv2.exe
changing to be built at mainv1.dll and mainv2.dll without
corresponding changes in the project files, due to insufficient
testing in the script.
Add this additional testing.
* Add more error checking
* Fix script errors in mainv1, mainv2 tests
A while back, tests were changed from building .exe to building .dll files
but these were not updated. Fix that.
Carol Eidt [Wed, 22 Jan 2020 14:54:24 +0000 (06:54 -0800)]
Reconcile handling of EH vars (#1884)
* Reconcile handling of EH vars
Modify `BasicBlock::hasEHBoundaryIn()` and `BasicBlock::hasEHBoundaryOut()` to reflect what liveness is doing, and adjust the register allocator code appropriately.
It might make sense to extract the code that's basically the same, except that the register allocator doesn't need the `finallyVars` except as validation in the `DEBUG` case.
Fix #1786
Swift Kim [Wed, 22 Jan 2020 14:53:41 +0000 (23:53 +0900)]
Use a consistent rootfs location (#2005)
Roman Marusyk [Wed, 22 Jan 2020 14:41:26 +0000 (16:41 +0200)]
Fix some links to coreclr repo (#1991)
Marek Safar [Wed, 22 Jan 2020 14:27:39 +0000 (15:27 +0100)]
Add readme for Mono specific version of SPC (#1963)
* Add readme for Mono specific version of SPC
* Update src/mono/netcore/System.Private.CoreLib/README.md
Co-Authored-By: Stephen Toub <stoub@microsoft.com>
Michal Strehovský [Wed, 22 Jan 2020 09:14:45 +0000 (10:14 +0100)]
Do not run validation on runtime determined types (#1357)
It doesn't seem like we validate anything for those and `IsRuntimeDeterminedSubtype` check is rather expensive.
Levi Broderick [Wed, 22 Jan 2020 08:25:22 +0000 (00:25 -0800)]
Unify char.IsControl and Rune.IsControl (#1988)
Not perf-critical, just some cleanup of low hanging fruit.
Jan Kotas [Wed, 22 Jan 2020 04:49:54 +0000 (20:49 -0800)]
Unify CoreLib interop files (#1914)
- Unify more of CoreLib interop files
- Replace manual interop with regular managed APIs where possible
- Delete unused code
Contributes to #1232
Erhan Atesoglu [Wed, 22 Jan 2020 04:05:51 +0000 (20:05 -0800)]
Rebased version of CoreFX renames (#1941)
* FinalCoreFXRenames
The last of the CoreFX renames.
* Update DirectorySearcher.cs
Fixed typo in DirectorySearcher.cs
* Update TestClasses.SimpleTestClassWithObjectArrays.cs
This fixes the expected value of the tests to runtime, instead of corefx.
* Update PersistedFiles.Names.Unix.cs
Adds a note to not update the corefx reference.
Anton Lapounov [Wed, 22 Jan 2020 03:58:05 +0000 (19:58 -0800)]
Even faster modulo computation: remove one of the three multiplications. (#406)
Davis Goodin [Wed, 22 Jan 2020 02:01:38 +0000 (20:01 -0600)]
**BYPASS_SECRET_SCANNING**
Mike McLaughlin [Wed, 22 Jan 2020 00:38:26 +0000 (16:38 -0800)]
Fix long name cross arch DAC (#1948)
Santiago Fernandez Madero [Tue, 21 Jan 2020 23:58:30 +0000 (17:58 -0600)]
Workaround AzDo issue when evaluating Build.SourcesDirectory variable in a docker container (#1982)
* Workaround AzDo issue when evaluating Build.SourcesDirectory variable in a docker container
* Only use env var when in a docker container
Andrew Au [Tue, 21 Jan 2020 23:56:12 +0000 (15:56 -0800)]
Make EHInfo parsing lazy (#1899)
Tomas Weinfurt [Tue, 21 Jan 2020 22:53:53 +0000 (14:53 -0800)]
Eliminate X509Extension allocations during ssl handshake with OpenSSL
Moves policydata to a PAL struct so it can be passed without creating and discarding the X509Extension objects.
Andrew Au [Tue, 21 Jan 2020 22:40:43 +0000 (14:40 -0800)]
Remove unwanted instrumentation code (#1820)
Anirudh Agnihotry [Tue, 21 Jan 2020 21:38:18 +0000 (13:38 -0800)]
Making the Microsoft.NET.IL.Sdk cross target. (#1972)
* making ilsdk crosstarget
* editing the comment
Steve MacLean [Tue, 21 Jan 2020 20:36:37 +0000 (15:36 -0500)]
Rename CLR_CMAKE_PLATFORM* CLR_CMAKE_HOST* (#1974)
The term platform was ambiguous. Migrate to using common terminology for
cross compilation.
Host is the platfrom which will execute the code
Target is the platform which will be debugged or for which code will be generated.
In most cases HOST == TARGET. The exceptions are the cross component crossgen
tools and the future cross DAC.
Tomas Weinfurt [Tue, 21 Jan 2020 20:29:24 +0000 (12:29 -0800)]
enable unicode tests on OSX (#1728)
Stephen Toub [Tue, 21 Jan 2020 20:14:00 +0000 (15:14 -0500)]
Streamline Regex path to matching, and improve Replace/Split (#1950)
* Add ThrowHelper, and clean up some style
Trying to streamline main path to the engine, ensuring helpers can be inlined, reducing boilerplate, etc. And as long as ThrowHelper was being used in some places, used it in others where it didn't require adding additional methods.
Also cleaned style along the way.
* Streamline the Scan loop
The main costs remaining are the virtual calls to FindFirstChar/Go.
* Enumerate matches with a reusable match object in Regex.Replace/Split
The cost of re-entering the scan implementation and creating a new Match object for each NextMatch is measurable, but in these cases, we can use an iterator to quickly get back to where we were and reuse the match object. It adds a couple interface calls per iteration, as well as an allocation for the enumerator, but it saves more than that in the common case.
* Use SegmentStringBuilder instead of ValueStringBuilder in Replace
A previous .NET Core release saw StringBuilder in Regex.Replace replaced by ValueStringBuilder. This was done to avoid the allocations from the StringBuilder. However, in some ways, for large input strings, it made things worse. StringBuilder is implemented as a linked list of builders, whereas ValueStringBuilder is contiguous memory taken from the ArrayPool. For large input strings, we start requesting buffers too large for the ArrayPool, and thus when we grow we generate large array allocations that become garbage.
We're better off using a simple arraypool-backed struct to store the segments that need to be concatenated, and then just creating the final string from those segments. For the common case where there are many fewer replacements than the length of the string, this saves a lot of memory as well as avoiding a layer of copying.
* Replace previously added enumerator with a callback mechanism
The delegate invocation per match is faster than the two interface calls per match, plus we can avoid allocating the enumerator and just pass the relevant state through by ref.
* Remove unnecessary fields from MatchCollection
* More exception streamlining and style cleanup
* Address PR feedback, and fix merge with latest changes
ts2do [Tue, 21 Jan 2020 20:01:36 +0000 (14:01 -0600)]
Optimize DateTime decomposition in CoreLib (#1944)
* Optimize DateTime decomposition in CoreLib
Add uses of DateTime.GetDate (renamed from GetDatePart) where appropriate
Add DateTime.GetTime method to eliminate duplicate computations
* Remove unused arithmetic from DateTime.GetTime
Marie Píchová [Tue, 21 Jan 2020 18:55:08 +0000 (19:55 +0100)]
WinHttpHandler tests are back (#1676)
The tests used by PlatformHandlerTest moved to Common/tests in order to share them between System.Net.Http and System.Net.Http.WinHttpHandler.
The added conditions correspond to the state before WinHttpHandler removal. They're just based on IsWinHttpHandler instead of UseSocketHandler.
Some of the code must be conditionally compiled since there is no usable common base class for HttpClientHandler and WinHttpHandler. Other issues solved by introducing WinHttpClientHandler for testing purposes. It corresponds to HttpClientHandler.Windows.cs code from before its removal.
Gérald Barré [Tue, 21 Jan 2020 18:10:07 +0000 (13:10 -0500)]
Fix typo (#1970)
Tom Deseyn [Tue, 21 Jan 2020 18:07:25 +0000 (19:07 +0100)]
Remove try-catch from SmtpClient.Abort to see what Exceptions get caught. (#428)
Stephen Toub [Tue, 21 Jan 2020 17:34:20 +0000 (12:34 -0500)]
Specialize Regex codegen for ? (#1898)
We're currently generating the code for a one / not one / set ? quantifier (zero-or-one) as a loop, when it can actually just be a conditional check. This adds a special path for that case.
(I've also added another reduction test for alternation, and tweaked the codegen for a successful match to touch fields less.)
Andy Ayers [Tue, 21 Jan 2020 16:08:19 +0000 (08:08 -0800)]
JIT: check that constant handles are not OK2_CONST_LONGs (#1831)
Follow-up from #1788.
Add padding to `AssertionDsc` so that the `iconFlags` no longer overlap with `lconVal`. Assert that `iconFlags` is never set for an O2K_CONST_LONG assertion.
Also remove an arm-only handle block that should now be redundant.
Maxim Lipnin [Tue, 21 Jan 2020 15:13:49 +0000 (18:13 +0300)]
[Docs] Fix small typo (#1961)
Dan Moseley [Tue, 21 Jan 2020 11:54:38 +0000 (03:54 -0800)]
Cleanup regex diagnostic output (#1947)
* Include actual pattern in diagnostic output
* Fix char category name in diagnostic output
* Tighten Boyer Moore debug output
* Clean up diagnostic output from RegexCode and RegexNode
* Apply suggestions from code review
Co-Authored-By: Stephen Toub <stoub@microsoft.com>
* more
* display options and timeout
* Some random nits
* Update src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexBoyerMoore.cs
Co-Authored-By: Stephen Toub <stoub@microsoft.com>
* Github typo
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Jan Kotas [Tue, 21 Jan 2020 10:14:43 +0000 (02:14 -0800)]
Delete outdated comment (#1952)
Dan Moseley [Tue, 21 Jan 2020 04:41:13 +0000 (20:41 -0800)]
Readme for regex implementation (#1945)
* Readme for regex implementation
* typo
* Update src/libraries/System.Text.RegularExpressions/src/dotnet-regular-expressions.md
Co-Authored-By: Stephen Toub <stoub@microsoft.com>
* Update src/libraries/System.Text.RegularExpressions/src/dotnet-regular-expressions.md
Co-Authored-By: Stephen Toub <stoub@microsoft.com>
* Update src/libraries/System.Text.RegularExpressions/src/dotnet-regular-expressions.md
Co-Authored-By: Stephen Toub <stoub@microsoft.com>
* Update src/libraries/System.Text.RegularExpressions/src/dotnet-regular-expressions.md
Co-Authored-By: Stephen Toub <stoub@microsoft.com>
* Update src/libraries/System.Text.RegularExpressions/src/dotnet-regular-expressions.md
Co-Authored-By: Stephen Toub <stoub@microsoft.com>
* Update src/libraries/System.Text.RegularExpressions/src/dotnet-regular-expressions.md
Co-Authored-By: Stephen Toub <stoub@microsoft.com>
* Update src/libraries/System.Text.RegularExpressions/src/dotnet-regular-expressions.md
Co-Authored-By: Stephen Toub <stoub@microsoft.com>
* Updates
* More
* note
* rename
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Michal Strehovský [Mon, 20 Jan 2020 23:51:44 +0000 (00:51 +0100)]
Fix documentation of R2R inline tracking map (#1942)
Don't want this to show up as a confusing diff when we upgrade the format later. Version is _not_ included in the format. We will need to key off the R2R version.
Jan Kotas [Mon, 20 Jan 2020 18:26:48 +0000 (10:26 -0800)]
Delete unnecessary clone of the assembly name (#1936)
Marek Safar [Mon, 20 Jan 2020 18:26:23 +0000 (19:26 +0100)]
Cleanup double initialized fields in SPC (#1935)
Marek Safar [Mon, 20 Jan 2020 15:50:07 +0000 (16:50 +0100)]
Initial pass on updating documentation to include MonoVM (#1863)
* Update documentation to cover also Mono runtime
* Updated requirements for mac and linux to include mono's
* Update System.Private.CoreLib/src/README.md
* Added initial mono building doc
* Added library testing steps for mono
* A bit of rewording based on feedback
* Add some scripts coloring
Jan Kotas [Sun, 19 Jan 2020 21:15:41 +0000 (13:15 -0800)]
Delete unnecessary defines from CoreCLR tests (#1922)
- PROJECK, STATIC, CORECLR
- Delete NoLogo
- Delete duplicate Exceptions/Finalization/Finalizer test
- Delete workaround for LLILC JIT
Alexander Köplinger [Sun, 19 Jan 2020 19:38:52 +0000 (20:38 +0100)]
Merge pull request #1912 from mono/consolidation
This adds the Mono runtime sources including the full history and some initial build system integration.
Jan Kotas [Sun, 19 Jan 2020 18:31:51 +0000 (10:31 -0800)]
Delete outdated workaround (#1921)
David Cantu [Sun, 19 Jan 2020 00:40:36 +0000 (16:40 -0800)]
Add support for preserve references on JSON (#655)
* Initial commit for JSON reference handling / preserve references
* Remove ReferenceHandling.Ignore option
* Code clean-up.
* Remove stale tests.
* Address PR feedback
* Reference handling inline (#1)
* Inline ReferenceHandling logic within main methods.
* remove stale Handle*Ref methods
* Refactor the code for Deserialization
* Create methods to reuse code
* Try to isolate Preserve logic as much as I can
* Replaced Exceptions for ThrowHelper methods
* Remove stale condition on $ref
* Add AggressiveInlining to HandlePropertyNameDefault
* Inline feature code in Serialization
* Fix preserve references for ExtensionData
* Split Reference dictionary into two, for (De)Serialize each.
Add Reference EqualityComparer to Serialize dictionary.
* Do not set PropertyName to s_missingProperty to avoid race condition issues.
* Remove Asserts that compare against an exception message.
* Set preserved array passing setPropertyDirectly = true to avoid issue when enumerable is already initialized.
* Code clean-up.
* Separate write code into WritePreservedObject and WriteReferenceObject
* Address some PR feedback:
* Switched ReferenceResolver to access it through a read-only property that initializes it the first time is tried to be accesed.
* Renamed some methods and properties
* Refactored WriteReference* methods.
* Fixed Exception messages
* Removed literal message comparison on tests.
* * Add round-tripping coverage to suitable unit tests
* Fix issues found with Round-tripping scenarios
* Move DictionaryPropertyIsPreserved to EndProperty() in order to fix issue where two dictionary properties were next to each other and the DictionaryPropertyIsPreserved was not reset.
* Add ReadStackFrame.IsNestedPreservedArray in order to identify preserved arrays nested and prevent using setPropertyDirectly on them.
* Add nullability annotations
* Code clean-up, reword comments and removed unnecesary properties in ReferenceHandling
* Fix issue where an object that tries to map into an enumerable could skip the validation that prevents this.
* Fix issue where the wrong type was passed into the throw helper for nested enumerable in HandleStartObject
* Address PR comments.
* Refactor flags on ReadStackFrame to avoid using unrelated fields for validation.
* Consolidated MetadataPropertyName enum logic on read and write.
* Reuse HandleStartObjectInEnumerable to handle arrays with metadata nested in a Dictionary.
* Refactor code:
* Change ReferenceResolver from class to struct to avoid one allocation.
* Replace propertyName.ToArray() for constant arrays in order to avoid allocation.
* Move some exception logic to the ThrowHelper class.
* * Apply optimizations:
* Use PropertyCacheArray on Values property lookup.
* Make Comparer static field to avoid one allocation at runtime.
* Document reasoning for DefaultReferenceResolver and ReferenreEqualsEqualityComparer
* Address PR comments.
* Addres more PR feedback:
* Add documentation to DefaultReferenceResolver public methods.
* Address PR feedback.
* Adderss more PR suggestions.
* * Move tests to Serialization namespace.
* On $values, set PropertyName on state.Current.JsonPropertyName instead.
Maher Jendoubi [Sun, 19 Jan 2020 00:32:21 +0000 (01:32 +0100)]
Contributing: fixed some typos (#1905)
Alexander Köplinger [Sat, 18 Jan 2020 23:54:54 +0000 (00:54 +0100)]
Merge remote-tracking branch 'upstream/master' into consolidation
Alexander Köplinger [Sat, 18 Jan 2020 17:00:01 +0000 (18:00 +0100)]
Add option to select Mono as the testhost runtime with the `/p:TestRuntimeFlavor=Mono` property
Alexander Köplinger [Sat, 18 Jan 2020 17:00:01 +0000 (18:00 +0100)]
Temporarily disable Mono from default subset categories
Robert Matusewicz [Sat, 18 Jan 2020 22:19:29 +0000 (23:19 +0100)]
Extract methods from Cng.cs to Interop.*.cs
* Extract BCryptImportKey from Cng.cs to Interop.BCryptImportKey.cs
* Extract BCryptEncrypt and BCryptDecrypt from BCryp/Cng.cs into Interop.BCryptEncryptDecrypt.cs
Jan Kotas [Sat, 18 Jan 2020 19:04:59 +0000 (11:04 -0800)]
More renames of full framework to .NET Framework (#1900)
* More renames of full framework to .NET Framework
* Apply suggestions from code review
Co-Authored-By: Stephen Toub <stoub@microsoft.com>
Alexander Köplinger [Sat, 18 Jan 2020 17:00:01 +0000 (18:00 +0100)]
Make Mono build in dotnet/runtime
Also add packaging project for Microsoft.NETCore.Runtime.Mono.
Alexander Köplinger [Sat, 18 Jan 2020 17:00:01 +0000 (18:00 +0100)]
Add new .gitignore for Mono
Jan Kotas [Sat, 18 Jan 2020 15:43:07 +0000 (07:43 -0800)]
Delete DESKTOP define in CoreCLR tests (#1901)
dotnet-bot [Sat, 18 Jan 2020 10:20:09 +0000 (05:20 -0500)]
Merge branch 'master' of mono
Stephen Toub [Sat, 18 Jan 2020 08:52:17 +0000 (03:52 -0500)]
Address more issue numbers in the code (#1888)
* Address more issue numbers in the code
Replaced a bunch of unadorned issue numbers with links, so we know which repo the issue is for. In some cases the repo was named, but for consistency I still replaced it with a link.
In some cases, in particular where the issue had been closed saying effectively "we're not going to do anything here", I removed TODOs and the associated issue numbers.
In a few cases, the TODO and issue number was to say "we should do X when Y is fixed", so I did X since Y was fixed.
* Apply suggestions from code review
Co-Authored-By: Jan Kotas <jkotas@microsoft.com>
* Address PR feedback
* Fix OrderedEnumerable by using MemoryExtensions.Sort
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
John Salem [Sat, 18 Jan 2020 07:11:55 +0000 (23:11 -0800)]
[testing] Update TraceEvent package version and bypass corner case in EventPipe (#1794)
* Update TraceEvent package version
* Workaround for deadlock in EventPipe
* Remove this change once the fix has be made
* Force the event source to be created
Jeremy Koritzinsky [Sat, 18 Jan 2020 06:02:09 +0000 (22:02 -0800)]
Fix RepoRoot to always have a directory terminator at the end (#1893)
* Make sure RepoRoot ends with a directory terminator.
* Use MSBuild::EnsureTrailingSlash
Stephen Toub [Sat, 18 Jan 2020 03:33:46 +0000 (22:33 -0500)]
Improve Regex codegen for negated / non-ASCII sets (#1799)
* Improve Regex codegen for negated sets
Given a set like `[ace]`, we currently generate a check along the lines of:
```C#
bool match = (uint)ch < 128 && asciiLookup[ch];
```
However, if there are any non-ASCII characters in the set, e.g. with `[ac\u1234]`, we need generate a non-ASCII fallback that does the full character set check:
```C#
bool match = (uint)ch < 128 ? asciiLookup[ch] : RegexRunner.CharInClass(ch, "...setstring");
```
This PR cleans that up and handles several additional cases to have a better fallback when possible.
- If we detect that the character class contains _only_ non-ASCII, such as would be the case with some of the named Unicode sets, then we generate the equivalent of `ch >= 128 && CharInClass(ch, "...")`.
- If we detect that every ASCII character is in the set, such as would be the case in a negated version of the above, then we generate the equivalent of `ch < 127 || CharInClass(ch, "...").
- If we detect that only ASCII is in the set (a very common case, such as with `[A-Fa-f0-9]`), then we generate the equivalent of `ch < 128 && lookup[ch]`.
- If we detect that all non-ASCII is in the set (such as when some ASCII characters are negated), then we generate the equivalent of `ch >= 128 || lookup[ch]`.
- Otherwise, we have our default of `ch < 128 ? lookup[ch] : CharInClass(ch, "...").
While this helps with non-ASCII inputs, it also helps to keep the code smaller/faster even when there are ASCI
* Update src/libraries/System.Text.RegularExpressions/tests/RegexCharacterSetTests.cs
Jared Parsons [Sat, 18 Jan 2020 03:25:51 +0000 (22:25 -0500)]
Disable failing test (#1896)
Disables `ConnectAsync_NotWebSocketServer_ThrowsWebSocketExceptionWithMessage`
as it's consistently failing in the outerloop jobs. Specifically the
libraries linux outerloop job.
Tracking Issue is #1895
Noah Falk [Sat, 18 Jan 2020 02:43:32 +0000 (18:43 -0800)]
Merge pull request #1199 from lmolkova/w3cTestSuiteCrashes
W3C Trace-Context: Allow hex chars in version and don't crash on non-hex chars in traceFlags
Jared Parsons [Sat, 18 Jan 2020 01:12:43 +0000 (20:12 -0500)]
Merge pull request #1873 from jaredpar/standard
Disable Apline.38 ARM64 runs
Julien Couvreur [Sat, 18 Jan 2020 01:12:01 +0000 (17:12 -0800)]
Tweak documentation on NotNullAttribute (#1891)
Tagging @BillWagner @stephentoub @RikkiGibson
The use of `[NotNull]` on an input parameter is allowed. The typical example is an `AssertNotNull` method. That behavior was [specified](https://github.com/dotnet/csharplang/blob/master/meetings/2019/LDM-2019-05-15.md#simple-postconditions), but does not appear in the docs. Adding a mention.
I assume that changes here propagate to docs automatically.
Eugene Rozenfeld [Fri, 17 Jan 2020 23:35:53 +0000 (15:35 -0800)]
Improvements for null check folding. (#1735)
optFoldNullChecks attempts to remove GT_NULLCHECK nodes that are
post-dominated by indirections on the same variable. These changes
implement a number of improvements.
1. Recognize more patterns.
Before these changes only the following pattern was recognized:
x = comma(nullcheck(y), add(y, const1))
followed by
indir(add(x, const2))
where const1 + const2 is sufficiently small.
With these changes the following patterns are recognized:
nullcheck(x)
or
x = comma(nullcheck(y), add(y, const1))
followed by
indir(x)
or
indir(add(x, const2))
where const1 + const2 is sufficiently small.
2. Indirections now include GT_ARR_LENGTH nodes.
3. Morph has an optimization
((x+icon1)+icon2) => (x+(icon1+icon2))
These changes generalize it to handle commas:
((comma(y, x+icon1)+icon2) => comma(y, x+(icon1+icon2))
That exposes more trees to null check folding.
4. Fix a bug in flow transformations that could lose BBF_HAS_NULLCHECK flag
on some basic blocks, which led to missing opportunities for null check folding.
5. Make safety checks in optCanMoveNullCheckPastTree
(for trees between the nullcheck and the indirection) both more correct
and less conservative. For example, we were not allowing any assignments
if we were inside try; however, assignments to compiler temps are safe since
they won't be visible in handlers.
5. Increase the maximum number of trees we check between GT_NULLCHECK and
the indirection from 25 to 50.
7. Refactor the code and move pattern recognition and safety checks to
helper methods.
8. Add missing BBF_HAS_NULLCHECK and OMF_HAS_NULLCHECK when we create GT_NULLCHECK nodes.
Vitek Karas [Fri, 17 Jan 2020 23:05:24 +0000 (15:05 -0800)]
Merge pull request #1525 from vitek-karas/OpenInstallerTestSln
Setup environment to open the installer test sln
Steve MacLean [Fri, 17 Jan 2020 23:01:25 +0000 (18:01 -0500)]
Remove unused/unnecessary defines (#1878)
Stephen Toub [Fri, 17 Jan 2020 23:00:49 +0000 (18:00 -0500)]
Port stubbed out Regex.CompileToAssembly (#1850)
* Port stubbed out Regex.CompileToAssembly
This ports Regex.CompileToAssembly. The "only" thing missing is the ability to actually save the Assembly out, which is obviously critical. I'm putting this commit up because I've been using the generated assembly to help debug/improve the code generation, using temporary hacks locally to get the Assembly saved to disk. Hopefully in the near future we can have a permanent solution in place.
* Code cleanup
Steve MacLean [Fri, 17 Jan 2020 22:49:08 +0000 (17:49 -0500)]
Fix MSVC warn as errors... (#1876)
* Fix warning as error
* Fix mismatched declaration/definition
Steve MacLean [Fri, 17 Jan 2020 22:48:28 +0000 (17:48 -0500)]
Remove stray sos reference (#1875)
Andrew Au [Fri, 17 Jan 2020 22:36:17 +0000 (14:36 -0800)]
Use bitmask operation to check if a slot is untracked (#1870)
Jeremy Koritzinsky [Fri, 17 Jan 2020 22:34:04 +0000 (14:34 -0800)]
Enable overriding CoreCLR and Libraries configurations in root… (#1826)
* Override the configuration of the CoreCLR and Libraries builds during the root build when CoreCLRConfiguration and LibrariesConfiguration are specified respectively.
* Add coreclrConfiguration and librariesConfiguration parameters to build scripts.
* Update docs.
* Make arguments lowercase on bash.
* Fix typos.
Davis Goodin [Fri, 17 Jan 2020 22:01:01 +0000 (16:01 -0600)]
Add Crossgen pack for crossgen2 tool (#1859)
* Add Crossgen pack for crossgen2 tool
* Inline sharedfx tooling support for Crossgen pack
* Support publishing crossgen pack
* "Crossgen pack" => "Crossgen2 pack"
Fadi Hanna [Fri, 17 Jan 2020 21:09:02 +0000 (16:09 -0500)]
Fix bug with PInvokes having byref arguments. (#1843)
* Fix bug with PInvokes having byref arguments.
Make IsMarshalingRequired return true for a byref argument
Jared Parsons [Fri, 17 Jan 2020 19:29:49 +0000 (11:29 -0800)]
Disable Apline.38 ARM runs
These are consistently failing on all runs. Disabling to get the build
green again while we dig into this
https://github.com/dotnet/runtime/issues/1871
Brian Sullivan [Fri, 17 Jan 2020 19:59:45 +0000 (11:59 -0800)]
Fixes runtime issue #1739 (#1840)
* Fixes runtime issue 1739
Added additional check for Jit Stress mode STRESS_LCL_FLDS
This stress mode requires that the types exactly match
* Code review feedback
Vitek Karas [Fri, 17 Jan 2020 19:22:44 +0000 (11:22 -0800)]
Merge pull request #1759 from vitek-karas/NativeSearchDirsFix
hostfxr_get_native_search_directories must fail when given CLI command
There's no check that when running with a "command" like hostfxr_get_native_search_directories that the code will not try to locate SDK and run CLI commands.
If it happens not only it does wrong things, but the return values are bogus (it doesn't fill the output buffer).
This change adds the necessary check to avoid this completely. It also makes sure that the output buffer size is always correctly set, even on errors.
Moved all the tests for hostfxr_get_native_search_directories to use nativehost and add a test to cover this case.
Davis Goodin [Fri, 17 Jan 2020 19:15:31 +0000 (13:15 -0600)]
Fix Linux_x64_glibc condition to build RPM/Deb (#1861)
Maryam Ariyan [Fri, 17 Jan 2020 18:49:42 +0000 (10:49 -0800)]
Adding area owners for new mono labels (#1865)
Justin Kotalik [Fri, 17 Jan 2020 18:21:13 +0000 (10:21 -0800)]
Implement required HttpClient apis in System.Net.Quic (#1703)
Adam Sitnik [Fri, 17 Jan 2020 17:48:49 +0000 (18:48 +0100)]
Update status badge link (#1855)
Adam Sitnik [Fri, 17 Jan 2020 14:37:34 +0000 (15:37 +0100)]
add benchmarking and profiling workflow docs links (#1856)
Wraith2 [Fri, 17 Jan 2020 14:21:50 +0000 (14:21 +0000)]
Spanify and cleanup System.Security.Principal.Windows
* spanify internal constructor, caller and callees
* rename locals and fields to match current style
* save the SecurityIdentifier objects for WindowsIdentity's Is(Something) properties as statics