Wes Haggard [Wed, 20 Jun 2018 17:07:31 +0000 (10:07 -0700)]
Move to netcoreapp3.0
Commit migrated from https://github.com/dotnet/corefx/commit/
7e103021ccfe3376ebe31d81698d5fbc7e1669b8
Stephen Toub [Tue, 19 Jun 2018 22:58:30 +0000 (18:58 -0400)]
Remove string allocation from IPAddress.ToString/TryFormat (dotnet/corefx#30530)
IPv6 addresses with embedded IPv4 addresses were incurring an extra string allocation for the IPv4 address.
Commit migrated from https://github.com/dotnet/corefx/commit/
83abd139edc4e2aa810c9fafe8c69e9d8dd9ad10
Jeremy Barton [Tue, 19 Jun 2018 22:41:42 +0000 (15:41 -0700)]
Clarify output size handling
Commit migrated from https://github.com/dotnet/corefx/commit/
d1bc30c2afefa4777f5539f65776095c49740b28
Stephen Toub [Tue, 19 Jun 2018 21:34:55 +0000 (17:34 -0400)]
Remove more number ToStrings from System.Net.Http headers (dotnet/corefx#30529)
Previously these wouldn't have helped but also wouldn't really have hurt. However, now that StringBuilder doesn't call ToString() by default on numeric types, these are resulting in unnecessary string allocations.
Commit migrated from https://github.com/dotnet/corefx/commit/
36ab1b5c1e503235e7c9100490de39ce73fe46e6
Viktor Hofer [Tue, 19 Jun 2018 21:34:37 +0000 (23:34 +0200)]
Remove StringBuilderCache usage from System.Text.RegularExpressions (dotnet/corefx#30474)
* Remove StringBuilderCache usage
* fixed buffer size, manual reverse copying & local textinfo
* Fast path for not to encode string
* avoid one span slice
* code formatting & bounds check opt
* Avoid string allocation in char class
Commit migrated from https://github.com/dotnet/corefx/commit/
33f401f5a8f7d78d18e96e33cdaf3da84f9b8438
Stephen Toub [Tue, 19 Jun 2018 20:57:48 +0000 (16:57 -0400)]
Remove some allocations from SocketAddress.ToString (dotnet/corefx#30521)
* Remove some allocations from SocketAddress.ToString
Avoids a string allocation per byte, plus a few other intermediary strings.
* Disable failing SocketAddress.ToString test on Unix
Commit migrated from https://github.com/dotnet/corefx/commit/
e910a045e63ce87f8218e62091e0806336039874
Stephen Toub [Tue, 19 Jun 2018 20:55:54 +0000 (16:55 -0400)]
Remove string allocation from Uri.PathDifference (dotnet/corefx#30514)
Commit migrated from https://github.com/dotnet/corefx/commit/
e1756ebbacffe3d0238ee9299908b10cebcd5a7e
Stephen Toub [Tue, 19 Jun 2018 20:55:36 +0000 (16:55 -0400)]
Remove a few boxing allocations from SecurityIdentifier.ToString (dotnet/corefx#30512)
Commit migrated from https://github.com/dotnet/corefx/commit/
9b3717bbc85fd17ac3481fc96365b092834dc637
Stephen Toub [Tue, 19 Jun 2018 20:54:54 +0000 (16:54 -0400)]
Remove unnecessary DllImports from System.Drawing.Common (dotnet/corefx#30510)
Commit migrated from https://github.com/dotnet/corefx/commit/
4a3c31a8dab92ab48bc44179944f72f5b26eb6e7
Stephen Toub [Tue, 19 Jun 2018 20:53:41 +0000 (16:53 -0400)]
Remove StringBuilder in System.IO.Pipes marshaling (dotnet/corefx#30509)
* Remove StringBuilder in System.IO.Pipes marshaling
To get the impersonated user name, we can just stackalloc space for the Win32 call and then create a string from that, instead of allocating a StringBuilder and its underlying char[], paying the associated StringBuilder marshaling costs, and then creating the string from that.
* Fix existing typo in comment
Commit migrated from https://github.com/dotnet/corefx/commit/
c09a2a5296d444b1e7e9b5fe659d2fdd4e742d79
Stephen Toub [Tue, 19 Jun 2018 20:51:58 +0000 (16:51 -0400)]
Remove some StringBuilder-related allocations from System.Net.Http (dotnet/corefx#30508)
* Remove boxing and ToString allocations from RangeHeaderValue.ToString
The current code uses ToString(object), boxng the long? and then calling ToString on it. By instead first checking whether the value is null and only calling ToString(long), we avoid both the box and the string allocations, for both From and To, relying on StringBuilder's ability to format a long directly into its buffer.
* Avoid StringBuilder/char[]/string allocation/copy in DumpHeaders
We can just write into the existing StringBuilder rather than creating a new one, appending to that, copying it to a string, and then appending that string to the original.
Commit migrated from https://github.com/dotnet/corefx/commit/
8c0487bfeff9229beca93dc480028b83d8e39705
Tony Di Nucci [Tue, 19 Jun 2018 20:49:07 +0000 (21:49 +0100)]
Adding support for synchronous Ping (dotnet/corefx#30000)
* Adding support for synchronous Ping
* Address PR feedback
* Address additional feedback
* Missed 2nd commented out visibility modifier
* Fix build for UWP
* Remove use of deprecated property
* Refactor to remove need for unsafe block
* Remove redundant calls to Stopwatch.Stop()
* Revert to using IPAddress.Address rather than IPAddress.GetAddressBytes() for IPv4
Commit migrated from https://github.com/dotnet/corefx/commit/
3ed92c4e3b21ec09787eeb79788cf41fc1280889
Jeremy Barton [Tue, 19 Jun 2018 20:09:42 +0000 (13:09 -0700)]
Make the Linux TLS hostname comparison be case-insensitive
This change also adds direct tests to CheckX509Hostname, because we still haven't added a strong X509Extension subclass for Subject Alternative Name, which is where more direct exposure would live.
Commit migrated from https://github.com/dotnet/corefx/commit/
237ab14caf7e60f221e5d1d0103477f99c17509d
dotnet-maestro-bot [Tue, 19 Jun 2018 19:53:30 +0000 (12:53 -0700)]
Update BuildTools, CoreClr, CoreSetup to preview1-02919-01, preview1-26619-04, preview1-26619-03, respectively (dotnet/corefx#30524)
Commit migrated from https://github.com/dotnet/corefx/commit/
8999b95fdd189440c2f1c6a914bad4adaa6be090
Eric Erhardt [Tue, 19 Jun 2018 18:29:18 +0000 (13:29 -0500)]
Ensure Reflection.Context tests find the correct results. (dotnet/corefx#30519)
Assert.All on an empty collection will pass.
Also, update the .resx message to mention which test requires the resource.
Commit migrated from https://github.com/dotnet/corefx/commit/
e2aec459cd3dadab0edde0e3666edfe47a277514
Kristian Hellang [Tue, 19 Jun 2018 16:17:03 +0000 (18:17 +0200)]
Expose and add unit tests for ISOWeek (dotnet/corefx#30386)
* Expose ISOWeek in System.Globalization
* Add unit tests for ISOWeek
* PR Feedback
* Add ISOWeek to ApiCompatBaseline
* Added more edge-case tests
Commit migrated from https://github.com/dotnet/corefx/commit/
9ed08bb062d6d73391dfd3c3bb812b090537772e
Stephen Toub [Tue, 19 Jun 2018 14:56:29 +0000 (10:56 -0400)]
Remove unused method from System.Text.Encoding.CodePages
Commit migrated from https://github.com/dotnet/corefx/commit/
7d772b56e070ff20ca0508e9d978f200b91a02c0
Jan Kotas [Tue, 19 Jun 2018 13:01:24 +0000 (06:01 -0700)]
Merge pull request dotnet/corefx#30497 from dotnet-maestro-bot/master-UpdateDependencies
Update BuildTools, CoreClr, CoreSetup, ProjectNTfs, ProjectNTfsTestILC to preview1-02918-02, preview1-26619-01, preview1-26618-02, beta-26619-00, beta-26619-00, respectively (master)
Commit migrated from https://github.com/dotnet/corefx/commit/
fe7adb2bf92bba926268c2e9f562b11c84932a07
Fei Peng [Fri, 15 Jun 2018 02:14:44 +0000 (19:14 -0700)]
Improve Intel hardware intrinsic APIs
Commit migrated from https://github.com/dotnet/corefx/commit/
9027f4da59d858bab422ca319e53a85d85b73f72
dotnet-maestro-bot [Tue, 19 Jun 2018 05:15:53 +0000 (22:15 -0700)]
Update BuildTools, CoreClr, CoreSetup, ProjectNTfs, ProjectNTfsTestILC to preview1-02918-02, preview1-26619-01, preview1-26618-02, beta-26619-00, beta-26619-00, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/
9cc7583caec9befd2e80ec1c684fadc4b3a78bba
David Shulman [Mon, 18 Jun 2018 23:21:44 +0000 (16:21 -0700)]
Fix SocketsHttpHandler for Windows auth proxy CONNECT tunneling (dotnet/corefx#30478)
SocketsHttpHandler wasn't even trying to send Negotiate/NTLM auth tokens to a proxy. This was due
to some invalid logic regarding the "usingProxy" field in HttpConnection. Reworked this logic to
be clearer about the various kinds of proxy scenarios.
I refactored the loopback proxy server and made it much more robust. It can now handle multiple
requests and multiple connections which helps test against the other handlers whose behavior is
different in this area. I plan to do further work in consolidating the LoopbackServer and
LoopbackProxyServer classes in future PRs.
I created a separate HttpClientHandlerTest.Proxy.cs file and moved many existing proxy tests and
added new tests. The current HttpClientHandlerTest.cs file is still over 3000 lines and needs more
refactoring to make it easier to maintain and track test scenario coverage.
Fixes dotnet/corefx#30330
Commit migrated from https://github.com/dotnet/corefx/commit/
ec1671fd7feffe1070a94d9d86379e0dd95ddcdf
Vance Morrison [Mon, 18 Jun 2018 23:00:42 +0000 (16:00 -0700)]
Expose and Add tests for StringBuilder overloads of TextWriter (dotnet/corefx#30491)
* Expose and Add tests for StringBuilder overloads of TextWriter
Add tests for implementation in https://github.com/dotnet/coreclr/pull/18281
This supports the issue https://github.com/dotnet/corefx/issues/30048
* Remove empty line
* Added tests for empy and large strings for the Text.Write*(StringBuilder) APIs
* Add AppCompat overrides for UWP.
(lost in merge conflict)
* review feedback
Commit migrated from https://github.com/dotnet/corefx/commit/
7e4093b9787b54da5329e5f752c34f42610c9e39
Stephen Toub [Mon, 18 Jun 2018 20:51:01 +0000 (16:51 -0400)]
Remove multiplication in pal_networking.c (dotnet/corefx#30496)
* Remove multiplication in pal_networking.c
* Fix paren
Commit migrated from https://github.com/dotnet/corefx/commit/
16f1fe20e3d6c68cc77325d3f30b1dbbca417920
Santiago Fernandez Madero [Mon, 18 Jun 2018 18:24:07 +0000 (11:24 -0700)]
Cross compile compat pack shims against 2.0 and use the 2.1 inbox ones (dotnet/corefx#30031)
* Cross compile compat pack shims against 2.0 and use the 2.1 inbox ones
* Fix build issues and use shims.proj produced facades as ref assemblies in the package
* Exclude System.ValueTuple only on nca2.0 and break compat pack dependency on shims package
* PR Feedback
* PR Feedback
Commit migrated from https://github.com/dotnet/corefx/commit/
d73434c0a8a6d7eb4f11d23c408d9f3d2ff809c4
Krzysztof Wicher [Mon, 18 Jun 2018 16:17:45 +0000 (09:17 -0700)]
Add test for dotnet/corefx#29914 (dotnet/corefx#30408)
Commit migrated from https://github.com/dotnet/corefx/commit/
21e73c6b703946032a61cd639c2ba7662b319785
dotnet-maestro-bot [Mon, 18 Jun 2018 16:17:00 +0000 (09:17 -0700)]
Update ProjectNTfs, ProjectNTfsTestILC to beta-26618-00, beta-26618-00, respectively (dotnet/corefx#30481)
Commit migrated from https://github.com/dotnet/corefx/commit/
803e0b33cc2ce2a1d42391b79424b0f1fd07aa2d
Ian Hays [Mon, 18 Jun 2018 15:59:41 +0000 (08:59 -0700)]
Add support for concatenated GZip streams. (dotnet/corefx#30442)
Currently, if you pass two or more concatenated GZipStreams we will read into the second one (to fill a buffer) but not do anything with that information. This PR modifies the Inflater code to instead look at the appended data for the Gzip header magic bytes and treats the rest of the data stream as an additional data segment if they are found.
More info:
- There is no limit to the number of concatenated GZipStreams supported.
- If a GZipStream is appended with garbage that happens to have its first two bytes equal to the GZip header bytes, then an exception will result. This is an acceptable risk, as garbage appended to a valid GZipStream isn't really usable right now anyways since we read past the end of the first stream into that data to fill our input buffer.
- Added exhaustive tests to test buffer boundary behavior
- Concatenated streams are supported using Read, ReadAsync, CopyTo, etc.
Commit migrated from https://github.com/dotnet/corefx/commit/
55f2293ddda3c972fcc2d94915b03bc8556e8c9b
Marc Gravell [Mon, 18 Jun 2018 15:56:46 +0000 (16:56 +0100)]
Sockets on Windows: reduce array allocations during Select, Poll, Receive, Send (dotnet/corefx#30485)
* untested; zero allocs during Socket.Poll and Socket.Select on Windows (aveat: Socket.Select with > cutoff will still allocate)
* use MemoryMarshal.GetReference - cleanly passes null ref for empty span
* remove all the "unsafe"; pretty sure that the "ref" will count as a "fixed" during the P/Invoke
* avoid allocating in Socket.Send/Socket.Receive when passing multiple segments (synchronous API)
* Revert "avoid allocating in Socket.Send/Socket.Receive when passing multiple segments (synchronous API)"
This reverts commit dotnet/corefx@
343b88602bd7974f64ae8247f5415b6bf590a89b.
* use spans for multi-segment sync send/receive
* remove "unsafe" from select - no longer required
* fix nit whitespace
* address @stephentoub feedback from review:
- prefer Foo* to ref Foo in p/invoke
- avoid repeated .Count access
- use const size stackalloc instead of dynamic
- use ArrayPool instead of allocate
- avoid multiple testing of count when determining stack vs heap
- use smaller stack threshold
* add debug assertions to express intent of file descriptor size vs socket list size
* use slice+span.clear to simplify objectsToPin wipe
Commit migrated from https://github.com/dotnet/corefx/commit/
146fe58389624354fee8e48ffffc2fde1c2e89f9
kasper3 [Mon, 18 Jun 2018 15:56:18 +0000 (18:56 +0300)]
Convert System.Security.Cryptography.Native to C (dotnet/corefx#30376)
* Rename extension .cpp to .c
* Convert System.Security.Cryptography.Native to C
* Address feedback comments
Commit migrated from https://github.com/dotnet/corefx/commit/
30148bf4a56ea5dc934893f8b87367ff221014a6
Marco Rossignoli [Mon, 18 Jun 2018 15:53:25 +0000 (17:53 +0200)]
Add Path.Join string overloads (dotnet/corefx#30447)
* update tests
* add null tests
* add null tests
* added uapaot ApiCompatBaseline
Commit migrated from https://github.com/dotnet/corefx/commit/
2776b6373590a896833b8b0eec4446f22f502ab0
jswolf19 [Mon, 18 Jun 2018 15:53:06 +0000 (00:53 +0900)]
Exposing CallerArgumentExpressionAttribute from System.Runtime assembly (dotnet/corefx#30469)
* Expose CallerArgumentExpressionAttribute (dotnet/corefx#21809)
* added basic CallerArgumentExpressionAttribute tests
* added test to show that overload without optional parameter is taken over method with
* added tests to illustrate behavior of CallerArgumentExpressionAttribute (final behavior may differ)
* added type CallerArgumentExpressionAttribute to uapaot ApiCompatBaseline
* Moved CallerArgumentExpressionTests to non-netfx section
* added newlines as per review
Commit migrated from https://github.com/dotnet/corefx/commit/
a9e5ed00dbc1aa662342e7e51ac1dc137941a91e
kasper3 [Mon, 18 Jun 2018 15:52:28 +0000 (18:52 +0300)]
Convert S.S.Cryptography.Native.Apple to C (dotnet/corefx#30448)
* Rename extension .cpp to .c
* Convert S.S.Cryptography.Native.Apple to C
* Use memset instead of consts for zero-init
Commit migrated from https://github.com/dotnet/corefx/commit/
9908dee27b7a73046c8dae4a1db1b3603e795c8a
Stephen Toub [Mon, 18 Jun 2018 15:04:54 +0000 (11:04 -0400)]
Upper-case a const in IPAddress
Commit migrated from https://github.com/dotnet/corefx/commit/
f6c6a894bd5b385636d4db778cd3ce6bf09daca3
Hugh Bellamy [Mon, 18 Jun 2018 14:14:28 +0000 (15:14 +0100)]
Add some more CodeDom tests (dotnet/corefx#30387)
* Cleanup some CodeDom product code
* Cleanup CodeDom tests
* Add misc CodeDom tests
* Address PR feedback
* Fix netfx tests
Commit migrated from https://github.com/dotnet/corefx/commit/
ac70bb1294a0fad6cacb4523ee057b7ffcd3a42b
Jan Kotas [Sun, 17 Jun 2018 12:55:28 +0000 (05:55 -0700)]
Reenable tests for fixed ProjectN bug (dotnet/corefx#30467)
The bug has been fixed in ProjectN 3 years ago.
Fixes dotnet/corefx#16747
Fixes dotnet/corefx#21198
Commit migrated from https://github.com/dotnet/corefx/commit/
7303e22416dbcf4c27940efa90770d183f9162dc
Michal Strehovský [Sun, 17 Jun 2018 12:54:51 +0000 (14:54 +0200)]
Delete ApiCompatBaseline (dotnet/corefx#30472)
These should not need baselining after dotnet/corefx#30438.
Commit migrated from https://github.com/dotnet/corefx/commit/
3443fc58c7f6bd571d6d14fe14ae6f218d4db945
Jan Kotas [Sun, 17 Jun 2018 02:52:47 +0000 (19:52 -0700)]
Make StackFrame tests robust against varying levels of optimizations (dotnet/corefx#30463)
- Add NoInlining attributes
- Relax ILOffset validation
Fixes dotnet/corefx#30444
Commit migrated from https://github.com/dotnet/corefx/commit/
9f18d08ea45c296592920d48e373d30975176b59
dotnet-maestro-bot [Sun, 17 Jun 2018 02:41:30 +0000 (19:41 -0700)]
Update CoreFx to preview1-26617-01 (dotnet/corefx#30460)
Commit migrated from https://github.com/dotnet/corefx/commit/
77082c3a602f14b4b06700359cb53210aa3d753a
Andrey Akinshin [Sun, 17 Jun 2018 00:29:53 +0000 (20:29 -0400)]
mach_absolute_time as the primary clock source on macOS (dotnet/corefx#30391) (dotnet/corefx#30457)
macOS 10.12+ supports clock_gettime (HAVE_CLOCK_MONOTONIC is defined)
However, mach_absolute_time has better resolution and should be used
as the primary clock source.
Commit migrated from https://github.com/dotnet/corefx/commit/
0b0a9d2961bae7d686d37101967c9ecb5c00d645
dotnet-maestro-bot [Sat, 16 Jun 2018 18:39:53 +0000 (11:39 -0700)]
Update CoreClr, CoreFx to preview1-26616-03, preview1-26616-02, respectively (dotnet/corefx#30450)
Commit migrated from https://github.com/dotnet/corefx/commit/
30fb78875148665b98748ede3013641734d9bf5c
Hugh Bellamy [Sat, 16 Jun 2018 18:38:42 +0000 (19:38 +0100)]
Remove some dead code from System.ComponentModel.Annotations (dotnet/corefx#30452)
* Remove dead code from System.ComponentModel.Annotations
* Move tests to correct directory
* Cleanup string.Format usage in exceptions
* Add parameter names to some exceptions
* Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/
38836b30cdf41632c5f43b8ae765d8992a0a9406
Viktor Hofer [Sat, 16 Jun 2018 17:50:38 +0000 (19:50 +0200)]
Exclude tests that require gdiplus to not produce errors (dotnet/corefx#30451)
* Exclude tests that require gdiplus to not produce errors
* Move BenchmarkFilter to Common
Commit migrated from https://github.com/dotnet/corefx/commit/
3885ee5a9dcef353b7cb2ce2b6eb0faa2977af00
José Rivero [Sat, 16 Jun 2018 14:39:42 +0000 (07:39 -0700)]
Moving `Perf_Array` under `System.Tests` namespace (dotnet/corefx#30434)
This will group its results with the rest of the other benchmarks in the same project.
Commit migrated from https://github.com/dotnet/corefx/commit/
4f4421879f9a12d5f414d6f4929d4621a8ed173f
Jan Kotas [Sat, 16 Jun 2018 03:19:00 +0000 (20:19 -0700)]
Merge pull request dotnet/corefx#30438 from dotnet-maestro-bot/master-UpdateDependencies
Update BuildTools, CoreClr, CoreFx, CoreSetup, ProjectNTfs, ProjectNTfsTestILC, Standard to preview1-02915-01, preview1-26616-01, preview1-26615-01, preview1-26615-02, beta-26615-00, beta-26615-00, servicing-26419-02, respectively (master)
Commit migrated from https://github.com/dotnet/corefx/commit/
9888240add39350552d970f249f15b2e51b7f8eb
luqunl [Wed, 13 Jun 2018 19:46:55 +0000 (12:46 -0700)]
Remove Opcodes due to Opcodes moved to S.P.Corelib
Commit migrated from https://github.com/dotnet/corefx/commit/
9307e4bab2489d4da64997d813f60fff2a2a5e89
luqunl [Mon, 11 Jun 2018 20:26:59 +0000 (13:26 -0700)]
Trivial Update WindowsRuntimeResourceManager
Commit migrated from https://github.com/dotnet/corefx/commit/
dcee3579e9374067fb770a9c7b98e5f64e45efc4
Viktor Hofer [Sat, 16 Jun 2018 01:46:15 +0000 (03:46 +0200)]
Cleanup BinaryFormatterHelpers usage (dotnet/corefx#30439)
Commit migrated from https://github.com/dotnet/corefx/commit/
03d643220955f86ef63c71d3bdd4cae05af1f586
dotnet-maestro-bot [Sat, 16 Jun 2018 00:46:32 +0000 (17:46 -0700)]
Update BuildTools, CoreClr, CoreFx, CoreSetup, ProjectNTfs, ProjectNTfsTestILC, Standard to preview1-02915-01, preview1-26616-01, preview1-26615-01, preview1-26615-02, beta-26615-00, beta-26615-00, servicing-26419-02, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/
1ea866369803566262de65d243eb840f5eff9c82
Viktor Hofer [Fri, 15 Jun 2018 22:08:28 +0000 (00:08 +0200)]
Add netfx472 serialization blobs and cleanup code to fix failing PRs (dotnet/corefx#30394)
* Add netfx472 serialization blobs and cleanup code
* Add check if net472 is patched
Commit migrated from https://github.com/dotnet/corefx/commit/
7c1dc969ce02cfab1dbb241800abbd7a3c9a0155
Hugh Bellamy [Fri, 15 Jun 2018 21:43:47 +0000 (22:43 +0100)]
Consolidate Graphics properties, fixing compat bugs (dotnet/corefx#29713)
* Consolidate Graphics properties, fixing compat bugs
* Add comments
Commit migrated from https://github.com/dotnet/corefx/commit/
0c52597fb3e8c55190dbe8a01c79f979d516681e
Peter V [Fri, 15 Jun 2018 20:05:28 +0000 (16:05 -0400)]
Remove unnecessary else from WebSocket.cs (dotnet/corefx#30425)
return in if, else is not necessary
Commit migrated from https://github.com/dotnet/corefx/commit/
3850fe7626873b47a0eef029ebd194a0f8d0b340
Stephen Toub [Fri, 15 Jun 2018 20:04:32 +0000 (16:04 -0400)]
Add test for IncompleteAsyncMethod async event (dotnet/corefx#30409)
* Add test for IncompleteAsyncMethod async event
In 2.1, I added an event that's fired when an async method state machine object gets garbage collected without having reached a completed state. Apparently I never added a test for that behavior. This does.
* Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/
a04a52a452d4e3176e0c3a0f8d32f1bc1b029d13
Christopher Costa [Fri, 15 Jun 2018 20:03:39 +0000 (13:03 -0700)]
Collect msbuild debug logs (dotnet/corefx#30428)
* Collect MSBuild debug logs
* Combine gather logs steps
* remove escape chars
Commit migrated from https://github.com/dotnet/corefx/commit/
cf838561b74fa9093fc52f21b3e75d902c6a7aee
Jeremy Barton [Fri, 15 Jun 2018 17:13:24 +0000 (10:13 -0700)]
Ensure X509Chain can succeed when the end cert has an empty subject
RFC 3280 says that the subject of an end-entity certificate can be empty. On Windows and Linux chains building with an empty-subject certificate succeed, but on macOS the "unknown error code" error is raised, resulting in a Debug.Assert (debug) or CryptographicException (release).
This change makes those chains work in macOS, and adds a test to make sure things stay that way.
Commit migrated from https://github.com/dotnet/corefx/commit/
45f7401d974bed335affc28ec45c50331bd75491
Jeremy Barton [Fri, 15 Jun 2018 15:18:06 +0000 (08:18 -0700)]
SignedCms: Improve NetFx compat for SignedCms wrapping EnvelopedCms
* SignedCms with a content-type other than id-data should have attributes
* Read classic PKCS7 SignedData(EnvelopedData) documents (NetFx compat)
In NetFX if a SignedCms is created using only CmsSigners with IssuerAndSerial as
the signer identifier type, the document gets encoded using the older PKCS7
structural definition instead of the newer CMS one.
RFC 5652 has a long section (5.2.1) on how to read these documents compatibly.
Since the defaults in SignedCms / CmsSigner are the PKCS7 behavior, not
reading it means that Signed(Enveloped) documents from NetFX cannot be read.
Commit migrated from https://github.com/dotnet/corefx/commit/
70f1b80af59f32652c1eb6b8d95d8c03e0d18eae
Viktor Hofer [Fri, 15 Jun 2018 11:12:31 +0000 (13:12 +0200)]
Reenable negative compression tests (dotnet/corefx#28993)
* Reenable negative compression tests
Commit migrated from https://github.com/dotnet/corefx/commit/
176fb6aed060d5ef2284844652f24b8aa965d827
Stephen Toub [Fri, 15 Jun 2018 00:08:33 +0000 (20:08 -0400)]
Fix WebSocket server split header parsing with large payload (dotnet/corefx#30402)
* Refactor WebSocket{Protocol}.CreateFromStream tests to be shared
We have the WebSocket.CreateFromStream and WebSocketProtocol.CreateFromStream methods, which are identical, except that the former is netcoreapp-only and the latter is in a separate NuGet package for downlevel use. However, tests for them were separate, with some tests only for one and some tests for the other.
This commit centralizes those tests so they're shared by and apply to both methods. There are no code changes to the actual bodies of tests, just moving code around to have it apply to both.
* Fix WebSocket server split header parsing with large payload
When ReceiveAsync is called, as a fast path it checks to see whether there's already enough data in the buffer to satisfy any possible header, skipping subsequent checks if there is. The max header size differs between client and server, though. The maximum size header a client can send to the server is 14 bytes, which includes a 4-byte masking value; the maximum size header a server can send to a client is 10 bytes, as it doesn't include a masking value. However, the code currently has those values reversed. If the code is running on the client, this means that we end up falling back to the slow-path unnecessarily if there are 10, 11, 12, or 13 bytes already in the buffer when ReceiveAsync is called. However, on the server, this means we end up potentially throwing an exception or misinterpreting the payload if 10, 11, 12, or 13 bytes are in the buffer and the packet contains a large payload (in which case it'll be using an 8-byte length and be the full 14 byte header), as we'll end up erroneously taking the fast path when we should have taken the slow path to read more data from the network.
The fix is simply to swap the branches of the conditional.
* Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/
d6d925e750a4e099ada6d3c32e15b15978518439
Koundinya Veluri [Fri, 15 Jun 2018 00:05:34 +0000 (17:05 -0700)]
Add some debugging code to help diagnose an issue (dotnet/corefx#30404)
* Add some debugging code to help diagnose an issue
CreateFile[2] is definitely failing, added some info to help try to find out why. Closes https://github.com/dotnet/corefx/issues/29390 until it happens again.
* Remove unnecessary local
Commit migrated from https://github.com/dotnet/corefx/commit/
96a1b2e25ca4a69b347cad5f748182a660071b76
Koundinya Veluri [Thu, 14 Jun 2018 22:34:32 +0000 (15:34 -0700)]
Make WindowsIdentity.RunImpersonated closer in behavior to Netfx (dotnet/corefx#30377)
Make WindowsIdentity.RunImpersonated closer in behavior to Netfx
Followup to https://github.com/dotnet/corefx/pull/30346, this is closer to Netfx behavior for invalid handles
Commit migrated from https://github.com/dotnet/corefx/commit/
ca6adc3aa8837e8e5ea057959452452a6f904ec0
Viktor Hofer [Thu, 14 Jun 2018 21:44:14 +0000 (23:44 +0200)]
Port System.Reflection.Context (dotnet/corefx#29347)
* Remove already implemented api warnings
* Port System.Reflection.Context
* Add package to harvesting list
* Set ref assembly version to 4.0.0.0, harvest netcore50, win8 and win81 paths, make OOB for uap10.0.16300
* Remove xamarin assemblies & ref debug line
* Remove Xamarin inbox so that it prefers ns2.0
* Add tests
Commit migrated from https://github.com/dotnet/corefx/commit/
62257690c3a167859d030092d99cd597eddcb774
Eric Erhardt [Thu, 14 Jun 2018 20:23:34 +0000 (15:23 -0500)]
Remove ObjectMarker from OpenSsl (dotnet/corefx#30400)
This class was added to satisfy ApiCompat, but with https://github.com/dotnet/buildtools/pull/1961, ApiCompat no longer runs on the netstandard version of this assembly (since it is a PNSE assembly). Thus, we no longer need the ObjectMarker class.
This also allows buildtools to remove the @(AssemblyInfoSource) support, since this was the only place using it.
Commit migrated from https://github.com/dotnet/corefx/commit/
3d3dde810cd8943ad005fce1fdc9962e4abdd55a
Brian Robbins [Thu, 14 Jun 2018 18:09:25 +0000 (11:09 -0700)]
Remove definition of USE_ETW. (dotnet/corefx#30396)
Commit migrated from https://github.com/dotnet/corefx/commit/
8e22cd7469f52e5d91c67b3809c1460584173c30
Caesar Chen [Thu, 14 Jun 2018 17:17:43 +0000 (10:17 -0700)]
Improve code coverage for NegoState class (dotnet/corefx#30310)
* adding code coverage for NegoState class
* address feedback
Commit migrated from https://github.com/dotnet/corefx/commit/
ab7f1e243d35bca1195144e9683755d95c381bc0
Viktor Hofer [Thu, 14 Jun 2018 15:40:26 +0000 (17:40 +0200)]
Merge AssertExtension test files together (dotnet/corefx#30384)
Commit migrated from https://github.com/dotnet/corefx/commit/
6758a6a42d42dd8a28b70cf36f46aa902e18316b
Ian Hays [Thu, 14 Jun 2018 15:02:25 +0000 (08:02 -0700)]
Upgrade zlib to 1.2.11 (dotnet/corefx#30362)
* Update zlib to 1.2.11
* Add PAL layer around zlib on Windows
On Windows we currently directly pinvoke into zlib. This requires defining/declaring the Zstream ourselves, which we currently do in managed code. This is an issue for zlib 1.2.8.1+ where it is required that the ZStream object remain at a fixed location. Our current ZStream is moveable, so we hit issues when it gets moved by the GC. There's also the issue that our ZStream definition can go out of sync with the one in zlib if we update again.
This changeset makes the PAL layer around zlib that we have on Unix also wrap the Windows zlib. This results in an unmanaged instantiation of the ZStream while also bringing the Windows and Unix code closer together, allowing us to delete a bunch of platform-specific files.
Commit migrated from https://github.com/dotnet/corefx/commit/
77222d3161fd1f22fd11c5e2431330f08b6753c7
Ian Hays [Thu, 14 Jun 2018 05:56:48 +0000 (22:56 -0700)]
Merge pull request dotnet/corefx#30364 from ianhays/zipfile_cleanup
Refactor, clean up ZipFile assembly
Commit migrated from https://github.com/dotnet/corefx/commit/
c6efb248fd3c633e09733b2c9514d5729577a701
Dan Moseley [Thu, 14 Jun 2018 02:21:43 +0000 (19:21 -0700)]
Move #pragma warning disable BCL0015 to baseline files (dotnet/corefx#30378)
* Move #pragma warning disable BCL0015 to baseline files
* Fix baselines
Commit migrated from https://github.com/dotnet/corefx/commit/
9c3f3d59f415e184487a8d244c2dacbe01756b4a
s. galiamov [Thu, 14 Jun 2018 01:09:35 +0000 (03:09 +0200)]
Remove USE_ETW Compilation Constant from System.Diagnostics.Tracing.Tests (dotnet/corefx#30076)
Commit migrated from https://github.com/dotnet/corefx/commit/
df42d0e5fbe7f168bfa96d8abdf35f84deb1509c
Ian Hays [Wed, 13 Jun 2018 21:41:13 +0000 (14:41 -0700)]
Fix some whitespace in ZipFile classes
Commit migrated from https://github.com/dotnet/corefx/commit/
647f59a14bba448430e37e282e4da0a334aa8a70
Calvin [Wed, 13 Jun 2018 21:04:58 +0000 (18:04 -0300)]
Fix AIX build of PAL because of GCC system header mangling (dotnet/corefx#30277)
* Fix AIX build of PAL because of GCC system header mangling
GCC's "fix"includes tool claims another function as its victim.
Import the func definition from the headers; we can't trust GCC
to not replace them with "fixed" versions.
(FreeBSD people: `_WITH_GETLINE` to replace what was removed
would help you)
* I figured out why further, explain this BS wrt getline on AIX
* be kinder and to the point
Commit migrated from https://github.com/dotnet/corefx/commit/
0f6f5ea8f08dc7e033b4bf998f54e6e731f3bfa1
Keerat Singh [Wed, 13 Jun 2018 20:59:10 +0000 (13:59 -0700)]
Remove test TestNotSupportedExceptionForTransactionScopeAsync (dotnet/corefx#30365)
Commit migrated from https://github.com/dotnet/corefx/commit/
f05adef1504915d6ef7f0836b392e174a1f6742d
Jan Kotas [Wed, 13 Jun 2018 20:51:57 +0000 (13:51 -0700)]
Merge pull request dotnet/corefx#30229 from kasper3/cpp-toc-net
Convert System.Net.Http.Native to C
Commit migrated from https://github.com/dotnet/corefx/commit/
4f321f8773cac29b035d92a3025b65a34529e347
Ian Hays [Wed, 13 Jun 2018 19:56:30 +0000 (12:56 -0700)]
Refactor, clean up ZipFile assembly.
This is a net-zero change PR to move around some files in the System.IO.Compression.ZipFile assembly in preparation for some upcoming major additions.
Commit migrated from https://github.com/dotnet/corefx/commit/
c64068e57d37f7b494dc56c7c426f67a451aafdd
Keerat Singh [Wed, 13 Jun 2018 17:57:23 +0000 (10:57 -0700)]
Merge pull request dotnet/corefx#30344 from keeratsingh/gh_29609_clientprocessid
Fix GH Issue 29609 Set correct client process ID
Commit migrated from https://github.com/dotnet/corefx/commit/
63cfd9ebb28533078b69daf16287dee1e1daef22
Victor Pelt [Wed, 13 Jun 2018 17:31:15 +0000 (19:31 +0200)]
Implementation of IReadOnlyDictionary on GroupCollection (dotnet/corefx#30077)
* Implementation of IReadOnlyDictionary to GroupCollection
* add failing unittest
* moved code around
* update enumerator/only 1 allocation and slight code duplication
* added some extra tests
re-implementation based on comments in pullrequests
* fix style issue
* fix code review comments
* code review
* this[i] just calls Group(i)
* Address my own PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/
7d945a074fb487966d6d9e05bac490868782ff94
kasper3 [Wed, 13 Jun 2018 17:16:46 +0000 (20:16 +0300)]
Remove __LinkCustomCRT and crt.cpp (dotnet/corefx#30256)
* Remove __LinkCustomCRT and crt.cpp
* Remove OLE link from ARM
* Remove LTCG option
Commit migrated from https://github.com/dotnet/corefx/commit/
f6505924d53ff66e7219ffe3551a541a1ae6928d
Keerat Singh [Wed, 13 Jun 2018 16:47:23 +0000 (09:47 -0700)]
Addressed review feedback
Commit migrated from https://github.com/dotnet/corefx/commit/
8c07d167ac22a685ea721ee6185d3df4e59cb60b
Filip Navara [Wed, 13 Jun 2018 16:06:16 +0000 (18:06 +0200)]
Remove CmsSigner property setters not present in .NET Framework.
Commit migrated from https://github.com/dotnet/corefx/commit/
238afa290b4b4bb5fd43b6e9e670e1b101f2b0c9
Koundinya Veluri [Wed, 13 Jun 2018 15:49:22 +0000 (08:49 -0700)]
Duplicate the access token passed to WindowsIdentity.RunImpersonated (dotnet/corefx#30346)
* Duplicate the access token passed to WindowsIdentity.RunImpersonated
So that callbacks for async work initiated while impersonated may continue to impersonate even after the original access token had been disposed.
Fix for https://github.com/dotnet/corefx/issues/30275
* Small fix
* Address feedback
* Change to use ref counting, remove assert (no null check on access token parameter)
* Manual add/release
Commit migrated from https://github.com/dotnet/corefx/commit/
50dfdd59ca435de5961c5c575d07d665c726741e
Hugh Bellamy [Wed, 13 Jun 2018 14:35:41 +0000 (15:35 +0100)]
Cleanup converters in ComponentModel (dotnet/corefx#30189)
* Cleanup converters in ComponentModel
* Get rid of SecurityUtils
* Remove some dead code
* Address PR feedback
* remove exclude
Commit migrated from https://github.com/dotnet/corefx/commit/
92280a42b6caafb3ba4683c97b5dc721fb0d6c01
Santiago Fernandez Madero [Wed, 13 Jun 2018 06:17:32 +0000 (23:17 -0700)]
Change Drawing.Common perf tests configuration to netcoreapp (dotnet/corefx#30329)
* Change Drawing.Common perf tests configuration to netcoreapp
* Skip drawing perf tests when gdiplus is not available
Commit migrated from https://github.com/dotnet/corefx/commit/
16b7210b25ac666ebffc8180f0f0c5b03b8b3eb6
Dan Friedman [Wed, 13 Jun 2018 03:46:27 +0000 (22:46 -0500)]
Clean dead code System.Private.Xml* (dotnet/corefx#28989)
* Clean dead code for System.Private.Xml
* Clean dead code for System.Private.Xml.Linq
* CR fixes
* Other CR fixes
* Fix syntax error
* Restore interface
Commit migrated from https://github.com/dotnet/corefx/commit/
5b8a52f104994040bb01de5364186b0cf07bb077
Günther Foidl [Wed, 13 Jun 2018 02:23:59 +0000 (04:23 +0200)]
Converted pal_(date)time, pal_sysctl, pal_runtimeextensions from C++ to C (dotnet/corefx#30192)
* Converted pal_time, pal_datetime, pal_sysctl, pal_runtimeextensions from C++ to C
* Keep the EXTERN_C guards, as per PR feedback
Cf. https://github.com/dotnet/corefx/pull/30192#discussion_r194520428
Commit migrated from https://github.com/dotnet/corefx/commit/
b3add58d237c1089e1a0bfd106ff510e8c23242f
Tarek Mahmoud Sayed [Wed, 13 Jun 2018 02:20:51 +0000 (19:20 -0700)]
Add Utf8 Decoder fallback test (dotnet/corefx#30224)
Commit migrated from https://github.com/dotnet/corefx/commit/
c25721cfb888ec26a63015d6c3970a057de116a8
Marco Rossignoli [Wed, 13 Jun 2018 01:45:34 +0000 (03:45 +0200)]
cleanup xml files (dotnet/corefx#30325)
Commit migrated from https://github.com/dotnet/corefx/commit/
145328f173b59ffa6feceeb335880ba7fb0a33be
Jeremy Kuhne [Wed, 13 Jun 2018 00:01:11 +0000 (17:01 -0700)]
Fix creating subdirectories under directories with trailing separators (dotnet/corefx#30293)
* Fix creating subdirectories under directories with trailing separators
This broke with dotnet/corefx#27810. Reworked the logic in an attempt to be clearer and added test cases.
This addresses dotnet/corefx#30283.
* Flip the logic to make it a little easier to follow.
(Reduces the number of nots.)
* Skip new test on desktop
Commit migrated from https://github.com/dotnet/corefx/commit/
4a6f54e7ab202d8391b050fd9a2cbae8f28374bb
Keerat Singh [Tue, 12 Jun 2018 21:49:02 +0000 (14:49 -0700)]
Set correct process ID for applications
Commit migrated from https://github.com/dotnet/corefx/commit/
a093b2cff9d27e54c3107b08edbd39b4794caeee
dotnet-maestro-bot [Tue, 12 Jun 2018 20:32:09 +0000 (13:32 -0700)]
Update BuildTools, CoreClr, CoreFx, CoreSetup, ProjectNTfs, ProjectNTfsTestILC to preview1-02912-01, preview1-26612-04, preview1-26612-04, preview1-26612-01, beta-26612-00, beta-26612-00, respectively (dotnet/corefx#30316)
Commit migrated from https://github.com/dotnet/corefx/commit/
9bdc5f52fad134d12cb64d116d671aa145871288
Jeremy Barton [Tue, 12 Jun 2018 18:33:29 +0000 (11:33 -0700)]
Move rd.xml from CryptoXml.Tests to CryptoXml (dotnet/corefx#30322)
If the entries are in the product then the product just works for UAP. As it is,
the entries are required in each application.
Commit migrated from https://github.com/dotnet/corefx/commit/
4012621d77ded2a61f3164ad2e995be5dfb9d342
Hugh Bellamy [Tue, 12 Jun 2018 16:06:50 +0000 (17:06 +0100)]
Consolidate _nativeFont param and simple properties in Font (dotnet/corefx#30318)
* Consolidate Font.NativeFont
* Consolidate Style parameters
* Consolidate misc Font properties
* Consolidate Font.GetHashCode/Font.Equals
* Address PR feedback
Commit migrated from https://github.com/dotnet/corefx/commit/
f5c0d3f6e36ffd706b56b67a17699ca4ce0fca00
Luigi Berrettini [Tue, 12 Jun 2018 15:06:00 +0000 (16:06 +0100)]
Add cross-platform support for keep-alive socket options (closes dotnet/corefx#25040) (dotnet/corefx#29963)
* Add cross-platform support for keep-alive socket options
* Use the OS specific socket option name constant in native code
* Match the scoped API shape
* Use CMake configuration to check if compiling on OS X
* Execute keep-alive tests only for netcoreapp
* Make keep-alive enabled check less strict
* Align CMake keep-alive config to format used elsewhere
* Test one keep-alive setting at a time on all platforms
* Clean-up
* Test *SocketOption on all OS/version combinations
* Test support for keep-alive time setting on all OS/version combinations
* Rename keep-alive test methods
Commit migrated from https://github.com/dotnet/corefx/commit/
b15f5097dfd600a6932e1b011970e4a09367af4a
Tomas Weinfurt [Tue, 12 Jun 2018 14:15:39 +0000 (07:15 -0700)]
fix dereferencing uninitialized byte array in case recv() fails (dotnet/corefx#30312)
Commit migrated from https://github.com/dotnet/corefx/commit/
823196ba9262b37b59800b8743da1b10f2b380e0
David Shulman [Tue, 12 Jun 2018 13:58:04 +0000 (06:58 -0700)]
Add HTTP/2.0 test server (dotnet/corefx#30309)
To prepare for the work of adding HTTP/2.0 support to SocketsHttpHandler, I deployed a new Azure
server. As with all HTTP/2.0 endpoints, only HTTPS (TLS) is supported.
This server is based on Azure Web Apps instead of Azure Cloud Services (classic). This makes it
easier to scale out and maintain as well as give us a staging environment to validate upgrades to
the test server without affecting the production PR/CI runs.
Although the default for HttpClient/HttpRequestMessage.Version is 2.0, only the older platform handler stacks (WinHttpHandler, CurlHandler, UAP) will send as HTTP/2.0. SocketsHttpHandler is currently just ignoring the version value and using HTTP/1.1 as the request version. When SocketsHttpHandler is modified to support HTTP/2.0, then all default requests by HttpClient will attempt HTTP/2.0. Our existing Azure test server (and loopback server) will still downgrade to HTTP/1.1. But this new test server will use HTTP/2.0.
Commit migrated from https://github.com/dotnet/corefx/commit/
58892b9d2d95d6cc3f90811d75248f90e0ff716b
Stephen Toub [Tue, 12 Jun 2018 13:46:47 +0000 (09:46 -0400)]
Delete some unused .cs files (dotnet/corefx#30251)
In a few cases, this also highlighted other dead code that could be removed, e.g. a shim export we no longer need. And it highlighted some places where .cs files weren't included in a .csproj but should have been; I've fixed those.
Commit migrated from https://github.com/dotnet/corefx/commit/
844415759d3f1525bf1f5d1bd79453c6aa8493f8
Anipik [Sat, 9 Jun 2018 07:19:16 +0000 (00:19 -0700)]
Tests fixed for long names for mutex semaphore and eventwaithandle
Commit migrated from https://github.com/dotnet/corefx/commit/
ceda383ca0c165dbcc274f34476538051bf42f8d
dotnet-maestro-bot [Tue, 12 Jun 2018 01:30:32 +0000 (18:30 -0700)]
Update CoreClr, CoreFx, CoreSetup to preview1-26612-01, preview1-26612-01, preview1-26611-03, respectively
Commit migrated from https://github.com/dotnet/corefx/commit/
e5e9f980f68e1ea871b4a211a55bc551b4305e25
Krzysztof Wicher [Mon, 11 Jun 2018 21:19:11 +0000 (14:19 -0700)]
Add tests for TimeZoneInfo to ensure offset is not outside of range (dotnet/corefx#30178)
* Add tests for TimeZoneInfo to ensure offset is not outside of range
* improve test
Commit migrated from https://github.com/dotnet/corefx/commit/
34627baf98fdc4d8178847692badb40346381792
kasper3 [Mon, 11 Jun 2018 19:51:25 +0000 (22:51 +0300)]
Convert pal_gssapi to C (dotnet/corefx#30201)
* Convert pal_gssapi to C
* Ignore incompatible-pointer-types-discards-qualifiers
Commit migrated from https://github.com/dotnet/corefx/commit/
e4cd91d8e895484f4a1bf7a7ee4565ae9695d9ed
slozier [Mon, 11 Jun 2018 19:09:42 +0000 (15:09 -0400)]
Check for IsByRefLike in MakeNewDelegate (dotnet/corefx#30269)
* Check for IsByRefLike in MakeNewDelegate
* Add test
Commit migrated from https://github.com/dotnet/corefx/commit/
01411ef4ed6bca82d92ecd79e101277591ece29b
Luqun Lou [Mon, 11 Jun 2018 18:29:58 +0000 (11:29 -0700)]
Add a static method to create WinRT SynchronizationContext instance (dotnet/corefx#30220)
Commit migrated from https://github.com/dotnet/corefx/commit/
bece3a206ec9fccd9a425447ac49a36bfb0d1bb0