platform/upstream/dotnet/runtime.git
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 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 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 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 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 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 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.

4 years agoSplit AsnReader into a class and a ref struct (AsnValueReader)
Jeremy Barton [Wed, 22 Jan 2020 16:16:39 +0000 (08:16 -0800)]
Split AsnReader into a class and a ref struct (AsnValueReader)

Largely, the intent of this change was to reduce the number of temporary readers required for deeply structured payloads (`ReadSequence` returns a new reader), while still maintaining the better usability of the class; and, frankly, to understand what the impact of splitting functionality into "bare metal" and "more usable" pieces was.

```
foreach (file in AsnReader.*)
{
    Copy/paste the entirety of the `partial class AsnReader`;
    Change the top version to say ref partial struct AsnValueReader;
    Replace all AsnReader calls in the top version to say AsnValueReader.
    Replace all ReadOnlyMemory in the top portion with ReadOnlySpan;
    Remove ArraySegment overloads from the top portion (when present);
    Rewrite the bottom portion to open a ref reader at the state the memory is tracking and defer work into the ref reader;
    Run all the existing tests to ensure that nothing broke in that piece;
}
```

Once that was done, I changed the asn.xslt to generate all of the decoding in terms of AsnValueReader.  This didn't change field generation from ReadOnlyMemory to ReadOnlySpan (and the types from struct to ref struct)--a change that could be done later--but instead added a new ReadOnlyMemory input parameter so it can use Overlaps to slice the memory as appropriate (with a fallback of ToArray()).

While I was editing asn.xslt I fixed probably all of the whitespace errors it generated.  I still left the "stylecop, have no opinion about whitespace" pragma since the generator isn't run as part of most people's (or the official) builds.  This also turns on the nullability checks in all of the generated structs.

4 years agoFix script errors in mainv1, mainv2 tests (#1997)
Bruce Forstall [Wed, 22 Jan 2020 15:20:02 +0000 (07:20 -0800)]
Fix script errors in mainv1, mainv2 tests (#1997)

* Add additional error checking for mainv1, mainv2 tests

These have been silently failing due to mainv1.exe and mainv2.exe
changing to be built at mainv1.dll and mainv2.dll without
corresponding changes in the project files, due to insufficient
testing in the script.

Add this additional testing.

* Add more error checking

* Fix script errors in mainv1, mainv2 tests

A while back, tests were changed from building .exe to building .dll files
but these were not updated. Fix that.

4 years agoReconcile handling of EH vars (#1884)
Carol Eidt [Wed, 22 Jan 2020 14:54:24 +0000 (06:54 -0800)]
Reconcile handling of EH vars (#1884)

* Reconcile handling of EH vars

Modify `BasicBlock::hasEHBoundaryIn()` and `BasicBlock::hasEHBoundaryOut()` to reflect what liveness is doing, and adjust the register allocator code appropriately.

It might make sense to extract the code that's basically the same, except that the register allocator doesn't need the `finallyVars` except as validation in the `DEBUG` case.

Fix #1786

4 years agoUse a consistent rootfs location (#2005)
Swift Kim [Wed, 22 Jan 2020 14:53:41 +0000 (23:53 +0900)]
Use a consistent rootfs location (#2005)

4 years agoFix some links to coreclr repo (#1991)
Roman Marusyk [Wed, 22 Jan 2020 14:41:26 +0000 (16:41 +0200)]
Fix some links to coreclr repo (#1991)

4 years agoAdd readme for Mono specific version of SPC (#1963)
Marek Safar [Wed, 22 Jan 2020 14:27:39 +0000 (15:27 +0100)]
Add readme for Mono specific version of SPC (#1963)

* Add readme for Mono specific version of SPC

* Update src/mono/netcore/System.Private.CoreLib/README.md

Co-Authored-By: Stephen Toub <stoub@microsoft.com>
4 years agoDo not run validation on runtime determined types (#1357)
Michal Strehovský [Wed, 22 Jan 2020 09:14:45 +0000 (10:14 +0100)]
Do not run validation on runtime determined types (#1357)

It doesn't seem like we validate anything for those and `IsRuntimeDeterminedSubtype` check is rather expensive.

4 years agoUnify char.IsControl and Rune.IsControl (#1988)
Levi Broderick [Wed, 22 Jan 2020 08:25:22 +0000 (00:25 -0800)]
Unify char.IsControl and Rune.IsControl (#1988)

Not perf-critical, just some cleanup of low hanging fruit.

4 years agoUnify CoreLib interop files (#1914)
Jan Kotas [Wed, 22 Jan 2020 04:49:54 +0000 (20:49 -0800)]
Unify CoreLib interop files (#1914)

- Unify more of CoreLib interop files
- Replace manual interop with regular managed APIs where possible
- Delete unused code

Contributes to #1232

4 years agoRebased version of CoreFX renames (#1941)
Erhan Atesoglu [Wed, 22 Jan 2020 04:05:51 +0000 (20:05 -0800)]
Rebased version of CoreFX renames (#1941)

* FinalCoreFXRenames

The last of the CoreFX renames.

* Update DirectorySearcher.cs

Fixed typo in DirectorySearcher.cs

* Update TestClasses.SimpleTestClassWithObjectArrays.cs

This fixes the expected value of the tests to runtime, instead of corefx.

* Update PersistedFiles.Names.Unix.cs

Adds a note to not update the corefx reference.

4 years agoEven faster modulo computation: remove one of the three multiplications. (#406)
Anton Lapounov [Wed, 22 Jan 2020 03:58:05 +0000 (19:58 -0800)]
Even faster modulo computation: remove one of the three multiplications. (#406)

4 years ago**BYPASS_SECRET_SCANNING**
Davis Goodin [Wed, 22 Jan 2020 02:01:38 +0000 (20:01 -0600)]
**BYPASS_SECRET_SCANNING**

4 years agoFix long name cross arch DAC (#1948)
Mike McLaughlin [Wed, 22 Jan 2020 00:38:26 +0000 (16:38 -0800)]
Fix long name cross arch DAC (#1948)

4 years agoWorkaround AzDo issue when evaluating Build.SourcesDirectory variable in a docker...
Santiago Fernandez Madero [Tue, 21 Jan 2020 23:58:30 +0000 (17:58 -0600)]
Workaround AzDo issue when evaluating Build.SourcesDirectory variable  in a docker container (#1982)

* Workaround AzDo issue when evaluating Build.SourcesDirectory variable in a docker container

* Only use env var when in a docker container

4 years agoMake EHInfo parsing lazy (#1899)
Andrew Au [Tue, 21 Jan 2020 23:56:12 +0000 (15:56 -0800)]
Make EHInfo parsing lazy (#1899)

4 years agoEliminate X509Extension allocations during ssl handshake with OpenSSL
Tomas Weinfurt [Tue, 21 Jan 2020 22:53:53 +0000 (14:53 -0800)]
Eliminate X509Extension allocations during ssl handshake with OpenSSL

Moves policydata to a PAL struct so it can be passed without creating and discarding the X509Extension objects.

4 years agoRemove unwanted instrumentation code (#1820)
Andrew Au [Tue, 21 Jan 2020 22:40:43 +0000 (14:40 -0800)]
Remove unwanted instrumentation code (#1820)

4 years agoMaking the Microsoft.NET.IL.Sdk cross target. (#1972)
Anirudh Agnihotry [Tue, 21 Jan 2020 21:38:18 +0000 (13:38 -0800)]
Making the Microsoft.NET.IL.Sdk cross target. (#1972)

* making ilsdk crosstarget

* editing the comment

4 years agoRename CLR_CMAKE_PLATFORM* CLR_CMAKE_HOST* (#1974)
Steve MacLean [Tue, 21 Jan 2020 20:36:37 +0000 (15:36 -0500)]
Rename CLR_CMAKE_PLATFORM* CLR_CMAKE_HOST* (#1974)

The term platform was ambiguous. Migrate to using common terminology for
cross compilation.

Host is the platfrom which will execute the code
Target is the platform which will be debugged or for which code will be generated.

In most cases HOST == TARGET.  The exceptions are the cross component crossgen
tools and the future cross DAC.

4 years agoenable unicode tests on OSX (#1728)
Tomas Weinfurt [Tue, 21 Jan 2020 20:29:24 +0000 (12:29 -0800)]
enable unicode tests on OSX (#1728)

4 years agoStreamline Regex path to matching, and improve Replace/Split (#1950)
Stephen Toub [Tue, 21 Jan 2020 20:14:00 +0000 (15:14 -0500)]
Streamline Regex path to matching, and improve Replace/Split (#1950)

* Add ThrowHelper, and clean up some style

Trying to streamline main path to the engine, ensuring helpers can be inlined, reducing boilerplate, etc.  And as long as ThrowHelper was being used in some places, used it in others where it didn't require adding additional methods.

Also cleaned style along the way.

* Streamline the Scan loop

The main costs remaining are the virtual calls to FindFirstChar/Go.

* Enumerate matches with a reusable match object in Regex.Replace/Split

The cost of re-entering the scan implementation and creating a new Match object for each NextMatch is measurable, but in these cases, we can use an iterator to quickly get back to where we were and reuse the match object.  It adds a couple interface calls per iteration, as well as an allocation for the enumerator, but it saves more than that in the common case.

* Use SegmentStringBuilder instead of ValueStringBuilder in Replace

A previous .NET Core release saw StringBuilder in Regex.Replace replaced by ValueStringBuilder.  This was done to avoid the allocations from the StringBuilder.  However, in some ways, for large input strings, it made things worse.  StringBuilder is implemented as a linked list of builders, whereas ValueStringBuilder is contiguous memory taken from the ArrayPool.  For large input strings, we start requesting buffers too large for the ArrayPool, and thus when we grow we generate large array allocations that become garbage.

We're better off using a simple arraypool-backed struct to store the segments that need to be concatenated, and then just creating the final string from those segments.  For the common case where there are many fewer replacements than the length of the string, this saves a lot of memory as well as avoiding a layer of copying.

* Replace previously added enumerator with a callback mechanism

The delegate invocation per match is faster than the two interface calls per match, plus we can avoid allocating the enumerator and just pass the relevant state through by ref.

* Remove unnecessary fields from MatchCollection

* More exception streamlining and style cleanup

* Address PR feedback, and fix merge with latest changes

4 years agoOptimize DateTime decomposition in CoreLib (#1944)
ts2do [Tue, 21 Jan 2020 20:01:36 +0000 (14:01 -0600)]
Optimize DateTime decomposition in CoreLib (#1944)

* Optimize DateTime decomposition in CoreLib
Add uses of DateTime.GetDate (renamed from GetDatePart) where appropriate
Add DateTime.GetTime method to eliminate duplicate computations

* Remove unused arithmetic from DateTime.GetTime

4 years agoWinHttpHandler tests are back (#1676)
Marie Píchová [Tue, 21 Jan 2020 18:55:08 +0000 (19:55 +0100)]
WinHttpHandler tests are back (#1676)

The tests used by PlatformHandlerTest moved to Common/tests in order to share them between System.Net.Http and System.Net.Http.WinHttpHandler.
The added conditions correspond to the state before WinHttpHandler removal. They're just based on IsWinHttpHandler instead of UseSocketHandler.
Some of the code must be conditionally compiled since there is no usable common base class for HttpClientHandler and WinHttpHandler. Other issues solved by introducing WinHttpClientHandler for testing purposes. It corresponds to HttpClientHandler.Windows.cs code from before its removal.

4 years agoFix typo (#1970)
Gérald Barré [Tue, 21 Jan 2020 18:10:07 +0000 (13:10 -0500)]
Fix typo (#1970)

4 years agoRemove try-catch from SmtpClient.Abort to see what Exceptions get caught. (#428)
Tom Deseyn [Tue, 21 Jan 2020 18:07:25 +0000 (19:07 +0100)]
Remove try-catch from SmtpClient.Abort to see what Exceptions get caught. (#428)

4 years agoSpecialize Regex codegen for ? (#1898)
Stephen Toub [Tue, 21 Jan 2020 17:34:20 +0000 (12:34 -0500)]
Specialize Regex codegen for ? (#1898)

We're currently generating the code for a one / not one / set ? quantifier (zero-or-one) as a loop, when it can actually just be a conditional check.  This adds a special path for that case.

(I've also added another reduction test for alternation, and tweaked the codegen for a successful match to touch fields less.)

4 years agoJIT: check that constant handles are not OK2_CONST_LONGs (#1831)
Andy Ayers [Tue, 21 Jan 2020 16:08:19 +0000 (08:08 -0800)]
JIT: check that constant handles are not OK2_CONST_LONGs (#1831)

Follow-up from #1788.

Add padding to `AssertionDsc` so that the `iconFlags` no longer overlap with `lconVal`. Assert that `iconFlags` is never set for an O2K_CONST_LONG assertion.

Also remove an arm-only handle block that should now be redundant.

4 years ago[Docs] Fix small typo (#1961)
Maxim Lipnin [Tue, 21 Jan 2020 15:13:49 +0000 (18:13 +0300)]
[Docs] Fix small typo (#1961)

4 years agoCleanup regex diagnostic output (#1947)
Dan Moseley [Tue, 21 Jan 2020 11:54:38 +0000 (03:54 -0800)]
Cleanup regex diagnostic output (#1947)

* Include actual pattern in diagnostic output

* Fix char category name in diagnostic output

* Tighten Boyer Moore debug output

* Clean up diagnostic output from RegexCode and RegexNode

* Apply suggestions from code review

Co-Authored-By: Stephen Toub <stoub@microsoft.com>
* more

* display options and timeout

* Some random nits

* Update src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexBoyerMoore.cs

Co-Authored-By: Stephen Toub <stoub@microsoft.com>
* Github typo

Co-authored-by: Stephen Toub <stoub@microsoft.com>
4 years agoDelete outdated comment (#1952)
Jan Kotas [Tue, 21 Jan 2020 10:14:43 +0000 (02:14 -0800)]
Delete outdated comment (#1952)

4 years agoReadme for regex implementation (#1945)
Dan Moseley [Tue, 21 Jan 2020 04:41:13 +0000 (20:41 -0800)]
Readme for regex implementation (#1945)

* Readme for regex implementation

* typo

* Update src/libraries/System.Text.RegularExpressions/src/dotnet-regular-expressions.md

Co-Authored-By: Stephen Toub <stoub@microsoft.com>
* Update src/libraries/System.Text.RegularExpressions/src/dotnet-regular-expressions.md

Co-Authored-By: Stephen Toub <stoub@microsoft.com>
* Update src/libraries/System.Text.RegularExpressions/src/dotnet-regular-expressions.md

Co-Authored-By: Stephen Toub <stoub@microsoft.com>
* Update src/libraries/System.Text.RegularExpressions/src/dotnet-regular-expressions.md

Co-Authored-By: Stephen Toub <stoub@microsoft.com>
* Update src/libraries/System.Text.RegularExpressions/src/dotnet-regular-expressions.md

Co-Authored-By: Stephen Toub <stoub@microsoft.com>
* Update src/libraries/System.Text.RegularExpressions/src/dotnet-regular-expressions.md

Co-Authored-By: Stephen Toub <stoub@microsoft.com>
* Update src/libraries/System.Text.RegularExpressions/src/dotnet-regular-expressions.md

Co-Authored-By: Stephen Toub <stoub@microsoft.com>
* Updates

* More

* note

* rename

Co-authored-by: Stephen Toub <stoub@microsoft.com>
4 years agoFix documentation of R2R inline tracking map (#1942)
Michal Strehovský [Mon, 20 Jan 2020 23:51:44 +0000 (00:51 +0100)]
Fix documentation of R2R inline tracking map (#1942)

Don't want this to show up as a confusing diff when we upgrade the format later. Version is _not_ included in the format. We will need to key off the R2R version.

4 years agoDelete unnecessary clone of the assembly name (#1936)
Jan Kotas [Mon, 20 Jan 2020 18:26:48 +0000 (10:26 -0800)]
Delete unnecessary clone of the assembly name (#1936)

4 years agoCleanup double initialized fields in SPC (#1935)
Marek Safar [Mon, 20 Jan 2020 18:26:23 +0000 (19:26 +0100)]
Cleanup double initialized fields in SPC (#1935)

4 years agoInitial pass on updating documentation to include MonoVM (#1863)
Marek Safar [Mon, 20 Jan 2020 15:50:07 +0000 (16:50 +0100)]
Initial pass on updating documentation to include MonoVM (#1863)

* Update documentation to cover also Mono runtime

* Updated requirements for mac and linux to include mono's

* Update System.Private.CoreLib/src/README.md

* Added initial mono building doc

* Added library testing steps for mono

* A bit of rewording based on feedback

* Add some scripts coloring

4 years agoDelete unnecessary defines from CoreCLR tests (#1922)
Jan Kotas [Sun, 19 Jan 2020 21:15:41 +0000 (13:15 -0800)]
Delete unnecessary defines from CoreCLR tests (#1922)

- PROJECK, STATIC, CORECLR
- Delete NoLogo
- Delete duplicate Exceptions/Finalization/Finalizer test
- Delete workaround for LLILC JIT

4 years agoMerge pull request #1912 from mono/consolidation
Alexander Köplinger [Sun, 19 Jan 2020 19:38:52 +0000 (20:38 +0100)]
Merge pull request #1912 from mono/consolidation

This adds the Mono runtime sources including the full history and some initial build system integration.

4 years agoDelete outdated workaround (#1921)
Jan Kotas [Sun, 19 Jan 2020 18:31:51 +0000 (10:31 -0800)]
Delete outdated workaround (#1921)

4 years agoAdd support for preserve references on JSON (#655)
David Cantu [Sun, 19 Jan 2020 00:40:36 +0000 (16:40 -0800)]
Add support for preserve references on JSON (#655)

* Initial commit for JSON reference handling / preserve references

* Remove ReferenceHandling.Ignore option

* Code clean-up.

* Remove stale tests.

* Address PR feedback

* Reference handling inline (#1)

* Inline ReferenceHandling logic within main methods.

* remove stale Handle*Ref methods

* Refactor the code for Deserialization
* Create methods to reuse code
* Try to isolate Preserve logic as much as I can
* Replaced Exceptions for ThrowHelper methods

* Remove stale condition on $ref

* Add AggressiveInlining to HandlePropertyNameDefault

* Inline feature code in Serialization

* Fix preserve references for ExtensionData

* Split Reference dictionary into two, for (De)Serialize each.
Add Reference EqualityComparer to Serialize dictionary.

* Do not set PropertyName to s_missingProperty to avoid race condition issues.

* Remove Asserts that compare against an exception message.

* Set preserved array passing setPropertyDirectly = true to avoid issue when enumerable is already initialized.

* Code clean-up.

* Separate write code into WritePreservedObject and WriteReferenceObject

* Address some PR feedback:
* Switched ReferenceResolver to access it through a read-only property that initializes it the first time is tried to be accesed.
* Renamed some methods and properties
* Refactored WriteReference* methods.
* Fixed Exception messages
* Removed literal message comparison on tests.

* * Add round-tripping coverage to suitable unit tests
* Fix issues found with Round-tripping scenarios
  * Move DictionaryPropertyIsPreserved to EndProperty() in order to fix issue where two dictionary properties were next to each other and the DictionaryPropertyIsPreserved was not reset.
  * Add ReadStackFrame.IsNestedPreservedArray in order to identify preserved arrays nested and prevent using setPropertyDirectly on them.

* Add nullability annotations

* Code clean-up, reword comments and removed unnecesary properties in ReferenceHandling

* Fix issue where an object that tries to map into an enumerable could skip the validation that prevents this.

* Fix issue where the wrong type was passed into the throw helper for nested enumerable in HandleStartObject

* Address PR comments.

* Refactor flags on ReadStackFrame to avoid using unrelated fields for validation.

* Consolidated MetadataPropertyName enum logic on read and write.

* Reuse HandleStartObjectInEnumerable to handle arrays with metadata nested in a Dictionary.

* Refactor code:
* Change ReferenceResolver from class to struct to avoid one allocation.
* Replace propertyName.ToArray() for constant arrays in order to avoid allocation.

* Move some exception logic to the ThrowHelper class.

* * Apply optimizations:
  * Use PropertyCacheArray on Values property lookup.
  * Make Comparer static field to avoid one allocation at runtime.
* Document reasoning for DefaultReferenceResolver and ReferenreEqualsEqualityComparer

* Address PR comments.

* Addres more PR feedback:
* Add documentation to DefaultReferenceResolver public methods.

* Address PR feedback.

* Adderss more PR suggestions.

* * Move tests to Serialization namespace.
* On $values, set PropertyName on state.Current.JsonPropertyName instead.

4 years agoContributing: fixed some typos (#1905)
Maher Jendoubi [Sun, 19 Jan 2020 00:32:21 +0000 (01:32 +0100)]
Contributing: fixed some typos (#1905)

4 years agoMerge remote-tracking branch 'upstream/master' into consolidation
Alexander Köplinger [Sat, 18 Jan 2020 23:54:54 +0000 (00:54 +0100)]
Merge remote-tracking branch 'upstream/master' into consolidation

4 years agoAdd option to select Mono as the testhost runtime with the `/p:TestRuntimeFlavor...
Alexander Köplinger [Sat, 18 Jan 2020 17:00:01 +0000 (18:00 +0100)]
Add option to select Mono as the testhost runtime with the `/p:TestRuntimeFlavor=Mono` property

4 years agoTemporarily disable Mono from default subset categories
Alexander Köplinger [Sat, 18 Jan 2020 17:00:01 +0000 (18:00 +0100)]
Temporarily disable Mono from default subset categories

4 years agoExtract methods from Cng.cs to Interop.*.cs
Robert Matusewicz [Sat, 18 Jan 2020 22:19:29 +0000 (23:19 +0100)]
Extract methods from Cng.cs to Interop.*.cs

* Extract BCryptImportKey from Cng.cs to Interop.BCryptImportKey.cs
* Extract BCryptEncrypt and BCryptDecrypt from BCryp/Cng.cs into Interop.BCryptEncryptDecrypt.cs

4 years agoMore renames of full framework to .NET Framework (#1900)
Jan Kotas [Sat, 18 Jan 2020 19:04:59 +0000 (11:04 -0800)]
More renames of full framework to .NET Framework (#1900)

* More renames of full framework to .NET Framework

* Apply suggestions from code review

Co-Authored-By: Stephen Toub <stoub@microsoft.com>
4 years agoMake Mono build in dotnet/runtime
Alexander Köplinger [Sat, 18 Jan 2020 17:00:01 +0000 (18:00 +0100)]
Make Mono build in dotnet/runtime

Also add packaging project for Microsoft.NETCore.Runtime.Mono.