Tomas Weinfurt [Fri, 4 Sep 2020 18:31:14 +0000 (11:31 -0700)]
hold ref to temp keychain on OSX to avoild premature cleanup (#41787)
* hold ref to temp keychain on OSX to avoild premature cleanup
* feedback from review
Zoltan Varga [Fri, 4 Sep 2020 18:30:32 +0000 (14:30 -0400)]
Add x86/arm64/arm support to the cmake build. Fix issues. (#41860)
Santiago Fernandez Madero [Fri, 4 Sep 2020 17:36:41 +0000 (10:36 -0700)]
Add libraries on mono outerloop build (#41712)
* Add libraries on mono outerloop build
* Flow testscope to helix and default build tfm to netcoreappcurrent
* Adjust correlation payload conditions and PR Feedback
* Disable scheduled runs
* Revert renaming of coreclr outerloop yml
Mitchell Hwang [Fri, 4 Sep 2020 17:19:46 +0000 (13:19 -0400)]
[wasm] Mark System.IO.Compression APIs as unsupported on Browser (#41683)
* [wasm] System.IO.Compression.Brotli enable platform attributes
* Mark System.IO.Compression.Brotli unsupported at assembly level
Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
Egor Bogatov [Fri, 4 Sep 2020 17:12:34 +0000 (20:12 +0300)]
[mono] Fix Android and iOS samples (#41870)
Fixes broken samples for Android and iOS.
`InvariantGlobalization` fixes the issue described in https://github.com/dotnet/runtime/issues/41866 because otherwise ILLink fails on Interop.Globalization.EnumCalendarInfo (with a function pointer).
Tammy Qiu [Fri, 4 Sep 2020 17:11:20 +0000 (13:11 -0400)]
Incorporate timezone data from runtime-assets (#41524)
* Incorporate timezone data from runtime-assets
* Change CreateWasmBundle name & create separate timezones.props file
Ankit Jain [Fri, 4 Sep 2020 16:56:25 +0000 (12:56 -0400)]
[wasm][debugger] Add support for surfacing inherited members (#41480)
* [wasm][debugger][tests] Update to use `TDateTime`
- this ensures that we check the datetime, and some property getters on
it, wherever we have a datetime.
* [wasm][debugger][tests] Add labels to more checks
* [wasm][debugger] Add support for surfacing inherited members
- surface inherited fields, and properties
- we try to support `Runtime.getProperties`'s two arguments:
- `ownProperties`, and `accessorsOnly`
- `ownProperties`: for JS, this means return only the object's own
members (not inherited ones)
- `accessorsOnly`: for JS, this means return all the getters
Actual implementation:
- In practice, VSCode, and Chrome debugger seem to only send
`{ ownProperties: true, accessorsOnly: false }`,
and `{ ownProperties: false, accessorsOnly: true }`. The combination of
which means - that we don't return any inherited fields!
- But we want to show inherited fields too, so to get that behavior we
essentially *ignore* `ownProperties`. IOW,
- `ownProperties`: we return all fields, and properties
- `accessorsOnly`: we return only the getters, including the
inherited ones
- Another thing to note is the case for auto-properties
- these have a backing field
- and we usually return the backing field's value, instead of
returning a getter
- To continue with that, auto-properties are *not* returned for
`accessorsOnly`
- The code in `mini-wasm-debugger.c` does handle these two arguments,
but that is currently disabled by not passing the args to debugger.c at
all
- Instead, we get the *full* list of members, and try to filter it
in `library_mono.js`
- which includes handling property overrides, or shadowing by new
properties/fields in derived classes
* [wasm][debugger][tests] Fix simple warnings
* [wasm][debugger][tests] Fix warnings introduced in this PR
* [wasm][debugger][tests] Fix indentation
* [wasm][debugger] Correctly handle local structs in async methods
- When we have a struct local in an async instance method, it doesn't
get expanded, since we have a containerId (the async object), and we can
expand/access it later.
- When the IDE asks us to expand it with `{accessorPropertiesOnly: true}`:
- we get the expanded json, but `_filter_automatic_properties` tries
to return just the accessors, but that doesn't handle the expanded
members of nested structs!
- That is done in `extract_and_cache_value_types`, which is run *after*
`_filter_automatic_properties`, but by that time we have already
lost the expanded members!
- So, `_get_vt_properties` fails with `Unknown valuetype id`,
because it doesn't have anything to return at that point.
- This is being solved by ignoring the getProperties args in case of
expanding valuetypes.
- that means that we can correctly extract, and cache the whole
object.
- And after that, we can return accessors/others, based on the args.
* [wasm][debugger] Fix warnings in debugger-test-app, and turn on warnAsError
* For some cases, debugger seems to give the actual method name instead of MoveNext for async methods
Mitchell Hwang [Fri, 4 Sep 2020 16:21:48 +0000 (12:21 -0400)]
Mark System.Diagnostics.Process unsupported at assembly level (#41694)
Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
Eric Erhardt [Fri, 4 Sep 2020 13:43:13 +0000 (08:43 -0500)]
DataContractSerialization cleanup (#41824)
* Clean up DataContractSerialization
- Remove DiagnosticUtility.IsFatal, which always returns false.
- Remove dead CreateDelegate method
- Fix a TODO-NULLABLE where MemberInfo will never be null
* Clean up remaining #if USE_REFEMIT and other unused defines in DataContractSerialization
Katelyn Gadd [Fri, 4 Sep 2020 13:05:30 +0000 (06:05 -0700)]
Fix mono_get_obj_type performing a failed assembly load on every call (#41862)
Jakob Botsch Nielsen [Fri, 4 Sep 2020 05:47:26 +0000 (07:47 +0200)]
Properly handle byrefs in tailcall helper stubs (#41815)
* Properly handle byrefs in tailcall helper stubs
Switch to using ByReference instead of using stind.i/ldind.i and relying
on the JIT to report the locations being moved between.
Fixes #41555
* Move NextCallReturnAddress call back
Bruce Forstall [Fri, 4 Sep 2020 05:43:21 +0000 (22:43 -0700)]
Add TailcallStress + GCStress testing to gcstress-extra pipeline (#41827)
Fixes #41825
Carlos Sanchez [Fri, 4 Sep 2020 00:40:36 +0000 (17:40 -0700)]
Revert #40641 (#41817)
Reverts "Ensure FileStatus and FileSystemEntry Hidden and ReadOnly attributes are retrieved the same way"
(commit
6ed1e41e590c41862b993f99c8f401c1935a523a) which introduced a perf regression.
Co-authored-by: carlossanlop <carlossanlop@users.noreply.github.com>
Anton Lapounov [Fri, 4 Sep 2020 00:23:25 +0000 (17:23 -0700)]
Fix Crossgen2 package by using the proper UCRT version (#41784)
Uriel Goncalves [Thu, 3 Sep 2020 23:57:50 +0000 (00:57 +0100)]
Fix configurations obsolete messages (#41835)
Krzysztof Wicher [Thu, 3 Sep 2020 23:32:16 +0000 (01:32 +0200)]
Fix param name in ActivityContext..ctor (#41801)
Krzysztof Wicher [Thu, 3 Sep 2020 23:31:50 +0000 (01:31 +0200)]
Fix argument name in CompareInfo.IsPrefix (suffix -> prefix) (#41803)
Adeel Mujahid [Thu, 3 Sep 2020 22:30:38 +0000 (01:30 +0300)]
Restrict CCompRC::LoadResourceFile and usage to win (#41757)
String resouces packaged as PE files only exist on Windows.
Ilia [Thu, 3 Sep 2020 22:27:32 +0000 (01:27 +0300)]
Replace g_tkCorEncodeToken with CorSigDecodeTokenType() inline function to keep its definition in cor.h (#41797)
Fixes undefined references to g_tkCorEncodeToken when using CorSigCompressToken()
in user projects with shared Profiling API headers like cor.h / corprof.h
See https://github.com/dotnet/runtime/pull/40254#issuecomment-
686485157.
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Egor Chesakov [Thu, 3 Sep 2020 22:21:58 +0000 (15:21 -0700)]
Potential fix for folding of *(typ*)&lclVar for small types #40607 (#40871)
* Add regression test for https://github.com/dotnet/runtime/issues/40607
* Add Runtime_40607.tt
* Add more extensive tests for loads in Runtime_40607.tt Runtime_40607.il
* Enable back failing test in System.Private.Xml.dll
* Fold *(typ*)&lclVar tree when:
1) it is *definitely load* and types of both indirection and local variable have the same signedness (e.g. bool and byte)
2) otherwise, fold the tree and mark the local node with GTF_VAR_FOLDED_IND
and call fgDoNormalizeOnStore() on such nodes' parents in post-order morph.
Mikhail Pilin [Thu, 3 Sep 2020 22:02:58 +0000 (00:02 +0200)]
Fix leaking ICorProfilerCallback10. (#41791)
monojenkins [Thu, 3 Sep 2020 21:56:36 +0000 (17:56 -0400)]
[runtime] Allocate code memory using MAP_JIT on apple silicon, patching code randomly crashes without it. (#41798)
Co-authored-by: vargaz <vargaz@users.noreply.github.com>
Layomi Akinrinade [Thu, 3 Sep 2020 21:16:13 +0000 (14:16 -0700)]
Add JsonNumberHandling.AllowReadingFromString as a JsonSerializer web default (#41539)
* Add JsonNumberHandling.AllowReadingFromString as a JsonSerializer web default
* Add test assertion for number handling option in S.N.H.Json
* Test number-as-string behavior in System.Net.Http.Json
Tomáš Rylek [Thu, 3 Sep 2020 21:15:09 +0000 (23:15 +0200)]
Fix parent assembly for standalone components in Crossgen2 build (#41821)
Noah Falk [Thu, 3 Sep 2020 21:07:37 +0000 (14:07 -0700)]
Add COMPlus env var comment docs (#41707)
We lost our docs at some point, but the key detail is that prepending COMPlus_ to the knob name is the environment variable you need to set. Hoisting that fact right to the top of the file so that people who come looking can find it.
Marek Safar [Thu, 3 Sep 2020 19:45:00 +0000 (21:45 +0200)]
Remove OSPlatformAttribute attributes from wasm linked output (#41799)
Fixes #40163
Koundinya Veluri [Thu, 3 Sep 2020 18:31:32 +0000 (14:31 -0400)]
Fix some interactions between tiering and multi-core JIT (#40948)
Fix some interactions between tiering and multi-core JIT
Issues:
- When a multi-core JIT profile includes a method for which prejitted code is available, and the method contains a loop, when playing back the profile the multi-core JIT of the method disables call counting for the method, then when the method gets called the prejitted code is used but does not get tiered up later. Also hits assertion failures.
- Tier 1 rejits also record the method in the multi-core JIT profile, another case where the above situation can occur
Fixes:
- Only record a method in the multi-core JIT profile for the default code version and only once for the code version
- When playing back a profile, don't disable call counting for a method immediately. Just record some info that may be used later when the method is actually gets called, if the multi-core jitted code gets used, to disable call counting if necessary.
Nikola Milosavljevic [Thu, 3 Sep 2020 18:29:58 +0000 (11:29 -0700)]
Enable runtime closure verification (#41698)
* Enable closure validation
* Ensure dependency graph directory exists
* Netstandard should not be ignored
* Ensure Reports dir exists; VerifyClosure change moved to Arcade
* Upgrade SharedFramework.SDK package to pick up a change for VerifyClosure target
Tomáš Rylek [Thu, 3 Sep 2020 17:46:26 +0000 (19:46 +0200)]
Fix neutral source flag in standalone MSIL component assemblies (#41764)
In composite build mode, we copy the input assemblies to output,
injecting the component R2R headers into them. This process was
missing the logic to set up the READYTORUN_FLAG_PLATFORM_NEUTRAL_SOURCE
flag, causing subsequent AssemblyName mismatches. At this point
I don't plan to back-propagate the change to .NET 5 as Crossgen2
is not yet generally available and this fixes just a corner case in it.
Thanks
Tomas
Sergey Andreenko [Thu, 3 Sep 2020 16:50:32 +0000 (09:50 -0700)]
Mark sizeValue as non faulting. (#41776)
The address of the ind can't be null because it is a prejited location.
However, the value of the indirection could be different, so should not mark as invariant.
Zoltan Varga [Thu, 3 Sep 2020 16:23:17 +0000 (12:23 -0400)]
Add ios support to the cmake build system. (#41710)
* Add ios support to the cmake build system.
* Only link against darwin libs on darwin.
* Add x86_64-apple-darwin10 to offset-tool abis.
* Add aot cross compiler support to the cmake build.
* Disable verifier on the cmake build.
* Add LLVM support.
* Use OS_LIBS in more place.
* Fix the build.
Fan Yang [Thu, 3 Sep 2020 14:22:51 +0000 (10:22 -0400)]
Enable passing tests (#41763)
Jan Kotas [Thu, 3 Sep 2020 08:43:29 +0000 (01:43 -0700)]
Update license headers (#41783)
dotnet-maestro[bot] [Thu, 3 Sep 2020 08:34:10 +0000 (08:34 +0000)]
[master] Update dependencies from mono/linker dotnet/arcade dotnet/runtime-assets dotnet/xharness dotnet/icu (#41591)
[master] Update dependencies from mono/linker dotnet/arcade dotnet/runtime-assets dotnet/xharness dotnet/icu
- Updates:
- Microsoft.NET.ILLink.Tasks: from 6.0.0-alpha.1.20424.3 to 6.0.0-alpha.1.20451.1
- Updates:
- Microsoft.DotNet.GenFacades: from 5.0.0-beta.20427.5 to 5.0.0-beta.20431.4
- Microsoft.DotNet.Build.Tasks.Feed: from 5.0.0-beta.20427.5 to 5.0.0-beta.20431.4
- Microsoft.DotNet.Build.Tasks.Packaging: from 5.0.0-beta.20427.5 to 5.0.0-beta.20431.4
- Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk: from 5.0.0-beta.20427.5 to 5.0.0-beta.20431.4
- Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk: from 5.0.0-beta.20427.5 to 5.0.0-beta.20431.4
- Microsoft.DotNet.CodeAnalysis: from 5.0.0-beta.20427.5 to 5.0.0-beta.20431.4
- Microsoft.DotNet.GenAPI: from 5.0.0-beta.20427.5 to 5.0.0-beta.20431.4
- Microsoft.DotNet.XUnitExtensions: from 5.0.0-beta.20427.5 to 5.0.0-beta.20431.4
- Microsoft.DotNet.Helix.Sdk: from 5.0.0-beta.20427.5 to 5.0.0-beta.20431.4
- Microsoft.DotNet.RemoteExecutor: from 5.0.0-beta.20427.5 to 5.0.0-beta.20431.4
- Microsoft.DotNet.VersionTools.Tasks: from 5.0.0-beta.20427.5 to 5.0.0-beta.20431.4
- Microsoft.DotNet.XUnitConsoleRunner: from 2.5.1-beta.20427.5 to 2.5.1-beta.20431.4
- Microsoft.DotNet.Arcade.Sdk: from 5.0.0-beta.20427.5 to 5.0.0-beta.20431.4
- Microsoft.DotNet.ApiCompat: from 5.0.0-beta.20427.5 to 5.0.0-beta.20431.4
- Updates:
- Microsoft.DotNet.XHarness.CLI: from 1.0.0-prerelease.20424.2 to 1.0.0-prerelease.20431.1
- Microsoft.DotNet.XHarness.TestRunners.Xunit: from 1.0.0-prerelease.20424.2 to 1.0.0-prerelease.20431.1
- Updates:
- Microsoft.NETCore.Runtime.ICU.Transport: from 6.0.0-alpha.1.20428.1 to 6.0.0-alpha.1.20451.1
- Updates:
- System.ComponentModel.TypeConverter.TestData: from 5.0.0-beta.20426.1 to 5.0.0-beta.20451.1
- System.Drawing.Common.TestData: from 5.0.0-beta.20426.1 to 5.0.0-beta.20451.1
- System.IO.Compression.TestData: from 5.0.0-beta.20426.1 to 5.0.0-beta.20451.1
- System.IO.Packaging.TestData: from 5.0.0-beta.20426.1 to 5.0.0-beta.20451.1
- System.Net.TestData: from 5.0.0-beta.20426.1 to 5.0.0-beta.20451.1
- System.Private.Runtime.UnicodeData: from 5.0.0-beta.20426.1 to 5.0.0-beta.20451.1
- System.Security.Cryptography.X509Certificates.TestData: from 5.0.0-beta.20426.1 to 5.0.0-beta.20451.1
- System.Windows.Extensions.TestData: from 5.0.0-beta.20426.1 to 5.0.0-beta.20451.1
- fix Browser-related tests
Tomas Weinfurt [Thu, 3 Sep 2020 06:55:19 +0000 (23:55 -0700)]
look for dhcp lease file in multiple locations (#41016)
Günther Foidl [Thu, 3 Sep 2020 02:55:24 +0000 (04:55 +0200)]
char.IsAscii xml doc comments (#41753)
* char.IsAscii xml doc comments
* Update src/libraries/System.Private.CoreLib/src/System/Char.cs
Co-authored-by: Dan Moseley <danmose@microsoft.com>
Jan Kotas [Thu, 3 Sep 2020 01:35:14 +0000 (18:35 -0700)]
Add LowLevelMonitor (#41736)
* Add LowLevelMonitor
* Fix style and bug
- Prevent CRITICAL_SECTION from moving by allocating it in unmanaged memory
- Refactor to match style used in the rest of System.Native
- Change LowLevelMonitor to struct to avoid unnecessary indirection
Co-authored-by: Koundinya Veluri <kouvel@users.noreply.github.com>
Alexander Köplinger [Wed, 2 Sep 2020 21:23:26 +0000 (23:23 +0200)]
WASM: Add SHA* hash functions (#40486)
This ports the managed SHA* hash functions from https://github.com/microsoft/referencesource so we can use them on Browser/WASM where we don't have OpenSSL.
Enables the System.Security.Cryptography.Algorithms tests for these classes: `Tests run: 271, Errors: 0, Failures: 0, Skipped: 1. Time: 11.857137s`
Resolves https://github.com/dotnet/runtime/issues/40076
Mike McLaughlin [Wed, 2 Sep 2020 19:11:42 +0000 (12:11 -0700)]
Fix cross-OS DAC metadata locator interface callback (#41746)
Anirudh Agnihotry [Wed, 2 Sep 2020 15:08:16 +0000 (08:08 -0700)]
fix version (#41729)
Natalia Kondratyeva [Wed, 2 Sep 2020 13:51:53 +0000 (14:51 +0100)]
Add cache for Socket.LocalEndPoint (#39313)
Added _localEndPoint field to cache LocalEndPoint value. Cached value
is cleared on error and disconnect. If the value is a wildcard
address, it is also cleared on connect and accept.
Fix #1482
Matt Galbraith [Wed, 2 Sep 2020 13:34:46 +0000 (06:34 -0700)]
Create productVersion as part of BlobArtifacts; this is used later by the dotnet-install.* scripts (#41719)
Jan Vorlicek [Wed, 2 Sep 2020 09:21:09 +0000 (11:21 +0200)]
Strip binaries more aggressively (#41039)
* Strip binaries more aggressively
We are currently stripping only debug symbols, but there are also other
symbols that can be stripped without affecting debuggability or anything
else. We were stripping the binaries in corefx that way in the past,
but some time ago we have unified the stripping between the former
three repos and started to strip just the debugging symbols.
This change strips all unneeded symbols, which results in significant
reduction of the binaries sizes. For example, libcoreclr.so went down
from 8732272 to 7027024 or libSystem.Security.Cryptography.Native.OpenSsl.so
went down from 163376 to 120952.
* Fix FreeBSD
* Fix FreeBSD and OSX
We use nm command to extract g_dacTable symbol value from libcoreclr
for the DAC purposes. On OSX, there are no dynamic symbols, on
FreeBSD, the stripping strips all regular symbols and leaves
dynamic ones only. So the nm needs to get a -D argument for
non OSX.
Jan Vorlicek [Wed, 2 Sep 2020 08:51:44 +0000 (10:51 +0200)]
Fix multiple version strings in coreclr shared libraries (#41711)
We were incorrectly adding the version.c source to all coreclr
libraries and not just the shared ones. That caused multiple
occurences of the version string in coreclr shared libraries
composed of sublibraries.
This change fixes it by adding that source file for shared
libraries only.
I've also discovered that libcoreclrtraceptprovider.so was
missing the version string completely, so I've added it there.
Adeel Mujahid [Wed, 2 Sep 2020 03:25:22 +0000 (06:25 +0300)]
Delete multi-byte related functions from PAL (#41611)
* Delete multi-byte related functions from PAL
In PAL, delete:
* `IsDBCSLeadByte`; unimplemented.
* `IsDBCSLeadByteEx`; no-op.
* `GetCPInfo`; has hardcoded length of 4, and the only usage checks for
`length == 1`.
* `_mbsinc`; has one usage in ilasm, which is simplified for Unix
(after the removal of above).
* `_mbsninc`; unused.
* `_mbsdec`; usage is inlined as `p--` because `IsDBCSLeadByteEx` is a
no-op.
* `GetCaseInsensitiveValueA`, handle ANSI cases as Unicode.
* `IsTextUnicode`, single usage in ilasm is inlined.
* Delete _MBCS, _ismbblead and simplifications
* Delete trailing whitespaces from PR file changed
Geoff Kizer [Wed, 2 Sep 2020 02:31:14 +0000 (19:31 -0700)]
Remove System.Net.Connections and related features (#41648)
* remove System.Net.Connections and related features
* cleanup csproj changes
* Update src/libraries/pkg/baseline/packageIndex.json
Co-authored-by: Cory Nelson <phrosty@gmail.com>
* Update src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Tasks.cs
Co-authored-by: Cory Nelson <phrosty@gmail.com>
Co-authored-by: Geoffrey Kizer <geoffrek@windows.microsoft.com>
Co-authored-by: Cory Nelson <phrosty@gmail.com>
Jan Vorlicek [Wed, 2 Sep 2020 01:12:28 +0000 (03:12 +0200)]
Fix issue with covariant return method validation (#41703)
The ClassLoader::ValidateMethodsWithCovariantReturnTypes was being called
from a place where the relevant types were sometimes not fully loaded yet.
That resulted in an attempt to load the type being loaded recursively,
which was detected and the TypeLoadException was thrown.
This change fixes it by moving the call to the
ClassLoader::ValidateMethodsWithCovariantReturnTypes to the PushFinalLevels
when the level is greater than CLASS_LOAD_EXACTPARENTS, which is the
last stage of normal loading.
Tomas Weinfurt [Wed, 2 Sep 2020 00:35:25 +0000 (17:35 -0700)]
free existingTrust when verifying certificate name on macOS (#41657)
* free existingTrust when verifying certificate name
* add back NL
* free existingTrust on error path as well
Safia Abdalla [Tue, 1 Sep 2020 23:09:51 +0000 (23:09 +0000)]
Use dynamic port for BrowserDebugHost process (#41688)
Seonyoung Park [Tue, 1 Sep 2020 22:39:37 +0000 (07:39 +0900)]
Remove unused USE_REFEMIT define in System.Private.DataContractSerialization (#41664)
monojenkins [Tue, 1 Sep 2020 21:01:53 +0000 (17:01 -0400)]
[interp] Optimize out conditional branches (#41628)
If we know the values of the arguments of a conditional branch, replace it with an unconditional branch. Once we have support for basic blocks, we can remove dead basic blocks and merge any adjacent ones.
Co-authored-by: BrzVlad <BrzVlad@users.noreply.github.com>
Jeremy Koritzinsky [Tue, 1 Sep 2020 20:35:56 +0000 (13:35 -0700)]
Block casting to an interface marked ComInterfaceType.InterfaceIsIInspectable (#41633)
Huo Yaoyuan [Tue, 1 Sep 2020 20:17:28 +0000 (04:17 +0800)]
Add methods to manipulate Half in binary (#40882)
* Expose HalfToInt16Bits and Int16BitsToHalf.
* Use HalfToInt16Bits and Int16BitsToHalf in tests.
* Add and expose BinaryPrimitive Half overloads.
* Test BinaryPrimitive Half overloads.
* Add and expose BinaryReader/Writer Half overloads.
* Test BinaryReader/Writer Half overloads.
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Juan Hoyos [Tue, 1 Sep 2020 18:56:58 +0000 (11:56 -0700)]
Include CrossOs diagnostic assets for signing (#41655)
* Include CrossOs diagnostic assets for signing
Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
Huo Yaoyuan [Tue, 1 Sep 2020 16:48:13 +0000 (00:48 +0800)]
Add SafeBuffer Span<T> methods (#40842)
* Implement SafeBuffer.ReadSpan and WriteSpan.
* Add reference source for SafeBuffer.
* Add empty span test for SafeBuffer.
* Add roundtrip tests for SafeBuffer.
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Tarek Mahmoud Sayed [Tue, 1 Sep 2020 16:38:28 +0000 (09:38 -0700)]
Add Support to ActivitySource events in DiagnosticSourceEventSource (#41641)
Tom Deseyn [Tue, 1 Sep 2020 12:42:47 +0000 (14:42 +0200)]
SafeSocketHandle: avoid potential blocking of finalizer thread (#41508)
* SafeSocketHandle: avoid potential blocking of finalizer thread
When the Socket is Disposed, it attempts to make all on-going operations
abort. It does this in a loop, and decides there are no on-going operations
when the reference count becomes zero and the handle gets released.
SafePipeHandle holds a reference to SafeSocketHandle. This prevents the
reference count to drop to zero, and causes the dispose to loop infinitly.
When the Socket is disposed from the finalizer thread, it is no longer used
for operations and we can skip the loop. This avoids blocking the finalizer
thread when the reference count can't drop to zero.
* When disposing from finalizer, fall back to ReleaseHandle
* Add test
* PR feedback
* Fix test
* PR feedback
* Refactor
* Refactor
* Log call to _handle.Dispose
* Handle null handle
Peter Sollich [Tue, 1 Sep 2020 10:23:21 +0000 (12:23 +0200)]
Fix issue 41413 (#41445)
Fix the AV issue in GCHeap::ApproxTotalBytesInUse:
- The AV is fixed by stopping the iteration when seg1 becomes null
- don't count segments that have been decommited
- stop iterating when seg1 becomes freeable_soh_segment - this takes care of the case where we have put a segment on the list, but the OS call to decommit hasn't come back.
These fixes will still leave a window where the result will be inaccurate. To reduce the chances of an inaccurate result, we try this 3 times.
Eric Erhardt [Tue, 1 Sep 2020 04:59:44 +0000 (23:59 -0500)]
Remove dead files from System.Private.DataContractSerialization (#41646)
These files have been moved to System.Runtime.Serialization.Primitives and were left over here. They aren't part of any .csproj, so they are not being compiled.
David Wrighton [Tue, 1 Sep 2020 03:02:37 +0000 (20:02 -0700)]
Add assert to verify the correctness of the GCRefMap pulled from an R2R image (#41544)
Adeel Mujahid [Tue, 1 Sep 2020 02:58:52 +0000 (05:58 +0300)]
Search libgdiplus in /usr/local/lib on macOS (#41503)
With Apple's Hardened Runtime, `/usr/local/lib` is not searched for
`dlopen(3)` calls.
Today, some brew packages, such as `mono-libgdiplus` (used by
System.Drawing) are installed in `/usr/local/lib`. This causes
`DllNotFoundException` and user is supposed to either:
1. manually create a symlink to `/usr/local/lib/libgdiplus.dylib`.
2. export `LD_LIBRARY_PATH`, `DYLD_LIBRARY_PATH` or
`DYLD_FALLBACK_LIBRARY_PATH` to `/usr/local/lib`.
3. remove signature from dotnet binary:
`sudo codesign --remove-signature $(command -v dotnet)`
This patch adds a fallback lookup for libgdiplus.dylib, to avoid
workaround on macOS (as it is done for Linux: `libgdiplus.so` falls
back to `libgdiplus.so.0`).
Also removed `LIBSEARCHPATH` which is unused since 8d5e610.
Jan Jahoda [Tue, 1 Sep 2020 02:56:29 +0000 (04:56 +0200)]
Obsolete Uri.EscapeUriString (#41501)
* Obsolete Uri.EscapeUriString
* Fix tests
Co-authored-by: Adeel Mujahid <adeelbm@outlook.com>
Santiago Fernandez Madero [Tue, 1 Sep 2020 02:45:04 +0000 (19:45 -0700)]
Fix infinite recursion in configuration manager (#41638)
* Revert "Remove unused local in System.Configuration.ConfigurationManager (#40583)"
This reverts commit
a4eba0a0e1ecb31b7cb3482509bd461c8e9f5ccf.
* Rename unused variable and add regression test
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
Egor Bogatov [Tue, 1 Sep 2020 02:43:25 +0000 (05:43 +0300)]
[RyuJIT] Avoid emitting cdq/coq for a positive constant in rax for idiv (#41551)
* avoid emitting cdq/coq for dividend if it's a positive constant
Adeel Mujahid [Tue, 1 Sep 2020 01:30:31 +0000 (04:30 +0300)]
Fix palsuite build (#41622)
Error 1
```sh
CMake Error at src/pal/tests/palsuite/exception_handling/pal_sxs/test1/CMakeLists.txt:22 (set_exports_linker_option):
set_exports_linker_option Function invoked with incorrect arguments for
function named: set_exports_linker_option
```
Error 2
```sh
[ 23%] Building CXX object src/vm/wks/CMakeFiles/cee_wks_core.dir/__/debugdebugger.cpp.o
In file included from /Users/am11/projects/runtime_base/src/coreclr/src/pal/tests/palsuite/c_runtime/acosf/test1/test1.c:17:
In file included from /Users/am11/projects/runtime_base/src/coreclr/src/pal/tests/palsuite/common/palsuite.h:24:
/Users/am11/projects/runtime_base/src/coreclr/src/pal/inc/pal.h:379:28: error: unknown type name 'bool'
const char *szExePath, bool runningInExe);
^
1 error generated.
```
Jan Kotas [Tue, 1 Sep 2020 01:18:23 +0000 (18:18 -0700)]
Optimize out gc polls in basic blocks with regular PInvokes (#41581)
Regular PInvokes poll for GC. It means that the explicit gc polls can be skipped in basic blocks that contain regular PInvoke.
Immo Landwerth [Tue, 1 Sep 2020 01:09:41 +0000 (18:09 -0700)]
Add nullable annotations for XmlDataDocument (#41541)
* Add nullable annotations for XmlDataDocument
* Address code review feedback
* More code review feedback
* Address Eric's feedback
* Annotate _dataSet as not null when AttachDataSet is called
* Fix GetElementById return type annotation
In order to match with src
Co-authored-by: Jeff Handley <jeff.handley@microsoft.com>
Co-authored-by: David Cantú <dacantu@microsoft.com>
Eric Erhardt [Tue, 1 Sep 2020 00:56:28 +0000 (19:56 -0500)]
Updating ref source documentation for full facades (#41629)
Eric StJohn [Mon, 31 Aug 2020 23:46:39 +0000 (16:46 -0700)]
Add TypeConverterAttribute to IListSource (#41634)
Andy Gocke [Mon, 31 Aug 2020 22:42:51 +0000 (15:42 -0700)]
Add docs link to editing-and-debugging (#41636)
We were missing a link to the Editing and Debugging doc from the main workflow doc.
Eric StJohn [Mon, 31 Aug 2020 20:58:16 +0000 (13:58 -0700)]
Renable AddMethodBody tests (#41613)
Egor Bogatov [Mon, 31 Aug 2020 20:47:11 +0000 (23:47 +0300)]
make cns_str indirect loads invariant (#40898)
Günther Foidl [Mon, 31 Aug 2020 20:21:36 +0000 (22:21 +0200)]
Made char.IsAscii public (#41396)
Ryan Lucia [Mon, 31 Aug 2020 18:53:38 +0000 (14:53 -0400)]
[mono] Add mono_image_open_from_data_alc to unstable embedding API (#41334)
Thays Grazia [Mon, 31 Aug 2020 17:30:50 +0000 (14:30 -0300)]
[wasm][debugger] Breakpoint stopping after it's removed (#41479)
* Remove unnecessary WriteLine.
Fix #41447.
* Creating unit test about remove breakpoint.
* Implementing @radical suggestions!
Miha Zupan [Mon, 31 Aug 2020 16:45:15 +0000 (18:45 +0200)]
Add Request/Response Headers/Content Start/Stop events (#41590)
Alexander Nikolaev [Mon, 31 Aug 2020 16:31:08 +0000 (18:31 +0200)]
HTTP 1.1 stress test steps (#41592)
Adds HTTP 1.1 steps to http-stress pipeline.
Ankit Jain [Mon, 31 Aug 2020 14:26:34 +0000 (10:26 -0400)]
[wasm] Disable an extraneous debug message (#41468)
Recent debugger test runs were showing lot of
`CWL: Failed to lookup sequence point` messages.
These are being shown for cases like:
`CWL: list_frames: Failed to lookup sequence point. method: runtime_invoke_direct_void, native_offset: 56`
This is a warning, and doesn't need to be emitted by default.
Ankit Jain [Mon, 31 Aug 2020 14:21:04 +0000 (10:21 -0400)]
[wasm][debugger] Correctly handle empty, and whitespace-only strings (#41424)
There are two cases being fixed here:
1. str=='', or str=' '
- We check `str_value == 0`, and for the above cases JS returns
true, due to type coercion.
- So, we show the result as a null string.
2. str==null
- debugger.c adds the value for this with `mono_wasm_add_typed_value ("string", NULL, 0)`
- the second argument is converted to a string with
`Module.UTF8ToString(..)`, but when it's `0`/NULL, we get an
empty string. And that becomes a null string, because of (1).
Fixing this by using `===` operator to avoid type coercion.
Fixes https://github.com/dotnet/runtime/issues/41276
Peter Sollich [Mon, 31 Aug 2020 13:17:56 +0000 (15:17 +0200)]
Fix issue 41311 - Assert failure ephemeral_heap_segment->saved_committed == heap_segment_committed (#41441)
This is an interaction problem between gradual decommit and entering a no GC region.
Details:
- When we enter a no GC region, we are manipulating our commit goals outside of GC, we usually are planning to commit more, so it makes sense to stop any gradual decommit in progress.
- Even if we need to do a GC in preparation for a no GC region, any decommit target established by decommit_ephemeral_segment_pages is likely to be invalid, so we do an early out.
- add an assert to grow_heap_segment so we can catch future issues in this area better.
We may want to trigger the gradual decommit logic in set_allocations_for_no_gc if we discover that after accounting for the planned allocation, we still have substantial decommits. I'm leaving this for a later PR though.
monojenkins [Mon, 31 Aug 2020 13:12:59 +0000 (09:12 -0400)]
mono: result of regmask should be stored in regmask_t, not int (#41543)
While unlikely in practice, architectures with more than 32 registers would be affected by this as `sizeof(regmask_t) ==8` && `sizeof(int) == 4`.
Run into this while debugging something unrelated.
Co-authored-by: skmp <skmp@users.noreply.github.com>
Marie Píchová [Mon, 31 Aug 2020 09:28:27 +0000 (11:28 +0200)]
Moved HTTP request telemetry to HttpClient.SendAsync (#41022)
* Moved HTTP request telemetry to HttpClient.SendAsync
* Added ResponseContent and helper methods events.
* Rework helper method activity nesting
* Expand Telemetry tests
* Also log RequestStart/Stop in HttpMessageInvoker
* Update RequestStart signature
* RequestAborted => RequestFailed rename
* ResponseContent Begin => Start/Stop
* Fix HttpMessageInvoker implementation
* Add Synchronous request Telemetry tests
* Check telemetryStarted before ResponseContentStart
Co-authored-by: MihaZupan <mihazupan.zupan1@gmail.com>
eli-fin [Mon, 31 Aug 2020 09:02:16 +0000 (12:02 +0300)]
Add 32/8 bit values of exit codes (#41566)
This will make searching for the exit code a little easier
Co-authored-by: Eli Finkel <Eli.Finkel@checkmarx.com>
Adam Sitnik [Mon, 31 Aug 2020 08:32:51 +0000 (10:32 +0200)]
Update perf docs (#41583)
* mention benchmarking and profiling in the workflow description
* remove a very general doc about PerfView which was not refferenced by other docs
* update the performance-guidelines.md doc
Huo Yaoyuan [Mon, 31 Aug 2020 07:08:21 +0000 (15:08 +0800)]
Optimize Half.Equals (#41554)
monojenkins [Sun, 30 Aug 2020 16:17:18 +0000 (12:17 -0400)]
[MIPS32] Fix mono_arch_get_cie_program and ELF_MACHINE undefined issue (#41546)
Hi,
Cross compile for MIPS32:
```
CC=mips-linux-gnu-gcc CFLAGS="-I./libatomic_ops/src" ./autogen.sh --host=mips-linux-gnu --prefix=/home/zhaixiang/mono-mips32-git
make
make install
```
And HelloWorld testcase PASSED:
```
$ ./mono-mips32-git/bin/mono HelloWorld/bin/Debug/netcoreapp3.0/HelloWorld.dll
Hello World!
```
Thanks,
Leslie Zhai
Co-authored-by: xiangzhai <xiangzhai@users.noreply.github.com>
Zoltan Varga [Sun, 30 Aug 2020 10:25:55 +0000 (06:25 -0400)]
Pass Configuration to cmake. Use -Os on wasm. (#41550)
dotnet-maestro[bot] [Sun, 30 Aug 2020 09:54:11 +0000 (09:54 +0000)]
[master] Update dependencies from dotnet/arcade Microsoft/vstest dotnet/runtime-assets dotnet/xharness dotnet/icu (#41322)
[master] Update dependencies from dotnet/arcade Microsoft/vstest dotnet/runtime-assets dotnet/xharness dotnet/icu
- Updates:
- System.ComponentModel.TypeConverter.TestData: from 5.0.0-beta.20420.1 to 5.0.0-beta.20426.1
- System.Drawing.Common.TestData: from 5.0.0-beta.20420.1 to 5.0.0-beta.20426.1
- System.IO.Compression.TestData: from 5.0.0-beta.20420.1 to 5.0.0-beta.20426.1
- System.IO.Packaging.TestData: from 5.0.0-beta.20420.1 to 5.0.0-beta.20426.1
- System.Net.TestData: from 5.0.0-beta.20420.1 to 5.0.0-beta.20426.1
- System.Private.Runtime.UnicodeData: from 5.0.0-beta.20420.1 to 5.0.0-beta.20426.1
- System.Security.Cryptography.X509Certificates.TestData: from 5.0.0-beta.20420.1 to 5.0.0-beta.20426.1
- System.Windows.Extensions.TestData: from 5.0.0-beta.20420.1 to 5.0.0-beta.20426.1
- Updates:
- Microsoft.DotNet.XHarness.CLI: from 1.0.0-prerelease.20424.1 to 1.0.0-prerelease.20424.2
- Microsoft.DotNet.XHarness.TestRunners.Xunit: from 1.0.0-prerelease.20424.1 to 1.0.0-prerelease.20424.2
- Updates:
- Microsoft.NETCore.Runtime.ICU.Transport: from 5.0.0-preview.8.20421.1 to 6.0.0-alpha.1.20428.1
- Updates:
- Microsoft.DotNet.GenFacades: from 5.0.0-beta.20419.21 to 5.0.0-beta.20427.5
- Microsoft.DotNet.Build.Tasks.Feed: from 5.0.0-beta.20419.21 to 5.0.0-beta.20427.5
- Microsoft.DotNet.Build.Tasks.Packaging: from 5.0.0-beta.20419.21 to 5.0.0-beta.20427.5
- Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk: from 5.0.0-beta.20419.21 to 5.0.0-beta.20427.5
- Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk: from 5.0.0-beta.20419.21 to 5.0.0-beta.20427.5
- Microsoft.DotNet.CodeAnalysis: from 5.0.0-beta.20419.21 to 5.0.0-beta.20427.5
- Microsoft.DotNet.GenAPI: from 5.0.0-beta.20419.21 to 5.0.0-beta.20427.5
- Microsoft.DotNet.XUnitExtensions: from 5.0.0-beta.20419.21 to 5.0.0-beta.20427.5
- Microsoft.DotNet.Helix.Sdk: from 5.0.0-beta.20419.21 to 5.0.0-beta.20427.5
- Microsoft.DotNet.RemoteExecutor: from 5.0.0-beta.20419.21 to 5.0.0-beta.20427.5
- Microsoft.DotNet.VersionTools.Tasks: from 5.0.0-beta.20419.21 to 5.0.0-beta.20427.5
- Microsoft.DotNet.XUnitConsoleRunner: from 2.5.1-beta.20419.21 to 2.5.1-beta.20427.5
- Microsoft.DotNet.Arcade.Sdk: from 5.0.0-beta.20419.21 to 5.0.0-beta.20427.5
- Microsoft.DotNet.ApiCompat: from 5.0.0-beta.20419.21 to 5.0.0-beta.20427.5
- Updates:
- Microsoft.NET.Test.Sdk: from 16.8.0-release-
20200821-04 to 16.8.0-release-
20200828-02
- fix TestFirstYearOfJapaneseEra test on Browser platform
monojenkins [Sat, 29 Aug 2020 18:23:12 +0000 (14:23 -0400)]
[mono] Squelch Mach exception handlers (#41536)
Work around LLDB's unconditionally-installed and inflexible Mach
exception handler by installing a no-op task-wide Mach exception
handler.
See also:
- https://github.com/openjdk/jdk/blob/
50cc54c730bb0f130991648d1547d42483edddc1/src/hotspot/os/bsd/os_bsd.cpp#L2810-L2817
- https://github.com/mono/mono/issues/10180#issuecomment-
683119507
Co-authored-by: imhameed <imhameed@users.noreply.github.com>
Serentty [Sat, 29 Aug 2020 18:14:43 +0000 (14:14 -0400)]
Fix comments calling surrogate halves low surrogates (#41545)
I think these comments were copied and pasted and someone forgot to modify them.
Bruce Forstall [Sat, 29 Aug 2020 17:22:20 +0000 (10:22 -0700)]
Fix a race condition in GCStress (#41540)
Consider the case of a partially interruptible function where we've replaced
each call site with INTERRUPT_INSTR_CALL or INTERRUPT_INSTR_CALL_32. Even
though the call site itself isn't a safe point, we put a GCStress instruction
there so we can capture the call target at GC stress time, then set a specific
GCStress instruction for the next instruction that will indicate how to GC
protect any GC refs that are returned from the call.
Multiple threads can enter `DoGcStress` at the same time. They all get just
past the race check `if (!IsGcCoverageInterruptInstruction(instrPtr)) return;`.
One goes ahead, and reads the instruction code for the address at which we're
doing a GCStress. We set `atCall` to `true` if this matches one of our known
GCStress instructions for partially-interruptible call sites. Later, if
`atCall` is `true`, we write the original call instruction back to the code
stream, write the distinguished next instruction GCStress instruction, and
continue. If the other threads then read at the instruction address, they
might read the actual call opcode, not the distinguished GCStress breakpoint
instruction code. Then, they will set `atCall` to `false`. This will indicate
that we are in a fully-interruptible location, or that no special call-site
behavior is required. We go on, force a GC, and eventually get to the assert
in `EECodeManager::EnumGcRefs` that we are at a GC safe point.
The solution is to simply move the `if (!IsGcCoverageInterruptInstruction(instrPtr))`
check below the read of `*instrPtr` to set `atCall`.
Re-enable the GitHub_27924 test.
Fixes #36681
Ankit Jain [Sat, 29 Aug 2020 09:59:41 +0000 (05:59 -0400)]
area-owners.md: Add @radical for debugger-mono (#41425)
Zoltan Varga [Sat, 29 Aug 2020 08:04:54 +0000 (04:04 -0400)]
[runtime] Fix signature of mini_cleanup (). (#41510)
Fixes https://github.com/dotnet/runtime/issues/41470.
Manish Godse [Sat, 29 Aug 2020 05:17:01 +0000 (22:17 -0700)]
Fix reading cpu cache size for Alpine(musl) (#41532)
* Fix reading cpu cache size for Alpine(musl)
* limiting the fallback to Linux only
* exclude ARM
* fixing copy-paste error
Miha Zupan [Sat, 29 Aug 2020 00:46:03 +0000 (02:46 +0200)]
System.Net Telemetry style changes (#41527)
* Change HandshakeStop SslProtocols parameter to enum
* Parameterize Http11/Http20 events
* Add dummy request to ensure Http2 settings are received
Eric Erhardt [Fri, 28 Aug 2020 21:55:24 +0000 (16:55 -0500)]
Nullable annotations for System.Runtime.Serialization.Xml and System.Runtime.Serialization.Json (#41476)
* Initial nullable annotations of System.Private.DataContractSerialization
Contributes to #2339
* Mark DataMember.Name as non-nullable.
* Fix a few simple nullable compile errors.
* Assert attributes is non-null in XmlObjectSerializerReadContext
* Ensure XmlObjectSerializerContext.serializer is never null
* Fix a few simple nullable errors
* Remove any checks that DataMember.MemberInfo can be null.
* Mark EnumDataContract.Members as non-nullable.
Fix nullable errors in SchemaExporter.
* Correctly annotate CollectionDataContract.IsCollectionOrTryCreate.
* Assert DataContractResolver is non-null.
* Suppress https://github.com/dotnet/runtime/issues/41465
* Update System.Runtime.Serialization.Json ref source for nullable annotations.
* Update System.Runtime.Serializaiton.Xml ref source for nullable annotations.
* Update for Xml.ReaderWriter nullable annotations
* Work around compiler issue.
* Fix test failure.
Reference compiler issue in TODO comment.
* Revert nullable suppression now that XmlSchemaAppInfo.Markup is annotated correctly.
* Fix build for latest annotations in master.
* PR feedback round 1
* Address PR feedback round 2
Mitchell Hwang [Fri, 28 Aug 2020 21:29:35 +0000 (17:29 -0400)]
Modfiy ErrorHandlingTests for Browser (#40659)
Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
Mateo Torres-Ruiz [Fri, 28 Aug 2020 20:57:39 +0000 (13:57 -0700)]
Do not add bundle deps file to APP_CONTEXT_DEPS_FILES on single-file apps (#41430)
* App Context deps file should be empty for single file apps
Layomi Akinrinade [Fri, 28 Aug 2020 20:39:17 +0000 (13:39 -0700)]
Update IgnoreNullValues obsoletion message (#41141)
* Update IgnoreNullValues obsoletion message
* Add attributes to ref file
Fan Yang [Fri, 28 Aug 2020 18:40:43 +0000 (14:40 -0400)]
Update excluded tests list for WASM (#41415)
* Check runtime test failures on WASM
* Modify ExcludeList for wasm to exclude only failed tests
* Revert the change to runtime.yml
* Update runtime.yml