Commit Graph
97193 Commits
Author SHA1 Message Date
Charles Stoner 096578ed4e Test concurrent calls to CallSite.AddRule() and MoveRule() (#40858) 2020-08-17 12:59:34 -07:00
devskoanddevsko f48bf80183 Not all object converters return a JsonElement (#40921)
Co-authored-by: devsko <[email protected]>
2020-08-17 12:46:24 -07:00
Mike McLaughlin 6574b7fdee Create dump in utility thread after m_LastThrownObjectHandle has been set (#40915)
The previous Windows stack overflow createdump trigger fix generated the dump before the m_LastThrownObjectHandle in the thread was set. This breaks SOS's !pe command.
2020-08-17 11:59:06 -07:00
Mateo Torres-Ruiz dfb3022b59 Normalize directory separator of paths in FileSpec (#40699) 2020-08-17 11:53:38 -07:00
Ben Adams 0bfb0fd402 Intrinsicify SpanHelpers.IndexOfAny(char,...) (#40729)
* Intrinsicify IndexOfAny(char,char)

* Intrinsicify IndexOfAny(char,char,char)

* Intrinsicify IndexOfAny(char,char,char,char)

* Intrinsicify IndexOfAny(char,char,char,char,char)

* Avoid movsx

* Feedback

* Super nit
2020-08-17 11:24:15 -07:00
Tomáš Rylek cb5177399c Reenable crossgen2smoke under GC stress (#40849)
This change removes the open-coded Crossgen2 execution
from the crossgen2smoke test project and switches it over
to use the normal CLRTest.Crossgen.targets logic for Crossgen2
invocation.

As the CLRTest.Crossgen.targets script already contains my fix
for the underlying issue - we were inadvertently running the
Crossgen2 compiler itself in GC stress mode and timing out
due to the long compilation times - we can now reenable
this test in GC stress mode.

Thanks

Tomas
2020-08-17 20:23:38 +02:00
Carol Eidt 2167dcf3b9 Fix GC liveness check in ByRefLocals test (#40857)
Fix #40751
2020-08-17 11:12:26 -07:00
Andrew Au 63adbf23e3 Make the buffer size configurable for generational aware analysis (#40918) 2020-08-17 11:08:35 -07:00
Tomáš Rylek 791834767b Block out the Runtime_40444 test failing in PR's + alpha-ordering (#40907) 2020-08-17 12:55:22 -05:00
asmichi 3b824aafe7 Fix IndexOutOfRangeException in CallSite.MoveRule. (#39159)
Because synchronization of AddRule is omitted for performance,
concurrent invocations of AddRule may cause Rules to revert back to
an older (smaller) version, making i out of bounds.
Add a guard against that.

The reasoning behind no synchronization is that Rules is just a cache
after all. As long as the cache is in a consistent state, wrong updates
will only cause more cache misses or longer lookup time.
This performance loss is fine if we get more performance gain by
omitting synchronization.

Fix #36983
2020-08-17 10:12:08 -07:00
Sven Boemer b61efface6 Update linker warning numbers (#40865)
* Update linker warning numbers

In response to https://github.com/mono/linker/pull/1385.
This replaces the global suppressions for IL2006 with the warnings that it was split into.

* Add suppressions for linker tests
2020-08-17 09:50:31 -07:00
Eirik Tsarpalis e756708893 Make Enumerable.Cast<T> and friends return IEnumerable<T?> (#40929)
* Make IEnumerable.Cast<TResult>() annotation admit nullable elements

* Make ImmutableArray cast method annotations report nullable elements

* fix System.Data nullability warnings
2020-08-17 16:48:40 +01:00
Adeel Mujahid d8ca356235 Include <sys/sysctl.h> only for FreeBSD in pal.cpp (#40923) 2020-08-17 15:14:39 +02:00
Marco Rossignoli 2d93df68bc Implement ReadOnlySequence<T>.GetPosition(SequencePosition) (#771), fixes #27158 2020-08-17 14:51:16 +02:00
Anton Firszov 296c90a362 Add NetworkError.TimedOut, rename Unknown to Other (#40841)
Adds NetworkError.TimedOut,
Renames Unknown to Other assuming my proposal gets accepted, will revert if not,
Improves exception message
2020-08-17 13:12:05 +02:00
Marie Píchová ba7c518a49 Renamed EventSources "Microsoft-"->"Private.InternalDiagnostics.". 2020-08-17 13:10:32 +02:00
David Wrighton b41f1c5f2f Implement concept of unstable ABI into crossgen2 (#40820)
* Implement concept of unstable ABI into crossgen2
- Use for the Vector types based on current defined stability rules
- Will prevent compilation of methods with not yet stable abis, or calls to methods with said unstable apis

* Bugs
2020-08-17 11:22:05 +02:00
Layomi Akinrinade 0862d48a9c Ensure value-type handling converter created by factory can be used to (#40879)
handle corresponding nullable value types
2020-08-16 18:38:51 -07:00
Miha Zupan 1382a341d8 Add remaining System.Net.Http Telemetry (#40838)
* Add remaining System.Net.Http Telemetry

* Remove http20-streams-current-total

* Use consts instead of magic values

* Move ResponseHeadersBegin event closer to actual timestamp for HTTP2
2020-08-17 01:49:59 +02:00
Miha Zupan 98eecc721d Disable HttpTelemetry for HTTP 3 requests (#40839)
* Disable HttpTelemetry for HTTP 3 requests

* Link to tracking issue for HTTP/3 Telemetry
2020-08-17 01:14:51 +02:00
Anton Lapounov e9c1cc4fe1 Fix runtime crash on Linux ARM64 running in WSL (#40597)
getauxval(AT_HWCAP) returns zero on Linux ARM64 running in WSL1. Fall back to reading capabilities from /proc/cpuinfo in that case.
2020-08-16 15:26:27 -07:00
Geoff Kizer 1341c35ace implement ConnectAsync overloads with CancellationToken on Socket and TcpClient (#40750)
* implement ConnectAsync overloads with CancellationToken on Socket and TcpClient
2020-08-16 15:21:34 -07:00
John Salem cac4f7dc8d Make suspend the default port configuration (#40888)
* Make suspend the default port configuration
* ignore empty port addresses

* Appease MSVC
2020-08-16 12:29:15 -07:00
Eirik TsarpalisandAdeel Mujahid 15ba1328f0 Workaround for WSL1 process IO redirection bug (#40851)
* Workaround for WSL1 process IO redirection bug

* Update src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Unix.cs

Co-authored-by: Adeel Mujahid <[email protected]>

Co-authored-by: Adeel Mujahid <[email protected]>
2020-08-16 15:57:58 +01:00
Noah FalkandDavid Mason 69b95dc0fd Limit Debugger.Log() calls in EventSource (#40823)
* Limit Debugger.Log() calls in EventSource

Fixing #40799 

Previously we would send a message via Debugger.Log() for event call to ReportOutOfBandMessage().
Now we only do it the first 16 times, then all errors after that are silent. This should alleviate performance
overhead from a scenarios with a large number of errors.

I made this change quickly via github to help out Bing. I have never compiled or tested it prior to the PR
but fingers crossed it appears simple enough that it has a decent chance to work : )

* Remove trailing whitespace

Co-authored-by: David Mason <[email protected]>
2020-08-15 23:29:08 -07:00
Jan Kotas 63b2b8593f Delete unused files (#40889) 2020-08-15 14:19:32 -07:00
Tammy Qiu d2601e3cad [wasm] Add Timezone data generator as build task (#39913)
Add two build tasks:
1. DownloadTimeZoneData 
2. CreateWasmBundle (given directory bundle files into a data archive)
2020-08-15 13:47:47 -04:00
c73371d989 Change Assembly.GetFile(s) to throw when in-memory (#40593)
* Change Assembly.GetFile(s) to throw when in-memory

This is technically a breaking change, although a minor one, as the
previous behavior also threw an exception. The previous exception was
an IOException and this is an InvalidOperationException, so if users
were catching the previous exception they would not succeed now.

Fixes #40154

* Don't specify exception for GetFile when passed null

* Skip ImplementedInterfaces test on Mono

* Fix tests for running in memory

Co-authored-by: Dan Moseley <[email protected]>
Co-authored-by: Jan Kotas <[email protected]>
2020-08-15 08:52:41 -07:00
Marie Píchová a32d979bda Fix sync ConnectHelper.Connect (#40880) 2020-08-15 14:30:38 +02:00
David Cantú c00478bb92 Reverts https://github.com/dotnet/corefx/pull/37583 ("Use clonefile for CopyFile, if available #37583") (#40753)
* Revert " Use clonefile for CopyFile, if available (dotnet/corefx#37583)"

This reverts commit 02ba75ad0f.

* Add unit test

* Disable tests failing in browser-wasm
2020-08-15 03:10:31 -07:00
Jared Parsons 321e5eb7cb Fix annotation in DataTableReaderListnener (#40855)
When running the new nullable constructor analysis on runtime we
discovered what appears to be a missing annotation in
`DataTableReaderListener`.

Note: the second `if` check in the constructor seems like dead code.
It's checking for the field to be non-null before ever setting the field
to a value. Probably could be deleted.
2020-08-15 05:44:43 -04:00
Krzysztof Wicher 12f8e34fec Nullable: System.Xml, part 6 (XSLT minus XSLT.Runtime) (#40368)
* Nullable: System.Xml, part 6 (XSLT minus XSLT.Runtime)

* change Evaluate to take non-nullable

* apply pr feedback

* fix nullability merge conflicts

* apply feedback
2020-08-15 10:44:47 +02:00
Andrew Au f35d747e8d Generational aware analysis based on environment variable. (#40332) 2020-08-14 23:52:14 -07:00
Ryan Lucia 71c83f38bc [mono] Make bundle filename changes netcore-only (#40845) 2020-08-15 01:18:38 -03:00
Santiago Fernandez Madero 1dbdb8b787 Move Font*, Image* and Margins converters to System.Drawing.Common and apply Unit and Name converter (#40825)
* Move Font, Image, and Margins converters to System.Drawing.Common

* Add FontUnit converter and FontName converter to Font properties

* Fix Unix tests

* Sort Compile items
2020-08-14 20:58:30 -07:00
Mike McLaughlin 1d6fc683c6 Fix stack overflow createdump triggering on Windows (#40869) 2020-08-15 03:45:52 +00:00
lindexi 89073400fd Ignore the executable file be deleted in Process Start (#40748) 2020-08-14 20:37:53 -07:00
Eugene Rozenfeld 7742b574c0 Fix TailCallStress mode. (#40698)
Improve validation of tail calls that are not tail-prefixed in the IL
but are marked as such because of TailCallStress. We now do the same
correctness validation in morph for such tail calls as we do for
implicit tail calls. That blocks tail calls when we have address-taken
locals, struct promoted params, and pinned vars.

Fixes #39398.
Fixes #39309.
Fixes #38892.
Fixes #38889.
Fixes #38887.
Fixes #37117.
Fixes #8017.
2020-08-14 19:33:05 -07:00
Steve Harter dc6ad2a89c Change null handling in custom converters for backwards compat (#40859) 2020-08-14 19:28:40 -07:00
Layomi Akinrinade 99829d5017 Throw when non-nullable struct converters indicate that they handle nullable structs (#40824)
* Wrap non-nullable struct converters in NullableOfT converter when
they explicitly handle nullable structs

* Throw exception instead of being nice

* Improve exception message
2020-08-14 19:24:36 -07:00
Jimmy Bogard 2564f1acff Adding support for constrained open generics to DI (#39540)
* Porting changes from https://github.com/dotnet/extensions/pull/536

* Correcting reference

* Avoiding wrapping exception as there may be other reasons why closing the generic type fails other than constraint failure
2020-08-15 02:19:55 +00:00
Anirudh Agnihotry 3bb51130cf Fixing the allconfig build. (#40812)
* fixing all config build

* address feedback
2020-08-14 18:28:46 -07:00
Sung Yoon Whang c67684bead Fix a deadlock in EventSource and CounterGroup (#40259)
* Fix a deadlock in CounterGroup and EventSource

* add more comments

* Add some more comments

* PR feedback

* Add comments
2020-08-14 17:27:34 -07:00
Jan VorlicekandJan Kotas 75495b7739 Fix ilasm, ildasm, crossgen and others launch from PATH (#40791)
* Fix ilasm, ildasm and crossgen launch from PATH

When trying to launch ilasm, ildasm, crossgen or any tool using
PAL_Initialize that are on the current PATH just by their file names,
they were crashing with SIGSEGV.
The problem was that the current exe path was extracted incorrectly
in that case.

This change fixes the problem using the same methods that corerun
uses to figure out the current exe path.

* Add missing FreeBSD headers

* Reflect PR feedback

* Update src/coreclr/src/pal/src/init/pal.cpp

* Fix typo in Solaris version of the code

Co-authored-by: Jan Kotas <[email protected]>
2020-08-15 02:17:14 +02:00
Alexander NikolaevandChris Ross 12f46e41eb Set MaxConcurrentStreams = 100 on new Http2Connection until first SETTINGS frame (#40779)
* Set MaxConcurrentStreams = 100 on new Http2Connection until first SETTINGS frame

* Update src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs

Co-authored-by: Chris Ross <[email protected]>

* - Setting infinite MaxConcurrentStreams fixed
- Test verifying new connection request queueing added

* More tests

* - const case fixed
- Outerloop attributed added

* ExtraStreams case fixed

Co-authored-by: Chris Ross <[email protected]>
2020-08-14 17:09:06 -07:00
Sergey Aseev a62b38d052 Move content type verification to a later stage (#40594)
* Move content type verification to a later stage

Fix #38713

* Rename ValidateContent to ValidateContentType

Fix #38713

* Get rid of content type check

* Add newline at end of the file

* Rename TestValidMediaTypes to TestVariousMediaTypes
2020-08-14 15:07:24 -07:00
Carlos Sanchezandcarlossanlop 6ed1e41e59 Ensure FileStatus and FileSystemEntry Hidden and ReadOnly attributes are retrieved the same way (#40641)
* Ensure FileStatus and FileSystemEntry IsHidden attribute is retrieved the same way

* Add missing check in public property FileSystemEntry.IsHidden. Address PR suggestions.

* Add tests for Hidden and ReadOnly attribute check for each platform. Split existing Skip attribute test into different platforms.

* Use _initialAttributes instead of Attributes for IsHidden. Add comment on top.

Co-authored-by: carlossanlop <[email protected]>
2020-08-14 13:04:28 -07:00
Marie Píchová 6cc7cffaff Fix timing issues with Http2_PingKeepAlive test. (#40788) 2020-08-14 21:14:56 +02:00
Alexander Nikolaev 056f728bc2 Flaky multiple HTTP/2 connection tests read full request body (#40844)
There are 2 flaky HTTP/2 tests verifying multiple connections feature which are randomly failing on CI, but not locally.
- Http2_MultipleConnectionsEnabled_ConnectionLimitNotReached_ConcurrentRequestsSuccessfullyHandled
- Http2_MultipleConnectionsEnabled_IdleConnectionTimeoutExpired_ConnectionRemovedAndNewCreated

It seems the failure is caused by not reading the request body. In current implementation, `Http2LoopbackServer` read only HEADERS frame via `ReadRequestHeaderAsync` and then immediately sends response. However, the client firstly completely sends headers and body and only then starting reading a response. Thus, it seems to get blocked sometimes if the server didn't read the full body. This PR fixes this by calling `ReadAndParseRequestHeaderAsync` instead of `ReadRequestHeaderAsync`.

Fixes #40436
Fixes #40115
2020-08-14 21:13:41 +02:00
Benjamin Bartels 46a563a551 Applied BinaryPrimitives throughout CoreLib (#37582) 2020-08-14 11:53:59 -07:00