Carol Eidt [Fri, 10 Apr 2020 01:22:29 +0000 (18:22 -0700)]
Add IR support for multireg lclVars & intrinsics
Carol Eidt [Wed, 15 Apr 2020 20:02:20 +0000 (13:02 -0700)]
Fix some flag uses (#34969)
* Fix some flag uses
Tomáš Rylek [Wed, 15 Apr 2020 19:39:33 +0000 (21:39 +0200)]
Script changes enabling composite R2R build with shared framework (#34661)
Jason Pugsley [Wed, 15 Apr 2020 17:27:14 +0000 (03:27 +1000)]
Add FreeBSD-specific SONAME versions to portable OpenSSL probing.
The version of OpenSSL installed will depend on the version of FreeBSD and
whether OpenSSL has been updated from the FreeBSD Ports collection.
The order of attempted loading is:
libssl.so.11 (ports)
libssl.so.111 (base FreeBSD using OpenSSL 1.1.1)
libssl.so.8 (base FreeBSD using OpenSSL 1.0.2)
Alexander Nikolaev [Wed, 15 Apr 2020 17:16:45 +0000 (19:16 +0200)]
Close timeout increased to 20 seconds (#34999)
CloseOutputAsync_Cancel_Success tests are failing due to 2 reasons:
1. `Assert` expecting the state to be `Aborted`, finds it's `Open` - most frequent
2. Connection gets forcibly terminated on a connect attempt
However, the second failure type is not specific to this test because it affects many tests in different types during the same time. Thus, it seems to be an infra issue.
This PR fixes only the first failure type by increasing Close operation timeout.
Fixes #1725
Stephen Toub [Wed, 15 Apr 2020 17:13:37 +0000 (13:13 -0400)]
Simplify KnownHeaders lookup in SocketsHttpHandler (#34974)
* Simplify KnownHeaders lookup
* Update src/libraries/System.Net.Http/src/System/Net/Http/Headers/KnownHeaders.cs
Co-Authored-By: David Shulman <david.shulman@microsoft.com>
Co-authored-by: David Shulman <david.shulman@microsoft.com>
monojenkins [Wed, 15 Apr 2020 16:09:03 +0000 (12:09 -0400)]
[metadata] Identify when a field is overlapped by a non-object field (#34745)
- Fix class loader to identify when the class has a field overlapped by a non-object field.
- Fix method-to-ir to forward the TypeLoad error.
- Fix transform to forward the TypeLoad error.
- Fix unit test that has a class with a field that is overlapped by a non-object field.
Fixes https://github.com/dotnet/runtime/issues/34388
Co-authored-by: thaystg <thaystg@users.noreply.github.com>
Andrew Au [Wed, 15 Apr 2020 16:00:28 +0000 (09:00 -0700)]
Fix Span length in TryFormatUInt64Slow (#34840)
* Make the Span length right
* Adding a regression test for the span problem
* Avoid dependency on machine locale
* Using customFormat
Marcus Turewicz [Wed, 15 Apr 2020 13:41:07 +0000 (23:41 +1000)]
Adds AssertContentsAgainstJsonNet to avoid unnecessary calls (#34931)
* Adds AssertContentsAgainstJsonNet to avoid unnecessary calls
Fixes #32351
* Remove temporary hack comments
Omair Majid [Wed, 15 Apr 2020 12:23:20 +0000 (08:23 -0400)]
Fix pal_io.c code based on code review suggestions (#34970)
These suggestions were provided by @lpereira on
https://github.com/dotnet/corefx/pull/42900
Marek Safar [Wed, 15 Apr 2020 12:20:46 +0000 (14:20 +0200)]
Fix section reference (#34992)
Zoltan Varga [Wed, 15 Apr 2020 09:34:16 +0000 (05:34 -0400)]
Add wasm cross compiler to the mono build. (#34935) (#34972)
Marie Píchová [Wed, 15 Apr 2020 08:57:27 +0000 (10:57 +0200)]
System.Net.Http ref sources regenerated. (#34961)
monojenkins [Wed, 15 Apr 2020 08:44:56 +0000 (04:44 -0400)]
Fix missing array ctor(int32,int32) test failures. (#34764)
According to ECMA, VES should add the following methods to arrays:
* A constructor that takes a sequence of int32 arguments, one for each dimension of the array, that specify the number of elements in each dimension beginning with the first dimension. A lower bound of zero is assumed.
* A constructor that takes twice as many int32 arguments as there are dimensions of the array. These arguments occur in pairs—one pair per dimension—with the first argument of each pair specifying the lower bound for that dimension, and the second argument specifying the total number of elements in that dimension.
* Get.
* Set.
* Address.
In Mono's case we only added the `ctor (int32, int32)` for rank 1 arrays if they were "jagged" array. Array with rank 1-4 executed an optimized code path always using the one int32 per rank constructor.
This doesn't work in cases where the array is constructed using both a length and a lower bound pattern, like:
`newobj instance void int32[10000...10005]::.ctor(int32, int32)`
this would trigger a method not found exception, since its not a jagged array, Mono wouldn't add the `ctor(int32, int32)` constructor for this type.
Fix will make sure we follow ECMA's definition of this and fix code to use right instance methods of arrays. Code also adds an assert to trap if a jagged array is created through this code path
(shouldn't happen) since current implementation would have handled it as
a 2 ranked array.
Fix also adds several tests into iltests.il allocating different variations of arrays using lower/upper bounds and validating length, rank, upper/lower bounds of allocated arrays.
Co-authored-by: lateralusX <lateralusX@users.noreply.github.com>
Levi Broderick [Wed, 15 Apr 2020 07:05:18 +0000 (00:05 -0700)]
Remove outdated CoreFx.Private.TestUtilities.Unicode references (#34981)
* Remove outdated CoreFx.Private.TestUtilities.Unicode references
* Update System.Globalization.Extensions.Nls.Tests dependencies
* Add System.Runtime.Nls.Tests to System.Runtime.sln
* Add missing .sln entry
Santiago Fernandez Madero [Wed, 15 Apr 2020 01:10:28 +0000 (18:10 -0700)]
Fix PrinterSettings.SupportsColor to use the right PInvoke (#34651)
* Fix PrinterSettings.SupportsColor to use the right PInvoke
* PR Fedback
* Fix test
* PR Feedbak
Reza Jooyandeh [Tue, 14 Apr 2020 23:55:10 +0000 (16:55 -0700)]
Fix NullReference on JsonExtensionData (#34569)
* Fix NullReference on JsonExtensionData
Fix NullReferenceException on serialization when JsonExtensionData dictionary has a custom JsonConverter.
Fix #32903
* Add test for converters declared through attribute
* Ensure custom serialization is not used for reading JsonExtensionData
* Cover all the combinations in tests
Omair Majid [Tue, 14 Apr 2020 22:51:31 +0000 (18:51 -0400)]
Sync cgroup v2 in libraries with coreclr (#34665)
This commit brings in two changes from coreclr to libraries:
1. https://github.com/dotnet/runtime/pull/980
"Fix named cgroup handling in docker"
This fixes getting cgroup information for named cgroups inside containers.
2. https://github.com/dotnet/runtime/pull/34334
"Add cgroup v2 support to coreclr"
This is essentially the same change pushed to corefx (now libraries)
to add cgroupv2 support, but this newer coreclr change has one major
difference: it determines whether the system is using cgroup v1 or
cgroup v2 once, and then explicitly uses that (only). This avoids
issues on systems where both cgroup v1 and v2 are enabled, (but only
one is being used by default).
TalAloni [Tue, 14 Apr 2020 22:51:14 +0000 (01:51 +0300)]
HttpClientMiniStressTest: Disable parallelism (#34941)
* Update HttpClientMiniStressTest.cs
Currently, it's possible for 4 different instances of SingleClient_ManyGets_Sync to run in parallel, each using up to 2 x 5000 sockets, totaling in 40,000 sockets. way beyond the original intent of testing 5000 client instances. since this additional stress is random in nature, I believe it is not intentional.
This change make sure that those tests will not run in parallel, this avoids some issues I've encountered in some systems.
* HttpClientMiniStressTest: Disable Parallelism: Used CollectionAttribute on the base class
Tomáš Rylek [Tue, 14 Apr 2020 22:17:52 +0000 (00:17 +0200)]
Update issues.targets to baseline recent Crossgen2 bugs (#34917)
I have also expanded the timeout from 150 to 200 minutes as
my several recent attempts to run the runtime-coreclr crossgen2
pipeline timed out on Windows.
Thanks
Tomas
Simon Nattress [Tue, 14 Apr 2020 22:14:42 +0000 (15:14 -0700)]
Call `SetParentAssembly` when binding from native manifest (#34924)
In large version bubble mode, Crossgen2 uses the native manifest table to encode assembly references. When a referenced module is decoded and an `AssemblySpec` is created, set the parent assembly for the bind.
Fixes Loader\binding\tracing\BinderTracingTest.Basic regression, which checks parent assembly is correctly set in the bind result.
Manish Godse [Tue, 14 Apr 2020 22:04:30 +0000 (15:04 -0700)]
Fix for runtime constraint checking for default interface methods (#34889)
* pass in InstantiationContext to check constraints.
* add a test
Clinton Ingram [Tue, 14 Apr 2020 20:59:56 +0000 (13:59 -0700)]
Improve crossgen HWIntrinsics handling (#34849)
* improve crossgen HWIntrinsics handling
* use fIsPlatformSubArchitecture for all x64 checks
Santiago Fernandez Madero [Tue, 14 Apr 2020 20:45:15 +0000 (13:45 -0700)]
Use ICU on Windows when available (#34645)
* Use ICU when available on Windows
* Fix System.Globalization tests
* Fix System.Globalization.Extensions tests
* Fix System.Runtime tests
* Add System.Globalization.Nls.Tests to test UseNls runtime switch
* Add System.Globalization.Extensions.Nls.Tests to force them to run on NLS
* Add System.Runtime.Nls.Tests.csproj to test Nls behavior
* Fix left over from GlobalizationTestMode
* PR Feedback
* PR Feedback 2
* Fix mono build
* Fix failing tests
* Fix typo
* Fix bad merge in projitems for tvOS
* PR Feedback 3
* PR Feedback 4
Stephen Toub [Tue, 14 Apr 2020 20:17:36 +0000 (16:17 -0400)]
Add some more common response headers to KnownHeaders (#34922)
Zoltan Varga [Tue, 14 Apr 2020 19:40:05 +0000 (15:40 -0400)]
Fix an uninitialized variable error introduced by #34877. (#34951)
Santiago Fernandez Madero [Tue, 14 Apr 2020 19:39:05 +0000 (12:39 -0700)]
Revert "Add wasm cross compiler to the mono build. (#34935)" (#34968)
This reverts commit
b134994b40eaecd98051362f076be4e23f904944.
Layomi Akinrinade [Tue, 14 Apr 2020 18:24:23 +0000 (14:24 -0400)]
Add JsonIncludeAttribute & support for non-public accessors (#34675)
* Add JsonIncludeAttribute & support for non-public property accessors
* Address review feedback
* Remove extra reflection call for non-public properties
Tomas Weinfurt [Tue, 14 Apr 2020 16:51:39 +0000 (09:51 -0700)]
use curl with OpenSSL backend on 16.04-cross based containers (#34909)
* use curl with OpenSSL backend
* update docs
Zoltan Varga [Tue, 14 Apr 2020 16:39:42 +0000 (12:39 -0400)]
Add wasm cross compiler to the mono build. (#34935)
* Add wasm cross compiler to the mono build.
* Address comments.
* Fix typo
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
Swaroop Sridhar [Tue, 14 Apr 2020 15:44:50 +0000 (08:44 -0700)]
Single-File: Add a test case with Resource Assemblies (#34736)
Add a test to verify that resolution of deps.json files directly from bundle succeeds when there are resource assemblies.
Günther Foidl [Tue, 14 Apr 2020 14:58:39 +0000 (16:58 +0200)]
Better codegen / perf form Math.Max and Math.Min (#33851)
* Forced inline of Math.Min/Max double/float
* Math.Min split in fast and slow
* Math.Min another try
* Added more tests to Math
* Picked variant "MinReorder"
Egor Bogatov [Tue, 14 Apr 2020 12:37:11 +0000 (15:37 +0300)]
[mono] Add iOS app builder project (#34563)
* Add iosAppBuilderTasks project
* Escape spaces in ProjectName
* Remove add_definitions(-DDEVICE)
* Fix typoe Buillder -> Builder, also build the task as part of mono runtime
* Rewrite HelloiOS sample (to use the task)
* Fix build
* Clean up
* Add license headers
* Clean up
* dont build app if provisionig is not set
* Add ExcludeFromAppDir input argument, remove stopwatch
* Drop DOTNET_SYSTEM_GLOBALIZATION_INVARIANT
* Address feedback
* Validate input
* fix build
* Disable GenerateXcodeProject by default
* move to mono/msbuild
* Add OutputDirectory property
* Fix sample
* Minor improvements
* fix build issues
monojenkins [Tue, 14 Apr 2020 11:46:55 +0000 (07:46 -0400)]
Fix infrequent/random crashes on Windows x64 due to use of GC forwarded objects. (#34694)
Hard to repro and very infrequent crash. Have been analyzing a couple of crash dumps from retail devices getting different crashes related to vtable "corruption" on Windows x64. After some deeper analysis it turns out the object instance has been forwarded by GC (object vtable pointers lowest bit set to 1), but object still holds tagged vtable. This will then cause misaligned reads, getting back random values and pointers from vtable on next object access.
After some further analyzing it turns out that LLVM codegen and some specific generic vt arrays lowering can cause optimized mem copies using XMM registers. I have also identified scenarios where vt copies gets lowered into a c-runtime memcpy that in turn uses XMM registers as an optimization. Since Windows x64 currently don't include XMM registers in context, any references in XMM registers will not be visible and pinned by GC, meaning that they will point to potentially
forwarded objects after completing GC, restarting threads, leading to these infrequent random crashes.
Fix includes xmm0-xmm15 into MonoContext on Windows x64, making sure GC will see all references that could be held in those registers, regardless if getting into those registers due to LLVM optimization or other native code, like memcpy.
Co-authored-by: lateralusX <lateralusX@users.noreply.github.com>
Ankit Jain [Tue, 14 Apr 2020 05:21:40 +0000 (01:21 -0400)]
Merge pull request #34754 from monojenkins/sync-pr-19490-from-mono
[wasm][debugger] Improve some valuetype visualization
Zoltan Varga [Tue, 14 Apr 2020 04:55:15 +0000 (00:55 -0400)]
[wasm] Disable the AOT cache check on wasm as well. (#34880)
Zoltan Varga [Tue, 14 Apr 2020 02:23:38 +0000 (22:23 -0400)]
[runtime] Try to load assemblies from bundles on netcore before trying other methods, the ALC might not be initialized yet. (#34877)
Adeel Mujahid [Tue, 14 Apr 2020 01:20:44 +0000 (04:20 +0300)]
Port Native libraries to SunOS (#34867)
Jeff Handley [Tue, 14 Apr 2020 00:31:36 +0000 (17:31 -0700)]
Update ownership of Buffers and Drawing (#34928)
David Mason [Tue, 14 Apr 2020 00:31:19 +0000 (17:31 -0700)]
Update ELT Hooks - tail calls.md (#34926)
mrj001 [Mon, 13 Apr 2020 23:26:38 +0000 (17:26 -0600)]
Issue incorrect exception message (#34416)
* Created unit test to trigger incorrect error message. This also covers a previously uncovered branch.
* Added string resource for the fractionDigits error, and changed the error message being thrown when the derived type has a larger fractionDigits value than the parent type.
Anirudh Agnihotry [Mon, 13 Apr 2020 22:34:41 +0000 (15:34 -0700)]
enables test (#34911)
Egor Bogatov [Mon, 13 Apr 2020 21:37:05 +0000 (00:37 +0300)]
[mono] Implement Sse41, Pclmulqdq, Aes and enable Sse41 intrinsics (#34866)
* Implement Sse41, Pclmulqdq and Aes, enable Sse42.
Stephen Toub [Mon, 13 Apr 2020 21:19:41 +0000 (17:19 -0400)]
Reimplement System.Net.Http's ObjectCollection<T> to reduce allocation / interface dispatch (#34902)
The current implementation of `ObjectCollection<T>` wraps a `List<T>` and derives from `Collection<T>`. This means that every `ObjectCollection<T>` allocated also involves an extra `List<T>` object (and its array if items are added to it) as well as multiple levels of indirection on each operation.
We can instead just implement `ObjectCollection<T>` directly. Since most uses end up with just a single object contained (e.g. for a `MedaTypeHeaderValue`'s `CharSet`), and since it only ever stores `T`s that are non-null classes, we can use the items field to be either a `T` or a `T[]`, optimizing for the case where a single element is stored. In implementing it directly, we then also avoid the extra `List<T>` object allocation, as well as the interface dispatch that results from going through the `IList<T>` interface.
Maoni Stephens [Mon, 13 Apr 2020 21:05:41 +0000 (14:05 -0700)]
Code cleanup (#34862)
made these #define's always defined -
INTERIOR_POINTERS
MARK_ARRAY (replace it with BACKGROUND_GC)
SEG_MAPPING_TABLE
GROWABLE_SEG_MAPPING_TABLE
got rid of code associated with GC_STATS, recursive_gc_sync and the following configs:
GCStressMix, GCStressStep, GCStressMaxFGCsPerBGC, GCMixLog, GCStressStart and GCStressStartAtJit.
got rid of all the unnecessary UNREFERENCED_PARAMETER
got rid of MAYBE_UNUSED_VAR
for joins, got rid of all the extra pairs of checking for #ifdef MULTIPLE_HEAPS and made code styling consistent
got rid of various other pieces of unused code and completely pointless comments.
note there is one functional change: fixed a memory leak by actually doing seg_table->delete_old_slots
when FEATURE_BASICFREEZE is defined; previously this could be leaking memory if there were more than 600
segments (which is very rare for ro segs) and it only leaks a small amount memory in that case.
Co-authored-by: Maoni Stephens <maonis@ntdev.microsoft.com>
Egor Bogatov [Mon, 13 Apr 2020 20:33:02 +0000 (23:33 +0300)]
Fix HostPolicyMock (corehost_error_writer_fn was moved) (#34903)
Bruno Garcia [Mon, 13 Apr 2020 20:32:24 +0000 (17:32 -0300)]
fix: distinct from streams (#34918)
Layomi Akinrinade [Mon, 13 Apr 2020 19:30:00 +0000 (15:30 -0400)]
Add logic for JsonIgnoreCondition[Never|WhenNull] on properties to win over global IgnoreReadOnlyValues (#34672)
Santiago Fernandez Madero [Mon, 13 Apr 2020 19:22:34 +0000 (12:22 -0700)]
Add support to pass subset without arg specifier in Unix (#34844)
* Add support to pass subset without arg specifier in Unix
* PR Feedback
* Fix regex expression to match whole word
Aaron Robinson [Mon, 13 Apr 2020 18:22:12 +0000 (11:22 -0700)]
Fix bug in test regarding GC'd delegate instance. (#34901)
Tom Deseyn [Mon, 13 Apr 2020 17:14:12 +0000 (19:14 +0200)]
Console.Unix: avoid deadlock between LazyInitializer and Console.Out (#34297)
* Console.Unix: avoid deadlock between LazyInitializer and Console.Out
* Add assert for InternalSyncObject
* Console: use Interlocked for lazy initialization
* Cleanup unused 'using'
* Limit locking to event handlers
* Fix AllowNull -> NotNull
* Localize LazyInitializer.EnsureInitialized logic
* Remove lazy initialize delegates
* Use static local functions for initializing
* Remove unused EnsureInitializedDisposableCore
* Remove unused arg from EnsureInitializedStdInReader
* Also EnsureInitialize when not redirected
* Dispose Console Streams with their Reader/Writer
* Fix s_out -> s_error
* leaveOpen streams, fix Encoding set race
* Fix races between Encoding en initializers of In/Out/Error
* Remove EnsureInitialized
* Cleanup
* Rename static local initializer functions to EnsureInitialized
* Use lock in Input/OutputEncoding
* Rename InternalSyncObject to s_syncObject
* Cleanup space
* Fix _isStdErrRedirected -> _isStdInRedirected
* Remove space
* Improve comments
* Fix potential CancelKeyPress deadlock
* Apply suggestions from code review
Co-Authored-By: Stephen Toub <stoub@microsoft.com>
* Remove unnecessary null forgiving
* Add comment about why we're not Disposing StdInReader
* Add Volatile.Writes for Volatile.Read fields
* More Volatile.Writes
* Add back lock to SetIn
Co-authored-by: Stephen Toub <stoub@microsoft.com>
GeorgeAlexandria [Mon, 13 Apr 2020 16:55:40 +0000 (19:55 +0300)]
Append TryGetValue to ImmutableHashSet`1.Builder and ImmutableSortedSet`1.Builder (#34869)
* Append TryGetValue method.
Append method to builder of ImmutableHashSet and ImmutableSortedSet.
Implements #28160.
* Small cleanup.
Marius Ungureanu [Mon, 13 Apr 2020 16:22:28 +0000 (19:22 +0300)]
Use 3-arg Array.Copy in ImmutableArray.CopyTo (#32387)
Zoltan Varga [Mon, 13 Apr 2020 07:18:50 +0000 (03:18 -0400)]
[wasm] Configure the wasm target runtime using --with-lazy-gc-… (#34878)
This flag got lost in the move to mono.proj.
TalAloni [Mon, 13 Apr 2020 00:34:31 +0000 (03:34 +0300)]
LoopbackServer.ReadAsync: Fixed data corruption bug (#34875)
This caused the unused parts of the temp buffer to be copied to buffer, returning 0 to the caller instead of the actual data.
This caused several tests to fail when targeting .NET Standard 2.0
Egor Bogatov [Sun, 12 Apr 2020 18:25:58 +0000 (21:25 +0300)]
Fix corlib and runtime rules in Makefile (#34868)
Levi Broderick [Sun, 12 Apr 2020 17:36:36 +0000 (10:36 -0700)]
Rename CoreFx.Private.TestUtilities.Unicode to TestUtilities.Unicode (#34836)
And explicitly reference it from solutions which consume it
Jan Kotas [Sun, 12 Apr 2020 17:21:31 +0000 (10:21 -0700)]
Fix System.Runtime version referenced by S.R.CS.Unsafe (#34870)
* Fix System.Runtime version referenced by S.R.CS.Unsafe
* Feedback
Eriawan Kusumawardhono [Sun, 12 Apr 2020 14:27:19 +0000 (21:27 +0700)]
remove unused local of genId in BinaryObjectReader (#34865)
Egor Bogatov [Sun, 12 Apr 2020 13:03:23 +0000 (16:03 +0300)]
Move "hostpolicy" pinvokes to Interop.HostPolicy.cs (#34813)
Stephen Toub [Sun, 12 Apr 2020 12:12:33 +0000 (08:12 -0400)]
Optimize HttpDateParser.TryStringToDate (#34860)
* Optimize HttpDateParser.TryStringToDate
When HttpResponseMessage headers are enumerated, even though SocketsHttpHandler adds headers with TryAddWithoutValidation, the enumeration ends up validating them (that's something to be discussed and follow-up on separately). As part of that, it validates the Date header that's required of most responses. It does so using DateTimeOffset.TryParseExact, but using a long list of allowed formats as well as options that knock TryParseExact's processing off the fast path. Since most responses are going to contain a date using RFC1123 format (aka "r"), we just try that first, in a way that will generally result in hitting the optimized "r" code path which is much faster.
* Address PR feedback
Santiago Fernandez Madero [Sun, 12 Apr 2020 12:12:02 +0000 (05:12 -0700)]
Reduce libraries build matrix with mono (#34835)
David Wrighton [Sun, 12 Apr 2020 10:20:01 +0000 (03:20 -0700)]
Fix incorrect behavior noted while compiling large aspnet application with debug build of compiler (#34842)
- Multi-thread handling of UnboxingMethodDesc was incorrect. It would result in incorrect caching of fixups to unboxing methods
- ldtoken of a static method on a valuetype should not refer to an unboxing stub
Stephen Toub [Sat, 11 Apr 2020 18:21:37 +0000 (14:21 -0400)]
Several allocation reductions in SocketsHttpHandler (#34724)
* Remove state machine allocation for SendWithNtConnectionAuthAsync
Just manually inline the tiny helper that's only used from one call site.
* Remove unnecessary HeaderStoreItemInfo allocations
For the common case of a raw string, let the dictionary store the raw string directly rather than always wrapping it in a HeaderStoreItemInfo.
* Cache Date and Server response header values
For Server, we expect it to be the same for every request on the same connection.
For Date, if we're making lots of requests in a high-throughput fashion, we expect many responses on the same connection to have the same value.
In both cases, we compare the received value against the last one received, and if it's the same, reuse the same string.
Prashanth Govindarajan [Sat, 11 Apr 2020 17:33:54 +0000 (10:33 -0700)]
More analyzer changes (#34843)
dotnet-maestro[bot] [Sat, 11 Apr 2020 16:58:05 +0000 (16:58 +0000)]
Update dependencies from https://github.com/mono/linker build
20200410.1 (#34851)
- ILLink.Tasks: 5.0.0-preview.3.20209.2 -> 5.0.0-preview.3.20210.1
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Adeel Mujahid [Sat, 11 Apr 2020 16:03:18 +0000 (19:03 +0300)]
Add native configurations for SunOS (#34756)
Matthew R Johnson [Sat, 11 Apr 2020 15:55:51 +0000 (16:55 +0100)]
HttpWebRequest allow returning redirect response (#34560)
* HttpWebRequest allow returning redirect response
Throw WebException for 3xx responses only when `AllowAutoRedirect = true`
Fixes #1074
* Simplify status code check
Sergio Pedri [Sat, 11 Apr 2020 15:44:34 +0000 (17:44 +0200)]
Fixed a typo in ValueType.cs (#34854)
Miha Zupan [Sat, 11 Apr 2020 14:43:15 +0000 (16:43 +0200)]
Reduce allocations in UriHelper.StripBidiControlCharacters (#34794)
* Reduce allocations in UriHelper.StripBidiControlCharacters
* Use Span in StripBidiControlCharacters
* Span > char*
Stephen Toub [Sat, 11 Apr 2020 13:40:31 +0000 (09:40 -0400)]
Add test for DOTNET_SYSTEM_THREADING_POOLASYNCVALUETASKS (#34818)
Miha Zupan [Sat, 11 Apr 2020 13:39:52 +0000 (15:39 +0200)]
Fix System.Private.Uri.sln hang on load (#34848)
Thorsten Reichert [Sat, 11 Apr 2020 09:48:57 +0000 (11:48 +0200)]
Enable test in System.Reflection.Extensions (#6445) (#34815)
Fixes #6445.
Enabled GetCustom_Attribute_On_Return_Parameter_On_Parent_Method in System.Reflection.Extension Tests.
Note: had to change the attribute to inherit true on the parent class, so that the attribute could actually be retrieved from the derived class
* port CoreClr fix (https://github.com/dotnet/coreclr/pull/6745) to Mono
apply the same check for parameter position = -1 in Mono as is done in CoreClr
monojenkins [Sat, 11 Apr 2020 07:41:22 +0000 (03:41 -0400)]
[wasm][bcl] Handle correctly backslash in file name (#34746)
- Modify IO file to assign backslash to alternate directory separator by default
- Add tests for issue https://github.com/mono/mono/issues/18933
closes: https://github.com/mono/mono/issues/18933
<!--
Thank you for your Pull Request!
If you are new to contributing to Mono, please try to do your best at conforming to our coding guidelines http://www.mono-project.com/community/contributing/coding-guidelines/ but don't worry if you get something wrong. One of the project members will help you to get things landed.
Does your pull request fix any of the existing issues? Please use the following format: Fixes #issue-number
-->
Co-authored-by: kjpou1 <kjpou1@users.noreply.github.com>
Jan Kotas [Sat, 11 Apr 2020 05:06:21 +0000 (22:06 -0700)]
[R2RDump] Fix x86 gcinfo formatting (#34847)
Fadi Hanna [Sat, 11 Apr 2020 05:04:42 +0000 (22:04 -0700)]
Use canonical method in TransitionFrames whenever we parse signatures (#33733)
* Canonicalize arguments before loading instantiation when dropGenericArgumentLevel is TRUE
* Fix casing in COMPlus_GCStress env variable and remove COMPlus_gcServer
Also changing a bunch of assert() calls to _ASSERTE. Usually when _ASSERTE fails in CI lab runs, we tend to get crash dumps associated with test results, unlike assert() which shows a GUI dialog that DHandler dismisses by clicking on the Abort button.
* Remove gcstress switch.
The test will run with gcstress as part of the gcstress lab runs
David Wrighton [Sat, 11 Apr 2020 05:03:41 +0000 (22:03 -0700)]
FixAcceleratedCompiledMethodEnum (#34841)
- Implementation checked in earlier today resulted in a non-sorted RUNTIMEFUNCTION list which caused unpredictable runtime failures
- Assertions around MethodCodeNode handling in EnumerateCompiledMethods were wrong
Aaron Robinson [Sat, 11 Apr 2020 03:33:29 +0000 (20:33 -0700)]
Remove ActiveIssue from tests. (#34719)
* Remove ActiveIssue from tests.
Update tests to pass since issues are being marked "Won't Fix".
Manish Godse [Sat, 11 Apr 2020 03:26:51 +0000 (20:26 -0700)]
Build corelib as part of libraries build. (#34664)
* simplify libraries build dependencies.
* FIx depends for tests
* Fix artifact name for webAssembly
* try building corelib during libraries build.
* small typo
* Merge coreclr+libraries build scripts
* update scripts based on new refactor
* fix script error
* dont build corelib for mono or testbuilds
* Handle webassembly case
* fix allconfigurations build
* remove separate corelib job
* remove corelib jobs from pipelines
* delete build-corelib-job
* PR feedback
* remove special case for webassembly
now that its dependent on the mono runtimeFlavor
Stephen Toub [Fri, 10 Apr 2020 23:54:09 +0000 (19:54 -0400)]
Add Socket(SocketSafeHandle) ctor (#34727)
Dan Moseley [Fri, 10 Apr 2020 23:46:56 +0000 (16:46 -0700)]
Merge pinvoke guidelines into interop guidelines (#34833)
Stefan Nikolei [Fri, 10 Apr 2020 23:34:21 +0000 (01:34 +0200)]
removed unused vars from System.DirectoryServices.AccountManagement (#34159)
* removed unused vars from System.DirectoryServices.AccountManagement
removed all unused locals and class variables. also added some _ to out vars
* fix build errors.
removed assignments to non existent vars
added one var back because it was used
* remove trailing whitespace
Santiago Fernandez Madero [Fri, 10 Apr 2020 23:05:39 +0000 (16:05 -0700)]
Use repo build script to restore internal tools (#34830)
Aaron Robinson [Fri, 10 Apr 2020 22:31:50 +0000 (15:31 -0700)]
ComWrappers: Add support for ICustomQueryInterface (#34733)
* Add support for falling back to ICustomQueryInterface if the managed object wrapper
doesn't know about the IID but implements the interface.
* The QI on the managed object wrapper is now callable from within the runtime.
This means we can no longer assume we are in preemptive mode during the QI.
Update the ICustomQueryInterface dispatch to be okay with ANY mode.
Dan Moseley [Fri, 10 Apr 2020 21:42:43 +0000 (14:42 -0700)]
subsets help (#34673)
Santiago Fernandez Madero [Fri, 10 Apr 2020 21:30:36 +0000 (14:30 -0700)]
Fix GenerateCoverageReport target in tests.proj (#34829)
Alexander Köplinger [Fri, 10 Apr 2020 21:09:50 +0000 (23:09 +0200)]
Fix installer CI job warnings for iOS/tvOS/Android (#34763)
We don't run tests in the installer for these OSes so the PublishTestResults task complains about missing *.xml result files.
dotnet-maestro[bot] [Fri, 10 Apr 2020 21:06:34 +0000 (17:06 -0400)]
[master] Update dependencies from mono/linker Microsoft/vstest (#34760)
* Update dependencies from https://github.com/microsoft/vstest build
20200408-06
- Microsoft.NET.Test.Sdk: 16.6.0 -> 16.7.0-preview-
20200408-06
* Update dependencies from https://github.com/mono/linker build
20200409.2
- ILLink.Tasks: 5.0.0-preview.3.20207.1 -> 5.0.0-preview.3.20209.2
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Fadi Hanna [Fri, 10 Apr 2020 19:39:49 +0000 (12:39 -0700)]
Remove gcstress switch.
The test will run with gcstress as part of the gcstress lab runs
David Mason [Fri, 10 Apr 2020 18:26:00 +0000 (11:26 -0700)]
Add check for unloaded types in GetAppDomainStaticAddress (#34677)
Fixes #33367
When a module is unloaded, the managed objectref is collected during a GC before the profiler is notified that the module is unloading. That means if you call in to GetAppDomainStaticAddress between when the object is collected and when you are notified about the module unload (GarbageCollectionFinished is a place that will hit this every time) it will cause an AV from trying to use the null objectref.
This fix prevents this AV by checking to see if the object's loaderheap or managed loaderheap object ref are invalid first.
David Wrighton [Fri, 10 Apr 2020 18:01:59 +0000 (11:01 -0700)]
Enumerate compiled methods faster (#34729)
* Enumerate compiled methods faster
- Split up the data structure that holds the list of compiled methods into per module, generic and non-generic method lists.
- Hold IMethodNodes in the data structure instead of MethodDescs
- This delivers a *significant* improvement to compile times for composite image build
- A sample application went from 456 seconds to compile down to 100 seconds in wall clock time
Mike McLaughlin [Fri, 10 Apr 2020 17:22:01 +0000 (10:22 -0700)]
Single-file diagnostic support for SOS. (#34697)
Single-file diagnostic support.
This will allow SOS, dotnet-dump, etc. to work for single-file programs on Linux. An library called runtimeinfo_lib is generated that is to be linked into the single-file superhost containing coreclr.
Added "DotNetRuntimeInfo" export/block containing the symbol index/build ids needed by the diagnostic tools.
Added ICLRRuntimeLocator DAC interface for SOS and other DAC clients so their data targets can provide the single-file runtime base address.
Added the GetModuleIndex tool to get build ids.
PAL fix for single-file superhost.
Fix elfreader allocation assert in debug. The 'new' did not use utilcode overrides but the 'delete' did.
Added a line to the build-job.yml pipeline to build the new clr.diagtools subset before the native coreclr runtime build because it uses the build-runtime scripts directly.
Added a Versions.props property for the Microsoft.FileFormats version and updated it to the latest.
Changed the GetModuleIndex to take an input and output file instead of using output redirection to write it because some messages from the dotnet.cmd script used to run it got written to the output h file.
Added FEATURE_SINGLE_FILE_DIAGNOSTICS cmake flag so build-runtime.sh can work without clr.buildtools subset
Stephen Toub [Fri, 10 Apr 2020 16:51:48 +0000 (12:51 -0400)]
Remove most [Fact(Skip = "...")] in library tests (#34772)
radical [Fri, 10 Apr 2020 16:50:40 +0000 (16:50 +0000)]
[wasm][debugger] Improve some valuetype visualization
- Invoke getters for certain types that we know are safe, like `System.DateTime`
- Use `.ToString()` to show as description for some types, like `System.DateTime`
- Show char symbol along with the code
Fixes:
https://github.com/mono/mono/issues/19380
https://github.com/mono/mono/issues/19381
https://github.com/mono/mono/issues/19411
Miha Zupan [Fri, 10 Apr 2020 16:49:58 +0000 (18:49 +0200)]
Reduce allocations in string.Normalize (#34774)
* Reduce allocations in string.Normalize
* Move stackalloc out of the loop
* Use char* instead of ref char, pin manually
* Mark methods unsafe instead of using unsafe blocks
* Return the original string if unchanged
* Use const for StackallocThreshold
Jacob Lalonde [Fri, 10 Apr 2020 16:41:49 +0000 (12:41 -0400)]
Invalidate FileInfo and DirectoryInfo upon create and delete (#34229)
* Invalidate upon delete and create for fileinfo and directoryinfo
* Add tests, remove directory info test that tested removed behavior
* Add delete test
* Fix typoe in directoryinfo
* Remove new line, and refactor away private method into delete method with paramter
* Change set time tests
* Code review linting as well as test change
* Modify other test that tested prior behavior
* Rework Reset test
* Edits for comments in tests
* Slight method refactor
* Minor test cleanup
Eric StJohn [Fri, 10 Apr 2020 16:32:01 +0000 (09:32 -0700)]
Fix condition for building runtime.native.System.IO.Ports (#34738)
Alexander Köplinger [Fri, 10 Apr 2020 16:16:16 +0000 (18:16 +0200)]
Remove mono/btls directory from source mirror (#34819)
We won't use btls in the netcore mono.
Anirudh Agnihotry [Fri, 10 Apr 2020 15:41:45 +0000 (08:41 -0700)]
use localSystem to start the service (#34802)
Carol Eidt [Fri, 10 Apr 2020 14:56:49 +0000 (07:56 -0700)]
Don't swap base and index if index is float reg (#34771)
* Don't swap base and index if index is float reg
Fix #33363