platform/upstream/dotnet/runtime.git
4 years agoMerge pull request #32669 from steveharter/NullConvertersAndNotSupportedException
Steve Harter [Fri, 6 Mar 2020 22:46:48 +0000 (16:46 -0600)]
Merge pull request #32669 from steveharter/NullConvertersAndNotSupportedException

Don't allow null converters and add Path support to NotSupportedException

4 years agoReduce thread consumption for sync HTTP/2 reads (#32917)
Stephen Toub [Fri, 6 Mar 2020 22:38:39 +0000 (17:38 -0500)]
Reduce thread consumption for sync HTTP/2 reads (#32917)

The response Stream returned from SocketsHttpHandler.SendAsync supports all of the various forms of read operations, including synchronous reads.

For HTTP/1.x, we're able to implement these as sync all the way down to synchronous calls on the underlying Socket, as every request/response owns its own connection (at least for the duration of the operation; the connection may be returned to the pool for subsequent reuse after).

For HTTP/2, however, a single connection is shared across all requests multiplexed onto it, and as such, reads on those individual responses need to coordinate, which can mean waiting one's turn.  Such waiting for asynchronous operations is implemented via async/await and a ManualResetValueTaskSource-based implementation.  For the sync operations, though, they're implemented as simply blocking waiting on the async equivalent, aka sync-over-async.  This not only blocks the calling thread, but because the MRVTS-based implementation specifies RunContinuationsAsynchronously==true (which is important for reliability with how the async code paths are structured) it means that, in order to unblock this waiter, another thread pool thread needs to be available to run the small continuation that will in turn unblock the sync primitive being blocked on.

This PR tweaks the use of MRVTS so that when we perform a synchronous read, we set MRVTS.RunContinuationsAsynchronously to false.  Since the only action that will be taken as part of the continuation is to set a sync primitive, we don't need to worry about arbitrary code running as part of the completing call stack.  This in turn means that in the common case, sync reads will still end up blocking the calling thread _but_ won't require an additional thread pool thread to unblock it, other than for the task running the main connection loop.

4 years agoAdd Socket.Get/SetRawSocketOption (#33261)
Stephen Toub [Fri, 6 Mar 2020 22:35:39 +0000 (17:35 -0500)]
Add Socket.Get/SetRawSocketOption (#33261)

4 years agoFix uname usage and add binlogs (#33223)
Juan Hoyos [Fri, 6 Mar 2020 20:20:08 +0000 (12:20 -0800)]
Fix uname usage and add binlogs  (#33223)

* Add binlogs back to PGO reads and native version header generation
* Use POSIX compliant `uname -m`

4 years agoFix error logging in referenceFromRuntime.targets (#33290)
Viktor Hofer [Fri, 6 Mar 2020 19:34:03 +0000 (20:34 +0100)]
Fix error logging in referenceFromRuntime.targets (#33290)

The RuntimeProjectFile property is used in the FilterReferenceFromRuntime target for error logging but is only available in the AddRuntimeProjectReference target. Moving this out onto the project level.

4 years agoUpdate SDK version to 5.0.100-preview.2.20155.14 (#33277)
Juan Hoyos [Fri, 6 Mar 2020 17:53:07 +0000 (09:53 -0800)]
Update SDK version to 5.0.100-preview.2.20155.14 (#33277)

4 years agoupdate branding to preview3 (#33262)
Anirudh Agnihotry [Fri, 6 Mar 2020 17:30:25 +0000 (09:30 -0800)]
update branding to preview3 (#33262)

4 years agoCorrects interim prerelease version for Extensions packages (#33278)
Maryam Ariyan [Fri, 6 Mar 2020 17:20:50 +0000 (09:20 -0800)]
Corrects interim prerelease version for Extensions packages (#33278)

4 years agoPrevent null converters and add Path support to NotSupportedException
Steve Harter [Fri, 21 Feb 2020 18:40:55 +0000 (12:40 -0600)]
Prevent null converters and add Path support to NotSupportedException

4 years agoFix re-declations of builtin functions with clang 10 (#32837)
Omair Majid [Fri, 6 Mar 2020 14:50:28 +0000 (09:50 -0500)]
Fix re-declations of builtin functions with clang 10 (#32837)

Clang commit 39aa8954a4846b317d3da2f0addfce8224b438de has moved
exception handling mismatches under the -fms-compatibility flag. This
breaks compilation of pal under clang 10 (and newer).

The compilation error looks like this:

In file included from .../pal/src/misc/tracepointprovider.cpp:19:
In file included from .../pal/src/include/pal/palinternal.h:620:
In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/stdlib.h:30:
/usr/include/stdlib.h:112:36: error: exception specification in declaration does not match previous declaration
__extension__ extern long long int atoll (const char *__nptr)
                                   ^
.../pal/inc/pal.h:4227:33: note: previous declaration is here
PALIMPORT long long int __cdecl atoll(const char *) THROW_DECL;
                                ^

The simplest fix seems to be to make clang do the same thing as gcc and
define THROW_DECL as 'throw()'.

Testing via https://godbolt.org shows that even clang 3.3 compiles this
successfully without additional compiler options:

    extern "C" long long atoll(char const*) throw();
    #include <stdlib.h>

An alternative fix would be to use -fms-compatibility.

More details at https://bugzilla.redhat.com/show_bug.cgi?id=1807176

4 years agoSupport rodata relocations in crossgen2 for ARM32 (#33153)
Dong-Heon Jung [Fri, 6 Mar 2020 14:09:55 +0000 (23:09 +0900)]
Support rodata relocations in crossgen2 for ARM32 (#33153)

4 years agoChanged signedness of iterator to fix warnings. (#32742)
pi1024e [Fri, 6 Mar 2020 13:19:02 +0000 (08:19 -0500)]
Changed signedness of iterator to fix warnings. (#32742)

numOperands is an unsigned integer. In addition, getArgOperand has unsigned int arguments. As a result, I have no idea why i is an int, but to fix compiler warnings, I made it an unsigned int.

4 years ago[jit] Use OP_EXTRACT_R4 in simd-intrinsics.c when using LLVM. (#33213)
monojenkins [Fri, 6 Mar 2020 12:32:39 +0000 (07:32 -0500)]
[jit] Use OP_EXTRACT_R4 in simd-intrinsics.c when using LLVM. (#33213)

Co-authored-by: vargaz <vargaz@users.noreply.github.com>
4 years agoRemove more OSGroup usages from src/mono (#33247)
Alexander Köplinger [Fri, 6 Mar 2020 11:03:08 +0000 (12:03 +0100)]
Remove more OSGroup usages from src/mono (#33247)

* Remove more OSGroup usages from src/mono

Follow-up to https://github.com/dotnet/runtime/pull/32833

* PR feedback

4 years agoCopy UCRT from versioned directory as fallback and fully incremental (#33209)
Juan Hoyos [Fri, 6 Mar 2020 08:38:59 +0000 (00:38 -0800)]
Copy UCRT from versioned directory as fallback and fully incremental (#33209)

4 years agoFix build warnings (#32208)
Next Turn [Fri, 6 Mar 2020 04:02:53 +0000 (12:02 +0800)]
Fix build warnings (#32208)

4 years agoAdd missing IAsyncDisposable interfaces to System.Data.Common (#33265)
Eric StJohn [Fri, 6 Mar 2020 02:08:25 +0000 (18:08 -0800)]
Add missing IAsyncDisposable interfaces to System.Data.Common (#33265)

4 years agoOverride SerializeToStreamAsync(..., cancellationToken) on Utf8StringContent (#32987)
Stephen Toub [Fri, 6 Mar 2020 01:19:41 +0000 (20:19 -0500)]
Override SerializeToStreamAsync(..., cancellationToken) on Utf8StringContent (#32987)

4 years agoMove Utf8String and Utf8Span code to src/libraries. (#33254)
Stephen Toub [Fri, 6 Mar 2020 01:19:08 +0000 (20:19 -0500)]
Move Utf8String and Utf8Span code to src/libraries. (#33254)

This is the first step in getting Utf8String and Utf8Span working on netstandard2.0.

Contributes to #29442

4 years agoAdd new properties for Obsolete Attribute (#33248)
buyaa-n [Fri, 6 Mar 2020 00:46:50 +0000 (16:46 -0800)]
Add new properties for Obsolete Attribute (#33248)

* Add DiagnosticId UrlFormat propertites for Obsolete attribute

4 years agoRemove Array.IsValueOfElementType internal call (#33239)
Jan Kotas [Fri, 6 Mar 2020 00:28:51 +0000 (16:28 -0800)]
Remove Array.IsValueOfElementType internal call (#33239)

4 years agoFix for solving lock contention issue in GC statics scanning. (#32795)
Jan Kotas [Fri, 6 Mar 2020 00:10:01 +0000 (16:10 -0800)]
Fix for solving lock contention issue in GC statics scanning. (#32795)

* Fix for solving lock contention issue in GC statics scanning.

* Comment change to clarify benefit of switching order in GcScanRoots.

4 years agoSupport COM objects with dynamic keyword (#33060)
Elinor Fung [Thu, 5 Mar 2020 23:02:23 +0000 (15:02 -0800)]
Support COM objects with dynamic keyword (#33060)

4 years agoFix allocation of RuntimeTypeCache GC handle (#33243)
Jan Vorlicek [Thu, 5 Mar 2020 20:57:16 +0000 (21:57 +0100)]
Fix allocation of RuntimeTypeCache GC handle (#33243)

When there is a race calling RuntimeType.InitializeCache, each of the
racing threads creates a new GC handle using
new RuntimeTypeHandle(this).GetGCHandle(GCHandleType.WeakTrackResurrection);
This ends up calling RuntimeTypeHandle::GetGCHandle native method that
adds the allocated handle into the handle cleanup list of the
AssemblyLoaderAllocator specific for the runtime type.
All but the winning thread then call GCHandle.InternalFree on the just
allocated handle. That frees the handle, but leaves it on the cleanup
list of the loader allocator. The same handle can be later allocated for some
other purpose. When the AssemblyLoaderAllocator is being destroyed, all
the handles on the cleanup list are destroyed too. So it destroys also
the handle that was left on the cleanup list incorrectly. That can cause
all kinds of hard to diagnose issues, like the #32171.

This change fixes it by adding a FreeGCHandle method on the
RuntimeTypeHandle that besides freeing the handle also removes it from
the cleanup list of the related AssemblyLoadContext.

4 years agoChanges to excluded test failures when using mono runtime. (#33176)
Nathan Ricci [Thu, 5 Mar 2020 20:20:20 +0000 (15:20 -0500)]
Changes to excluded test failures when using mono runtime. (#33176)

4 years agoFix an assert in ReadyToRunReader constructor (#33203)
Andrew Au [Thu, 5 Mar 2020 19:37:20 +0000 (11:37 -0800)]
Fix an assert in ReadyToRunReader constructor (#33203)

4 years agoCalculate if we're in an instance method in one place to support reverse IL stubs...
msftbot[bot] [Thu, 5 Mar 2020 18:42:02 +0000 (18:42 +0000)]
Calculate if we're in an instance method in one place to support reverse IL stubs. (#33199)

4 years agoMove elfreader assertions (#33195)
Steve MacLean [Thu, 5 Mar 2020 18:20:30 +0000 (13:20 -0500)]
Move elfreader assertions (#33195)

* Move elfreader assertions

Assert before operating on parsed program header

* Remove blank lines

4 years agoMake HPackEncoder stateless and optimize :status writing (#33170)
Cory Nelson [Thu, 5 Mar 2020 18:19:22 +0000 (10:19 -0800)]
Make HPackEncoder stateless and optimize :status writing (#33170)

Make HPackEncoder stateless and optimize :status writing (#33170)

4 years agoRemove "virtual" from GregorianCalendarHelper (#33241)
Jan Kotas [Thu, 5 Mar 2020 18:00:38 +0000 (10:00 -0800)]
Remove "virtual" from GregorianCalendarHelper (#33241)

4 years agoFix cross targeting for depproj (#33238)
Viktor Hofer [Thu, 5 Mar 2020 17:41:14 +0000 (18:41 +0100)]
Fix cross targeting for depproj (#33238)

* Fix cross targeting for depproj

* Fix cross-targeting for ilproj

4 years agoRevert "Initial runtime changes for composite support (#32500)" (#33214)
Tomáš Rylek [Thu, 5 Mar 2020 17:35:15 +0000 (18:35 +0100)]
Revert "Initial runtime changes for composite support (#32500)" (#33214)

This reverts commit f0f33999dea0c1188b30c5e2705d3d3217aeae67.

4 years agoReplacing OSGroup with TargetOS for coreclr, libraries and installer (#32833)
Anirudh Agnihotry [Thu, 5 Mar 2020 15:51:06 +0000 (07:51 -0800)]
Replacing OSGroup with TargetOS for coreclr, libraries and installer (#32833)

* Remove OSGroup from coreclr and corefx

* remove from installer

* fixing coreclr tests

* Some documentation changes

Co-Authored-By: Viktor Hofer <viktor.hofer@microsoft.com>
* moving buildos calculation to config.props

* BuildOS -> TargetOS

* remove osgroup suffix

* removing comment and correcting typo

* dotnet msbuild -> dotnet build at relevant places in docs

* moving more properties to configuration.props

* refactoring properties

* moving TargetArchitecture property to loveBuildd.Targets

* adding configuration.props to signing

* Fix installer build

* BuildOS -> Target os and removing slash

Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
4 years ago[llvm] Don't set the LLVM JIT TLS variable in AOT. (#33201)
Sam Patel [Thu, 5 Mar 2020 13:35:04 +0000 (08:35 -0500)]
[llvm] Don't set the LLVM JIT TLS variable in AOT. (#33201)

Should fix https://github.com/mono/mono/issues/19115. This bug was
introduced in https://github.com/mono/mono/pull/18824, which
conditionally initalized an LLVM JIT-related TLS slot while preserving
unconditonal stores to that same slot.

The value stored in this TLS slot should only be used during JIT
compilation, so set/reset it in `mono_llvm_compile_method` instead of
during IR construction in `mono_llvm_emit_method`. No non-JIT code
should depend on the existence or presence of this TLS variable, so
remove `mono_llvm_jit_set_tls_cfg`.

Co-authored-by: imhameed <imhameed@microsoft.com>
4 years agoRemove non-existent references (#33204)
Stephen Toub [Thu, 5 Mar 2020 12:30:46 +0000 (07:30 -0500)]
Remove non-existent references (#33204)

4 years agoUpdate area owners (#33219)
Stephen Toub [Thu, 5 Mar 2020 12:29:47 +0000 (07:29 -0500)]
Update area owners (#33219)

1. RussKeldorph => echesakovMSFT
2. jeffschw => jeffschwMSFT

4 years agoUpdate error message on failing to find hostpolicy for self-contained (#33193)
Elinor Fung [Thu, 5 Mar 2020 07:32:44 +0000 (23:32 -0800)]
Update error message on failing to find hostpolicy for self-contained (#33193)

- Specify if the config wasn't found versus didn't have a framework
- Show message for apphost (not just dotnet)

4 years agoDelete support for old GCInfo version from the runtime (#33202)
Jan Kotas [Thu, 5 Mar 2020 04:50:45 +0000 (20:50 -0800)]
Delete support for old GCInfo version from the runtime (#33202)

We do not support old R2R images anymore

4 years agoUse prefixed hex format in asm (#33205)
Dan Moseley [Thu, 5 Mar 2020 04:39:24 +0000 (20:39 -0800)]
Use prefixed hex format in asm (#33205)

* Use prefixed hex format in asm

* Use prefixed hex format in asm

4 years agoTweak coreclr runtime build (#33190)
Bruce Forstall [Thu, 5 Mar 2020 02:35:16 +0000 (18:35 -0800)]
Tweak coreclr runtime build (#33190)

1. Output log file names to look at if a build fails.
2. Don't 'mkdir' if the directory already exists.
3. Always save !errorlevel! before running any other command.

4 years ago[merp] Add a test for Mono.Runtime.ExceptionToState() (#32045)
Aleksey Kliger (λgeek) [Thu, 5 Mar 2020 02:25:02 +0000 (21:25 -0500)]
[merp] Add a test for Mono.Runtime.ExceptionToState() (#32045)

Contributes to https://github.com/mono/mono/issues/18078

Co-authored-by: Alexis Christoforides <alexis@thenull.net>
4 years agoMake Crossgen2 built in the VS runnable (and debuggable) (#33194)
Tomáš Rylek [Thu, 5 Mar 2020 01:26:12 +0000 (02:26 +0100)]
Make Crossgen2 built in the VS runnable (and debuggable) (#33194)

4 years agoUse xmm for stack prolog zeroing rather than rep stos (#32538)
Andy Ayers [Thu, 5 Mar 2020 01:24:21 +0000 (17:24 -0800)]
Use xmm for stack prolog zeroing rather than rep stos (#32538)

Use 16 byte xmm stores for prolog zeroing on xarch.

Zeroing strategy varies depending on target arch, isa target, block size, block alignment, and stack alignment.

x86 does unaligned xmm stores (vmovdqu/vmovups); x64 uses aligned stores (vmovdqa/vmovaps) for non-small cases.

* For small blocks [4-32) bytes:  discrete stores are used (16, 8, or 4 byte as appropriate);
* For medium blocks [32 to 96) bytes: 4 and 8 byte discrete stores are used to zero leading and trailing parts that are not 16 byte aligned; an inline sequence of 16 byte stores does the rest;
* For large blocks: small leading and trailing stores are zeroed as is done for medium blocks, then one or two 16 byte stores to leave a region to zero that is a multiple of 48 bytes. This is then handled by a 3x16 unrolled store loop.

4 years agoFix typo (#33192)
msftbot[bot] [Thu, 5 Mar 2020 01:17:38 +0000 (01:17 +0000)]
Fix typo (#33192)

DAC_COMPILE -> DACCESS_COMPILE

4 years agoUpdate API review process image (corefx->runtime) (#33173)
Carlos Sanchez Lopez [Thu, 5 Mar 2020 01:12:21 +0000 (17:12 -0800)]
Update API review process image (corefx->runtime) (#33173)

* Update API Review Process image

* Update docs/project/api-review-process.md

Co-Authored-By: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
4 years agoUpdate shared code with runtime (#33187)
Justin Kotalik [Thu, 5 Mar 2020 01:04:44 +0000 (17:04 -0800)]
Update shared code with runtime (#33187)

4 years agoFix Crossgen2 build of framework assemblies (issue 33155) (#33169)
Tomáš Rylek [Thu, 5 Mar 2020 01:01:50 +0000 (02:01 +0100)]
Fix Crossgen2 build of framework assemblies (issue 33155) (#33169)

4 years agoAdded PerfScore support for IF_LARGExxx instruction formats (#33161)
Brian Sullivan [Wed, 4 Mar 2020 23:23:40 +0000 (15:23 -0800)]
Added PerfScore support for IF_LARGExxx instruction formats (#33161)

4 years agoManaged StelemRef and LdelemaRef (#32722)
Vladimir Sadov [Wed, 4 Mar 2020 22:19:47 +0000 (14:19 -0800)]
Managed StelemRef and LdelemaRef (#32722)

* Managed `LdelemaRef` and `StelemRef`

* support ARM64 and OSX

* removed old JIT_Stelem_Ref implementation

* removed JIT_Ldelema_Ref

* Attributes for stack/debug hiding.

* PR feedback

* Avoid needing static initializer.

* couple small tweaks

* Avoid PreStub indirection in array element JIT helpers.

* Initialize `gcCoverLock` a bit earlier

* Added comment about revisiting after #5857 is fixed

4 years ago[loader] Clean up locking around adding assemblies to domain/ALC (#32622)
Ryan Lucia [Wed, 4 Mar 2020 22:08:59 +0000 (17:08 -0500)]
[loader] Clean up locking around adding assemblies to domain/ALC (#32622)

This cleans up three components of assembly loading that could potentially cause races/crashes.

First, both `add_assemblies_to_domain` and `add_assembly_to_alc` now ignore resolved references on netcore. We were seeing a crash on CI related to an assertion in here that resulted from two threads using the same MonoImage simultaneously as one is being loaded in with LoadFile, and this should solve that. Fixes #2305

Second, we take both the domain and ALC loaded assemblies locks simultaneously around the assembly being added to both lists, ensuring they stay in sync.

Finally, MonoImage now takes the image lock when writing to references instead of using the global `assemblies_mutex` in assembly.c for all images. This potentially helps reduce contention. Work here is not complete, but for this PR it's good enough. See #32889

4 years agoFix locating Python on Windows when py.exe not found (#33163)
Jeremy Koritzinsky [Wed, 4 Mar 2020 21:53:02 +0000 (13:53 -0800)]
Fix locating Python on Windows when py.exe not found (#33163)

4 years agoAdd ConcurrentDictionary outerloop test for torn values (#33157)
Stephen Toub [Wed, 4 Mar 2020 21:38:24 +0000 (16:38 -0500)]
Add ConcurrentDictionary outerloop test for torn values (#33157)

4 years agoDelete obsolete doc (#33166)
Stephen Toub [Wed, 4 Mar 2020 21:34:30 +0000 (16:34 -0500)]
Delete obsolete doc (#33166)

4 years agoMake cross DAC subsets obey the- runtimeConfiguration flag. (#33168)
Jeremy Koritzinsky [Wed, 4 Mar 2020 21:33:55 +0000 (13:33 -0800)]
Make cross DAC subsets obey the- runtimeConfiguration flag. (#33168)

4 years agoRename JsonSerializer.Read\Write.cs to JsonConverterOfT.Read\WriteCore.cs
Steve Harter [Fri, 21 Feb 2020 18:37:22 +0000 (12:37 -0600)]
Rename JsonSerializer.Read\Write.cs to JsonConverterOfT.Read\WriteCore.cs

4 years agoJIT: Optimize range checks for a[i & C], a[i % c] and a[(i & c1)>>c2)] patterns ...
Eugene Rozenfeld [Wed, 4 Mar 2020 19:22:03 +0000 (11:22 -0800)]
JIT: Optimize range checks for a[i & C], a[i % c] and a[(i & c1)>>c2)] patterns (#1644)

* Optimize range checks for array[x & c]

* Handle more cases...

* Fix possible crash

* Formatting

* Allow only [0..31] range for RSH operator

* Address feedback

* Add tests, also handle GT_LSH

* Address feedback

* Add a comment

4 years agoAdded support for tests to check if they are running under the mono interpreter ...
Steve Pfister [Wed, 4 Mar 2020 19:10:54 +0000 (14:10 -0500)]
Added support for tests to check if they are running under the mono interpreter (#33106)

The mono interpreter is activated by passing --interpreter into the MONO_ENV_OPTIONS
environment variable.

4 years agoRemove BuildAndTest and RebuildAndTest target in favor of Test (#33151)
Viktor Hofer [Wed, 4 Mar 2020 18:40:19 +0000 (19:40 +0100)]
Remove BuildAndTest and RebuildAndTest target in favor of Test (#33151)

* Implicitly build when invoking the test target

To get closer to the VSTest behavior this changes the Test target to
implicitly invoke the Build target unless /p:TestNoBuild is passed in.
(VSTest uses VSTestNoBuild which is controlled by the
dotnet test --no-build flag)

* Fix error logging for test outputs

* Update dotnet msbuild to build docs

* Update ReportGenerator global tool version

Updating ReportGenerator's version to 4.5.0 which removes unnecessary
logging (args passed in).

4 years agoMerge pull request #33065 from nattress/crossgen2_test_baseline
Simon Nattress [Wed, 4 Mar 2020 18:28:43 +0000 (10:28 -0800)]
Merge pull request #33065 from nattress/crossgen2_test_baseline

Baseline Crossgen2 outer loop failing tests

4 years agoPrevent ArrayPool<RegexOptions>.Shared creation (#33093)
Stephen Toub [Wed, 4 Mar 2020 18:21:26 +0000 (13:21 -0500)]
Prevent ArrayPool<RegexOptions>.Shared creation (#33093)

* Prevent ArrayPool<RegexOptions>.Shared creation

* Missed one

4 years agoUpdate dependencies from https://github.com/dotnet/arcade build 20200303.1 (#33156)
Stephen Toub [Wed, 4 Mar 2020 18:19:55 +0000 (13:19 -0500)]
Update dependencies from https://github.com/dotnet/arcade build 20200303.1 (#33156)

- Microsoft.DotNet.XUnitExtensions - 5.0.0-beta.20153.1
- Microsoft.DotNet.VersionTools.Tasks - 5.0.0-beta.20153.1
- Microsoft.DotNet.ApiCompat - 5.0.0-beta.20153.1
- Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.20153.1
- Microsoft.DotNet.Build.Tasks.Feed - 5.0.0-beta.20153.1
- Microsoft.DotNet.Build.Tasks.Packaging - 5.0.0-beta.20153.1
- Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk - 5.0.0-beta.20153.1
- Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk - 5.0.0-beta.20153.1
- Microsoft.DotNet.CodeAnalysis - 5.0.0-beta.20153.1
- Microsoft.DotNet.GenAPI - 5.0.0-beta.20153.1
- Microsoft.DotNet.GenFacades - 5.0.0-beta.20153.1
- Microsoft.DotNet.Helix.Sdk - 5.0.0-beta.20153.1
- Microsoft.DotNet.RemoteExecutor - 5.0.0-beta.20153.1
- Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.20153.1

4 years ago[dim] Class overriding interface method that was already override by another interfac...
monojenkins [Wed, 4 Mar 2020 15:48:17 +0000 (10:48 -0500)]
[dim] Class overriding interface method that was already override by another interface (#32609)

The problem was a parent class overriding an interface that was already override by another interface.
Refactor class-init.c

Fix mono/mono#18917

Co-authored-by: Thays Grazia <thaystg@gmail.com>
4 years agoInitial runtime changes for composite support (#32500)
Tomáš Rylek [Wed, 4 Mar 2020 14:28:31 +0000 (15:28 +0100)]
Initial runtime changes for composite support (#32500)

This change changes CoreCLR runtime to support running
composite R2R apps with standalone MSIL produced by
Crossgen2. It introduces the new concept of a NativeImage
representing the composite R2R with native executable header
and adds basic support for loading these native images
upon loading the original MSIL assemblies and for using
the R2R code information therein as the native code cache
for the component MSIL assemblies.

Thanks

Tomas

4 years agoInitial implementation of stateful CBOR writer and reader classes (#32803)
Eirik Tsarpalis [Wed, 4 Mar 2020 12:57:08 +0000 (12:57 +0000)]
Initial implementation of stateful CBOR writer and reader classes (#32803)

* initial CborReader commit

* rename PositiveInteger to UnsignedInteger

* fix indices in unsigned integer encoding

* use an enum for AdditionalInfo constants

* s/ArgumentException/InvalidOperationException/

* make utf8 decoder throw on invalid bytes

* remove property-based tests

* address style

* just copy the header struct for now

* s/CborReader/CborValueReader/

* address feedback

* add more test cases in the happy path

* remove using declaration

* fix the seed parameter

* add `EnsureBuffer()` method in reader

* add tests for artihmetic overflow and type exceptions

* rename CborDateItem to CborInitialByte and expose reader Peek() methods

* add tests for non-canonical integer encodings

* use hex representation when asserting byte array equality

* add format and invalidop exception tests

* consistent test terminology

* add invalid unicode writing test

* add string reader failure tests

* fix failing test

* add peek tests

* implement ReadCborNegativeIntegerEncoding(); remove TryRead() methods for integer types

* add span overloads for string reader methods

* update string reader span overload signatures

* add format and invalidop exception tests for TryRead() string methods

* add tests for failure modes

* Update src/libraries/System.Security.Cryptography.Encoding/tests/Cbor/CborReader.String.cs

Co-Authored-By: Jeremy Barton <jbarton@microsoft.com>
* Update src/libraries/System.Security.Cryptography.Encoding/tests/Cbor/CborReader.String.cs

Co-Authored-By: Jeremy Barton <jbarton@microsoft.com>
* fix build

Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
4 years agoAdd IReadOnlySet<T> interface (#32488)
Jacob Lalonde [Wed, 4 Mar 2020 12:07:46 +0000 (07:07 -0500)]
Add IReadOnlySet<T> interface (#32488)

* Add read only set interface

* Rebase and fix conflicts

* Add Implementations into specs

Added to immutable set and spec

Spacing for Spec

Drop code snippets that I re-added accidentally during rebase

Re add code snippets that I dropped instead of squashed

* Add for sorted set in impl

* Refactor interface declarations, change ifdef for immutable

* Fix indentation

* One more indenting change

* Add ifdef to spec, re-order interfaces

* Remove from IImmutablespec

* Replace ISet<T> to immutable hashset spec that was erroneously removed

* Add read only set to system.runtime ref

* Add comments on IReadOnlySet<T>

* Add lang words to comments and fix spelling

4 years ago[cxx] Remove static initializers. (#33022)
monojenkins [Wed, 4 Mar 2020 11:54:18 +0000 (06:54 -0500)]
[cxx] Remove static initializers. (#33022)

In a current shipping Visual C++, 19.21.27702.2,
there is a bug involving const member data in structs, where for example:

static const struct a { // const on this line in either case
  const int b; // const on this line
} c = {1};

will have a static initializer, run usually reliably before main, but:

static const struct a { // const on this line in either case
  int b; // no const on this line
} c = {1};

will not.
The semantic difference is minuscule, so much so, that the first form
is relatively rare, and the bug shipped.

Just always use the second form.

The difference is that if you have a non-const a, b is still const, I guess.
If you have a const a, then no difference.

You can find these easily:

cd ...
for %a in (*.exe *.dll) do link /dump /disasm %a > %a.txt
findstr /c:"dynamic initializer" *.txt

Which could be automated and tested in CI.

This probably not an actual problem, but it is needlessly inefficient,
and potentially a problem. The timing/ordering of the initializers
is a bit not deterministic. You get writable data where you expect
read only.

It is in fact a compiler bug, fixed in later releases.
But it has been shipping for a while, I first noticed it over two years
ago, in code of mine that it caused to not work (a delayload implementation
which runs before main).

Co-authored-by: Jay Krell <jay.krell@cornell.edu>
4 years agoMove EventPipe environment variable parsing logic to native code (#32516)
Sung Yoon Whang [Wed, 4 Mar 2020 11:16:43 +0000 (03:16 -0800)]
Move EventPipe environment variable parsing logic to native code (#32516)

* Move environment variable parsing logic to native code

* Fix multiple provider issue

* Use env vars to set up eventpipe config

* Add default provider configuration if eventpipeconfig is not set

* Remove EventPipeController

* Add Argument parsing logic to XplatEventLoggerConfiguration

* cleanup

* Fix Linux build

* Check provider configuration before enabling them

* wrap new code under ifdef, put EventPipeController back

* pr feedback

* fix x86 build

* fix typo

* Fix loop condition

* ifdef out call to EnableViaEnvironmentVariables()

* Use CLRConfigStringHolder

* pr comments

* use NewHolder to avoid leak

4 years agoAdd -msse2 compile option (#33135)
Next Turn [Wed, 4 Mar 2020 08:48:01 +0000 (16:48 +0800)]
Add -msse2 compile option (#33135)

4 years agoRemove fallback resource (#33123)
Elinor Fung [Wed, 4 Mar 2020 06:57:21 +0000 (22:57 -0800)]
Remove fallback resource (#33123)

* Stop using fallback resource DLL
* Rename mscorrc.debug -> mscorrc

4 years agoFix missing TransitionBlock methods (#33134)
Next Turn [Wed, 4 Mar 2020 05:43:37 +0000 (13:43 +0800)]
Fix missing TransitionBlock methods (#33134)

4 years agoAnnotate System.Diagnostics.TraceSource for nullable (#32888)
buyaa-n [Wed, 4 Mar 2020 05:23:34 +0000 (21:23 -0800)]
Annotate System.Diagnostics.TraceSource for nullable (#32888)

* Annotate System.Diagnostics.TraceSource for nullable

4 years agoAdditional code coverage in System.Text.Json (#33019)
Alan Isaac [Wed, 4 Mar 2020 05:04:56 +0000 (00:04 -0500)]
Additional code coverage in System.Text.Json (#33019)

* added tests for invalid metadata properties with same length

* moved base64 test data in class, added test case

* added missing cyclic test for max depth of 0

* added test for null converter

* validated exception path

* added comment explaining 0 max depth

* using named parameter for readability

* added license header

* replacing duplicate test data

* removed redunant character assignment

* added explanation for base64 string length

4 years agoMove MSBuild projects out of the native build scripts (#31701)
Jeremy Koritzinsky [Wed, 4 Mar 2020 02:19:03 +0000 (18:19 -0800)]
Move MSBuild projects out of the native build scripts (#31701)

* Move coreclr managed tools that don't need to be published and System.Private.CoreLib into their own subsets in Subsets.props and drive their builds via Arcade instead of the coreclr scripts.

* Remove building System.Private.CoreLib from build scripts. Eventing sources TBD.

* Build packages via an Arcade subset instead of within build.cmd/build.sh

* Remove packages and test build from build.cmd. Clean up options on build.cmd and build.sh

* Generate eventing sources for System.Private.CoreLib within MSBuild instead of in the build.cmd/sh scripts. Clean up the build.sh usage documentation (lots of copy-paste errors).

* Remove check-definitions.py script and supporting goo.

* Fix eventing generation.

* Wire up  TargetArchitecture and OSGroup to coreclr's BuildArch and BuildOS to enable building System.Private.CoreLib for the correct output given the script parameters.

* Stop passing down now non-existent skiptests parameter.

* Fix coreclr .nuget rid parsing to account for linux-musl correctly.

* Update build scripts to use Arcade to build packages.

* Convert from Properties to AdditionalProperties.

* Build crossgen as part of Arcade (self-contained publish TBD).

* Pull down .NET runtime CLI for helix runs with crossgen2.

* Output crossgen2 to the BinDir/crossgen when built from the project file. Enable the test shell scripts to either resolve the dotnet CLI from the path or from relative to Core_Root if the __DotNet variable is undefined.

* Generate distro rid during windows build.

* Various fixes to get files binplaced correctly and builds to work on Linux.

* Fix search for dotnet in repo on bash.

* Remove __BuildTest variable and fix up the script.

* Fix steps in build-job to build S.P.CL before the runtime and build managed tools after the runtime.

* Fix casing typo.

* Refactor detecting system OS and Architecture.

* Fix wasm rid calculation.

* Run crossgen2 on corerun so we run it on the runtime we're going to ship it with.

* Assemble a live self-contained publish in the crossgen2 package.

* Fix init-os-and-arch resolution.

* Ensure that the runtime files we package in crossgen2 are the crossgened ones.

* Remove extraneous /bl

* Build R2RDump to a subfolder instead of the product dir.

* Seperate out the crosssgening corelib step into a separate script.

* Fix permissions on crossgen-corelib.sh

* Rename build.cmd/sh to build-runtime.cmd/sh

* Fix parameters in crossgen2determinism test.

* Run crossgen on System.Private.CoreLib in CI.

* Restore original build.cmd/sh scripts with a deprecation warning and update instructions.

* Initialize developer prompt in crossgen-corelib.cmd script so we can find DIA on CI machines.

* Make sure vs tools are enabled so we can resolve DiaSymReader.

* Call build-native instead of build.

* Fix build-native -> build-runtime.

* Fix permissions.

* Remove dead MSBuild code.

* Factor out python locating targets to make them available to the whole repo.

* PR Feedback/simplification.

* Create a self-contained deps.json for crossgen2 and add it to the package.

* Pass runtimeconfiguration as configuration for crossgen2 deps file generation.

* Try specifying rids directly in crossgen2 project to get the restore correct for the live-build pipeline.

* Run crossgen2 via corerun in R2R.SuperILC.

* Add binlogs to build-runtime.cmd

* Combine non build-runtime steps into a single step so we get one binlog that doesn't get overwritten.

* Add reference to issue describing new workflow.

* Quote python path

* Set arch default.

* PR Feedback and clean up crossgen-corelib's argument list.

* Fix subset name matching to work when one subset name is a substring of another.

* Pass the official build id as an msbuild arg at all times.
Additional cleanup for crossgen-corelib step.

* PR Feedback.

* Fix default subset list construction.

* Add deprecation warnings at beginning and end of build.cmd and build.sh.

* Setup dirs in crossgen-corelib.sh

* Move enforcepgo argument to before the official build arg so that it gets consumed correctly.

* Add cross-os DAC builds as subsets.
Clean up build-runtime parameters and passing the official build ID from runtime.proj.

* Update script usage docs.

* Skip the cross-os dac on x86.

* Build windows->linux cross dac on PR and CI.

* Don't build the cross-OS linux dac on Windows x86.

4 years agoFix incorrect r2r codegen for hardware instrinsics (#33090)
David Wrighton [Wed, 4 Mar 2020 00:09:17 +0000 (16:09 -0800)]
Fix incorrect r2r codegen for hardware instrinsics (#33090)

* Address incorrect generation of insertps and dpps instructions in crossgen images
* Implement matching intrinsics processing for crossgen2
Fixes #32175

4 years agoMerge pull request #33078 from maryamariyan/enable-primitives
Maryam Ariyan [Tue, 3 Mar 2020 23:31:15 +0000 (15:31 -0800)]
Merge pull request #33078 from maryamariyan/enable-primitives

Enable Microsoft.Extensions.Primitives

4 years ago[threads] Add a global "runtime startup is finished" flag (#32668)
monojenkins [Tue, 3 Mar 2020 23:28:45 +0000 (18:28 -0500)]
[threads] Add a global "runtime startup is finished" flag (#32668)

This contributes to https://github.com/mono/mono/issues/18916 (to make coop locking not bother with state transitions if the runtime isn't ready yet) .

Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
4 years agoSList::Init: add missing constructor (#33096)
Tom Deseyn [Tue, 3 Mar 2020 22:45:29 +0000 (23:45 +0100)]
SList::Init: add missing constructor (#33096)

SList::Init uses an assignment operator that doesn't exist.
Because this template class method doesn't get used during
default compilation, most compilers don't detect the issue.
clang 10 detects the issue and gives an error.

4 years agoRemove extractor from HostModel (#33001)
Swaroop Sridhar [Tue, 3 Mar 2020 22:09:23 +0000 (14:09 -0800)]
Remove extractor from HostModel (#33001)

* Remove extractor from HostModel

Microsoft.NET.HostModel.Bundle implemented a bundle-extractor in managed code.
The extractor is not used in production.
It is a tool for testing the bundler before extraction capability was implemented in the AppHost.

The extractor is now removed because:
* The Apphost handles bundles and we don't need the extractor for testing.
* The bundler will generate multiple versions of single-file apps.
  Maintaining the extractor for all these versions is unnecessary complexity in the codebase.

* Update src/installer/managed/Microsoft.NET.HostModel/Bundle/Manifest.cs

Co-Authored-By: Adeel Mujahid <adeelbm@outlook.com>
Co-authored-by: Adeel Mujahid <adeelbm@outlook.com>
4 years agoFixed heap corruption in HttpListener
Marie Píchová [Tue, 3 Mar 2020 21:57:42 +0000 (22:57 +0100)]
Fixed heap corruption in HttpListener

Fixes #31997

In non-blocking HttpListenerResponse.Close, RequestContextBase was being disposed multiple times from different threads. This fix ensures that the underlying IntPtr is freed only once, even in multi-threaded scenarios.

4 years ago[master] Update dependencies from dotnet/arcade mono/linker (#33101)
dotnet-maestro[bot] [Tue, 3 Mar 2020 20:56:25 +0000 (15:56 -0500)]
[master] Update dependencies from dotnet/arcade mono/linker (#33101)

* Update dependencies from https://github.com/dotnet/arcade build 20200302.4

- Microsoft.DotNet.XUnitExtensions - 5.0.0-beta.20152.4
- Microsoft.DotNet.VersionTools.Tasks - 5.0.0-beta.20152.4
- Microsoft.DotNet.ApiCompat - 5.0.0-beta.20152.4
- Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.20152.4
- Microsoft.DotNet.Build.Tasks.Feed - 5.0.0-beta.20152.4
- Microsoft.DotNet.Build.Tasks.Packaging - 5.0.0-beta.20152.4
- Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk - 5.0.0-beta.20152.4
- Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk - 5.0.0-beta.20152.4
- Microsoft.DotNet.CodeAnalysis - 5.0.0-beta.20152.4
- Microsoft.DotNet.GenAPI - 5.0.0-beta.20152.4
- Microsoft.DotNet.GenFacades - 5.0.0-beta.20152.4
- Microsoft.DotNet.Helix.Sdk - 5.0.0-beta.20152.4
- Microsoft.DotNet.RemoteExecutor - 5.0.0-beta.20152.4
- Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.20152.4

* Update dependencies from https://github.com/mono/linker build 20200302.3

- ILLink.Tasks - 0.1.6-prerelease.20152.3

4 years agoEnable assert in perfScoreUnhandledInstruction (#810)
Brian Sullivan [Tue, 3 Mar 2020 20:36:33 +0000 (12:36 -0800)]
Enable assert in perfScoreUnhandledInstruction (#810)

* perfScoreUnhandledInstruction will now assert in a DEBUG or CHECKED build when it encounters an unhanded instruction

* Added PerfScore values for IF_DV_2T: // addv, saddlv, smaxv, sminv, uaddlv, umaxv, uminv

* Add PerfScore support for fcmeq, fcmge, fcmgt, fcmle, fcmlt, fcvtl2, fcvtn, fcvtn2, fabd

* Added PerfScore support for INS_addp

* Addded fmla and fmls

* Update flma and fmls

4 years ago- Simplify PortedExtensionsProject
Maryam Ariyan [Tue, 3 Mar 2020 20:20:39 +0000 (12:20 -0800)]
- Simplify PortedExtensionsProject
- add sln file
- Fix TargetFramework on Test project

4 years ago[Mono] Fix Sse2.ConvertScalarToVector128 and add signed overloads (#33100)
Egor Bogatov [Tue, 3 Mar 2020 20:14:57 +0000 (23:14 +0300)]
[Mono] Fix Sse2.ConvertScalarToVector128 and add signed overloads (#33100)

* Fix OP_CREATE_SCALAR and add more intrinsics

* Add a note

* Enable HW intrinsics in the mono corlib build (Zoltan's PR)

* cmethod_klass_name_space should not be empty for nested classes

4 years agoUpdate bootstrapped SDK (#33113)
Viktor Hofer [Tue, 3 Mar 2020 19:51:50 +0000 (20:51 +0100)]
Update bootstrapped SDK (#33113)

Updating the bootstrapped SDK to fix a NuGet restore issue during EvaluateCacheFile.

4 years agoBuild CoreCLR tests as platform independent (AnyCPU) (#32916)
Gleb Balykov [Tue, 3 Mar 2020 19:38:48 +0000 (22:38 +0300)]
Build CoreCLR tests as platform independent (AnyCPU) (#32916)

* Build platform independent tests dlls

* Fix tests exclusion conditions

* Fix windows specific dirs

4 years agoRevert "[mono] Include filename in Invalid image error messages (#32560)" (#33116)
Mitchell Hwang [Tue, 3 Mar 2020 18:41:04 +0000 (13:41 -0500)]
Revert "[mono] Include filename in Invalid image error messages (#32560)" (#33116)

This reverts commit 5371ef4fc3a3983f12c7fda816bd939eb37f3c65.

4 years agoAdd Fedora 33 runtime ids
Omair Majid [Tue, 3 Mar 2020 18:26:56 +0000 (13:26 -0500)]
Add Fedora 33 runtime ids

Fedora 32 is gearing up for release[1], and in-development version of
Fedora has been offically labelled as being Fedora 33:

    $ podman run -it fedora:33 cat /etc/os-release
    NAME=Fedora
    VERSION="33 (Container Image)"
    ID=fedora
    VERSION_ID=33
    VERSION_CODENAME=""
    PLATFORM_ID="platform:f33"
    PRETTY_NAME="Fedora 33 (Container Image)"
    ANSI_COLOR="0;34"
    LOGO=fedora-logo-icon
    CPE_NAME="cpe:/o:fedoraproject:fedora:33"
    HOME_URL="https://fedoraproject.org/"
    DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/rawhide/system-administrators-guide/"
    SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help"
    BUG_REPORT_URL="https://bugzilla.redhat.com/"
    REDHAT_BUGZILLA_PRODUCT="Fedora"
    REDHAT_BUGZILLA_PRODUCT_VERSION=rawhide
    REDHAT_SUPPORT_PRODUCT="Fedora"
    REDHAT_SUPPORT_PRODUCT_VERSION=rawhide
    PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
    VARIANT="Container Image"
    VARIANT_ID=container

[1] https://fedorapeople.org/groups/schedule/f-32/f-32-key-tasks.html

4 years agoSimplifying the implementation of several Vector2/3/4 methods (#33088)
Tanner Gooding [Tue, 3 Mar 2020 18:24:05 +0000 (18:24 +0000)]
Simplifying the implementation of several Vector2/3/4 methods (#33088)

4 years agoRemove pre-consolidation CoreCLR-only Official-build specific… (#32999)
Jeremy Koritzinsky [Tue, 3 Mar 2020 18:02:47 +0000 (10:02 -0800)]
Remove pre-consolidation CoreCLR-only Official-build specific… (#32999)

4 years agoUpdate shared code license headers (#33086)
Chris Ross [Tue, 3 Mar 2020 17:56:36 +0000 (09:56 -0800)]
Update shared code license headers (#33086)

4 years agoDisabled GetTotalAllocatedBytes test. (#33092)
Nathan Ricci [Tue, 3 Mar 2020 17:54:35 +0000 (12:54 -0500)]
Disabled GetTotalAllocatedBytes test. (#33092)

4 years agoReturn original value in Interlocked.Or/And (#33102)
Miha Zupan [Tue, 3 Mar 2020 17:54:15 +0000 (18:54 +0100)]
Return original value in Interlocked.Or/And (#33102)

4 years ago[merp] Create a signal ('source') breadcrumb for the crash dump process (#32945)
monojenkins [Tue, 3 Mar 2020 16:47:06 +0000 (11:47 -0500)]
[merp] Create a signal ('source') breadcrumb for the crash dump process (#32945)

TODO: Test + maybe rename 'signal' argument to 'source' everywhere

/cc @kdubau @lambdageek

Addresses https://github.com/mono/mono/issues/18715
<!--
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: Alexis Christoforides <alexis@thenull.net>
4 years ago[mono] Include filename in Invalid image error messages (#32560)
Mitchell Hwang [Tue, 3 Mar 2020 16:14:03 +0000 (11:14 -0500)]
[mono] Include filename in Invalid image error messages (#32560)

* [mono] Include filename in Invalid Image message

* [mono] Rename Invalid Image to File Not Found where applicable

* [Mono] Remove ActiveIssue attributes 31649 and 31650

* Touch up callers of mono_error_set_simple_file_not_found in appdomain.c

* Specify file name in mono_error_set_simple_file_not_found reflection_only message

* Touch up mono_error_set_file_not_found callers in icall.c

* Include image name in mono_error_set_bad_image_by_name calls in metadata.c

* Include aot name in mono_error_set_bad_image_by_name calls in aot-runtime.c

4 years agoUpdate shared HPackEncoder (#32944)
James Newton-King [Tue, 3 Mar 2020 15:57:20 +0000 (04:57 +1300)]
Update shared HPackEncoder (#32944)

4 years agoImprove call counting mechanism (#32250)
Koundinya Veluri [Tue, 3 Mar 2020 15:53:43 +0000 (10:53 -0500)]
Improve call counting mechanism (#32250)

* Improve call counting mechanism

- Commit 1
  - Reverts commit f954c6bb80a21d9c44a6ee751d935a0573f7226a, which reverted PR https://github.com/dotnet/runtime/pull/1457 due to issues
- Commit 2
  - Fixes crashes and assertion failures seen by the original change, fixes https://github.com/dotnet/runtime/issues/29934
  - The crashes were caused by commit https://github.com/dotnet/runtime/pull/1457/commits/6aa3c7083735895c2e687a77e3636080edb366c3 in the original PR
  - Call counting infos cannot be deleted when the corresponding call counting stubs may still run, because:
    - The remaining call count decremented by the stub is in the call counting info
    - The only way to get a code version / method desc from a stub is to go through the call counting info
  - Got one repro of the assertion failure in https://github.com/dotnet/runtime/issues/22786 and it is most likely caused by the same issue, following heap corruption from modifying a deleted call counting info where the memory is reused for a `NativeCodeVersionNode`, messing up the method desc pointer
  - Fixed with a partial revert of the above commit. Added back the `Complete` stage and then call counting infos are deleted only after it's ensured that call counting stubs won't be used (shortly before deleting them).
- Commit 3
  - Public static functions of `CallCountingManager` that may be called through the debugger may occur before static initialization, added a check for null as suggested in https://github.com/dotnet/runtime/pull/29892

* Fix crashes and assertion failures seen by the original change

* Add check for null for some functions callable from the debugger

4 years ago[aot] Add support for emitting the method address table as a table of normal pointers...
monojenkins [Tue, 3 Mar 2020 15:52:26 +0000 (10:52 -0500)]
[aot] Add support for emitting the method address table as a table of normal pointers in the data segment. (#33006)

[aot] Rename acfg->opts to acfg->jit_opts.

Co-authored-by: Zoltan Varga <vargaz@gmail.com>
4 years agoSet GenFacadesForceZeroVersionSeeds for shims (#33052)
Eric StJohn [Tue, 3 Mar 2020 15:51:23 +0000 (07:51 -0800)]
Set GenFacadesForceZeroVersionSeeds for shims (#33052)

4 years agoEnable Mono netcore LLVM build on Windows. (#32869)
Johan Lorensson [Tue, 3 Mar 2020 15:14:10 +0000 (16:14 +0100)]
Enable Mono netcore LLVM build on Windows. (#32869)

Current Mono netcore LLVM build on Windows uses a prebuild LLVM and doesn't
support local build LLVM. Current mono.proj only use configure and
--with-llvm argument on none Windows build. On Windows, trying to build
Mono netcore using LLVM will fail.

Fix sets msbuild property, MONO_EXTERNAL_LLVM_CONFIG to full path of
downloaded llvm-config.exe, this is what's set when doing LLVM build
using configure --with-llvm on Mono Windows build in Mono repro, but since
Mono netcore Windows build won't use configure, the property should be
specified directly when calling msbuild.

4 years agoFix Mono Tool MSVC Debug build. (#32960)
monojenkins [Tue, 3 Mar 2020 15:12:02 +0000 (10:12 -0500)]
Fix Mono Tool MSVC Debug build. (#32960)

Changes done in object-offsets.h by mono/mono#18713 adding offsets for TARGET_AMD64 exposed
a build configuration error in the Mono Tool MSVC debug build due to incorrectly setting both X86 and AMD64 defines causing compile errors when including object-offset.h. Release configuration didn't have this configuration error, meaning that CI builds wouldn't trigger build error.

Fix makes sure all MSVC build configurations for Mono Tools (genmdesc, monodis, pedump) matches the build configuration for other binaries and that debug build configuration is inline with release build configuration.

Co-authored-by: Johan Lorensson <lateralusx.github@gmail.com>