Levi Broderick [Tue, 5 Mar 2019 02:31:41 +0000 (18:31 -0800)]
React to changes through ASCIIEncoding and EncoderNLS
Also create some additional ASCII tests
Commit migrated from https://github.com/dotnet/corefx/commit/
d817d68fc6e2fc78624540aa90a060f4d5bf0eee
Jan Kotas [Tue, 12 Mar 2019 21:03:55 +0000 (14:03 -0700)]
Pin buffer for NtQuerySystemInformation (dotnet/corefx#35991)
Fixes dotnet/corefx#35987
Commit migrated from https://github.com/dotnet/corefx/commit/
704a9669e69ef5faae55ca438e9850b8aa0e9ec5
Tomas Weinfurt [Tue, 12 Mar 2019 19:16:12 +0000 (12:16 -0700)]
Fix SendWithPingUtilityAsync to catch InvalidOperationException (dotnet/corefx#35992)
* ignore InvalidOperationException from Kill
* ignore InvalidOperationException from Kill
Commit migrated from https://github.com/dotnet/corefx/commit/
0f7a0bd5fb4892c1434e263824d394ab621a1b2a
Osman Turan [Tue, 12 Mar 2019 09:57:50 +0000 (12:57 +0300)]
Add unit tests for PEHeaderBuilder factory methods
See: dotnet/corefx#35758
Commit migrated from https://github.com/dotnet/corefx/commit/
07dfb7b7530528a065a2eccb09b6df560e2547c5
Osman Turan [Wed, 6 Mar 2019 11:03:30 +0000 (14:03 +0300)]
Fix ImageCharacteristics of PEHeaderBuilder when initialized by CreateLibraryHeader
Fixes: dotnet/corefx#35758
Commit migrated from https://github.com/dotnet/corefx/commit/
a04be5028544df36b11cabd4081896ba8037b71e
Stephen Toub [Tue, 12 Mar 2019 15:05:04 +0000 (11:05 -0400)]
Include correct error code in WebSocket.ThrowOnInvalidState (dotnet/corefx#35960)
* Include correct error code in WebSocket.ThrowOnInvalidState
* Address PR feedback
* Fix UWP leg
Commit migrated from https://github.com/dotnet/corefx/commit/
ef145001b10660be940aeb9318e0ff7e306f65bc
David Fowler [Tue, 12 Mar 2019 15:02:02 +0000 (08:02 -0700)]
Made some tweaks to the BufferSegmentStack (dotnet/corefx#35980)
- Remove array covariance checks
- Added another test for pooled segments
Commit migrated from https://github.com/dotnet/corefx/commit/
19ec4f3cabcc0796c14f4663c6ee3ab8173ad90d
Stephen Toub [Tue, 12 Mar 2019 14:40:45 +0000 (10:40 -0400)]
Remove stale TODO
We have no plans to address this further.
Commit migrated from https://github.com/dotnet/corefx/commit/
57642c99f187a4611763d1c5b3efb4347d27c1b3
David Fowler [Tue, 12 Mar 2019 02:53:04 +0000 (19:53 -0700)]
Don't allocate a stack (dotnet/corefx#35958)
- Avoid an extra object allocation by using a struct based stack
Commit migrated from https://github.com/dotnet/corefx/commit/
a7098b8893a0ebf53a881d43b333dcda5b2c8716
Calvin Buckley [Tue, 12 Mar 2019 00:23:45 +0000 (21:23 -0300)]
Switch from asserts on POSIX_FADV_* to conversions (dotnet/corefx#35971)
Commit migrated from https://github.com/dotnet/corefx/commit/
fb4afc8dec2fc5bb7885606986387c37227cd350
Marco Rossignoli [Mon, 11 Mar 2019 23:36:40 +0000 (00:36 +0100)]
fix catch (dotnet/corefx#35970)
Commit migrated from https://github.com/dotnet/corefx/commit/
d5c6b10af17a87139c745c78148f942f947e1eb9
Liudmila Molkova [Mon, 11 Mar 2019 22:15:08 +0000 (15:15 -0700)]
Inject W3C headers in HTTP diagnostics handler (dotnet/corefx#35882)
* Inject W3C headers in corefx Htpp Diagnostics HAndler
* Inject W3C headers if activity format is W3C
* fix style and indentation
* review: fix issue
Commit migrated from https://github.com/dotnet/corefx/commit/
7314001fd1ebfb25b500774d1551170a17c7a209
David Fowler [Mon, 11 Mar 2019 21:35:27 +0000 (14:35 -0700)]
Throw an exception if examined < consumed and reworked lastExamined (dotnet/corefx#35879)
- Store a single absolute position instead of the segment
- Fixed some typos and added tests for null segments
- Added more tests
Commit migrated from https://github.com/dotnet/corefx/commit/
203bc37eddbae8fb14531d305554a662c0428279
Adeel Mujahid [Mon, 11 Mar 2019 19:32:34 +0000 (21:32 +0200)]
Add GNU compiler support to build src/Native (dotnet/corefx#35737)
* Add GNU compiler support to build src/Native
Tested with gcc v5, v6, v7 and v8 on CentOS 7, Ubuntu 18, Debian 8 and
FreeBSD 11.
`corefx/src/Native/build-native.sh x64 checked gcc`
* Remove unnecessary cast
* Sync gen-buildsys-gcc.sh with CoreCLR
Commit migrated from https://github.com/dotnet/corefx/commit/
b3b1777642c80f7a0ba57b32581c33442ceac1d7
Stephen Toub [Mon, 11 Mar 2019 17:32:41 +0000 (13:32 -0400)]
Use TryAddWithoutValidation in WebSocketHandle.ConnectAsyncCore (dotnet/corefx#35954)
Don't validate the headers the developer has explicitly added to ClientWebSocketOptions.RequestHeaders; just pass them through.
Commit migrated from https://github.com/dotnet/corefx/commit/
e433981ea570928efbb1587cc6735c90c1881a58
Stephen Toub [Mon, 11 Mar 2019 17:32:14 +0000 (13:32 -0400)]
Add missing deserialization ctor to ChannelClosedException (dotnet/corefx#35952)
Commit migrated from https://github.com/dotnet/corefx/commit/
9187219ad62356da3d5b820c6b63deba0549f79f
Stephen Toub [Mon, 11 Mar 2019 17:31:04 +0000 (13:31 -0400)]
Fix timezone-related failures in System.Runtime.Tests (dotnet/corefx#35955)
In timezones with a positive offset, several tests were failing due to going below the minimum supported values.
Commit migrated from https://github.com/dotnet/corefx/commit/
8f50086da1ac1f2edd175d0a6cac7c6b596f4f36
Hugh Bellamy [Mon, 11 Mar 2019 15:39:15 +0000 (15:39 +0000)]
Cleanup and enhance misc reflection/attribute tests (dotnet/corefx#35858)
* Cleanup and enhance misc reflection tests
* Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/
2a2d34df7db5d2617d12f55fe5ad8fd208117049
David Fowler [Mon, 11 Mar 2019 14:31:42 +0000 (07:31 -0700)]
Better defaults for the Pipe (dotnet/corefx#35939)
- Use a 4K buffer instead of 2K (4K is a very common buffer size and usually maps to system page size)
- Use a stack for the buffer segment pool and allow pooling more than 16 segments for large writes
Commit migrated from https://github.com/dotnet/corefx/commit/
b49b512a6288edd96d4fbb68bf23a4bd2f831545
Stephen Toub [Mon, 11 Mar 2019 14:17:04 +0000 (10:17 -0400)]
Disable TestCheckChildProcessUserAndGroupIds test (dotnet/corefx#35949)
Sporadically failing in CI
Commit migrated from https://github.com/dotnet/corefx/commit/
6eedd6fd57dc89bba05bbe18ed395e9efae4ada1
Stephen Toub [Mon, 11 Mar 2019 03:19:09 +0000 (23:19 -0400)]
Add await stack guard test (dotnet/corefx#35905)
* Add await stack guard test
* Fix typo
* Skip new test on netfx
Commit migrated from https://github.com/dotnet/corefx/commit/
6d7126e0a329db795930ea17e84369eacb7bae5a
Hugh Bellamy [Sun, 10 Mar 2019 17:41:22 +0000 (17:41 +0000)]
Fix CompositionContract.Equals for null (dotnet/corefx#35132)
* Fix CompositionContract.Equals for null
* Move tests to right folder
Commit migrated from https://github.com/dotnet/corefx/commit/
f52d7e6f69a35042489a192fec08edd318a134aa
Tomas Weinfurt [Sun, 10 Mar 2019 09:56:10 +0000 (01:56 -0800)]
disable SendToRecvFrom_Datagram_UDP aagin. (dotnet/corefx#35920)
Commit migrated from https://github.com/dotnet/corefx/commit/
0dbce2be7aa2fe6d4c82b91e9cab677c6289ace1
Marco Rossignoli [Sun, 10 Mar 2019 09:53:30 +0000 (10:53 +0100)]
disable test on netfx (dotnet/corefx#35921)
Commit migrated from https://github.com/dotnet/corefx/commit/
1f8a77c4a96c476741b2ed35ec4faf7c92e14a8f
David Shulman [Sun, 10 Mar 2019 05:22:44 +0000 (21:22 -0800)]
Fix NetEventSource logging for Windows auth on Linux (dotnet/corefx#35918)
While debugging some Linux enterprise auth (Negotiate/NTLM) scenarios, I discovered that the
logging I added in PR dotnet/corefx#35383 wasn't working. This was due to not passing in a 'null' value
for the context object for NetEventSource.Info. It was using the string object as the
context object and not logging the string data.
As part of fixing that I optimized some code for remembering what auth package (NTLM
or SPNEGO) is used.
Commit migrated from https://github.com/dotnet/corefx/commit/
21db29aeff8acafe080113856545d30246891da6
Marco Rossignoli [Sat, 9 Mar 2019 22:23:32 +0000 (23:23 +0100)]
Bug fix: await SmtpClient.SendMailAsync never ends (dotnet/corefx#35915)
Call InvokeCallback() in case of CompletedSynchronously.
Fixes dotnet/corefx#35738
Commit migrated from https://github.com/dotnet/corefx/commit/
848811c496a7cb9d48ddee2775e982b4b732e8ac
Dan Moseley [Sat, 9 Mar 2019 21:54:04 +0000 (13:54 -0800)]
Remove 2 suffix step 1 (dotnet/corefx#35904)
Commit migrated from https://github.com/dotnet/corefx/commit/
71a2e84b885f4d83697c93d25cebdb85c28a5d74
dotnet-maestro[bot] [Sat, 9 Mar 2019 05:00:44 +0000 (05:00 +0000)]
[master] Update dependencies from dotnet/coreclr (dotnet/corefx#35891)
* Update dependencies from https://github.com/dotnet/coreclr build
20190307.75
This change updates the following dependencies
- Microsoft.NET.Sdk.IL - 3.0.0-preview4-27507-75
- Microsoft.NETCore.ILAsm - 3.0.0-preview4-27507-75
- Microsoft.NETCore.Runtime.CoreCLR - 3.0.0-preview4-27507-75
* Update tests for globalization cleanup
* Fix NegativeSign_SetNull_ThrowsArgumentNullException test with updated arg name
Commit migrated from https://github.com/dotnet/corefx/commit/
e45615101e28fac1a89414e701fee4e4be84a4fc
Jeremy Barton [Sat, 9 Mar 2019 03:50:25 +0000 (19:50 -0800)]
JsonDocument should allow the UTF-8 content-BOM from Stream inputs
Commit migrated from https://github.com/dotnet/corefx/commit/
232796d75d9492f273f61df9bb8afc05d33d6dc6
Vance Morrison [Fri, 8 Mar 2019 19:27:52 +0000 (11:27 -0800)]
Fix a race and inefficiency in Microsoft-Diagnostics-DiagnosticSource (dotnet/corefx#35764)
* Fix a race and inefficiency in Microsoft-Diagnostics-DiagnosticSource
There is a bridge from DiagnosticSource to EventSoruce called Microsoft-Diagnostics-DiagnosticSource.
This bridge take the data object payload and derializes it int EventSource events.
There was a cache that kept the type and it cooresponding serialization transform of the last object, which were not atomic and thus could be confused if code was executed concurrently.
In this cache is per EXPLICITLY filtered events, and works well for that case. If however the transform is implicit, many events can share the same cache slot, and the cache becomes very ineffective.
To fix this we keep the existing one element cache, but we only set it once (which keeps things simple but avoids races and covers the explicitly filtered case), and add a lazily created ConcurrentDictionary for the 'many envent' case.
Also fixes some unrelate test issues (avoided using the same DiagnosticListner names so that tests don't interact when run concurrently), Fixed issue were a test fails under the debugger (because the debugger turns on Microsoft-Diagnostics-DiagnosticSource which interfers with the test).
I did walk new code to insure that we at least had code coverage for the new code over our set of tests.
* Review feedback.
Basically rather than tolerate races, change to code to remove them.
This makes the code less error prone.
* Fix more nits.
* fix whitespace
* comment and use lambda so c# caches it.
* fix typo
* add in deleted line
Commit migrated from https://github.com/dotnet/corefx/commit/
a8cef502cd74aabb209cb9ad7a1e2a5bc1612459
Vance Morrison [Fri, 8 Mar 2019 17:52:06 +0000 (09:52 -0800)]
Update System.Activity API to be more readonly (dotnet/corefx#35863)
* Add back in Read-only-ness for ActivitySpanId and ActivityTraceId
I was able to determine a way of casting away readonly-ness (using Unsafe.AsRef),
so I was able to make ActivitySpanId and ActivityTraceId read-only (and cast away
the read-only when updating the cache). This works better becasuse it allows
refs to these IDs to be readonly and thus prevent update to Activity.TraceId and Activity.SpanId (which we don't want).
Note that for some reason on NetStandard1.3 ref readonly returns fail (says it can't find the 'InAttribute').
This error seems to be bogus, but the upshot is that older standards gives the C# compiler a problem so
we work around it by simply droping the read-only attribute for those (you still have all the functionality).
* Resolved conflicts
* Fix for NetStandard1.3
* Update to make the cache ref-equality friendly.
Commit migrated from https://github.com/dotnet/corefx/commit/
0846c3157735b00135500e20a61be9bf879859fa
Jeff Schwartz [Fri, 8 Mar 2019 07:43:39 +0000 (07:43 +0000)]
Add target to remove binding redirect (dotnet/corefx#35828)
* Add target to remove binding redirect
* Update name of target to not collide with WindowsRuntime target
Commit migrated from https://github.com/dotnet/corefx/commit/
ca106c24bead0b7b8606be5ff5de0778ef9bc1bb
Stephen Toub [Fri, 8 Mar 2019 07:42:10 +0000 (23:42 -0800)]
Add dummy object field to TypedReference in ref assembly (dotnet/corefx#35883)
Commit migrated from https://github.com/dotnet/corefx/commit/
7aef7b15a9b42fd06762ccbaff821af35b97f9d6
Hugh Bellamy [Fri, 8 Mar 2019 05:52:45 +0000 (05:52 +0000)]
Cleanup StrongNameKeyPair tests and increase coverage (dotnet/corefx#35856)
Commit migrated from https://github.com/dotnet/corefx/commit/
cae9ed27d90d33f5e5cd2f95145a39806004750a
Viktor Hofer [Fri, 8 Mar 2019 05:52:25 +0000 (06:52 +0100)]
Upgrade Test Sdk to 16.0.1 (dotnet/corefx#35876)
* Upgrade Test Sdk to 16.0.1
* Remove static dependency
* Remove VB exclusion
Commit migrated from https://github.com/dotnet/corefx/commit/
a99a7a450d7b3b785b0a495627ec745ad4f6c3e4
Tomas Weinfurt [Fri, 8 Mar 2019 05:51:39 +0000 (21:51 -0800)]
enable SendToRecvFrom_Datagram_UDP again (dotnet/corefx#35846)
* enable SendToRecvFrom_Datagram_UDP again and add some basic instrumentation
* increase timeout + feedback from review
Commit migrated from https://github.com/dotnet/corefx/commit/
2e74dc7996579bc132a748e186b2a5cc0a712840
Santiago Fernandez Madero [Fri, 8 Mar 2019 05:19:16 +0000 (21:19 -0800)]
Fix ReflectPropertyDescriptor.IsReadOnly (dotnet/corefx#35872)
* Fix ReflectPropertyDescriptor.IsReadOnly
* PR Feedback and fix one more place we were fetching nonPublic members when shouldn't
* Add regression test for overriden readonly virtual property
Commit migrated from https://github.com/dotnet/corefx/commit/
3a879b1a861946bf04cc3278d13df63e09dbe018
Stephen Toub [Fri, 8 Mar 2019 05:15:21 +0000 (21:15 -0800)]
Merge pull request dotnet/corefx#35854 from dotnet/darc-master-
59b93f32-aa46-40fb-8bb9-
c9b777d54bd0
[master] Update dependencies from dotnet/coreclr
Commit migrated from https://github.com/dotnet/corefx/commit/
29778a938d7de0a0915061f9519e3086ed55e3b8
Marco Rossignoli [Fri, 8 Mar 2019 05:14:42 +0000 (06:14 +0100)]
Improve process test fail output (dotnet/corefx#35853)
* improve test
* cleanup
* add current pid
* address PR feedback
* nit
* Update ProcessTests.cs
Commit migrated from https://github.com/dotnet/corefx/commit/
84eba428b42d5c60d4418a0c04325b9699be5e05
Dávid Kaya [Fri, 8 Mar 2019 05:12:31 +0000 (06:12 +0100)]
Added UserFlags field, unblocks dotnet/corefx#34560 (dotnet/corefx#35851)
* Added UserFlags field
* Added UserFlags
Commit migrated from https://github.com/dotnet/corefx/commit/
8c66b0fa9634b543df4bc93430d6f20d011da9e6
Steven Weerdenburg [Fri, 8 Mar 2019 03:49:06 +0000 (22:49 -0500)]
Utf8JsonReader.cs - Add support for single line comments ending on \r, \r\n (dotnet/corefx#33393)
* Add support for single line comments ending on \r, \r\n
* Single Segment done
* Move single segment tests over. Add 2/3 multisegment tests
* Multi-segment tests
* Fix formatting in tests file
* Fix formatting feedback. Fix failing test post-rebase
* Modified logic and added new test cases
* Changes related to review comments
* Fixes to tests
* Remove Verify Info, fix issues
* Fix NETFX_x86 test failure
Commit migrated from https://github.com/dotnet/corefx/commit/
c25d5b76dcb2a53e032a333a5cce607ed565345d
Ben Adams [Fri, 8 Mar 2019 02:06:49 +0000 (02:06 +0000)]
Shrink ReadOnlySequence by 8 bytes (dotnet/corefx#35860)
* Shrink ReadOnlySequence by 8 bytes
* nit
* Unwrap Start, End when used interally
Commit migrated from https://github.com/dotnet/corefx/commit/
fd88c5df4bde4ef56522a1cd81da1ff69c92edc4
Levi Broderick [Fri, 8 Mar 2019 01:59:49 +0000 (17:59 -0800)]
Add unit tests for Rune.Decode and friends (dotnet/corefx#35469)
Also forwards OperationStatus from System.Memory to System.Runtime
Commit migrated from https://github.com/dotnet/corefx/commit/
43bfb492dbde0177a669982dfc9ed93d3236e1ac
Filip Navara [Thu, 7 Mar 2019 22:48:30 +0000 (23:48 +0100)]
Replace AsnReader/AsnWriter with updated versions, remove unused AsnSerializer
* Copy AsnReader/AsnWriter unit tests from dotnet/corefxlabs.
Remove original AsnReader/AsnWriter/AsnSerializer.
Original commit message from dotnet/corefxlab:
* Tests
* AssertExtensions.Throws => Assert.Throws
* Rename private overloads of public methods to *Core to avoid xunit discovery bug
* Add tests for WriteUtcTime(maxYear)
* Add tests for the ObjectDisposedException priority
* Change classes in the System.Security.Cryptography.Asn1 namespace to be "internal" instead of "public".
Change comment for AsnReader.ReadNamedBitListValue to allow compilation in project with warnings-as-errors.
* Update unit test names to match API names
* Add shared project for AsnReader/AsnWriter files
* Update AsnXml template to use new API names and `WriteEncodedValue` overload with `Span`
* S.S.C.Asn1: Regenerate AsnXml files
* Use new `AsnReader` API names in common S.S.C code
* S.S.C.Pkcs: Regenerate AsnXml files
* S.S.C.X509Certificates: Regenerate AsnXml files
* Update code to use `AsnWriter.WriteEncodedValue` with `Span`
* S.S.C.Algorithms: Use shared csproj for AsnReader/AsnWriter, add Argument_EncodeDestinationTooSmall resource
* S.S.C.Cng: Use shared csproj for AsnReader/AsnWriter, add Argument_EncodeDestinationTooSmall resource
* S.S.C.Encoding, S.S.C.Encoding.Tests: Use shared csproj for AsnReader/AsnWriter, add Argument_EncodeDestinationTooSmall resource
* S.S.C.OpenSSL: Use shared csproj for AsnReader/AsnWriter, add Argument_EncodeDestinationTooSmall resource
* S.S.C.Pkcs: Use shared csproj for AsnReader/AsnWriter, add Argument_EncodeDestinationTooSmall resource
* S.S.C.Pkcs: Update usage of `AsnWriter.WriteUtcTime` to use the maximum year instead of minimum year
* S.S.C.Pkcs: Use new `AsnReader` API names
* S.S.C.Pkcs: Use `AsnReader.WriteEncodedValue` with `Span`
* S.S.C.X509Certificates: Use shared csproj for AsnReader/AsnWriter, add Argument_EncodeDestinationTooSmall resource
* S.S.C.X509Certificates: Use new `AsnReader` API names
Commit migrated from https://github.com/dotnet/corefx/commit/
1382754add40c899c141803c1cdb03c335d60095
Maryam Ariyan [Thu, 7 Mar 2019 21:40:50 +0000 (13:40 -0800)]
Expose AmbiguousImplementationException and add tests (dotnet/corefx#35632)
* Expose AmbiguousImplementationException and add tests
Fixes: dotnet/corefx#34124
Commit migrated from https://github.com/dotnet/corefx/commit/
34337c3a73675aa06f09d81b15bc926889b44922
Tanner Gooding [Thu, 7 Mar 2019 18:59:13 +0000 (10:59 -0800)]
Temporarily disabling a RealParser test.
Commit migrated from https://github.com/dotnet/corefx/commit/
ee943b6c257e8e05c96d3a91bea418cb9c095972
Vance Morrison [Thu, 7 Mar 2019 18:25:58 +0000 (10:25 -0800)]
Rename APIs based on API review (dotnet/corefx#35848)
See https://github.com/dotnet/corefx/issues/34828
Commit migrated from https://github.com/dotnet/corefx/commit/
3eacad602f7505f9f199dcd1992429506dd98330
Stephen Toub [Thu, 7 Mar 2019 16:44:32 +0000 (08:44 -0800)]
Add FileStream.CopyToAsync missing override to ref (dotnet/corefx#35850)
Commit migrated from https://github.com/dotnet/corefx/commit/
c710854045bf7ffdffff3c2127b8fddf533ed46f
Jeremy Barton [Thu, 7 Mar 2019 06:26:05 +0000 (22:26 -0800)]
Seed the AsnReader/AsnWriter changes from corefxlab
These files are identical to the files at
https://github.com/dotnet/corefxlab/tree/dotnet/corefx@
42ab2422b190521dd21c5c9e816810cf23f6a828/src/System.Security.Cryptography.Asn1.Experimental/System/Security/Cryptography/Asn1
though PointerMemoryManager is not included (already present in corefx)
Commit migrated from https://github.com/dotnet/corefx/commit/
b66846b62fd39973eb54204087fe311941c87235
Omair Majid [Thu, 7 Mar 2019 06:13:49 +0000 (01:13 -0500)]
Disable used-but-marked-unused warnings in System.Security.Cryptography.Native
When building in non-portable mode, some OpenSSL 1.1 function defnitions
that are marked as unused can be picked up by our build. When those
functions are called, clang reports a warning and fails the build:
src/Native/Unix/System.Security.Cryptography.Native/openssl.c:432:12:
error: 'sk_ASN1_OBJECT_num' was marked unused but was used [-Werror,-Wused-but-marked-unused]
return sk_ASN1_OBJECT_num(eku);
^
This 'unused' attribute was recently added to sk_* methods in OpenSSL
1.1: https://github.com/openssl/openssl/pull/8246
Fixes dotnet/corefx#35807
Commit migrated from https://github.com/dotnet/corefx/commit/
4819ac49f2e82158baeb464c56f4cd206da1bfec
Tanner Gooding [Thu, 7 Mar 2019 05:05:10 +0000 (21:05 -0800)]
Updating the Microsoft.Private.Intellisense package to 3.0.0-preview3-190305-0 (dotnet/corefx#35842)
Commit migrated from https://github.com/dotnet/corefx/commit/
2283bf7f329ee550b94da0d30d27017d50e630b4
Stephen Toub [Thu, 7 Mar 2019 04:49:58 +0000 (20:49 -0800)]
Improve JsonSerializer.ReadAsync(Stream) throughput (dotnet/corefx#35823)
* Improve JsonSerializer.ReadAsync(Stream) throughput
Some low hanging fruit:
- The method was using the Stream.ReadAsync overload that returns a `Task<int>`. Changed it to take a `Memory<byte>` so that it instead returns a `ValueTask<int>`.
- The method was clearing the full rented buffer upon returning it to the pool, even when only using a small portion of it. Changed it to only clear what was used.
- The method was resizing the buffer unnecessarily due to faulty logic around how much data remained. Fixed it to only resize when more than half the buffer is full, which was the original intention.
- The ReadCore method is a bit chunky to call, initializing a new Utf8JsonReader each time, copying large structs, etc. Since we need to read all of the data from the stream anyway, I changed it to try to fill the buffer, which then minimizes the number of times we need to call ReadCore, in particular avoiding the extra empty call at the end. We can tweak this further in the future as needed, e.g. only making a second attempt to fill the buffer rather than doing so aggressively.
- Also fixed the exception to contain the full amount of data read from the stream, not just from the most recent call.
* Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/
7d1a6b0548cb1fb74e2d3e7da4237e2ca56559e8
Tomas Weinfurt [Thu, 7 Mar 2019 04:43:28 +0000 (20:43 -0800)]
disable tests failing on Windows ARM (dotnet/corefx#35849)
Commit migrated from https://github.com/dotnet/corefx/commit/
0543bc85905acedfec77cb4c561754c790bed277
Dan Moseley [Thu, 7 Mar 2019 03:28:24 +0000 (19:28 -0800)]
Reduce fix to just S.L.P (dotnet/corefx#35728)
Commit migrated from https://github.com/dotnet/corefx/commit/
b7cc13e495944eb3f23cfbc0d18b69b680e52efb
Tomas Weinfurt [Wed, 6 Mar 2019 23:11:10 +0000 (15:11 -0800)]
skip tests failing on Windows ARM64 (dotnet/corefx#35825)
* skip tests failing on Windows ARM64
* fix CanWriteToPerfCounters condition to properly exclude run on arm
Commit migrated from https://github.com/dotnet/corefx/commit/
229fad3002e6f986b3ae6eab08bc023abaf99bec
Tomas Weinfurt [Wed, 6 Mar 2019 23:10:51 +0000 (15:10 -0800)]
ignore verification failures on 10.14 (dotnet/corefx#35829)
Commit migrated from https://github.com/dotnet/corefx/commit/
9d535849e79a83fed80c506e9edc01590063a54b
Stephen Toub [Wed, 6 Mar 2019 20:03:00 +0000 (12:03 -0800)]
Clean up lots of string.Format / SR.Format usage (dotnet/corefx#35777)
* Clean up lots of string.Format usage
This PR does a few things:
- Adds new SR.Format overloads, in particular to support accepting an IFormatProvider as the first argument.
- Fixes a bunch of calls to string.Format that should have been using SR.Format. This not only helps in AOT builds where we want to be able to more cleanly remove resource strings, it enables easier auditing of the remaining string.Format uses to determine whether there are more appropriate implementations.
- Replaces some string.Format uses, in particular in asserts, with easier to read and maintain string interpolation
- Replaces some string.Format uses with string concatenation where it's simple and cheaper
- Fixes a bunch of SR.Format(SR.Something) calls where the SR.Format part is extraneous and should just be removed.
- Replaces a bunch of Debug.Assert(false, ...) calls with Debug.Fail(...). This isn't directly related to string.Format, but I started this cleanup as part of cleaning up asserts that were using string.Format, and then ended up accidentally merging the chain into the same commit, and decided it was simple enough that I should just leave it rather than trying to separate it out again.
* Address PR feedback
* Fix breaks due to lower netstandard builds
Commit migrated from https://github.com/dotnet/corefx/commit/
a6f76f4f620cbe74821c6445af3f13e048361658
Stephen Toub [Wed, 6 Mar 2019 19:10:46 +0000 (11:10 -0800)]
Reduce overhead of ReadOnlySequence<T>.CopyTo (dotnet/corefx#35819)
`ReadOnlySequence<T>.Length` isn't as small or fast as `ReadOnlySpan<T>.Length`, which is just a field access. Since we need the span anyway for the single element case, just get the span first and then compare with its length.
Commit migrated from https://github.com/dotnet/corefx/commit/
7fc9d5730aabc6724edf18f5bedde6d32610f681
Tomas Weinfurt [Wed, 6 Mar 2019 19:08:38 +0000 (11:08 -0800)]
re-enable MulticastInterface test on RH6, disable on RH7 and OSX (dotnet/corefx#35798)
* re-enable MulticastInterface test on RH6, disable on RH7 and OSX
* add missing using
* feedback from review
Commit migrated from https://github.com/dotnet/corefx/commit/
ebe74b3ad7d1b7be02217bf199f5dedc05f76297
Honza Rameš [Wed, 6 Mar 2019 15:51:17 +0000 (16:51 +0100)]
Fix ValueStringBuilder.EnsureCapacity to call Grow correctly (dotnet/corefx#35810)
* Fix ValueStringBuilder.EnsureCapacity to call Grow correctly (dotnet/corefx#35746)
Call to EnsureCapacity may result in invalid buffer size being
allocated.
* Update ValueStringBuilder.Grow to prevent misuse (dotnet/corefx#35746)
Updated name of the argument to make it clearer on the call-site also
added summary co clearly state the behavior of Grow.
Commit migrated from https://github.com/dotnet/corefx/commit/
7a627bb7e380c0d56621a6d8acb61328c989fa58
Marco Rossignoli [Wed, 6 Mar 2019 09:39:40 +0000 (10:39 +0100)]
Update benchmarking.md doc (dotnet/corefx#35786)
* update doc
* address PR feedback
Co-Authored-By: MarcoRossignoli <marco.rossignoli@gmail.com>
Commit migrated from https://github.com/dotnet/corefx/commit/
7e3d30144cdb7d9ec16fcd8b73d02edd23e1bced
Jeremy Barton [Wed, 6 Mar 2019 04:59:57 +0000 (20:59 -0800)]
Improve X509Chain handling of NotSignatureValid on Linux (dotnet/corefx#35801)
* Native changes for better NotSignatureValid support
* clang-format -i the modified files
* Tests and managed changes for better supporting NotSignatureValid chains
* Chain the WorkingChain ctors
* Fix tests on macOS (Classic) Sierra
Commit migrated from https://github.com/dotnet/corefx/commit/
148623a7cd0eb2789dfb0d1fd2bfb9fc925baa60
Hugh Bellamy [Wed, 6 Mar 2019 02:11:16 +0000 (02:11 +0000)]
Remove dead code from GuidConverter and add tests (dotnet/corefx#35790)
Commit migrated from https://github.com/dotnet/corefx/commit/
b1c9885c6d1fdd6d7bcaca216861e0b8fc4d388d
Tomas Weinfurt [Wed, 6 Mar 2019 01:47:45 +0000 (17:47 -0800)]
replace WaitForPipeDrain with Flush in Kill_EntireProcessTree_True_EntireTreeTerminated test (dotnet/corefx#35796)
* replace WaitForPipeDrain with FLush
* feedback from review
Commit migrated from https://github.com/dotnet/corefx/commit/
758c059b3d1a2a9a365f66a7e5563f18413f8002
Santiago Fernandez Madero [Wed, 6 Mar 2019 00:04:34 +0000 (16:04 -0800)]
Fix publish.proj when pushing corefx-test-assets.xml file (dotnet/corefx#35802)
Commit migrated from https://github.com/dotnet/corefx/commit/
e031c37884aae34196dbb5592234e10b24ba06ce
Hugh Bellamy [Tue, 5 Mar 2019 21:22:50 +0000 (21:22 +0000)]
Cleanup some Syndication code (dotnet/corefx#35175)
Commit migrated from https://github.com/dotnet/corefx/commit/
327d8ed428b40491b499cad4d4114af4fa3f8f30
Dan Moseley [Tue, 5 Mar 2019 21:01:05 +0000 (13:01 -0800)]
Fix ArgIterator condition (dotnet/corefx#35741)
Commit migrated from https://github.com/dotnet/corefx/commit/
5540da6584fb78e4de9f8df9751a00bf09d9cd1b
Santiago Fernandez Madero [Tue, 5 Mar 2019 20:55:16 +0000 (12:55 -0800)]
Add Alpine arm64 official build (dotnet/corefx#35778)
* Add Alpine arm64 official build
* Include musl_arm64 in PRs as well
Commit migrated from https://github.com/dotnet/corefx/commit/
a33c5e92879eaa6c1cc07527deb7e85fc0a074a0
Stephen Toub [Tue, 5 Mar 2019 19:55:56 +0000 (11:55 -0800)]
Tweak ImmutableDictionary.TryGetValue to improve throughput (dotnet/corefx#35759)
* Avoid recursive calls in SortedInt32KeyNode.Search
* Compare first key directly in HashBucket
* Seal a few internal types that have virtual overrides or interface implementations
* Avoid extra level of indirection with Search
Now that it's no longer recursive, we can just inline it and build the caller's decisions right into it.
Commit migrated from https://github.com/dotnet/corefx/commit/
8c54cd84f98c553b75356c69d2c8f5a4029717bc
Hugh Bellamy [Tue, 5 Mar 2019 19:49:26 +0000 (19:49 +0000)]
Add more Syndication tests (dotnet/corefx#35107)
* Add more Syndication tests
Commit migrated from https://github.com/dotnet/corefx/commit/
013fd82b1bb218d171300e127a487ebc39e1fc2e
Ahson Khan [Tue, 5 Mar 2019 19:47:31 +0000 (11:47 -0800)]
Reduce inner and outer loop test time for S.T.Json (dotnet/corefx#35776)
* Reduce inner and outer loop test time for S.T.Json
* Remove redundant sequence slicing, only compare the SequencePositions.
Commit migrated from https://github.com/dotnet/corefx/commit/
0c264c6d61cd6d18fbe7a760606f0e8548ff334d
dotnet-maestro[bot] [Tue, 5 Mar 2019 19:17:12 +0000 (19:17 +0000)]
[master] Update dependencies from dotnet/core-setup (dotnet/corefx#35713)
* Update dependencies from https://github.com/dotnet/core-setup build
20190301.13
This change updates the following dependencies
- Microsoft.NETCore.App - 3.0.0-preview4-27501-13
- Microsoft.NETCore.DotNetHost - 3.0.0-preview4-27501-13
- Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview4-27501-13
* Remove workaround for System.Runtime.CompilerServices.Unsafe
* Update dependencies from https://github.com/dotnet/core-setup build
20190302.8
This change updates the following dependencies
- Microsoft.NETCore.App - 3.0.0-preview4-27502-8
- Microsoft.NETCore.DotNetHost - 3.0.0-preview4-27502-8
- Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview4-27502-8
* Update dependencies from https://github.com/dotnet/core-setup build
20190303.9
This change updates the following dependencies
- Microsoft.NETCore.App - 3.0.0-preview4-27503-9
- Microsoft.NETCore.DotNetHost - 3.0.0-preview4-27503-9
- Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview4-27503-9
* Update dependencies from https://github.com/dotnet/core-setup build
20190304.10
This change updates the following dependencies
- Microsoft.NETCore.App - 3.0.0-preview4-27504-10
- Microsoft.NETCore.DotNetHost - 3.0.0-preview4-27504-10
- Microsoft.NETCore.DotNetHostPolicy - 3.0.0-preview4-27504-10
* Don't include EventRegistrationToken on Unix
This type was accidentally duplicated between CoreLib and contracts.
Suppress that for now since we're detecting the duplication in the shared framework.
Make a fix in the shared items to restore the condition on this type.
Commit migrated from https://github.com/dotnet/corefx/commit/
ae1426803f77356a7bed0b14c505c8b6030b3a6e
David Fowler [Tue, 5 Mar 2019 18:10:09 +0000 (10:10 -0800)]
Fix issue with BufferSegment reuse (dotnet/corefx#35779)
- We stored the last examined segment to compute how many bytes we should decrement on the writer side but if that segment is returned to the segment pool, we end up in a bad state. This properly clears the state so that doesn't happen.
Commit migrated from https://github.com/dotnet/corefx/commit/
c6b999d77e6f7e36851523662a9471e343555e16
Jeremy Barton [Tue, 5 Mar 2019 17:21:27 +0000 (09:21 -0800)]
Fix Linux chain.ChainStatus when multiple layers have errors
The recent chain rewrite caused only the last layer with errors to be reported.
Commit migrated from https://github.com/dotnet/corefx/commit/
fc9629cae7bfcda2196b24ba5127265efce1716a
Eric StJohn [Tue, 5 Mar 2019 16:48:42 +0000 (08:48 -0800)]
Allow CreateRelationship to work with FileAccess.Write (dotnet/corefx#35763)
When adding a relationship InternalRelationshipCollection was creating a part
but not writing anything to it. This caused an empty entry to be created in
the zip archive which later needed to be rewritten. That's disallowed with
FileAccess.Write. Instead, avoid creating the entry until it's content is
written.
When writing a relationship file InternalRelationshipCollection was attempting
to truncate any existing content. This throws when the package is open with
FileAccess.Write since the part stream is not seekable. Don't do the seek
when package is open for FileAccess.Write since no pre-existing content is
possible.
In Package.PartExists don't attempt to get the part. PartExists on .NETCore
only needs to query its local list of parts. Since it isn't returning a
mutable part, it doesn't need to throw for packages opened with FileAccess.Write.
Avoid out of bounds exception when enumerating part keys. The fix that delays
creating the relationship part until its content exposed an issue in
DoOperationOnEachPart. This was creating a copy of the part keys, but then
enumerating over the length of original list instead of the copy. Since I
delayed the creating of a part until it was flushed this made the length change
while iterating the loop. Since this code was using its copied list of keys
it should have never been using the original bounds.
Commit migrated from https://github.com/dotnet/corefx/commit/
1822fec76a7bc02764ffa94c0e1f97b8ebfdbdea
Tomas Weinfurt [Tue, 5 Mar 2019 03:28:24 +0000 (19:28 -0800)]
disable AllHelperPortsAreInGetPortNames on ARM Windows (dotnet/corefx#35773)
Commit migrated from https://github.com/dotnet/corefx/commit/
8a730a6ecd96fef04d74e1807c8b1d193e0a5f16
Aaron Robinson [Tue, 5 Mar 2019 00:41:37 +0000 (16:41 -0800)]
Update API for new RCW license impl in coreclr (dotnet/corefx#35767)
Commit migrated from https://github.com/dotnet/corefx/commit/
4f9e62149207fb1bbef18426bb302cea6869b78a
Adeel Mujahid [Mon, 4 Mar 2019 23:30:57 +0000 (01:30 +0200)]
Adhere to desktop implementation of [Can]ConvertFrom (dotnet/corefx#35760)
* Adhere to desktop implementation of [Can]ConvertFrom
* Add tests for InstanceDescriptor in TypeConverter
Commit migrated from https://github.com/dotnet/corefx/commit/
f603cea8ca5bdb62b33b0d67c67ab84d6d50300f
Tomas Weinfurt [Mon, 4 Mar 2019 23:27:20 +0000 (15:27 -0800)]
Disable alpine39 (dotnet/corefx#35770)
* disable alpine3.9
Commit migrated from https://github.com/dotnet/corefx/commit/
ad13ae9528b0717b74aefa929ea933e6db50cf5d
Viktor Hofer [Mon, 4 Mar 2019 22:19:26 +0000 (23:19 +0100)]
Update adding-api-guidelines.md
Commit migrated from https://github.com/dotnet/corefx/commit/
f75d8e8d9cb48abe623cf43f649fc49b6b8435d8
Clinton Ingram [Mon, 4 Mar 2019 22:07:01 +0000 (14:07 -0800)]
Update brotli to v1.0.7 (dotnet/corefx#35172)
* update to brotli v1.0.7
* update WithState perf test to use compressLevel arg
* update brotli-version.txt
Commit migrated from https://github.com/dotnet/corefx/commit/
6ad08fec6cd1fcb7348dfe60fda775ca69476a8d
Daniel Turan [Fri, 1 Mar 2019 08:08:40 +0000 (09:08 +0100)]
removed test from full .net framework
Commit migrated from https://github.com/dotnet/corefx/commit/
cb726dd396dc70d87a9cf69a1e84f05e8ecc224a
Daniel Turan [Fri, 1 Mar 2019 08:05:42 +0000 (09:05 +0100)]
Ignored tests for custom ValidationResults on .NET Framework, since it is not supported there
Commit migrated from https://github.com/dotnet/corefx/commit/
f2e274bd435c3494dd6b22883b3b589bea5cde6e
Daniel Turan [Wed, 27 Feb 2019 08:01:42 +0000 (09:01 +0100)]
Removed extra leading space
Commit migrated from https://github.com/dotnet/corefx/commit/
959cdfac0744b0a12c41fa06b9f5df55a91ff415
Daniel Turan [Tue, 26 Feb 2019 11:52:15 +0000 (12:52 +0100)]
Adding support for custom ValidationResult (derived class) in CustomValidationAttribute
Commit migrated from https://github.com/dotnet/corefx/commit/
27af01cb476debb4e791e3a8305bed279efecfbc
Stephen Toub [Mon, 4 Mar 2019 20:13:52 +0000 (12:13 -0800)]
Use C# async iterator to implement ChannelReader.ReadAllAsync (dotnet/corefx#35745)
While the hand-written implementation is a bit faster than what the compiler currently generates, it's also a lot more code, and complex, error-prone code. Better to go with the simpler implementation, and work to improve the compiler for the future.
Commit migrated from https://github.com/dotnet/corefx/commit/
0ce020951d5956916a9084820cefe3684d19f856
slozier [Mon, 4 Mar 2019 18:55:12 +0000 (13:55 -0500)]
SBCSCodePageEncoding: Don't call DecoderFallback.CreateFallbackBuffer until needed (dotnet/corefx#35199)
* Don't call DecoderFallback.CreateFallbackBuffer until needed
* Use null instead of fallbackBuffer
Commit migrated from https://github.com/dotnet/corefx/commit/
5419ecd858d11f08938019ba49477039de93ec3f
Viktor Hofer [Mon, 4 Mar 2019 17:44:25 +0000 (18:44 +0100)]
Remove SharedFrameworkValidation (dotnet/corefx#35747)
Commit migrated from https://github.com/dotnet/corefx/commit/
365e78019c73158fa8819141a3191b0e9c1493d1
hamish-rose [Mon, 4 Mar 2019 16:03:27 +0000 (05:03 +1300)]
Add tests for dotnet/coreclrdotnet/corefx#20815 - new Math and MathF rounding modes (dotnet/corefx#33297)
* add tests for new midpointrounding modes
new tests added for Math.cs double Round methods
* add tests for float, decimal
convert to theory
* Update tests
tests now reflect correct rounding behavior
* add tests for existing modes
* code review feedback
- refactor tests to use member data
- move MathF tests to MathF.netcoreapp.cs
- add tests for new modes with digits and special cases
* move math tests to mathtests.netcoreapp.cs
netcoreapp specific tests moved
Commit migrated from https://github.com/dotnet/corefx/commit/
cc42bb95b0877a653d4f556a0839d261ea3563b7
Stephen Toub [Mon, 4 Mar 2019 00:22:23 +0000 (19:22 -0500)]
Avoid NullReferenceException in BinaryObjectInfo (dotnet/corefx#35740)
A corrupted BinaryFormatter stream can result in a BinaryObjectInfo getting constructed before the ObjectManager is constructed, resulting in the BinaryObjectInfo not having a reference to the ObjectManager. Attempts to use it then hit a null reference exception.
Commit migrated from https://github.com/dotnet/corefx/commit/
7622efd2dbd363a632e00b6b95be4d990ea125de
Viktor Hofer [Sun, 3 Mar 2019 17:55:25 +0000 (18:55 +0100)]
Project msbuild syntax cleanup (dotnet/corefx#35686)
* Remove license header from non-shipping files
* Remove obsolete Project attributes
* Remove xml header and remove DefaultTargets
Commit migrated from https://github.com/dotnet/corefx/commit/
c390ce7df50252e11f5d322276e9d19e046d1332
Viktor Hofer [Sun, 3 Mar 2019 17:43:07 +0000 (18:43 +0100)]
OSX to macOS rename in dev guide
Commit migrated from https://github.com/dotnet/corefx/commit/
9f22abfdf98d79dc4ffbc8d77a1de41da519b6bd
Viktor Hofer [Sun, 3 Mar 2019 17:41:19 +0000 (18:41 +0100)]
Update developer-guide to address workflow changes
Commit migrated from https://github.com/dotnet/corefx/commit/
255ec6fb26d5efd3154047641aba031bb2303ad5
David Fowler [Sun, 3 Mar 2019 08:16:33 +0000 (00:16 -0800)]
Revisit back pressure implementation (dotnet/corefx#35711)
- Today when using a PipeReader from a Pipe, when the pause threshold is hit and the reader does not consume enough data to unblock the writer (enough to reduce the resume threshold) an exception is thrown. This exception is extremely hard to understand and work around since it's based on a limit set by the owner of the Pipe. It leads to people setting an extremely big limit (bigger than the biggest message) or disabling the limit completely.
- The changes the back pressure mechanic to be based on examined instead of consumed. This pauses the writer if the pause threshold is hit, but lets the reader continue to buffer until a logical payload is reached (whatever matters to the protocol).
- This breaks software that relied on these limits to enforce a maximum buffer size and those pieces of code need to now handle their own maximum buffer size.
Commit migrated from https://github.com/dotnet/corefx/commit/
ce278ee840561e90b2c6bb9daaee5ff4b9cce293
Dan Moseley [Sun, 3 Mar 2019 03:55:06 +0000 (19:55 -0800)]
Add Windows ARM64 to official builds (dotnet/corefx#35721)
* Add Windows ARM64 to official builds
* Add ARMxx properties
* Disable WMI tests for ARMxx
Commit migrated from https://github.com/dotnet/corefx/commit/
1d6287840322200f6b83d7c459588a23666df3bd
Stephen Toub [Sun, 3 Mar 2019 03:07:24 +0000 (22:07 -0500)]
Improve assert error message in Process tests (dotnet/corefx#35725)
Commit migrated from https://github.com/dotnet/corefx/commit/
9a542f020ed230888cb956c90494910bfc9035c0
danmosemsft [Sat, 2 Mar 2019 23:26:32 +0000 (15:26 -0800)]
Get RH6 outerloop clean
Commit migrated from https://github.com/dotnet/corefx/commit/
21799a3c1613285a90398eb3cf9ce41d704e786b
Hugh Bellamy [Sat, 23 Feb 2019 12:54:12 +0000 (12:54 +0000)]
PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/
3814b5fcea2a215f7f0a34f6d944fda711e27cd8
Hugh Bellamy [Mon, 4 Feb 2019 19:51:38 +0000 (19:51 +0000)]
Fix null reference exceptions in TypeConverter
Commit migrated from https://github.com/dotnet/corefx/commit/
a7d0e7b048a549fbce55831d60e19e0e36f33851
Hugh Bellamy [Mon, 4 Feb 2019 19:51:17 +0000 (19:51 +0000)]
Add support for param name for netcore-only exception
Commit migrated from https://github.com/dotnet/corefx/commit/
fa4ae94b220d477b4c8eef2a290542585f50c81c