platform/upstream/dotnet/runtime.git
4 years agoDelete orphaned file (#2217)
Michal Strehovský [Mon, 27 Jan 2020 14:01:30 +0000 (15:01 +0100)]
Delete orphaned file (#2217)

Became orphaned in #172.

4 years agoMinor R2RDump facelift w.r.t. diffing dump (#2184)
Tomáš Rylek [Mon, 27 Jan 2020 13:04:51 +0000 (14:04 +0100)]
Minor R2RDump facelift w.r.t. diffing dump (#2184)

Based on offline chat with JanV I added initial provisions to simplify
diffing Crossgen1- and 2-compiled SPC. In essence, the --diff option
newly ends up emitting two extra files with the ".r2rdump" extension
representing the methods common to the left and right R2R file. This
is formerly untrodden territory, I'm pioneering R2RDump usability for
this purpose.

Thanks

Tomas

4 years agoConfig for CredScan suppresions (#2212)
Marie Píchová [Mon, 27 Jan 2020 10:54:22 +0000 (11:54 +0100)]
Config for CredScan suppresions (#2212)

4 years agoFix for -mminimal-toc detection, enable BTLS on FreeBSD PowerPC (#2175)
monojenkins [Mon, 27 Jan 2020 10:21:29 +0000 (05:21 -0500)]
Fix for -mminimal-toc detection, enable BTLS on FreeBSD PowerPC (#2175)

Fixes mono/mono#18554 by making autoconf actually check if `-mminimal-toc` works instead of assuming on powerpc. Tested with FreeBSD 12.x and 13.x on powerpc64 ELFv2.
While we are in here, also enable BTLS which has passed testing.

Co-authored-by: Phil Jaenke <prj@rootwyrm.com>
4 years agoAllow passing IntPtr values with UnmanagedType.AsAny. (#2039)
monojenkins [Mon, 27 Jan 2020 10:19:26 +0000 (05:19 -0500)]
Allow passing IntPtr values with UnmanagedType.AsAny. (#2039)

This is used by the SplashScreen class of WindowsBase in .NET Core to pass a NULL pointer.

Co-authored-by: Vincent Povirk <madewokherd@gmail.com>
4 years ago[mono-corelib] Throw exception on an invalid use of short form opcodes for locals...
Alexis Christoforides [Mon, 27 Jan 2020 10:13:32 +0000 (05:13 -0500)]
[mono-corelib] Throw exception on an invalid use of short form opcodes for locals. (#2201)

4 years agoAdd HTTP/3 draft 25 support. (#1294)
Cory Nelson [Mon, 27 Jan 2020 07:50:54 +0000 (23:50 -0800)]
Add HTTP/3 draft 25 support. (#1294)

4 years agoUnify remaining CoreLib interop files (#2203)
Jan Kotas [Mon, 27 Jan 2020 02:24:51 +0000 (18:24 -0800)]
Unify remaining CoreLib interop files (#2203)

Fixes #1232

4 years agoMerge pull request #2206 from vargaz/disable-lldb
Zoltan Varga [Sun, 26 Jan 2020 19:31:17 +0000 (14:31 -0500)]
Merge pull request #2206 from vargaz/disable-lldb

[runtime] Disable lldb backtrace display on osx, it hangs on attaching in lldb.

4 years agoMake JIT configuration a single-init static (#2208)
Michal Strehovský [Sun, 26 Jan 2020 17:52:08 +0000 (18:52 +0100)]
Make JIT configuration a single-init static (#2208)

This fixes two things:
* UseJitPath on compilation builder doesn't make sense for any other backends this file is shared with (CppCodegen/LLVM). Moving that to ReadyToRunCodenCompilationBuilder.
* JitConfigProvider made it look like a configurable JIT path and configurable COMPlus RyuJIT options are a thing, but they're in fact per process and can only be initialized once (first is an implementation limitation in CorInfoImpl, the second is a RyuJIT limitation). Making the config class static+throwing for double-initialization to make this very clear.

4 years ago[runtime] Disable lldb backtrace display on osx, it hangs on attaching in lldb.
Zoltan Varga [Sun, 26 Jan 2020 13:22:05 +0000 (08:22 -0500)]
[runtime] Disable lldb backtrace display on osx, it hangs on attaching in lldb.

4 years agoMerge pull request #2079 from monojenkins/sync-pr-18537-from-mono
Thays Grazia [Sun, 26 Jan 2020 02:59:45 +0000 (23:59 -0300)]
Merge pull request #2079 from monojenkins/sync-pr-18537-from-mono

[debugger] Access invalid memory address using PointerValue Command.

4 years ago[debugger] Access invalid memory address using PointerValue Command.
thaystg [Sun, 26 Jan 2020 00:23:38 +0000 (00:23 +0000)]
[debugger] Access invalid memory address using PointerValue Command.

Creating a fork process to access address that came from IDE using PointerValue. The IDE can send an invalid address and it was crashing mono.

Fixes mono/mono#18191

4 years agoCPU utilization computation fixes (#2196)
Jan Kotas [Sat, 25 Jan 2020 23:56:23 +0000 (15:56 -0800)]
CPU utilization computation fixes (#2196)

* CPU utilization computation fixes
- On Unix, move scalling for total number of processors from PAL to managed side, so that it can use container limit aware ProcessorCount
- Delete asserts for CPU utilization being between 0 and 100. These asserts can fail due to races or rounding errors.
- Converted a few classes to structs

Fixes #2195

* Fix buildbreak

4 years agoFix typos (#2179)
monojenkins [Sat, 25 Jan 2020 18:55:53 +0000 (13:55 -0500)]
Fix typos (#2179)

Co-authored-by: Maher Jendoubi <maher.jendoubi@gmail.com>
4 years agoReduce execution time of RegexCharacterSetTests (#2194)
Stephen Toub [Sat, 25 Jan 2020 18:29:32 +0000 (13:29 -0500)]
Reduce execution time of RegexCharacterSetTests (#2194)

I recently wrote a large, exhaustive set of tests to validate our handling of regex character sets.  Unfortunately it ends up being too much for our CI system.  We were validating ~440 different character sets, for both RegexOptions.None and RegexOptions.Compiled, and for each validating all 65,536 character inputs... that's ~58M regex matches.  In most cases locally it was taking around 15s, but on a loaded, underwhelming CI machine, it was taking minutes in some cases.

I've reduced the load (primarily by only validating the specified characters that should be included or excluded in cases where we're already testing both the positive and negative variants of the same set), while trying to keep a reasonable semblence of the coverage.

I also made it outerloop, and moved a few other longer-running regex tests to outerloop as well.

4 years agoInitialize HashSizeValue for digest algorithms.
Kevin Jones [Sat, 25 Jan 2020 18:00:12 +0000 (13:00 -0500)]
Initialize HashSizeValue for digest algorithms.

The abstract types SHAx and MD5 did not set HashSizeValue, which
would lead to derived types to have HashSize a value of 0. This
initializes the field to match .NET Framework behavior.

4 years agoMerge pull request #2081 from monojenkins/sync-pr-18552-from-mono
Zoltan Varga [Sat, 25 Jan 2020 14:20:20 +0000 (09:20 -0500)]
Merge pull request #2081 from monojenkins/sync-pr-18552-from-mono

[jit] Compute has_references correctly for gshared types whose constraint is a generic valuetype.

4 years ago[jit] Compute has_references correctly for gshared types whose constraint is a generi...
vargaz [Sat, 25 Jan 2020 13:06:43 +0000 (13:06 +0000)]
[jit] Compute has_references correctly for gshared types whose constraint is a generic valuetype.

4 years agoFixed typo in docker readme (#2190)
Marie Píchová [Sat, 25 Jan 2020 13:01:23 +0000 (14:01 +0100)]
Fixed typo in docker readme (#2190)

4 years agoFix intrinsics treatment in Crossgen2 (#1926)
Tomáš Rylek [Sat, 25 Jan 2020 10:27:13 +0000 (11:27 +0100)]
Fix intrinsics treatment in Crossgen2 (#1926)

* Fix intrinsics treatment in Crossgen2

This change fixes unintentional differences in the treatment of
intrinsics in Crossgen2 compared to Crossgen1 I found while
investigating failures in the regression test b426654. While the
change by itself doesn't fully fix the test, I believe it to be
generally useful towards removing the remaining codegen
differences between the compilers.

Thanks

Tomas

* Address JanK's PR feedback

I have audited all entries in the intrinsics table and I added
the [Intrinsic] annotation to all applicable methods. I haven't
found <code>System.EETypePtr.EETypePtrOf</code> and
<code>System.Activator.DefaultConstructorOf</code> anywhere.
I have reverted the additional check for IsInternalCall that
I put in CorInfoImpl in the 1st commit.

Thanks

Tomas

* Revert assertion check for IsInternalCall

* Remove superfluous check for the intrinsic attribute

* Put back the CORINFO_FLG_JIT_INTRINSIC flag

* Remove superfluous namespace name on Intrinsic per JanK's suggestion

* One more removal of superfluous namespace specification

4 years agoMove Strings.resx from CoreCLR to shared System.Private.CoreLib folder (#2151)
Alexander Köplinger [Sat, 25 Jan 2020 10:08:02 +0000 (11:08 +0100)]
Move Strings.resx from CoreCLR to shared System.Private.CoreLib folder (#2151)

* Move Strings.resx from CoreCLR to shared System.Private.CoreLib folder

Mono and CoreCLR both use the same file.

* Get rid of duplicate string

4 years agoRemove unused parts of resource loading (#2164)
Elinor Fung [Sat, 25 Jan 2020 10:01:18 +0000 (02:01 -0800)]
Remove unused parts of resource loading (#2164)

4 years agoFix restore of internal tools and enable IBC merge (#1846)
Santiago Fernandez Madero [Sat, 25 Jan 2020 03:02:49 +0000 (19:02 -0800)]
Fix restore of internal tools and enable IBC merge (#1846)

4 years agoMerge pull request #2142 from vargaz/runtime-no-abort
Zoltan Varga [Sat, 25 Jan 2020 01:12:53 +0000 (20:12 -0500)]
Merge pull request #2142 from vargaz/runtime-no-abort

[runtime] Avoid loading ThreadAbortException class on netcore.

4 years agoIncrease crossgen-comparison job timeout (#2160)
Santiago Fernandez Madero [Sat, 25 Jan 2020 00:45:09 +0000 (16:45 -0800)]
Increase crossgen-comparison job timeout (#2160)

4 years agoJIT: merge fgMorph into compCompile (#2110)
Andy Ayers [Sat, 25 Jan 2020 00:19:50 +0000 (16:19 -0800)]
JIT: merge fgMorph into compCompile (#2110)

This gives us a single method that controls most of the jit's phase behavior.
Largely a manual inline, though I updated some comments and changed one assert.

Follow up from #1309; also see #2109.

4 years agoJIT: fix another jitstress/gcstress issue with profiler leave hook (#2105)
Andy Ayers [Sat, 25 Jan 2020 00:05:27 +0000 (16:05 -0800)]
JIT: fix another jitstress/gcstress issue with profiler leave hook (#2105)

Need to also report the hidden return buffer pointer as GC live, in case it
happens to refer to a heap location (method invoked via reflection).

Also did some minor cleanup; we weren't using `returnsGCr` in `emitEndCodeGen`
and we were munging return value liveness unnecessarily when not emitting
a profiler leave hook.

Closes #1971.

4 years agofixed few races when setting or clearing card bundle bits (#2132)
Vladimir Sadov [Fri, 24 Jan 2020 22:58:45 +0000 (14:58 -0800)]
fixed few races when setting or clearing card bundle bits (#2132)

4 years agoRefactor CMake system to allow cross OS DAC compile (#2054)
Steve MacLean [Fri, 24 Jan 2020 22:09:26 +0000 (17:09 -0500)]
Refactor CMake system to allow cross OS DAC compile (#2054)

* Refactor CMake system to allow cross OS DAC compile

Add CLR_CMAKE_HOST_OS

Add rules to determine which cross OS combinations are valid

Make add_definitions depend on TARGET OS properties. Wherever reasonable
make C++ defines depend on runtime target rather than host.

4 years agoUpdate perfview link (#2161)
Bill Wert [Fri, 24 Jan 2020 22:00:28 +0000 (14:00 -0800)]
Update perfview link (#2161)

4 years agoMerge pull request #2108 from vargaz/mono-cmake-build
Zoltan Varga [Fri, 24 Jan 2020 22:00:12 +0000 (17:00 -0500)]
Merge pull request #2108 from vargaz/mono-cmake-build

Initial CMAKE build system support for Mono.

4 years agoFix validation of uninstantiated generic methods (#2137)
Michal Strehovský [Fri, 24 Jan 2020 20:56:32 +0000 (21:56 +0100)]
Fix validation of uninstantiated generic methods (#2137)

Matches what we do for uninstatiated generic types - no need to look at generic parameters.

4 years agoOne more removal of superfluous namespace specification
Tomas [Fri, 24 Jan 2020 19:57:31 +0000 (20:57 +0100)]
One more removal of superfluous namespace specification

4 years agoReenable Http2_ServerSendsInvalidSettingsValue_Error test (#2134)
Tomas Weinfurt [Fri, 24 Jan 2020 19:42:20 +0000 (11:42 -0800)]
Reenable Http2_ServerSendsInvalidSettingsValue_Error test (#2134)

4 years agoRemove superfluous namespace name on Intrinsic per JanK's suggestion
Tomas [Fri, 24 Jan 2020 19:05:40 +0000 (20:05 +0100)]
Remove superfluous namespace name on Intrinsic per JanK's suggestion

4 years agoRemove date number from dev build version (#1835)
Davis Goodin [Fri, 24 Jan 2020 18:17:11 +0000 (12:17 -0600)]
Remove date number from dev build version (#1835)

* Remove date number from dev build version

* Set Library assembly version back to 5.0.0.0

* Use default assembly version in versions.props and fix package testing

* Add missed change to define AssemblyVersion to match MajorVersion.MinorVersion.0.0 in the root

* Don't change AssemblyVersions in installer, leave as it was

* Fix installer tests

* Move AssemblyVersion for installer test assets to right place

Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
4 years agocorefx => runtime (#2068)
Youssef Victor [Fri, 24 Jan 2020 17:30:18 +0000 (19:30 +0200)]
corefx => runtime (#2068)

* corefx => runtime

* Update adding-api-guidelines.md

* Update adding-api-guidelines.md

4 years agoRecognize the `Vector128/256.AsVector*` methods as intrinsic (#1280)
Tanner Gooding [Fri, 24 Jan 2020 15:49:44 +0000 (07:49 -0800)]
Recognize the `Vector128/256.AsVector*` methods as intrinsic (#1280)

* Recognize the `Vector128/256.AsVector*` methods as intrinsic

* Ensure we normalize the struct handle for S.Numerics to S.R.Intrinsic vector conversions

* Marking the Vector128/256.As* methods as intrinsic

* Don't handle AsVector2 or AsVector3 as intrinsic right now

4 years agoenable PostAsync_ReuseRequestContent_Success on Unix (#2118)
Tomas Weinfurt [Fri, 24 Jan 2020 15:00:44 +0000 (07:00 -0800)]
enable PostAsync_ReuseRequestContent_Success on Unix (#2118)

4 years agoRemove ActiveIssue(39075) (#2119)
Eric StJohn [Fri, 24 Jan 2020 14:59:47 +0000 (06:59 -0800)]
Remove ActiveIssue(39075) (#2119)

Issue was fixed but test was not enabled.

4 years agoenable GetAsync_SupportedSSLVersion_Succeeds (#2125)
Tomas Weinfurt [Fri, 24 Jan 2020 14:59:01 +0000 (06:59 -0800)]
enable GetAsync_SupportedSSLVersion_Succeeds (#2125)

4 years ago[runtime] Avoid loading ThreadAbortException class on netcore.
Zoltan Varga [Fri, 24 Jan 2020 14:22:27 +0000 (09:22 -0500)]
[runtime] Avoid loading ThreadAbortException class on netcore.

4 years agoFix pipeline trigger for running libraries tests against Mono (#2097)
Alexander Köplinger [Fri, 24 Jan 2020 08:51:56 +0000 (09:51 +0100)]
Fix pipeline trigger for running libraries tests against Mono (#2097)

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

Also disables one test that seems to be flaky on Mono.

4 years agoFix enterprise stress pipeline (#2121)
Santiago Fernandez Madero [Fri, 24 Jan 2020 01:01:55 +0000 (17:01 -0800)]
Fix enterprise stress pipeline (#2121)

4 years agoAdd COMPlus_DiagnosticsServerTransportPath (#1600)
John Salem [Fri, 24 Jan 2020 00:27:24 +0000 (16:27 -0800)]
Add COMPlus_DiagnosticsServerTransportPath (#1600)

* Add COMPlus_DiagnosticsServerTransportPath
* allows users to specify a location for the Diagnostics Server

4 years agoUnify EH boundary handling (#2049)
Carol Eidt [Fri, 24 Jan 2020 00:03:23 +0000 (16:03 -0800)]
Unify EH boundary handling (#2049)

4 years agoAdd alpinedac & linuxdac build options (#2056)
Steve MacLean [Thu, 23 Jan 2020 23:31:08 +0000 (18:31 -0500)]
Add alpinedac & linuxdac build options (#2056)

* Add alpinedac & linuxdac build options

4 years agoInitial CMAKE build system support.
Zoltan Varga [Thu, 23 Jan 2020 22:30:05 +0000 (17:30 -0500)]
Initial CMAKE build system support.

4 years agoClean up stale issue links (#2063)
Stephen Toub [Thu, 23 Jan 2020 22:05:05 +0000 (17:05 -0500)]
Clean up stale issue links (#2063)

- In some cases, I deleted ActiveIssues associated with issues where the problem was supposedly fixed.  We'll see.
- In some cases, I deleted test cases entirely, e.g. where the corresponding issue said effectively "we'll live with the behavior" or "another repo is responsible for this now" (paraphrasing), or where the tests were initially added to the repo years ago already disabled and against bug numbers from some old bug database.
- In some cases, I replaced the link with the correct one.
- In some cases, I re-opened closed issues.

4 years agoSpanify SqlDecimal internals (#1155)
Wraith2 [Thu, 23 Jan 2020 19:59:37 +0000 (19:59 +0000)]
Spanify SqlDecimal internals (#1155)

4 years agoFix assert 'treeWithCall == call' (#2050)
Bruce Forstall [Thu, 23 Jan 2020 19:56:20 +0000 (11:56 -0800)]
Fix assert 'treeWithCall == call' (#2050)

* Fix assert 'treeWithCall == call'

This assert was occurring when we have:
- a potential optimistic tail call
- of a function that returns a ref type
- that is also an inline candidate
- whose inline is rejected
- with `COMPlus_JitGCChecks` stress mode that injects a
call to `CORINFO_HELP_CHECK_OBJ` at the `RETURN`
- where we decide to go ahead with the optimistic tailcall
but it is no longer in legal tailcall position.

To fix, simply disallow a tailcall if we are doing
`COMPlus_JitGCChecks` in a function with a ref type return, that
would have inserted the problemmatic call.

Fixes #1821

* Fix formatting

4 years agoMake sure CoreCLRArtifactsPath/MonoArtifactsPath has trailing slash (#2083)
Alexander Köplinger [Thu, 23 Jan 2020 19:13:07 +0000 (20:13 +0100)]
Make sure CoreCLRArtifactsPath/MonoArtifactsPath has trailing slash (#2083)

* Make sure CoreCLRArtifactsPath/MonoArtifactsPath has trailing slash

Addresses the official build break caused by the Mono CI PR.

Fixes https://github.com/dotnet/runtime/issues/2053

* Handle empty RuntimeArtifactsPath

4 years agoMatch blittability rules in crossgen2 with CoreCLR (#2072)
Michal Strehovský [Thu, 23 Jan 2020 19:07:36 +0000 (20:07 +0100)]
Match blittability rules in crossgen2 with CoreCLR (#2072)

Fixes #483. Structs with pointer-typed fields are blittable.

After #1866 we no longer have to worry about the recursion because the code path that recursed into pointed-to types was deleted.

4 years agoRemove legacy guard against loading PFX with no MAC on Unix
Jeremy Barton [Thu, 23 Jan 2020 19:07:07 +0000 (11:07 -0800)]
Remove legacy guard against loading PFX with no MAC on Unix

4 years agoMerge pull request #2040 from monojenkins/sync-pr-18512-from-mono
Aleksey Kliger (λgeek) [Thu, 23 Jan 2020 18:59:28 +0000 (13:59 -0500)]
Merge pull request #2040 from monojenkins/sync-pr-18512-from-mono

Remove "handles" from System.Threading.Semaphore.

Co-Authored-By: Jay Krell <jaykrell@microsoft.com>
4 years agoPut back the CORINFO_FLG_JIT_INTRINSIC flag
Tomas [Thu, 23 Jan 2020 18:46:40 +0000 (19:46 +0100)]
Put back the CORINFO_FLG_JIT_INTRINSIC flag

4 years agoFix typos (#2065)
Youssef Victor [Thu, 23 Jan 2020 18:40:29 +0000 (20:40 +0200)]
Fix typos (#2065)

* begining -> beginning

* paramterized -> parameterized

* folow -> follow

* occurance -> occurrence

* Fix bad changes

* Apply suggestion + minor space fix

4 years agoRemove superfluous check for the intrinsic attribute
Tomas [Thu, 23 Jan 2020 18:38:39 +0000 (19:38 +0100)]
Remove superfluous check for the intrinsic attribute

4 years agoRevert assertion check for IsInternalCall
Tomas [Thu, 23 Jan 2020 18:28:13 +0000 (19:28 +0100)]
Revert assertion check for IsInternalCall

4 years agoU+0085 not recognised as a newline character in CSharpCodeGenerator.cs (#1740) (...
Hamish Arblaster [Thu, 23 Jan 2020 17:48:36 +0000 (04:48 +1100)]
U+0085 not recognised as a newline character in CSharpCodeGenerator.cs (#1740) (#1853)

* Fix for issue #1740

U+0085 not recognised as a newline character in CSharpCodeGenerator.cs

Fix $1740

* Fix for issue #1740

U+0085 not recognised as a newline character in CSharpCodeGenerator.cs

* Fix for issue #1740

U+0085 not recognised as a newline character in CSharpCodeGenerator.cs
This change fixes a previous test that incorrectly causes the character to be forced out of being in unicode format.

* Stop the changes from #1740 on the .Net Framework as per #1913

Read #1913 for why, view PR #1853 and #1740 also.

4 years agoAddress JanK's PR feedback
Tomas [Thu, 23 Jan 2020 17:07:54 +0000 (18:07 +0100)]
Address JanK's PR feedback

I have audited all entries in the intrinsics table and I added
the [Intrinsic] annotation to all applicable methods. I haven't
found <code>System.EETypePtr.EETypePtrOf</code> and
<code>System.Activator.DefaultConstructorOf</code> anywhere.
I have reverted the additional check for IsInternalCall that
I put in CorInfoImpl in the 1st commit.

Thanks

Tomas

4 years agoMerge pull request #2076 from monojenkins/sync-pr-18501-from-mono
Thays Grazia [Thu, 23 Jan 2020 15:41:12 +0000 (12:41 -0300)]
Merge pull request #2076 from monojenkins/sync-pr-18501-from-mono

[debugger] Native thread not executing managed code considered as terminated

4 years agoAdd disable_omit_fp support for LLVM (#2045)
monojenkins [Thu, 23 Jan 2020 15:30:58 +0000 (10:30 -0500)]
Add disable_omit_fp support for LLVM (#2045)

Fixes mono/mono#18417

4 years ago[jit] Compute the instance size/alignment correctly for gshared types whose constrain...
monojenkins [Thu, 23 Jan 2020 14:43:49 +0000 (09:43 -0500)]
[jit] Compute the instance size/alignment correctly for gshared types whose constraint is a generic valuetype. (#2034)

Fixes mono/mono#18455

4 years agoAdd workaround for ILLinker stripping COM interop details (#2012)
Jan Kotas [Thu, 23 Jan 2020 14:23:59 +0000 (06:23 -0800)]
Add workaround for ILLinker stripping COM interop details (#2012)

* Add workaround for ILLinker stripping COM interop details

Fixes #1264

* Correct version of the fix

4 years agoRemove unrelated msvc/scripts folder from mono (#2069)
Alexander Köplinger [Thu, 23 Jan 2020 14:19:23 +0000 (15:19 +0100)]
Remove unrelated msvc/scripts folder from mono (#2069)

It's not needed in dotnet/runtime.

4 years agoImprove crossgen2 markdown file (#2064)
Youssef Victor [Thu, 23 Jan 2020 14:18:53 +0000 (16:18 +0200)]
Improve crossgen2 markdown file (#2064)

* Improve markdown file

* Revert the ol to ul change

4 years agoUse 4 spaces in coding-style.md examples (#2066)
Youssef Victor [Thu, 23 Jan 2020 13:52:33 +0000 (15:52 +0200)]
Use 4 spaces in coding-style.md examples (#2066)

4 years ago[debugger] Native thread not executing managed code considered as terminated
thaystg [Thu, 23 Jan 2020 13:32:21 +0000 (13:32 +0000)]
[debugger] Native thread not executing managed code considered as terminated

If a thread was suspended and doesn't have any managed stack, it was considered as terminated, but it wasn't really terminated because it can execute managed code again, and stop in a breakpoint so if the execution arrives in debugger_agent_breakpoint_from_context we reset the flag terminated to FALSE.

Fixes #18106

4 years ago[interp] context can be uninitialized for get_resume_state callback (#2073)
monojenkins [Thu, 23 Jan 2020 12:52:11 +0000 (07:52 -0500)]
[interp] context can be uninitialized for get_resume_state callback (#2073)

`jit_tls->interp_context` gets initialized lazily, that is, upon the first interpreter execution on a specific thread (e.g. via interp_runtime_invoke). However, with mixed mode the execution can purely happen in AOT code upon the first interaction with the managed debugger.

Stack trace:

```
  thread #1, name = 'tid_407', queue = 'com.apple.main-thread'
    frame #0: 0x0000000190aedc94 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x0000000190a0f094 libsystem_pthread.dylib`_pthread_cond_wait$VARIANT$armv81 + 672
    frame #2: 0x000000010431318c reloadcontext.iOS`mono_os_cond_wait(cond=0x0000000104b9ba78, mutex=0x0000000104b9ba30) at mono-os-mutex.h:219:8
    frame #3: 0x0000000104312a68 reloadcontext.iOS`mono_coop_cond_wait(cond=0x0000000104b9ba78, mutex=0x0000000104b9ba30) at mono-coop-mutex.h:91:2
    frame #4: 0x0000000104312858 reloadcontext.iOS`suspend_current at debugger-agent.c:3021:4
    frame #5: 0x000000010431be18 reloadcontext.iOS`process_event(event=EVENT_KIND_BREAKPOINT, arg=0x0000000145d09ae8, il_offset=0, ctx=0x0000000149015c20, events=0x0000000000000000, suspend_policy=2) at debugger-agent.c:4058:3
    frame #6: 0x0000000104310cf4 reloadcontext.iOS`process_breakpoint_events(_evts=0x000000028351a680, method=0x0000000145d09ae8, ctx=0x0000000149015c20, il_offset=0) at debugger-agent.c:4722:3
    frame #7: 0x000000010432f1c8 reloadcontext.iOS`mono_de_process_breakpoint(void_tls=0x0000000149014e00, from_signal=0) at debugger-engine.c:1141:2
    frame #8: 0x000000010430f238 reloadcontext.iOS`debugger_agent_breakpoint_from_context(ctx=0x000000016f656790) at debugger-agent.c:4938:2
    frame #9: 0x00000001011b73a4 reloadcontext.iOS`sdb_breakpoint_trampoline + 148
    frame #10: 0x00000001008511b4 reloadcontext.iOS`reloadcontext_iOS_Application_Main_string__(args=0x000000010703a030) at Main.cs:14
    frame #11: 0x00000001010f9730 reloadcontext.iOS`wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 272
    frame #12: 0x00000001042fd8b8 reloadcontext.iOS`mono_jit_runtime_invoke(method=0x0000000145d09ae8, obj=0x0000000000000000, params=0x000000016f656f20, exc=0x0000000000000000, error=0x000000016f656ff8) at mini-runtime.c:3162:3
    frame #13: 0x0000000104411950 reloadcontext.iOS`do_runtime_invoke(method=0x0000000145d09ae8, obj=0x0000000000000000, params=0x000000016f656f20, exc=0x0000000000000000, error=0x000000016f656ff8) at object.c:3052:11
    frame #14: 0x000000010440c4dc reloadcontext.iOS`mono_runtime_invoke_checked(method=0x0000000145d09ae8, obj=0x0000000000000000, params=0x000000016f656f20, error=0x000000016f656ff8) at object.c:3220:9
    frame #15: 0x0000000104415ae0 reloadcontext.iOS`do_exec_main_checked(method=0x0000000145d09ae8, args=0x000000010703a030, error=0x000000016f656ff8) at object.c:5184:3
    frame #16: 0x00000001044144ac reloadcontext.iOS`mono_runtime_exec_main_checked(method=0x0000000145d09ae8, args=0x000000010703a030, error=0x000000016f656ff8) at object.c:5281:9
    frame #17: 0x0000000104414500 reloadcontext.iOS`mono_runtime_run_main_checked(method=0x0000000145d09ae8, argc=1, argv=0x000000016f6570d0, error=0x000000016f656ff8) at object.c:4734:9
    frame #18: 0x00000001042d3b54 reloadcontext.iOS`mono_jit_exec_internal(domain=0x0000000145f00130, assembly=0x0000000281ba2900, argc=1, argv=0x000000016f6570d0) at driver.c:1320:13
    frame #19: 0x00000001042d39a4 reloadcontext.iOS`mono_jit_exec(domain=0x0000000145f00130, assembly=0x0000000281ba2900, argc=1, argv=0x000000016f6570d0) at driver.c:1265:7
    frame #20: 0x0000000104597994 reloadcontext.iOS`::xamarin_main(argc=5, argv=0x000000016f657a80, launch_mode=XamarinLaunchModeApp) at monotouch-main.m:483:8
    frame #21: 0x00000001008510dc reloadcontext.iOS`main(argc=5, argv=0x000000016f657a80) at main.m:104:11
    frame #22: 0x0000000190af8360 libdyld.dylib`start + 4
[...]
* thread #5, name = 'Debugger agent', stop reason = signal SIGABRT
  * frame #0: 0x0000000190aedec4 libsystem_kernel.dylib`__pthread_kill + 8
    frame #1: 0x0000000190a0d724 libsystem_pthread.dylib`pthread_kill$VARIANT$armv81 + 216
    frame #2: 0x000000019095d844 libsystem_c.dylib`abort + 100
    frame #3: 0x00000001045871b4 reloadcontext.iOS`log_callback(log_domain=0x0000000000000000, log_level="error", message="* Assertion at ../../../../../mono/mini/interp/interp.c:7176, condition `context' not met\n", fatal=4, user_data=0x0000000000000000) at runtime.m:1213:3
    frame #4: 0x0000000104544fc8 reloadcontext.iOS`eglib_log_adapter(log_domain=0x0000000000000000, log_level=G_LOG_LEVEL_ERROR, message="* Assertion at ../../../../../mono/mini/interp/interp.c:7176, condition `context' not met\n", user_data=0x0000000000000000) at mono-logger.c:405:2
    frame #5: 0x000000010456093c reloadcontext.iOS`monoeg_g_logstr(log_domain=0x0000000000000000, log_level=G_LOG_LEVEL_ERROR, msg="* Assertion at ../../../../../mono/mini/interp/interp.c:7176, condition `context' not met\n") at goutput.c:134:2
    frame #6: 0x0000000104560598 reloadcontext.iOS`monoeg_g_logv_nofree(log_domain=0x0000000000000000, log_level=G_LOG_LEVEL_ERROR, format="* Assertion at %s:%d, condition `%s' not met\n", args="e\x12z\x04\x01") at goutput.c:149:2
    frame #7: 0x000000010456061c reloadcontext.iOS`monoeg_assertion_message(format="* Assertion at %s:%d, condition `%s' not met\n") at goutput.c:184:22
    frame #8: 0x0000000104560674 reloadcontext.iOS`mono_assertion_message(file="../../../../../mono/mini/interp/interp.c", line=7176, condition="context") at goutput.c:203:2
    frame #9: 0x000000010459b570 reloadcontext.iOS`interp_get_resume_state(jit_tls=0x000000014900d000, has_resume_state=0x000000016fc7a9f4, interp_frame=0x000000016fc7a9e8, handler_ip=0x000000016fc7a9e0) at interp.c:7176:2
    frame #10: 0x0000000104319420 reloadcontext.iOS`compute_frame_info(thread=0x0000000104fe4130, tls=0x0000000149014e00, force_update=1) at debugger-agent.c:3422:3
    frame #11: 0x0000000104320d40 reloadcontext.iOS`thread_commands(command=1, p="", end="", buf=0x000000016fc7acf8) at debugger-agent.c:9048:3
    frame #12: 0x000000010431cca0 reloadcontext.iOS`debugger_thread(arg=0x0000000000000000) at debugger-agent.c:10132:10
    frame #13: 0x000000010447eb04 reloadcontext.iOS`start_wrapper_internal(start_info=0x0000000000000000, stack_ptr=0x000000016fc7b000) at threads.c:1232:3
    frame #14: 0x000000010447e788 reloadcontext.iOS`start_wrapper(data=0x000000028203ef40) at threads.c:1305:8
    frame #15: 0x0000000190a11d8c libsystem_pthread.dylib`_pthread_start + 15
[...]
```

Thanks to @drasticactions for helping me to reproduce.

Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1050615

<!--
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: Bernhard Urban-Forster <bernhard.urban@xamarin.com>
4 years agoAddress follow-up feedback from #1934 (#2028)
Viktor Hofer [Thu, 23 Jan 2020 08:49:53 +0000 (09:49 +0100)]
Address follow-up feedback from #1934 (#2028)

* Address follow-up feedback from #1934

* Remove whitespaces

4 years agoUnify build_native via eng/native/build-commons (#1753)
Adeel Mujahid [Thu, 23 Jan 2020 08:47:40 +0000 (10:47 +0200)]
Unify build_native via eng/native/build-commons (#1753)

* Unify build_native via eng/native/build-commons
In order to add new platform, architecture, compiler or its newer
version, there are currently multiple places to update, which can be
deduplicated.

This patch unifies:

* directories creation
* prerequisites checking
* `version.c` generation
* native build invocation
* common argument parsing
* building help menu

for various build scripts under coreclr, installer and libraries.

The common entry-point script is now `eng/native/build-commons.sh` and
rest of the scripts under `eng/native` are implementation detail.

Also extracted CMake platform detection in
`eng/native/configureplatform.cmake`, to share with coreclr and
`installer/corehost`.

* Use if [[ cond ]] in all places

4 years agoJIT: fix jitstress/gcstress issue with return value liveness (#2055)
Andy Ayers [Thu, 23 Jan 2020 08:33:25 +0000 (00:33 -0800)]
JIT: fix jitstress/gcstress issue with return value liveness (#2055)

The jit was not extending return value liveness properly for methods that
returned a ref-wrapped struct, if jitstress caused code to be added between
the final body statement and the epilog (eg a profile leave hook).

Fixes many of the cases in #1971.

4 years agoAdd missing RIDs for Tizen (5.5.0, 6.0.0) (#2003)
Swift Kim [Thu, 23 Jan 2020 08:32:19 +0000 (17:32 +0900)]
Add missing RIDs for Tizen (5.5.0, 6.0.0) (#2003)

4 years agoUnused strings in mscorrc.rc (#2020)
Elinor Fung [Thu, 23 Jan 2020 08:02:53 +0000 (00:02 -0800)]
Unused strings in mscorrc.rc (#2020)

4 years agoFix intrinsics treatment in Crossgen2
Tomas [Sun, 19 Jan 2020 21:33:16 +0000 (22:33 +0100)]
Fix intrinsics treatment in Crossgen2

This change fixes unintentional differences in the treatment of
intrinsics in Crossgen2 compared to Crossgen1 I found while
investigating failures in the regression test b426654. While the
change by itself doesn't fully fix the test, I believe it to be
generally useful towards removing the remaining codegen
differences between the compilers.

Thanks

Tomas

4 years agoContributing: fixed some typos (#2061)
Maher Jendoubi [Thu, 23 Jan 2020 06:41:34 +0000 (07:41 +0100)]
Contributing: fixed some typos (#2061)

4 years agoRemove gc_lh_block_event (#2059)
Andrew Au [Thu, 23 Jan 2020 06:09:44 +0000 (22:09 -0800)]
Remove gc_lh_block_event (#2059)

4 years agoRefactor compilation module group (#1889)
David Wrighton [Thu, 23 Jan 2020 00:27:27 +0000 (16:27 -0800)]
Refactor compilation module group (#1889)

- Our CompilationModule groups used for single method compilation and general compilation had diverged substantially, reducing the effectiveness of single method compilation substantially
- The profiler guided optimization logic also needs to use the VersionWithCode logic to identify which methods are interesting to consider, this will happen in a future change
- The VersionsWith logic in CompilationModuleGroup did not correctly model versionable logic.
  - Methods with generic parameters were not handled correctly. Method generic parameters did not contribute to the VersionsWith logic.
  - The newer ideas in our recent work on upcoming enhancements to crossgen2 driven compilation enhancements are aligned with this effort
  - Add support for the concept of considering instantiations over primitive types to be legal even if the primitive types aren't part of the version bubble. (Only if there are no constraints in the generic)

- Also a bonus determinism fix. In cases where MemberRef's were being used in combination with ENCODE_FIELD_SIG_OwnerType, we could possibly emit multiple different choices for the token emitting in a signature.

4 years agoChange HostPolicyMock to use CharSet.Auto now that it correctly switches to Ansi...
Jeremy Koritzinsky [Thu, 23 Jan 2020 00:23:04 +0000 (16:23 -0800)]
Change HostPolicyMock to use CharSet.Auto now that it correctly switches to Ansi (aka Utf8) on non-Windows. (#2031)

4 years agoDon't block non-blittable pointer types in P/Invokes. (#1866)
Jeremy Koritzinsky [Thu, 23 Jan 2020 00:22:09 +0000 (16:22 -0800)]
Don't block non-blittable pointer types in P/Invokes. (#1866)

* Don't block non-blittable pointer types in P/Invokes.

Don't block non-blittable pointer types in P/Invokes. If you're using pointers in interop you're already using unsafe code so we're going to assume you know what you're doing. C# won't let you form a pointer to a reference, so there's no risk of passing an object reference directly to native unless you're writing IL directly.

Fixes dotnet/coreclr#27800

* Delete unused resources.

* Apply fix to managed type system as well.

* Add positive test for nonblittable pointers. Remove negative tests that were in GenericTest.

4 years agoRename PAL_CMAKE_* CLR_CMAKE_* (#1984)
Steve MacLean [Thu, 23 Jan 2020 00:01:53 +0000 (19:01 -0500)]
Rename PAL_CMAKE_* CLR_CMAKE_* (#1984)

* Rename PAL_CMAKE_* CLR_CMAKE_*

Remove separatation between CLR_CMAKE and PAL_CMAKE defines

Revise PAL_CMAKE_PLATFORM* defines to use CLR_CMAKE_HOST* defines

Revise other PAL_CMAKE_* defines to use CLR_CMAKE_* equivalents.

Remove redundant compiler configuration

4 years agohost: Allow comments in JSON files (#1070)
Leandro A. F. Pereira [Wed, 22 Jan 2020 23:29:04 +0000 (15:29 -0800)]
host: Allow comments in JSON files (#1070)

host: Allow comments in JSON files

4 years agoFix System.Net.Quick.csproj configurations (#1675)
Jan Vorlicek [Wed, 22 Jan 2020 22:27:31 +0000 (23:27 +0100)]
Fix System.Net.Quick.csproj configurations (#1675)

The Configurations.props file was modified to have $(NetCoreAppCurrent)-Linux and
$(NetCoreAppCurrent)-OSX instead of $(NetCoreAppCurrent)-Unix in a recent PR #427,
but the Configurations in the System.Net.Quic.csproj were not updated accordingly.

4 years agoAdd asynchronous overload of WindowsIdentity.RunImpersonated (#1152)
Marco Rossignoli [Wed, 22 Jan 2020 22:09:18 +0000 (23:09 +0100)]
Add asynchronous overload of WindowsIdentity.RunImpersonated (#1152)

* add RunImpersonateAsync overloads

* skip on full framework

* run test netcoreapp only

* skip tests on nanoserver

* address PR feedback

* address PR feedback

* address PR feedback

* address PR feedback

* Update WindowsIdentity.cs

update comment

* Update WindowsIdentity.cs

update comment

* Update WindowsIdentity.cs

Fix comment

* Update WindowsIdentity.cs

fix comment

* Fix comment

4 years agoconfigure.ac: remove AC_SEARCH_LIBS for libintl (#2027)
Marek Safar [Wed, 22 Jan 2020 22:08:45 +0000 (23:08 +0100)]
configure.ac: remove AC_SEARCH_LIBS for libintl (#2027)

configure.ac: remove AC_SEARCH_LIBS for libintl

4 years agoRemove "handles" from System.Threading.Semaphore.
monojenkins [Wed, 22 Jan 2020 21:32:09 +0000 (21:32 +0000)]
Remove "handles" from System.Threading.Semaphore.

Actually, there were no handles.
This reduces MonoError.

4 years agoEnable NetworkAddressChange on FreeBSD (#1602)
Adeel Mujahid [Wed, 22 Jan 2020 21:26:37 +0000 (23:26 +0200)]
Enable NetworkAddressChange on FreeBSD (#1602)

4 years agoProtect multi-threaded access to Module.m_GenericParamToDescMap. (#1907)
Jan Kotas [Wed, 22 Jan 2020 21:02:12 +0000 (13:02 -0800)]
Protect multi-threaded access to Module.m_GenericParamToDescMap. (#1907)

Same type can be loaded by multiple threads in parallel in rare situations

Fixes #1847

4 years ago[master] Update dependencies from dotnet/arcade mono/linker Microsoft/vstest (#1804)
dotnet-maestro[bot] [Wed, 22 Jan 2020 21:00:56 +0000 (22:00 +0100)]
[master] Update dependencies from dotnet/arcade mono/linker Microsoft/vstest (#1804)

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

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

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

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

* Update dependencies from https://github.com/microsoft/vstest build 20200116-01

- Microsoft.NET.Test.Sdk - 16.5.0-preview-20200116-01

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

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

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

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

* Update dependencies from https://github.com/microsoft/vstest build 20200120-01

- Microsoft.NET.Test.Sdk - 16.5.0-preview-20200120-01

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

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

4 years agoAdd a Sockets test to validate undesired blocking of continuations (#1973)
Stephen Toub [Wed, 22 Jan 2020 20:55:23 +0000 (15:55 -0500)]
Add a Sockets test to validate undesired blocking of continuations (#1973)

We go out of our way (e.g. on Unix queueing work off of the epoll threads) to ensure that arbitrary user code running as part of socket continuations doesn't block those threads and potentially deadlock.  Add a test to help validate this.

4 years agoDon't do STRESS_PROFILER_CALLBACKS when pre-JITing (#2016)
Bruce Forstall [Wed, 22 Jan 2020 20:48:33 +0000 (12:48 -0800)]
Don't do STRESS_PROFILER_CALLBACKS when pre-JITing (#2016)

This leads us to generate an illegal relocation fixup.

Fixes #1789

4 years agohost: Allow comments in JSON files
Leandro Pereira [Thu, 19 Dec 2019 21:00:55 +0000 (13:00 -0800)]
host: Allow comments in JSON files

Although JSON doesn't support comments, a common extension is to enable
JavaScript-style comments.  By default, RapidJSON will error out if
comments are found in the input data, but it can be configured to
ignore them.

This is useful especially when testing out changes in
runtimeconfig.json files.

Fixes http://github.com/dotnet/core-setup/5661

4 years agoTweak codegen for Regex's FindFirstChar (#1996)
Stephen Toub [Wed, 22 Jan 2020 20:32:16 +0000 (15:32 -0500)]
Tweak codegen for Regex's FindFirstChar (#1996)

* Avoid extra field loads / comparisons in FindFirstChar

If we've already compared the current pos to the end pos as part of a minimum length check, we don't need to repeat it again later.  We can also read from locals rather than fields more than we are to save redundant field reads.

* Reduce branches in Boyer-Moore negative switch table

It's often the case that lots of negative branches have the same value.  We can coalesce them.

* Address PR feedback

4 years agoProhibit null key on HMAC. (#2018)
Kevin Jones [Wed, 22 Jan 2020 20:30:35 +0000 (15:30 -0500)]
Prohibit null key on HMAC. (#2018)

* Validate key on HMAC classes.

A refactoring in HMACCommon caused null keys to be implicitly converted
in to empty spans. This lead to a null key being used as an empty key.

* Use assertion helper to test parameter name.

4 years agoconfigure.ac: remove AC_SEARCH_LIBS for libintl
monojenkins [Wed, 22 Jan 2020 20:28:45 +0000 (20:28 +0000)]
configure.ac: remove AC_SEARCH_LIBS for libintl

This causes an additional dependency of mono on libintl which we didn't have before.
Reported by a user on gitter, it's problematic on macOS since it makes the mono binary depend on the libintl we ship in the Mono .pkg.

It was introduced in Mono 6.6 by https://github.com/mono/mono/commit/18e0ebfe89be0a175d2f904b9bb1ec6816daa318

4 years agoEnable Mono build in CI (#1934)
Alexander Köplinger [Wed, 22 Jan 2020 20:20:13 +0000 (21:20 +0100)]
Enable Mono build in CI (#1934)

* Enable Mono in default build

* Integrate Mono into the build system

* Fix System.Private.CoreLib build in Mono

Broken by https://github.com/dotnet/runtime/commit/9c82a36c23235c4d50954cb33a4d5d89b787a1aa

* Disable Windows test runs

Fails due to https://github.com/dotnet/runtime/issues/1933

Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
4 years agoMoving fast parts of cast FCALLs to managed code. (#1068)
Vladimir Sadov [Wed, 22 Jan 2020 19:02:56 +0000 (11:02 -0800)]
Moving fast parts of cast FCALLs to managed code. (#1068)

* Exposed casting cache to managed code
* Implemented a managed version of cache lookup
* Moved `JIT_IsInstanceOfAny` and `JIT_ChkCastAny`  to managed code as the first ones to move.
* Skip managed JIT helpers in exception stack traces and debugger
* Managed `JIT_IsInstanceOfInterface`
* All other cast helpers are managed.

Fixes:https://github.com/dotnet/coreclr/issues/27931

4 years agoImprove error messages for invalid WebSocket headers (#1962)
Stephen Toub [Wed, 22 Jan 2020 18:06:30 +0000 (13:06 -0500)]
Improve error messages for invalid WebSocket headers (#1962)

And add tests.