Stephen Toub [Wed, 4 Nov 2020 01:00:59 +0000 (20:00 -0500)]
Add assert to SharedPerformanceCounter to debug test failures in CI (#44225)
Stephen Toub [Wed, 4 Nov 2020 01:00:30 +0000 (20:00 -0500)]
Add wiggle room to MonitoringIsEnabled test (#44228)
Viktor Hofer [Wed, 4 Nov 2020 00:07:00 +0000 (01:07 +0100)]
Add a PNSE configuration for System.Net.Quic (#44223)
Systme.Net.Quic is part of the shared framework but dosn't have a
configuration that applies to Browser. Adding a non-rid configuration so
that this applies for all future configurations that aren't explicitely
listed as well.
Changing some throw null lambdas in the reference source file to work
around a bug in the GenFacades not supported assembly creation logic:
https://github.com/dotnet/arcade/issues/6509.
Larry Ewing [Tue, 3 Nov 2020 23:37:30 +0000 (17:37 -0600)]
Remove the old mono timezone icall implementation from driver.c (#44171)
* Remove unused on netcore icall and set TZ in the startup js
Vlad Brezae [Tue, 3 Nov 2020 23:14:49 +0000 (01:14 +0200)]
[interp] Reinitialize error in a few places (#44188)
Otherwise we can assert when attempting to use the error.
Sergey Andreenko [Tue, 3 Nov 2020 22:42:20 +0000 (12:42 -1000)]
Check that we don't create null checks on an address that is not null. (#44059)
* Check that we don't create null checks on an address that is not null.
* Egor's request
Stephen Toub [Tue, 3 Nov 2020 22:09:20 +0000 (17:09 -0500)]
Try a different attribute for disabling stream conformance tests on browser (#44218)
Stephen Toub [Tue, 3 Nov 2020 21:33:57 +0000 (16:33 -0500)]
Remove several volatiles from Timer (#44199)
TimerQueueTimer._canceled is only ever used when _associatedTimerQueue is held.
TimerQueueTimer._notifyWhenNoCallbacksRunning only ever transitions from null to non-null, always under a lock, and the only time it's used outside of a lock is just after that same thread validated the field was non-null while holding the lock.
Sergey Andreenko [Tue, 3 Nov 2020 21:01:34 +0000 (11:01 -1000)]
Don't expect LIST nodes in CALL args. (#44089)
Adeel Mujahid [Tue, 3 Nov 2020 20:28:21 +0000 (22:28 +0200)]
Check catch and throw non-Exception derived types (#43969)
Verifies:
* `X` is derived from `Exception` in `throw X`.
* `throw null` is valid.
* `X` is derived from `Exception` in `catch(X)`.
Contributes to #37390
Larry Ewing [Tue, 3 Nov 2020 19:58:47 +0000 (13:58 -0600)]
Don't create a wrapper for run-v8.sh (#44172)
Tomas Weinfurt [Tue, 3 Nov 2020 19:35:01 +0000 (11:35 -0800)]
improve accuracy of Expect100Continue_WaitsExpectedPeriodOfTimeBeforeSendingContent test (#44053)
* improve accuracy of Expect100Continue_WaitsExpectedPeriodOfTimeBeforeSendingContent test
* feedback from review
Anton Firszov [Tue, 3 Nov 2020 19:10:18 +0000 (20:10 +0100)]
Extend SendAsync/ReceiveAsync cancellation tests (#44161)
- Rename CanceledDuringOperation_Throws to ReceiveAsync_CanceledDuringOperation_Throws and extend it to IPv6 sockets.
- Introduce cancellation test for Socket.SendAsync.
Martin Vseticka [Tue, 3 Nov 2020 18:33:23 +0000 (19:33 +0100)]
TcpClient.ConnectAsync(EndPoint) (#44110)
Implement TcpClient.ConnectAsync(IPEndPoint)
Aleksey Kliger (λgeek) [Tue, 3 Nov 2020 17:44:08 +0000 (12:44 -0500)]
[mono] remove 2 extra members from System.Object (#44081)
1. move `GetRawData` to an extension method in RuntimeHelpers and fixup the intrinsics
2. replace `Object.CloneInternal` by `MarshalAsAttribute.CloneInternal` at its one use site
3. re-enable System.Reflection.Tests.TypeInfoTests.FindMembers and fix mono/mono#15029
Alexander Köplinger [Tue, 3 Nov 2020 17:34:26 +0000 (18:34 +0100)]
Use different variable in base-job.yml to avoid confusion (#44193)
`/p:RuntimeOS` and the `-os` args are not the same thing (see https://github.com/dotnet/runtime/issues/33419) so we shouldn't be using the same variable for them.
Stephen Toub [Tue, 3 Nov 2020 17:19:00 +0000 (12:19 -0500)]
Clean up style of Random.cs (#44195)
No functional changes.
Jan Jahoda [Tue, 3 Nov 2020 16:51:46 +0000 (17:51 +0100)]
Add SYSLIB0013 into obsoletion list (#44203)
* Add SYSLIB0013 into obsoletion list
Add obsoletion of Uri.EscapeUriString to the list.
* Remove extra new line
Stephen Toub [Tue, 3 Nov 2020 15:23:03 +0000 (10:23 -0500)]
Fix comment causing formatting leg in CI to fail (#44197)
Tomas Weinfurt [Tue, 3 Nov 2020 13:25:02 +0000 (05:25 -0800)]
disable MockQuicStreamConformanceTests.Parallel_ReadWriteMultipleStreamsConcurrently (#44184)
* disable MockQuicStreamConformanceTests.Parallel_ReadWriteMultipleStreamsConcurrently
* Update QuicStreamConnectedStreamConformanceTests.cs
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Krzysztof Wicher [Tue, 3 Nov 2020 13:18:46 +0000 (14:18 +0100)]
Fix/remove TODO-NULLABLE in System.Private.Xml (#44149)
* Fix/remove TODO-NULLABLE in System.Private.Xml
* update contract for System.Xml.ReaderWriter
* follow up changes
Eric Erhardt [Tue, 3 Nov 2020 11:36:45 +0000 (05:36 -0600)]
Fill out hardware intrinsics linker substitutions for unsupported platforms (#44156)
Fix #44146
Stephen Toub [Tue, 3 Nov 2020 10:55:04 +0000 (05:55 -0500)]
Fix race condition in timeout handling and GetAsync_ContentCanBeCanceled (#44169)
There are three issues here.
Two tests issues:
1. When the client times out, it could do so while the server is still reading the request or sending the response, in which case the server can fail and cause the test to fail. The server failure needs to be ignored.
2. when the client times out, it could do so before it even initiates the request, in which case the test would hang while the server waits indefinitely for a request that'll never arrive. The server waiting needs to factor in the client's completion.
And one product issue:
1. The timeout handling we added in .NET 5 has a race condition that can, in extreme conditions (e.g. a unit test trying to force the interleaving) result in us not throwing the appropriate TimeoutException. There are two different timer mechanisms used, the one based on Timer inside of CancellationTokenSource, and then the use of Envrionment.TickCount64 to track how much time has progressed. Their quantums are different, so it's possible for the timer to fire due to the timeout expiring but Environment.TickCount64 not ticking over, at which point we'll read it and determine that the cause of the cancellation wasn't for a timeout. The fix is to use the pending requests token source to check whether it or the timeout occurred, rather than using the time elapsed to determine which of the two occurred.
Santiago Fernandez Madero [Tue, 3 Nov 2020 02:03:21 +0000 (18:03 -0800)]
Move serializable types for xml serialization generator tests to separate assembly (#44164)
* Move serializable types for xml serialization generator tests to separate assembly
* Add comment explaining why we need a separate assembly
Stephen Toub [Tue, 3 Nov 2020 01:53:00 +0000 (20:53 -0500)]
Add stream conformance tests for standalone streams (#44069)
* Nullable-enable stream conformance tests
* Add standalone stream conformance tests
* Address PR feedback
Stephen Toub [Tue, 3 Nov 2020 01:28:13 +0000 (20:28 -0500)]
Use actual nint/nuint in Latin1Utility (#44162)
Sergey Andreenko [Tue, 3 Nov 2020 01:26:04 +0000 (15:26 -1000)]
Fix asserts that were always true due to a missed neg. (#44095)
* Fix asserts that were always true due to missed neg.
* Ensure we don't assert for HWIntrinsics that already had the imm operand marked contained
Co-authored-by: Tanner Gooding <tagoo@outlook.com>
Zoltan Varga [Tue, 3 Nov 2020 00:47:33 +0000 (19:47 -0500)]
Fix an assert which is hit when compiling Microsoft.CodeAnalysis.dll with llvmonly. (#44092)
Levi Broderick [Tue, 3 Nov 2020 00:24:23 +0000 (16:24 -0800)]
Remove some unsafe code from System.Xml (#43379)
* Remove private DoubleToInt64Bits
* Remove unsafe IntToString implementation
* Remove unsafe AdjustLineInfo implementation
* Remove unsafe GetStringAligned implementation
* Remove unsafe code from BinHexDecoder
* Remove unsafe MemoryMarshal usage from CodeIdentifier
* Remove unsafe Base64Decoder implementation
* Remove unsafe code in GetSingle and GetDouble
* Remove unsafe code from CheckText
Tomáš Rylek [Mon, 2 Nov 2020 23:30:42 +0000 (00:30 +0100)]
Move the exclusion of unregister01/03 into general CoreCLR group (#44163)
Vlad Brezae [Mon, 2 Nov 2020 23:10:22 +0000 (01:10 +0200)]
[interp] Fix pinvoke passing of valuetype on wasm (#44129)
For valuetypes, a stackval used to contain a pointer to the valuetype data, while currently the valuetype data is stored directly in the stackval.
Anirudh Agnihotry [Mon, 2 Nov 2020 22:25:58 +0000 (14:25 -0800)]
Changing Windows_NT -> Windows for enabling TargetPlatformMoniker feature of the sdk for platform specific tfms. (#43651)
* eng change
* coreclr change
* libraries change
* tests change
* installer & mono change
* py files changed
* .md change
* .yml change
* remove redundant targetos property
* Windows_NT -> windows after ninja change
* fixing runtime build failure
devsko [Mon, 2 Nov 2020 21:37:52 +0000 (22:37 +0100)]
JSON continuation tests (#42393)
* Repro #42070
* formatting
* namespace
* Fix
* never forget the header
* More tests
- Test continuation at every position inside the tested object
- Many member with primitive and nullable types
- One more level of nested object
- All combinations of class/struct for tested and nested object
- tested and nested object with parametrized ctor for some properties
* Addressed feedback
* refactoring
* Test with original repro data from #42070
* custom converter to ensure the padding is written in front of the tested object
* rename
* test data moved to Strings.resx
* Using test data from SR
* Generalize continuation tests for payloads of any length
Tweak the payload and expect `JsonException`
* merge
* Test deserialize with Utf8JsonReader and ReadOnlySequence
* Again with value typed nested object
* Add tests for splitted whitespaces
* Addressed feedback
Added dictionary test
* Validate line and position of failure in tweaked payloads
more tweaks
* Fixed comment
Co-authored-by: Layomi Akinrinade <laakinri@microsoft.com>
Stephen Toub [Mon, 2 Nov 2020 21:13:53 +0000 (16:13 -0500)]
Remove stale !s and TODO-NULLABLEs, plus those for indexer nullability tracking (#44136)
Mitchell Hwang [Mon, 2 Nov 2020 20:36:05 +0000 (15:36 -0500)]
Add property to reuse Android App signing key (#44085)
Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
Zoltan Varga [Mon, 2 Nov 2020 20:25:31 +0000 (15:25 -0500)]
Strip release builds on wasm. Avoid linking against libicudata.a, its not needed. (#43951)
Fix warnings.
Elinor Fung [Mon, 2 Nov 2020 20:22:46 +0000 (12:22 -0800)]
Slight cleanup in hostpolicy (#44157)
Clinton Ingram [Mon, 2 Nov 2020 20:16:17 +0000 (12:16 -0800)]
Update Brotli to v1.0.9 (#44107)
* sync brotli source
* update runtime project
Steve MacLean [Mon, 2 Nov 2020 19:44:18 +0000 (14:44 -0500)]
Remove OSX_arm64 from platform group all (#44160)
Jeremy Koritzinsky [Mon, 2 Nov 2020 17:45:54 +0000 (09:45 -0800)]
Set the MSVC RuntimeLibrary properties for ASM_MASM when we use MASM. (#44155)
Mitchell Hwang [Mon, 2 Nov 2020 17:44:46 +0000 (12:44 -0500)]
Add NativeMainSource alternative to Android Sample App (#44076)
* Add NativeMainSource alternative to Android Sample
* Move nativeMainSource from parameter to property
Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
Prashanth Govindarajan [Mon, 2 Nov 2020 17:40:15 +0000 (09:40 -0800)]
Fix incorrect handling of character range and capitalization in regex (#42282)
* Bug fix and unit test
* Address comments
* An elegant fix and unit tests
* Remove old code
* Fix the unit tests
* sq
* sq
* Address comments and add test case
* Skip the unit tests on net framework
* Debug commit for CI
* Try to get more error info
* Run validation as a unit test.
Skip it on non-ICU environments
Stephen Toub [Mon, 2 Nov 2020 16:21:49 +0000 (11:21 -0500)]
Delete duplicate Buffer.Memmove implementations and avoid unnecessary pinning (#44118)
* Delete duplicate Buffer.Memmove implementations and avoid unnecessary pinning
We have several versions of Buffer.Memmove, including one implemented around `byte*` and one implemented around `ref byte`. We can delete the former and just use the latter everywhere. In doing so, we can also remove a few wrapper helpers, and reduce pinning in places where those wrappers were pinning to get pointers only to eventually end up in the ref-based implementation, anyway.
* Use ThrowHelper in more places
Tomáš Rylek [Mon, 2 Nov 2020 16:16:46 +0000 (17:16 +0100)]
Add issues.targets CG2 entries for issue #44054 (#44142)
Jeremy Koritzinsky [Mon, 2 Nov 2020 15:50:01 +0000 (07:50 -0800)]
Enable using the Ninja generator instead of Visual Studio on Windows builds. (#41897)
* Move DacTableGen out of the CMake build and into tools-local.
* Attempt: usenmakefiles means ninja.
* Make changes to Windows build to support non-VS generators like ninja.
* Use CMake 3.16 PCHs.
* Remove explicit process count.
* Build and run DacTableGen via the .NET CLI we pull down for the build instead of via CMake.
* Update configurecompiler.cmake to specify language (needed for Ninja).
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Get Ninja build working again.
* Pass configuration to cmake configure step for Ninja build.
* Rename flag
* Fix configure step for cross-arch native build
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Support building via Ninja for coreclr via an MSBuild property
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Implement support for opening the CoreCLR solution in VS via the -vs flag.
* Fix setting generator to Ninja.
* Merge libraries gen-buildsys-win.bat with runtime gen-buildsys.cmd to share windows cmake configure infra.
* Enable building libraries native build with ninja.
* Centralize setting CMAKE_SYSTEM_VERSION for windows builds.
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Update host build to use shared gen-buildsys.cmd
* Fix multi-config generator detection.
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Exit with success when we build successfully.
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Enable and fix up Ninja build for hosts.
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Only link delayimp.lib on Windows
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Remove "overriding /W3 with /W1" warning in Ninja build of hosts by turning on /W3 and disabling any new warnings we hit.
* Reduce command line override warnings by adopting the MSVC_RUNTIME_LIBRARY abstraction feature in CMake 3.14+ (below the minimum requirement on Windows).
* Use the delayed expansion syntax to correctly pass in the config to cmake.
* Move all usages of MSVC runtime library selection to the CMake abstraction to reduce console spew about overridden flags.
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Condition the rest of the compiler options correctly so they don't show up as invalid parameter warnings for assembly builds.
* Correctly build DIALib and DacTableGen as AnyCPU
* Fix WRITE_BARRIER_CHECK define
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Fix passing arch for MSBuild build.
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Configure ASM compiler command line format in configurecompiler.cmake and use CMake's assembly compilation step to build ASM files for ARM/ARM64 instead of manually building them and adding the generated files as additional sources.
* Cleanup after fixing ARM/ARM64 support.
* Rename variable
* Condition PCH's for C++-only as needed to fix using them on non-Windows (where we compile C as C instead of as C++).
* Fix CoreCLR native test build on windows to point to new gen-buildsys location.
* Add missing compilation options in Ninja build that are implicitly defined in the MSBuild build.
* Disable analyzers for DacTableGen. Remove /MAP linker flag (that's for local testing).
* Upgrade to CMake 3.16.4
* Don't warn on unused variables in CMake (these usually vary on platform/config)
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Manually compile ARM and ARM64 asm files when using the VS generator since it doesn't support emitting MARMASM item types in projects (and as a result cannot compile ARM or ARM64 asm without assistance).
* Enable CMake policy in test build to use CMAKE_MSVC_RUNTIME_LIBRARY variable.
* Update initially disabled warnings in host.
* Add -ninja arg to root scripts to enable using Ninja.
* Enable using Ninja in CoreCLR CI.
* Try to fix passing the -ninja arg in yaml.
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Add ninja to the Windows invocation
* Fix 2-phase cross targeting to do one phase at a time and initialize the VC++ environment for the correct build tools each time instead of interleaving them and relying on Visual Studio to handle the differing targets.
* Restore old /Ox optimization setting for Release.
* Fix typos, don't pass exception flags to C files.
* Remove unneeded pragma.
* Fix .pgd file installation.
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Add mention of the `-ninja` flag in the Building CoreCLR documentation.
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Mention installation locations for Ninja and warn while building if CMake is older than 3.16.0.
* Update docs/workflow/requirements/windows-requirements.md
Zoltan Varga [Mon, 2 Nov 2020 15:47:15 +0000 (10:47 -0500)]
Set GC_SUSPEND based on the target os not the host os. (#44093)
* Set GC_SUSPEND based on the target os not the host os.
* Add ENABLE_LLVM_RUNTIME cmake option.
Larry Ewing [Mon, 2 Nov 2020 15:44:29 +0000 (09:44 -0600)]
Fix equality check for unset variables (#44099)
Stephen Toub [Mon, 2 Nov 2020 15:04:55 +0000 (10:04 -0500)]
Use slightly smaller code for String.Concat(object, object, ...) (#44133)
C#, IL, and asm are all a bit smaller. We don't need to set the arguments to Empty if they're null, as the called function checks for null.
Stephen Toub [Mon, 2 Nov 2020 15:03:30 +0000 (10:03 -0500)]
Delete dead AppendSpanFormattable method from ValueStringBuilder (#44135)
Zoltan Varga [Mon, 2 Nov 2020 08:46:35 +0000 (03:46 -0500)]
Remove some unused icalls. (#44128)
Levi Broderick [Mon, 2 Nov 2020 02:57:26 +0000 (18:57 -0800)]
(MQ cleanup) Remove size_t from managed Brotli code (#44043)
* Remove size_t from managed Brotli code
* Apply suggestions from code review
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Stephen Toub [Mon, 2 Nov 2020 02:18:01 +0000 (21:18 -0500)]
Remove unsafe code from String.Join (#44126)
* Remove unsafe code from String.Join
- Use a span for the separator to share the same code across a char separator and string separator, rather than using pointers.
- Consolidate argument validation for the value/startIndex/count overloads into one shared helper
- Change indexing to use standard 0 to values.Length for loop to eliminate bounds checking on span accesses
* Update src/libraries/System.Private.CoreLib/src/System/String.Manipulation.cs
Aaron Robinson [Sun, 1 Nov 2020 23:11:16 +0000 (15:11 -0800)]
Remove last remnants of IExpando support. (#44122)
David Wrighton [Sun, 1 Nov 2020 22:54:35 +0000 (14:54 -0800)]
Fix type generator test failures (#44041)
- Fix issue where method token referred to derived type but method was actually defined on base type
- Previously the methods did not carry enough state to determine when to emit the owner type of the method, and which exact type was the owning type. The new logic computes it from the token in the presence of a proper instantiation context, which allows for correct operation.
- Fix issue where constrained dispatch on a method of a valuetype would not put in the correct owner type
- Issue fixed by determining if the token resolves to a method on the same type as the eventual target method, or if it needs to have a specific owning type specified
In general these issues where both caused by confusion around exactly the correct owning type, and it turned out that computation could not be computed within the signature emitter code, but instead needed to be computed in the JIT at point of use. Fortunately, we had a structure `MethodWithToken` that is used in these (and only these situations). Finally, I also made a pass through the emitter and related logic to remove various band-aids that had built up over the last few years to make all the tests and applications pass. I believe that the new logic should be correct in the general case.
Bonus tweak... Use parallelism when compiling the framework composite images with crossgen2, and fix bug in composite image generation where mangled symbol names might conflict.
Fixes #43466 and fixes #43467
John Call [Sun, 1 Nov 2020 17:37:08 +0000 (09:37 -0800)]
Add optimized String.Join for IList<string> (#44032)
* Support IList<string>
* Revert API change
* Feedback
* Use ReadOnlySpan
* Feedback
* Fix comment
* address feedback
* Add test for List<string> optimization
* Remove StartIndex and Count in core
* Update src/libraries/System.Private.CoreLib/src/System/String.Manipulation.cs
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Jan Kotas [Sun, 1 Nov 2020 14:08:42 +0000 (06:08 -0800)]
Delete unnecessary seek from SetLengthInternal on Unix (#44097)
Also, improve test coverage for FileStream.SetLength
Zoltan Varga [Sun, 1 Nov 2020 07:01:15 +0000 (02:01 -0500)]
Avoid linking against libicudata.a, its not needed. (#44105)
SingleAccretion [Sun, 1 Nov 2020 03:00:39 +0000 (06:00 +0300)]
Fix the typo (#44075)
dotnet-maestro[bot] [Sat, 31 Oct 2020 21:38:38 +0000 (21:38 +0000)]
[master] Update dependencies from dotnet/arcade dotnet/llvm-project dotnet/xharness (#44062)
[master] Update dependencies from dotnet/arcade dotnet/llvm-project dotnet/xharness
Adeel Mujahid [Sat, 31 Oct 2020 16:36:26 +0000 (18:36 +0200)]
Remove WinRT leftovers from mono's CoreLib (#44102)
monojenkins [Sat, 31 Oct 2020 16:30:19 +0000 (12:30 -0400)]
Minor update to function signatures for RISCV64 architecture (#43862)
I don't believe this fixes any existing issue in the tracker, but I'm trying to build mono with dotnet-core on riscv from git and ran into this problem when compiling. There may end up being other changes but I won't know until my VM is done actually building mono. The changes right now are incredibly minor, just updating some function signatures to match the current rest of the system.
<!--
Thank you for your Pull Request!
If you are new to contributing to Mono, please try to do your best at conforming to our coding guidelines http://www.mono-project.com/community/contributing/coding-guidelines/ but don't worry if you get something wrong. One of the project members will help you to get things landed.
Does your pull request fix any of the existing issues? Please use the following format: Fixes #issue-number
-->
Co-authored-by: simcop2387 <simcop2387@users.noreply.github.com>
hev [Sat, 31 Oct 2020 12:16:44 +0000 (20:16 +0800)]
Fix IL interpreter build on GCC. (#44049)
Stephen Toub [Sat, 31 Oct 2020 09:57:50 +0000 (05:57 -0400)]
Disable PollingEventFires test (#44096)
Stephen Toub [Sat, 31 Oct 2020 02:22:49 +0000 (22:22 -0400)]
Optimize String.Replace(string, string) (#44088)
We can significantly improve its throughput for a few scenarios:
- If both oldValue and newValue are single characters in the form of strings, we can just delegate to the Replace(char, char) overload, which is much faster.
- If oldValue is a single character but newValue isn't, we can use IndexOf to find it, rather than an open-coded loop, making search times much faster for reasonably sized strings.
- If oldValue is multiple characters and the string being searched for isn't super frequent (e.g. doesn't repeat every few characters), we can significantly speed up throughput by using IndexOf to search for the whole string. For example, replacing "\r\n" with "\n" in the contents of a typical file.
This does come at a measurable cost when the oldValue is really common and tightly packed, e.g. searching for "aa" in "
aaaaaaaaaaaaaaaaaa", so we can decide whether the tradeoff is the right one.
Fan Yang [Fri, 30 Oct 2020 21:06:32 +0000 (17:06 -0400)]
[Interp] Create an intrinsic for Interlocked.Exchange for int64 (#43893)
* Add an instrinsic for Interlocked.Exchange
* Hacks to help with development
* Remove one more layer of function call and revert local hacks
* Revert redundant format change
* make interlocked_mutex a global variable
* Update opcode name
* Resolve reviewer feedbacks
* Add a pair of braces.
Carlos Sanchez [Fri, 30 Oct 2020 21:04:29 +0000 (14:04 -0700)]
Add area owners for System.Formats (#44038)
* Asn1
* Cbor
* Align last pipe, add missing pipes.
* Quic
* Additional owners for Asn1 and Cbor
Co-authored-by: carlossanlop <carlossanlop@users.noreply.github.com>
Larry Ewing [Fri, 30 Oct 2020 20:09:07 +0000 (15:09 -0500)]
Clean up debugger debug logging and wasm trace logging (#43960)
* Clean up debugger debug logging and wasm trace logging
* Update src/mono/mono/mini/mini-wasm-debugger.c
Co-authored-by: Ryan Lucia <ryan@luciaonline.net>
Ben Adams [Fri, 30 Oct 2020 19:42:38 +0000 (19:42 +0000)]
EqualityComparer IndexOf to shared (#44065)
Jan Kotas [Fri, 30 Oct 2020 19:41:11 +0000 (12:41 -0700)]
Delete area-Tizen
Layomi Akinrinade [Fri, 30 Oct 2020 18:38:27 +0000 (11:38 -0700)]
Set default value for value-type ctor params properly (#43831)
* Set default value for value-type ctor params properly
* Address review feedback
Layomi Akinrinade [Fri, 30 Oct 2020 17:39:43 +0000 (10:39 -0700)]
Set number handling for properties read after deserializing ctor params (#43829)
* Set number handling for properties read after deserializing ctor params
* Use DeserializeWrapper pattern for tests
Adeel Mujahid [Fri, 30 Oct 2020 17:36:06 +0000 (19:36 +0200)]
Enable unused-result warning for PAL (#43395)
Delete the remaining dead variables and methods from PAL, that were
highlighted by gcc's dead code analysis, and enable `unused-result`
warning for PAL.
Zoltan Varga [Fri, 30 Oct 2020 16:53:26 +0000 (12:53 -0400)]
Fix gsharedvt constrained calls to Object.GetHashCode () which was broken by #43729. (#44047)
Fixes https://github.com/dotnet/runtime/issues/44000.
Brian Sullivan [Fri, 30 Oct 2020 16:21:58 +0000 (09:21 -0700)]
Implement the reuse of duplicate constant values (#43899)
* Implement the reuse of duplicate constant value
- Duplicate values will now be reused in the constants area
- Added MIN_DATA_ALIGN and MAX_DATA_ALIGN constants
- Added dsDataType to record the type of the constant
- Print the floating point values in the constants area
- Changed 'alignment' and 'cnsSize' parameters to be unsigned instead of UNATIVE_OFFSET
- Added method emitDataGenFind to search and return a duplicate constant value
* Correctly place declaration of curOffs
* Code review feedback
* Carol's feedback
* Feedback from Tanner Gooding
Allow binary bit pattern matches of constants
* Fix build warning/error
* Jit Format
Aleksey Kliger (λgeek) [Fri, 30 Oct 2020 15:35:37 +0000 (11:35 -0400)]
[cmake] Add -DCHECKED_BUILD=args support, and check getters in Debug (#44024)
* [cmake] Add -DCHECKED_BUILD=args support, and check getters in Debug
Add support for additional compile-time and runtime checks to cmake.
Also for Debug builds, turn on the compile-time "private types" check that
verifies that getters are being used to access the fields of certain structs.
* [interp] Use getters
* remove unused stub
Steve Harter [Fri, 30 Oct 2020 14:36:55 +0000 (09:36 -0500)]
Address JsonElement doc and test feedback (#43832)
Levi Broderick [Fri, 30 Oct 2020 09:52:58 +0000 (02:52 -0700)]
Remove unused ifdef logic in ODBC (#44042)
Stephen Toub [Fri, 30 Oct 2020 09:50:49 +0000 (05:50 -0400)]
Add Stream argument validation helpers and use throughout dotnet/runtime (#43968)
* Add Stream argument validation helpers and use throughout dotnet/runtime
* Delete unnecessary code in Stream
Stream.Null was using BlockingBegin/EndRead/Write, but the operations are nops (they don't even do argument validation), so the functionality was unnecessary complication. We can just use TaskToApm instead, with already completed tasks, and then also delete the SynchronousAsyncResult that was used by these operations.
Also, the Begin/EndRead/Write methods were checking CanRead/Write and throwing if they return false, but this is a private sealed type with CanRead/Write hardcoded to return true! Delete.
Finally added consistency across Stream.Null to checking for cancellation.
* Clean up some style on Stream
Also consolidate a few resources and use a few existing ThrowHelpers where appropriate.
* Fix a few issues, and remove duplicative tests missed in conformance tests rollout
* Address PR feedback
Kunal Pathak [Fri, 30 Oct 2020 06:16:29 +0000 (23:16 -0700)]
Enable automated SPMI collection for outerloop tests (#43773)
* wip
* wip
* Parameterized SPMI collection
* move the condition
* change to variables
* Update displayName
* Change the format
* Revert "Change the format"
This reverts commit
292ba21c95026feae7528be449c99a0f20b4b068.
* Use variables.collectionName
* fix displayName
* use variables.collectionName for displayName
* print
* Use name
* fix condition
* Create 2 yml files
* Download test artifacts for tests collection
* Attempt to have multiple jobs
* Back to superpmi.yml
* Add missing parameter
* Use CollectionName at other places
* Use collectionName for artifacts, increase timeout for test
* try to merge whatever mch files we got
* Fixes
- increase the timeout for tests to 8 hours
- ignore file error in superpmi.py
- revert timeout setting from superpmi.proj
* fix the .mch file name
* fix typo
dotnet-maestro[bot] [Fri, 30 Oct 2020 04:33:53 +0000 (04:33 +0000)]
Update dependencies from https://github.com/dotnet/arcade build
20201027.10 (#44020)
[master] Update dependencies from dotnet/arcade
Levi Broderick [Fri, 30 Oct 2020 04:30:07 +0000 (21:30 -0700)]
Use BinaryPrimitives where possible (#43474)
Stephen Toub [Thu, 29 Oct 2020 22:10:58 +0000 (18:10 -0400)]
Remove some unnecessary List-related allocation from EventSource (#44026)
David Wrighton [Thu, 29 Oct 2020 21:26:44 +0000 (14:26 -0700)]
Use jitstd::sort instead of qsort in jit and gcinfo (#43923)
Current use of qsort interferes with cross compilation.
The qsort algorithm is quite different between Windows and Linux, thus causing cross compilation comparison failures while testing.
This replaces qsort with the use of jitstd::sort which provides a sort which is consistent between all platforms. (Particularly in Windows where CFG has costs for function pointer usage.) With a homegrown sort performance test, there is about 15-30% performance win with this sort over qsort. (However as these tests do not resemble the behavior of these sorts in the JIT I do not believe they are spectacularly relevant.)
There is a size cost of about 4KB-6KB for the templatized routines. I was unable to measure a performance difference for the JIT itself. (Crossgen is very slightly faster in my testing with the change, but I do not believe the difference is statistically meaningful.)
Jackson Miller [Thu, 29 Oct 2020 21:11:04 +0000 (17:11 -0400)]
remove unnecessary bound check (#42431)
now that all primitive types are supported (thanks to #29000), we can
remove custom bound checks.
Stephen Toub [Thu, 29 Oct 2020 20:25:32 +0000 (16:25 -0400)]
Update coding-style.md
Kevin Jones [Thu, 29 Oct 2020 18:43:57 +0000 (14:43 -0400)]
Support loading public-only PEM X.509 certificates
Create an overload of CreateFromFile that accepts just the PEM-encoded
X.509 certificate that does not contain a private key.
Elinor Fung [Thu, 29 Oct 2020 18:29:51 +0000 (11:29 -0700)]
Fix loading component when application was started with `dotnet` instead of apphost (#43962)
* Don't parse arguments in hostpolicy until necessary
* Explicit error on invalid startup info in hostfxr
* Update tests
Zoltan Varga [Thu, 29 Oct 2020 18:10:40 +0000 (14:10 -0400)]
Disable the 'problematic assembly' code on .net core. (#44022)
Zoltan Varga [Thu, 29 Oct 2020 18:08:44 +0000 (14:08 -0400)]
Fix #44004, disable assertion messages in release mode instead of debug. (#44023)
* Fix #44004, disable assertion messages in release mode instead of debug.
* Remove obsolete 'full_messages' enable-minimal option.
Fan Yang [Thu, 29 Oct 2020 14:12:57 +0000 (10:12 -0400)]
Remove redundant lower function (#44010)
David Pine [Thu, 29 Oct 2020 13:41:41 +0000 (08:41 -0500)]
Update ServiceProviderServiceExtensions.cs (#43974)
Use pattern matching, rather than `as` cast and `null` check.
Zoltan Varga [Thu, 29 Oct 2020 05:20:18 +0000 (01:20 -0400)]
Avoid disabling assert messages in debug configuration on wasm to help debugging. (#44004)
Levi Broderick [Thu, 29 Oct 2020 03:52:39 +0000 (20:52 -0700)]
Clarify string.IndexOf rules in code comments (#43999)
Alexander Köplinger [Thu, 29 Oct 2020 02:21:29 +0000 (03:21 +0100)]
Bump xharness (#43996)
Includes a potential fix for https://github.com/dotnet/runtime/issues/43983
Alexander Köplinger [Thu, 29 Oct 2020 01:29:26 +0000 (02:29 +0100)]
Add back passing of --build-id option to Mono runtime build (#43993)
This got lost as part of CMake cleanup in https://github.com/dotnet/runtime/pull/43678 but it is actually important for some publishing infrastructure: https://github.com/dotnet/arcade/issues/6464
Egor Bogatov [Thu, 29 Oct 2020 01:27:12 +0000 (04:27 +0300)]
[interp] return false for IsLittleEndian on BE (#43946)
To help those who maintain Mono for BE.
Also, it allows interpreter to fold branches since now IsLittleEndian is converted into `LDC.I4.1` always on LE.
Example:
```csharp
static void Validate()
{
if (!BitConverter.IsLittleEndian)
throw new PlatformNotSupportedException();
}
```
Current output for `MONO_VERBOSE_METHOD=Validate` on both LE/BE:
```
IR_0000: ldsfld.u1 0
IR_0003: brtrue.i4.s IR_000b
IR_0005: newobj_fast 3
IR_000a: throw
IR_000b: ret.void
```
New output on LE:
```
IR_0000: ret.void
```
Alexander Köplinger [Wed, 28 Oct 2020 23:38:07 +0000 (00:38 +0100)]
Add static libraries for System.Native back to mobile runtime packs (#43987)
We need it for various scenarios there. It was removed in https://github.com/dotnet/runtime/pull/41966.
Fixes https://github.com/dotnet/runtime/issues/43949
dotnet-maestro[bot] [Wed, 28 Oct 2020 23:34:18 +0000 (00:34 +0100)]
[master] Update dependencies from mono/linker dotnet/arcade dotnet/xharness dotnet/llvm-project dotnet/runtime-assets dotnet/icu (#43822)
* Update dependencies from https://github.com/mono/linker build
20201026.1
Microsoft.NET.ILLink.Tasks
From Version 6.0.0-alpha.1.20525.1 -> To Version 6.0.0-alpha.1.20526.1
* Update dependencies from https://github.com/dotnet/arcade build
20201022.2
Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk , Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.ApiCompat
From Version 6.0.0-beta.20520.8 -> To Version 6.0.0-beta.20522.2
* Update dependencies from https://github.com/dotnet/icu build
20201026.1
Microsoft.NETCore.Runtime.ICU.Transport
From Version 6.0.0-alpha.1.20512.1 -> To Version 6.0.0-alpha.1.20526.1
* Update dependencies from https://github.com/mono/linker build
20201026.2
Microsoft.NET.ILLink.Tasks
From Version 6.0.0-alpha.1.20525.1 -> To Version 6.0.0-alpha.1.20526.2
* Update dependencies from https://github.com/mono/linker build
20201027.1
Microsoft.NET.ILLink.Tasks
From Version 6.0.0-alpha.1.20525.1 -> To Version 6.0.0-alpha.1.20527.1
* Update dependencies from https://github.com/dotnet/arcade build
20201025.1
Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk , Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.ApiCompat
From Version 6.0.0-beta.20520.8 -> To Version 6.0.0-beta.20525.1
* Update dependencies from https://github.com/dotnet/xharness build
20201027.1
Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Xunit
From Version 1.0.0-prerelease.20519.2 -> To Version 1.0.0-prerelease.20527.1
* Update dependencies from https://github.com/dotnet/llvm-project build
20201026.1
runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk
From Version 9.0.1-alpha.1.20523.1 -> To Version 9.0.1-alpha.1.20526.1
* Update dependencies from https://github.com/dotnet/runtime-assets build
20201026.1
System.ComponentModel.TypeConverter.TestData , System.Drawing.Common.TestData , System.IO.Compression.TestData , System.IO.Packaging.TestData , System.Net.TestData , System.Private.Runtime.UnicodeData , System.Runtime.TimeZoneData , System.Security.Cryptography.X509Certificates.TestData , System.Windows.Extensions.TestData
From Version 5.0.0-beta.20522.4 -> To Version 5.0.0-beta.20526.1
* Update dependencies from https://github.com/mono/linker build
20201027.2
Microsoft.NET.ILLink.Tasks
From Version 6.0.0-alpha.1.20525.1 -> To Version 6.0.0-alpha.1.20527.2
* Update dependencies from https://github.com/dotnet/arcade build
20201026.10
Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk , Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.ApiCompat
From Version 6.0.0-beta.20520.8 -> To Version 6.0.0-beta.20526.10
* Update dependencies from https://github.com/dotnet/runtime-assets build
20201027.1
System.ComponentModel.TypeConverter.TestData , System.Drawing.Common.TestData , System.IO.Compression.TestData , System.IO.Packaging.TestData , System.Net.TestData , System.Private.Runtime.UnicodeData , System.Runtime.TimeZoneData , System.Security.Cryptography.X509Certificates.TestData , System.Windows.Extensions.TestData
From Version 5.0.0-beta.20522.4 -> To Version 5.0.0-beta.20527.1
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Wei Zheng [Wed, 28 Oct 2020 23:31:26 +0000 (07:31 +0800)]
Fix DI DisposeAsync being called twice (#43803)
* Fix DI DisposeAsync being called twice
Koundinya Veluri [Wed, 28 Oct 2020 20:58:03 +0000 (16:58 -0400)]
Enable the portable thread pool by default in coreclr (#43841)