-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Android] Throw PNSE for unavailable network information #63633
[Android] Throw PNSE for unavailable network information #63633
Conversation
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
Tagging subscribers to this area: @dotnet/ncl Issue DetailsThis PR is a follow-up of #62780. I went through the Android APIs that provide information about IP interfaces' properties and network usage stats (e.g., ConnectivytManager, TrafficStats) and I couldn't find a way to populate most of the properties we expose in Closes #50567
|
@@ -0,0 +1,32 @@ | |||
// Licensed to the .NET Foundation under one or more agreements. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the naming convention is IPGlobalProperties.Android.cs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other platform-specific files in this project are LinuxIPGlobalProperties.cs
, UnixIPGlobalProperties.cs
, and BsdIPGlobalProperties.cs
, so I replicated it with the Android
prefix.
...s/System.Net.NetworkInformation/src/System/Net/NetworkInformation/AndroidNetworkInterface.cs
Outdated
Show resolved
Hide resolved
...s/System.Net.NetworkInformation/src/System/Net/NetworkInformation/AndroidNetworkInterface.cs
Outdated
Show resolved
Hide resolved
/azp run runtime-manual |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-manual |
Azure Pipelines successfully started running 1 pipeline(s). |
} | ||
if (ni.OperationalStatus == OperationalStatus.Up) | ||
{ | ||
return true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems quite wasteful to allocate the array with complex types to return true, LoopbackInterfaceIndex has a similar problem. Perhaps GetAndroidNetworkInterfaces version with a predicate would be better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried implementing your suggestion. The code is a bit more complex now but there's no need to allocate
AndroidNetworkInterface[]
in LoopbackInterfaceIndex
and GetIsNetworkAvailable()
anymore.
/azp run runtime-manual |
Azure Pipelines successfully started running 1 pipeline(s). |
src/libraries/System.Net.NetworkInformation/tests/FunctionalTests/NetworkInterfaceBasicTest.cs
Outdated
Show resolved
Hide resolved
/azp run runtime-manual |
Azure Pipelines successfully started running 1 pipeline(s). |
There are a bunch of failing
I'm gonna go ahead and merge the PR. |
* Update tests * Add android specific implementation * Add UnsupportedOSPlatform attributes * Fix typo * Remove unnecessary file reference * Clean-up code * Minor code clean-up * Remove dictionary * Refactoring * Revert comment change
…tion (#63628) * [Android] Fix accessing network interfaces information (#62780) * Re-enable tests * Dynamically load getifaddrs if necessary * Prevent redeclaration of the ifaddrs struct * Fix typo * Do not close the dynamic library * Enable the fixed functional tests in CI * Reduce code duplication for obtaining libc file name * Simplify usage of the function pointers * Move typedefs * Rename the _ensure_ function * Remove fptr typedefs * Update comment * Add missing include * Update comment * Remove unnecessary comment * Move static variable * Remove unnecessary change * Move LIBC_FILENAME to the utilities header * Avoid error if constant is undefined * Conditionally include ifaddrs * Try to fix cmake_symbol_exists issue for browser * Minor tweaks * Try different way of detecting getifaddrs * Use the hack only for Android builds * Revert "Move LIBC_FILENAME to the utilities header" This reverts commit 4e67687. * Revert "Reduce code duplication for obtaining libc file name" This reverts commit aca15d1. * Simplify opening libc * Update code style * Fix race condition * Prevent race condition * Switch locking implementation for a lock-free implementation * Enable unit test for Android * Try using weak symbols * Fix function name * Revert "Fix function name" This reverts commit f927aae. * Revert "Try using weak symbols" This reverts commit 46d3ede. * Refactor code to use pthread_once * [Android] Throw PNSE for unavailable network information (#63633) * Update tests * Add android specific implementation * Add UnsupportedOSPlatform attributes * Fix typo * Remove unnecessary file reference * Clean-up code * Minor code clean-up * Remove dictionary * Refactoring * Revert comment change * Fix usage of Interop.Sys.GetNetworkInterfaces
commit 36cdb5fc0c38cbb44291114e48e2b202ff37db01 Author: Ilona Tomkowicz <32700855+ilonatommy@users.noreply.github.com> Date: Thu Jan 20 11:03:02 2022 +0100 [wasm][debugger] Added support for stepper boundary attribute (#63991) * Hidden methods and step through methods behave the same way. * Perpared flow for setting JustMyCode in the future. * Tests for JustMyCode setting before debug launch. * Transformed into dynamic JustMyCode change flow. * JustMyCode disabled, first 3 cases solved. * Finished behavior for JMC disabled (with 1 difference). * JMC enabled: stepIn np bp + stepIn bp + resume bp. * Functional version (with minor deviations from expected behavior). * Refactoring. * All tests for NonUserCode work. * Fix line number after adding code above. * Stepper boundary with tests. * Save information about multiple decorators. * Fix error in merge. commit 5a523cf27a9b73e61adb1408f21b5e75a2246d9e Author: Ilona Tomkowicz <32700855+ilonatommy@users.noreply.github.com> Date: Thu Jan 20 10:26:06 2022 +0100 [debugger][wasm] Added support for non user code attribute (#63876) * Hidden methods and step through methods behave the same way. * Perpared flow for setting JustMyCode in the future. * Tests for JustMyCode setting before debug launch. * Transformed into dynamic JustMyCode change flow. * JustMyCode disabled, first 3 cases solved. * Finished behavior for JMC disabled (with 1 difference). * JMC enabled: stepIn np bp + stepIn bp + resume bp. * Functional version (with minor deviations from expected behavior). * Refactoring. * All tests for NonUserCode work. * Fix line number after adding code above. * Fix error in merge. * Removing duplicated tests. commit 8f2c84f02b74dbbe6e1f02dc9be37cf3ee288d6e Author: Peter Sollich <petersol@microsoft.com> Date: Thu Jan 20 10:06:45 2022 +0100 Fix issues with verify_regions, clear_batch_mark_array_bits. (#63798) Details: - we cannot verify the tail of the region list from background GC, as it may be updated by threads allocating. - fix case in clear_batch_mark_array_bits where end is equal to the very end of a segment and we write into uncommitted memory in the mark_array. - bgc_clear_batch_mark_array_bits did some checks and then called clear_batch_mark_array_bits which repeated the exact same checks. Renamed clear_batch_mark_array_bits to bgc_batch_mark_array_bits and removed the old copy, removed the declaration for clear_batch_mark_array_bits. commit e4bfedd847990795eb28cda4008b5ff4c58fd561 Author: Jeremy Barton <jbarton@microsoft.com> Date: Thu Jan 20 00:06:28 2022 -0800 Fix OpenSSL version check in GetAlpnSupport The previous check failed 3.0.0 because the Minor was 0 and Build was 0. It could probably be rewritten to be `>= new Version(1, 0, 2)`, but that'd require more thinking. commit 2cf6b0d07309a3c19938f4c886fe13e8d5cc28ee Author: Andrew Au <andrewau@microsoft.com> Date: Wed Jan 19 20:57:41 2022 -0800 Fix gc_heap::remove_ro_segment (#63473) commit 65a5d0e8a3027f2b240d098f47327ba3e1f743b1 Author: Tlakaelel Axayakatl Ceja <tlakaelel.ceja@microsoft.com> Date: Wed Jan 19 19:46:45 2022 -0800 Add ProcessLinkerXmlBase to NativeAOT (#63666) Add Xml Parsing linker files as a reference source to NativeAOT Rename NativeAOT ProcessLinkerXmlBase version to ProcessXmlBase (uses XmlReader) Add ProcessLinkerXmlBase from linker and fix it so it can be used in NativeAOT (uses XPath) commit f1c8b10ef824c5abf0c851f610ab0961ca31693f Author: Egor Chesakov <Egor.Chesakov@microsoft.com> Date: Wed Jan 19 19:43:26 2022 -0800 [Arm64] Keep unrolling InitBlock and CopyBlock up to 128 bytes (#63422) * Add INITBLK_LCL_UNROLL_LIMIT and CPBLK_LCL_UNROLL_LIMIT of 128 bytes in src/coreclr/jit/targetarm64.h * Keep unrolling InitBlock up to INITBLK_LCL_UNROLL_LIMIT bytes when dstAddr points to the stack in src/coreclr/jit/lowerarmarch.cpp * Keep unrolling CopyBlock up to CPBLK_LCL_UNROLL_LIMIT bytes when both srcAddr and dstAddr point to the stack in src/coreclr/jit/lowerarmarch.cpp commit a5158df084780e52005e4dcbd02ee091542e06d0 Author: Will Smith <lol.tihan@gmail.com> Date: Wed Jan 19 18:44:19 2022 -0800 'cmeq' and 'fcmeq' Vector64<T>.Zero/Vector128<T>.Zero ARM64 containment optimizations (#62933) * Initial work * Added a comma to display * Cleanup * Fixing build * More cleanup * Update comment * Update comment * Added CompareEqual Vector64/128 with Zero tests * Do not contain op1 for now * Wrong intrinsic id used * Removing generated tests * Removing generated tests * Added CompareEqual tests * Supporting containment for first operand * Fix test build * Passing correct register * Check IsVectorZero before not allocing a register * Update comment * Fixing test * Minor format change * Fixed formatting * Renamed test * Adding AdvSimd_Arm64 tests: * Adding support for rest of 'cmeq' and 'fcmeq' instructions * Removing github csproj * Minor test fix * Fixed tests * Fix print * Minor format change * Fixing test * Added some emitter tests * Feedback * Update emitarm64.cpp * Feedback commit 68a923a24edb47f1d0e3c38a69d4091a7587bfc4 Author: Andrew Au <andrewau@microsoft.com> Date: Wed Jan 19 17:59:07 2022 -0800 Check if the child object is in the heap range before object_gennum (#63970) commit 752569f66bcde98fcc4dd1e651f9f1f138184c5c Author: Andrew Au <andrewau@microsoft.com> Date: Wed Jan 19 17:58:39 2022 -0800 Check if the child object is in the heap range before get_region_plan_gen_num (#63828) commit 5cefc0f9e618e2d8b38d7de67bbd8a50adb9646f Author: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com> Date: Thu Jan 20 04:23:50 2022 +0300 Fix invalid threading of nodes in rationalization (#64012) The code in question assumes that the ASG will be reversed and thus threads "simdTree" before "location" in the linear order. That dependency, while valid, because "gtSetEvalOrder" will always reverse ASGs with locals on the LHS, is unnecessary and incorrect from the IR validity point of view. Fix this by using "InsertAfter" instead of manual node threading. commit 93dc760481bdde2c463d725c2927b9da8787eb98 Author: Tomáš Rylek <trylek@microsoft.com> Date: Thu Jan 20 01:52:15 2022 +0100 Fix Crossgen2 bug #61104 and add regression test (#63956) The issue tracks the runtime regression failure where Crossgen2-compiled app is unable to locate a type with non-ASCII characters in its name. The failure was caused by the fact that Crossgen2 was incorrectly zero-extending the individual UTF8 characters when calculating the hash whereas runtime is sign-extending them. Thanks Tomas commit 94b699cc6f6b88c6de1d13152143d32285c59555 Author: Jeremy Koritzinsky <jekoritz@microsoft.com> Date: Wed Jan 19 16:46:00 2022 -0800 Update StructMarshalling design now that DisableRuntimeMarshallingAttribute is approved (#63765) Co-authored-by: Elinor Fung <elfung@microsoft.com> commit a618086f53fa755732697fba171a16e8bf67900a Author: Andy Ayers <andya@microsoft.com> Date: Wed Jan 19 16:01:16 2022 -0800 JIT: fix up switch map for out-of-loop predecessor (#64014) If we have a loop where some of the non-loop predecessors are switchs, and we add pre-header to the loop, we need to update the switch map for those predecessors. Fixes #63982. commit 7f828a7e6b712bdeab02d75160249cd13c26a467 Author: Egor Bogatov <egorbo@gmail.com> Date: Thu Jan 20 02:08:10 2022 +0300 [arm64] JIT: Redundant zero/sign extensions after ldrX/ldrsX (#62630) commit ae1b755cd074745b0f09e826d3c7064b2a8f20dd Author: Dan Moseley <danmose@microsoft.com> Date: Wed Jan 19 16:07:53 2022 -0700 Retries for flaky WMI test (#64008) commit 54eec5d1f4d7ded21e33e65c63ada26afe80b208 Author: Elinor Fung <elfung@microsoft.com> Date: Wed Jan 19 14:23:48 2022 -0800 Make ILStubGenerated event log ModuleID corresponding to that on other events (#63974) commit 97fec41a752f067f4d6dde170073300e1184693b Author: Santiago Fernandez Madero <safern@microsoft.com> Date: Wed Jan 19 14:18:21 2022 -0800 Add runtime-extra-platforms pipeline to have matching runtime PR and Rolling builds (#62564) * Add runtime-extended-platforms pipeline to have matching runtime PR and Rolling builds * Fix evaluate changed paths condition for the extra pipeline * PR Feedback and fix condition * Move MacCatalyst back to staging, disable tvOS tests * Disable browser wasm windows legs commit 826e03e4b984d3bb76b2ead5f6ebb847be9c616f Author: Jeremy Koritzinsky <jekoritz@microsoft.com> Date: Wed Jan 19 14:08:07 2022 -0800 Bump Explicit-layout value types with no fields to at minimum 1 byte size. (#63975) commit 6f8d8b20a0c78dcfc09ea7a43db48a9a4e055e13 Author: Ankit Jain <radical@gmail.com> Date: Wed Jan 19 16:41:04 2022 -0500 Disable hot reload tests for AOT configurations (#64006) commit 675c16711007536120fa2ef7b69224e44299d1e3 Author: Egor Chesakov <Egor.Chesakov@microsoft.com> Date: Wed Jan 19 12:59:49 2022 -0800 [Arm64] Don't use D-copies in CopyBlock (#63588) * Increase the maximum number of internal registers allowd per node in src/coreclr/jit/lsra.h * Based on discussion in https://github.com/dotnet/runtime/issues/63453 don't allocate a SIMD register pair if the JIT won't be able to use Q-copies in src/coreclr/jit/lsraarmarch.cpp * Update CodeGen to reflect that Q-copies should be used only when size >= 2 * FP_REGSIZE_BYTES and using of them makes the instruction sequence shorter in src/coreclr/jit/codegenarmarch.cpp * Update comment - we don't use D-copies after that change in src/coreclr/jit/codegenarmarch.cpp commit ac4c7fb9457a8b0972686b017d82367d7a9bf1ca Author: Pavel Savara <pavelsavara@microsoft.com> Date: Wed Jan 19 20:59:01 2022 +0100 - mono_wasm_new_external_root for roots on stack (#63997) - temp_malloc helper via linear buffer in js - small refactorings Co-authored-by: Katelyn Gadd <kg@luminance.org> commit 65db54e2a92a2ef8ba8a75c70990e78f21818e18 Author: Egor Bogatov <egorbo@gmail.com> Date: Wed Jan 19 22:23:45 2022 +0300 Add IsKnownConstant jit helper and optimize 'str == ""' with str.StartsWith('c') (#63734) Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com> Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com> commit ded841a690e73c04ebdc86c681893bf9fd372751 Author: Egor Bogatov <egorbo@gmail.com> Date: Wed Jan 19 22:22:49 2022 +0300 Don't reuse registers in Debug mode (#63698) Co-authored-by: Bruce Forstall <brucefo@microsoft.com> commit 67848f23d51562bd2e54f6490f5aad22f57baffe Author: Brennan <brecon@microsoft.com> Date: Wed Jan 19 11:01:24 2022 -0800 [RateLimiting] Dequeue items when queuing with NewestFirst (#63377) commit 12f434db114e629854e7d5eb966e07d24e243712 Author: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Wed Jan 19 20:42:27 2022 +0200 Fix for Werror=use-after-free in PAL (#63954) * Fix for Werror=use-after-free in PAL * Delete Local{Alloc,Free} * Delete LMEM_* macros * Delete PAL_dladdr commit bbbfba31b61a2299c434172f709716325c073ef8 Author: Stephen Toub <stoub@microsoft.com> Date: Wed Jan 19 12:27:25 2022 -0500 Use IndexOf in StringBuilder.Replace(char, char) (#63913) commit df049b9a23c5182bf7f26f224b69bf1f47f9dc2f Author: Dan Moseley <danmose@microsoft.com> Date: Wed Jan 19 09:26:30 2022 -0700 Disable 2 SMTP tests on checked runtime (#63947) commit 8604989022950ef38f94b9150043b31d81f061a5 Author: Maksym Koshovyi <maximkoshevoi61@gmail.com> Date: Wed Jan 19 17:49:39 2022 +0200 [Group 5] Enable nullable annotations for `Microsoft.Extensions.Configuration.Json` (#63694) * Nullable enable commit a8c1408084714a7db13db7eb5cae10b209d9c096 Author: TobiasLaving <95348503+TobiasLaving@users.noreply.github.com> Date: Wed Jan 19 16:04:02 2022 +0100 Update runtime.json with manjaro information (#63338) Without specifying runtime on manjaro we cannot run the projects. FYI: Manjaro has a "ID_LIKE" param in os_release that has arch as input. Perhaps that would be another way forward. commit 31f20c54ad56946a506d705261a5445930b56d29 Author: Stephen Toub <stoub@microsoft.com> Date: Wed Jan 19 09:57:04 2022 -0500 Improve auto-atomicity for conditionals (#63299) - Allow for automatically making loops that end conditional branches be atomic - Allow for using a following expression conditional to make a prior loop atomic - Allow conditionals to influence the computed minimum length commit 8fe0467efd29d952fc2afbf302c1d8a1bb3b2fa5 Author: Maxim Lipnin <v-maxlip@microsoft.com> Date: Wed Jan 19 16:55:40 2022 +0300 Take MacCatalyst into account in EnvironmentTests.WorkingSet_Valid test (#63995) Follow-up on https://github.com/dotnet/runtime/pull/63934 commit b042bc3043f3f7f475f5bd6e8f58df2952dd9250 Author: Radek Zikmund <32671551+rzikm@users.noreply.github.com> Date: Wed Jan 19 14:15:57 2022 +0100 Avoid allocating byte array when setting ALPN list on Linux (#63674) * Avoid allocating byte array when setting ALPN list * Code review feedback * Apply suggestions from code review Co-authored-by: Stephen Toub <stoub@microsoft.com> * Slice the stackalloc'd buffer to correct length Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com> * Code review fixes Co-authored-by: Stephen Toub <stoub@microsoft.com> Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com> commit 34794bc5f2bcdbaa9057bb07b8764e2bb6a411a2 Author: Krzysztof Wicher <kwicher@microsoft.com> Date: Wed Jan 19 13:45:01 2022 +0100 Enable System.Text.Json tests on netfx (#63803) * Enable System.Text.Json tests on netfx * use NETFRAMEWORK define * disable another two test cases after rebase * disable last test case which repros only on CI for me * add p2p only on netfx commit e54df94bc9a5e1e064835be817d3e9ac773e1d9a Author: Eirik Tsarpalis <eirik.tsarpalis@gmail.com> Date: Wed Jan 19 11:59:34 2022 +0000 Replace "needs more info" label with "needs-author-action" (#63899) commit a5292a6b54ca743efe2e5b6776864efb7c7702a5 Author: Olivier Giniaux <oginiaux@gmail.com> Date: Wed Jan 19 12:56:54 2022 +0100 Fix profiling objectsallocatedbyclass (#63814) * Add test for ObjectsAllocatedByClass profiler callbacks * Fix ObjectsAllocatedByClass profiler callbacks based on wrong flag * Fix wrong args in test log Co-authored-by: Olivier Giniaux <oginiaux@smartadserver.com> commit 6e4dfbfe2db42c9c67f1094dd65ec683c44e3457 Author: Stephen Toub <stoub@microsoft.com> Date: Wed Jan 19 06:53:36 2022 -0500 Improve reductions for Regex empty / nothing nodes (#63695) commit 777c353c767c588824a489ad39238fef01c80f4e Author: Stephen Toub <stoub@microsoft.com> Date: Wed Jan 19 06:53:24 2022 -0500 Extend regex switch alternation optimization to IgnoreCase (#63756) IgnoreCase now results in producing sets (e.g. an 'a' becomes '[Aa]') but the source generator's optimization that produces a switch statements for alternations with non-overlapping branches doesn't yet understand such sets. This augments that logic to fix that. commit a25536f790258fe68240feff864713e8d20b418c Author: Stephen Toub <stoub@microsoft.com> Date: Wed Jan 19 06:52:15 2022 -0500 Improve auto-atomicity for Regex loops (#63986) - As part of recognizing loops that could be made atomic, we currently only look at the node guaranteed to come immediately after it, e.g. in a+b+c+, when analyzing a+ we only look at the b+. That's fine in many cases, but if our expression was instead e.g. a*b*c*, we couldn't make a* atomic because we wouldn't be guaranteed it'd be followed by a b, and we wouldn't look at the subsequent nodes to determine what else might follow. When that situation occurs, we can now walk the tree to find the next node, and repeatedly do so as much as is needed in order to find the next node, enabling us to make all of those loops atomic. - We currently perform the auto-atomicity reduction for single-char loops as part of reducing concatenations. But this means we're performing that transformation at a time when the tree isn't fully formed, which means we can't necessarily reach out of a concatenation to what comes after it and use that to influence the atomicity. It also means we might repeat the analysis unnecessarily multiple times, because it's done as part of parenting a node. We can instead do that optimization as part of the final optimization phase, after the tree is already created. - When we find a lazy loop at the end of an expression, we can treat it as atomic, which means we can lower its max bound to its min bound. - When we encounter a loop (lazy or greedy) at the end of an expression, if it has a max bound of 1 (i.e. it's optional), we can proceed to eliminate ending backtracking with its child regardless of whether the child could be made atomic with the start of the loop, since it won't ever repeat more than once. commit eeaee44e6fe4425db044967e025255e6a12c97a9 Author: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed Jan 19 11:20:02 2022 +0100 [main] Update dependencies from dotnet/runtime dotnet/arcade dotnet/xharness dotnet/icu dotnet/roslyn-analyzers dotnet/llvm-project (#63737) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com> commit 313baef638104ed64f93e077c84547421884c91b Author: Egor Bogatov <egorbo@gmail.com> Date: Wed Jan 19 13:16:28 2022 +0300 JIT: Fix repeatable failure for max CALLSITE_DEPTH (#63966) commit a354bb152f4e505d53034c3538f971ad4c2f18ac Author: Stephen Toub <stoub@microsoft.com> Date: Wed Jan 19 04:10:27 2022 -0500 Address follow-up feedback to CachedCompletedInt32Task (#63968) commit b68cf65634bb0d6a1a7e588568959cdc33a0322c Author: Adam Sitnik <adam.sitnik@gmail.com> Date: Wed Jan 19 08:58:20 2022 +0100 Reading beyond EOF should return 0 for FILE_FLAG_NO_BUFFERING (#63625) * move Length to SafeFileHandle, so it's cached value can be reused in more places commit ea2a98163327022e6cefb6a424de4cb4e9618277 Author: Ilona Tomkowicz <32700855+ilonatommy@users.noreply.github.com> Date: Wed Jan 19 08:55:35 2022 +0100 [wasm][debugger] Added support for StepThroughAttribute (#63679) * Hidden methods and step through methods behave the same way. * Perpared flow for setting JustMyCode in the future. * Tests for JustMyCode setting before debug launch. * Transformed into dynamic JustMyCode change flow. * JustMyCode disabled, first 3 cases solved. * Finished behavior for JMC disabled (with 1 difference). * JMC enabled: stepIn np bp + stepIn bp + resume bp. * Functional version (with minor deviations from expected behavior). * Refactoring. commit 00e13f5482ea1156e6b37ea5d242d7f27befb8d3 Author: Adam Sitnik <adam.sitnik@gmail.com> Date: Wed Jan 19 08:42:07 2022 +0100 Add tests for creating memory mapped files from non-seekable files (#63927) commit c66e3c49b59e0894ed3e7c41b0e78dcda22528ae Author: Michal Strehovský <MichalStrehovsky@users.noreply.github.com> Date: Wed Jan 19 15:01:43 2022 +0900 Add support for libraries testing with NativeAOT (#63781) This adds support for running libraries tests with NativeAOT. It reuses the single file xunit runner since we cannot `LoadFrom` the tests on NativeAOT. The strategy is the same as for single file testing: do a publish. To do the NativeAOT publish, we include the Microsoft.DotNet.ILCompiler.targets. commit 3104ed8a3579746eaadb6280acc4fae1ae0df6ed Author: Michal Strehovský <MichalStrehovsky@users.noreply.github.com> Date: Wed Jan 19 15:00:52 2022 +0900 Fix up warnings from delegate thunks (#63980) If we hit a p/invoke with a `System.Delegate` in a delegate marshalling stub, blame the delegate type, not the compiler-generated method. Apparently we marshal System.Delegate in MsQuick interop. commit 0b307c95286a4f468fbb627a66515054ff18dc87 Author: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Wed Jan 19 07:25:12 2022 +0200 Add managed implementation of Math/MathF.Abs (#63881) * Add managed implementation of Math/MathF.Abs * Cleanup trailing whitespaces in changeset * Delete unused _copysignf macro commit fc3875f14f310cdce716df30a94feb43db79a28a Author: Jose Perez Rodriguez <joperezr@microsoft.com> Date: Tue Jan 18 19:47:09 2022 -0800 Fix case where we incorrectly select a prefix as a FindFirstChar optimization when the pattern includdes an alternation that could lead to different prefixes. (#63976) commit 454ac0a6e7584e1c02677d459d20dae5df61fb47 Author: Stephen Toub <stoub@microsoft.com> Date: Tue Jan 18 22:15:32 2022 -0500 Revert "Improve auto-atomicity for Regex loops (#63518)" (#63984) This reverts commit 557901e779a009cf4a51327963727a4d1ded0094. commit da72791c37480532e647e8f69aff3f2b7eef6049 Author: Jan Kotas <jkotas@microsoft.com> Date: Tue Jan 18 18:59:04 2022 -0800 Fix System.Reflection.Metadata version in ILVerification nuget package metadata (#63965) Fixes #63944 commit b7d8f5ecfa7bceb8069448951c7fabd65bcf26a0 Author: Tarek Mahmoud Sayed <tarekms@microsoft.com> Date: Tue Jan 18 18:39:37 2022 -0800 Fix Failing Globalization Test on OSX (#63971) commit 546c23804538ee751e4bb419942bc0170c3e5e06 Author: Michal Strehovský <MichalStrehovsky@users.noreply.github.com> Date: Wed Jan 19 10:58:17 2022 +0900 Improve ILLink.targets integration (#63914) Runtime side of https://github.com/dotnet/sdk/pull/23470 (depends on that getting merged). Skip touching the IL Linker semaphore that tricks the target into not running. commit 557901e779a009cf4a51327963727a4d1ded0094 Author: Stephen Toub <stoub@microsoft.com> Date: Tue Jan 18 20:40:35 2022 -0500 Improve auto-atomicity for Regex loops (#63518) * Improve auto-atomicity for Regex loops - As part of recognizing loops that could be made atomic, we currently only look at the node guaranteed to come immediately after it, e.g. in a+b+c+, when analyzing a+ we only look at the b+. That's fine in many cases, but if our expression was instead e.g. a*b*c*, we couldn't make a* atomic because we wouldn't be guaranteed it'd be followed by a b, and we wouldn't look at the subsequent nodes to determine what else might follow. When that situation occurs, we can now walk the tree to find the next node, and repeatedly do so as much as is needed in order to find the next node, enabling us to make all of those loops atomic. - We currently perform the auto-atomicity reduction for single-char loops as part of reducing concatenations. But this means we're performing that transformation at a time when the tree isn't fully formed, which means we can't necessarily reach out of a concatenation to what comes after it and use that to influence the atomicity. It also means we might repeat the analysis unnecessarily multiple times, because it's done as part of parenting a node. We can instead do that optimization as part of the final optimization phase, after the tree is already created. - When we find a lazy loop at the end of an expression, we can treat it as atomic, which means we can lower its max bound to its min bound. - When we encounter a loop (lazy or greedy) at the end of an expression, if it has a max bound of 1 (i.e. it's optional), we can proceed to eliminate ending backtracking with its child regardless of whether the child could be made atomic with the start of the loop, since it won't ever repeat more than once. * Extend auto-atomicity to lazy loops commit 14ebc594b2757e29e1f73742ce37d68f855c0a3c Author: Jan Kotas <jkotas@microsoft.com> Date: Tue Jan 18 17:36:09 2022 -0800 Do not register ACTIVATION_SIGNAL for secondary PAL copies (#63961) Related to #63959 commit cde93b69b6b099627d3615ec7f54cfb28b25bcde Author: Andy Ayers <andya@microsoft.com> Date: Tue Jan 18 16:57:51 2022 -0800 JIT: yet another OSR stress mode (#62980) Existing OSR stress use existing patchpoint placement logic and alter the policy settings so that OSR methods are created more eagerly. This new version of OSR stress alters the patchpoint placement logic, to add patchpoints to more places. In conjunction with the eager policy stress above this leads to creation and execution of large numbers of OSR methods. Any IL offset in the method with an empty stack (and not in a handler) is fair game for a patchpoint, so this new method randomly adds patchpoints to the starts of blocks when stack empty (future work may extend this to mid-block stack empty points). The new mode is enabled by setting `COMPlus_JitRandomOnStackReplacement` to a non-zero value; this value represents the likelihood of adding a patchpoint at a stack-empty block start, and also factors into the random seed. (Recall this is parsed in hex, so 0x64 == 100 or larger will put a patchpoint at the start of every stack empty block). Various values are interesting because once a method reaches a patchpoint and triggers OSR, the remainder of that method's execution is in the OSR method, so later patchpoints in the original method may never be reached. So some sort of random/selective patchpoint approach (in conjunction with varying policy settings) is needed to ensure that we create an execute as many different OSR variants as possible. This PR also includes a couple of fixes exposed by local testing of this new stress mode: * The OSR prolog may end up empty, which gcencoder doesn't like. Detect this and add a `nop` for the prolog. * If we're importing the `fgEntryBB` during OSR, we don't need to schedule it for re-importation. This happens if we put a patchpoint at IL offset zero. * Update the selective dumping policy `COMPlus_JitDumpAtOSROoffset` to only dump OSR method compilations. A new test leg is added to `jit-experimental` to run with this mode enabled with a probability of 21% (0x15) and quick OSR triggers. Also included: * fix probability calc * remove obsolete assert * osr exposed does not apply to simd * only pad zero-sized OSR prolog if we're reporting generic context * Add ability to have patchpoint at specified offset. * Fix interaction of stress patchpoints and profile instrumentation. We need to force block-based instrumentation if we might have stress patchpoints. commit 93cb3559a17aca424e3ce1206a71496da2c34b69 Author: Honza Rameš <ramejan@gmail.com> Date: Wed Jan 19 01:12:18 2022 +0100 Reduce allocations in code generated by Logging generators (#61162) (#62011) commit c50185bb24ace683f2ce6c5e4351ce2104bd1349 Author: Aleksey Kliger (λgeek) <alklig@microsoft.com> Date: Tue Jan 18 18:40:42 2022 -0500 [mono] Hot Reload: initial push to support adding lambdas (#63513) Adds support for: * Adding static lambdas to existing methods, whether or not they had lambdas before. * Adding lambdas that capture `this` to existing methods that already captured `this` before * Adding new static or instance methods to existing types * Adding static fields to existing types * Adding new types (note that adding instance fields currently will fail. It'll go in in a future PR that will address https://github.com/dotnet/runtime/issues/63643). Note that reflection on newly added members isn't tested yet and likely doesn't work. Fixes https://github.com/dotnet/runtime/issues/50249 Contributes to https://github.com/dotnet/runtime/issues/57365 * Add AddStaticField test; cleanup AddLambdaCapturingThis * Add AddNestedClass testcase * hot_reload: add a comment about remaining work * move per-class metadata update info to MonoClassMetadataUpdateInfo Use a property on the class instead of a hash table in the baseline image to keep track of added fields and methods * Cleanup pass1 to check add/update against prior gen Instead of the baseline image * adding a class Working on making mono_metadata_nested_in_typedef do the right thing for nested classes Contributes to making mono_class_create_from_typedef do the right thing for nested classes. * fix: correct mutant table population when the baseline table is empty In that case the table row_size and size_bitmap of the baseline are both 0, so offset calculations don't work. In that case when we know we need to add rows to the mutant table, use the uncompressed layout (32-bit columns, always) same as the EnC delta. * Calling new methods on a nested class works * adding fields Doesn't work yet. Dies in mono_class_get_field, called from mono_field_from_token_checked. The problem we're going to have to deal with is that unlike MonoMethod which is allocated upon lookup, the MonoClassFields of a class are allocated contiguously in class initialization. And there are not really enough fields in MonoClassField to indicate "this is not an ordinary field, don't do pointer arithmetic with it". One idea is to steal a bit from MonoClassField:parent and always check it as a trigger to go on a slower path. * adding static fields Rework the delta info to store info about "members" (rather than methods and fields separately). Add a MonoClassMetadataUpdateField subclass of MonoClassField that has extra info. Add new component methods to go from a MonoClassField to an index, and from a field token to a MonoClassField. Set MonoClassField:offset to -1 to generally go down the "special static field" codepath since we will need to do some one-off work to make a storage area for added static fields. Instance fields are not supported yet and error out during the update pass for now. * fix custom attribute lookups on new classes/methods/fields * Add a sketch of HotReloadInstanceFieldTable This is a class that manages the lifetime for added instance fields for reference types that had new fields added to them by EnC It's basically ConditionalWeakTable<object, Dictionary<uint, Store>> where the outer key is the object instance, the inner key is the fielddef token, and the value is a Store. The store has a single object? field which the location where the field's value will go. For reference types this is the reference directly, and for valuetypes and primitives, this is the boxed object (so to get the actual storage address you need to add sizeof(MonoObject)). * mono_metadata_update_get_static_field_addr two reminders: 1. The static field area needs to be GC-visible 2. We should really handle added fields on un-inited classes by allocating the instances in the normal way - in the layout algorithm. * Free MonoClassMetadataUpdateInfo when BaselineInfo is destroyed * placeholder struct for runtime class data; instance offset placeholder * static field storage Need to store the fields in a GC root, and in pinned allocations. * Implement hot_reload_get_static_field_addr() * Add mono_metadata_update_find_method_by_name Now we can find .cctor This is enough that a basic sample with an added static lambda works * Fix infinite loop * fix build * fix dynamic components builds * fix windows build * Fix inadvertent fallthru in previous fix * Report new capabilities NewTypeDefinition is not completely functional because adding instance fields is not supported yet. But adding classes with only static methods works. * tests: describe what existing tests do, add placeholder static lambda test * tests: Add AddStaticLambda test case Adding a brand new static lambda to an existing method body is supported * Destroy the runtime part of MonoClassMetadataUpdateInfo, too * rename Mono.HotReload file it has more classes than just the instance table * tests: add ActiveIssue for supporting adding instance fields * ifdef out Mono.HotReload.InstanceFieldTable it's not ready yet * Remove get_added_members from hot reload component interface Doesn't seem necessary to expose this yet. It's only used in hot_reload.c right now * Change the AddStaticLambda sample to use Func<string,string> To check that lambdas with parameters work * Use a mempool allocated GSlist for the added members This avoids invalidating iterators in case we add members on one thread while another thread is iterating. If it turns out we need random access, we can switch to a GArray with locking. But so far we only ever iterate. * Use mono_get_corlib instead of passing MonoDefaults to hot_reload * use normal GENERATE_TRY_GET_CLASS_WITH_CACHE * [metadata] make m_field_set_parent and m_field_set_meta_flags inline m_ prefix functions are supposed to be inline commit d2844ebf57568de4926517c521a94a721d9c26a8 Author: Bradley Grainger <bgrainger@gmail.com> Date: Tue Jan 18 15:32:16 2022 -0800 Add `UnicodeRange.ArabicExtendedB` (#63901) commit 8d5f5267d33f7703c014cc89670f1f7aa47544f9 Author: Andrii Kurdiumov <kant2002@gmail.com> Date: Wed Jan 19 05:23:32 2022 +0600 Update links to the project for DllImportGenerator (#63940) As coincidence, I think `RestoreAdditionalProjectSources` not needed anymore. commit 83b52cdc310ebd77cddff7efd772a0800a403f47 Author: Alexander Köplinger <alex.koeplinger@outlook.com> Date: Tue Jan 18 23:13:58 2022 +0100 [iOS/tvOS] Remove P/Invokes to libproc from System.Private.CoreLib (#63934) They aren't allowed by Apple when submitting to the App Store. Finishes https://github.com/dotnet/runtime/issues/61265 commit b0de23b1677fbaf4fbcde814ec0bad6f60094920 Author: Andy Gocke <angocke@microsoft.com> Date: Tue Jan 18 13:37:41 2022 -0800 Revert "Enable GC Regions by default (#59283)" (#63935) This reverts commit cf91716. This looks to be creating a lot of crashes in a lot of different unit tests on Mac. Reverting seems to halt the Mac failures (see https://dev.azure.com/dnceng/public/_build/results?buildId=1557880) Fixes #63439 commit 0266f034221188bc7d0156ba76a571c71885c68f Author: Kunal Pathak <Kunal.Pathak@microsoft.com> Date: Tue Jan 18 11:04:48 2022 -0800 Fix decoding errors (#63929) commit 078da6c37e2ab602fe37ab699051ef71161ce2cc Author: Bruce Forstall <brucefo@microsoft.com> Date: Tue Jan 18 11:04:22 2022 -0800 Introduce `BasicBlock::KindIs()` for checking bbJumpKind (#63203) * Introduce `BasicBlock::KindIs()` for checking bbJumpKind This can simplify code that is checking for multiple `bbJumpKind` kinds with an `if` statement, where a `switch` is not warranted. It's the same usage model as `GenTree::OperIs()`. e.g., ``` if (block->KindIs(BBJ_COND, BBJ_SWITCH, BBJ_RETURN)) ``` * Fix argument name commit 82b8d79b6f858f0d44791e3eab36735b7093d935 Author: Shane Krueger <shane@acdmail.com> Date: Tue Jan 18 13:56:09 2022 -0500 Fix NullabilityInfoContext.Create to properly analyze types with nested generic types (#63556) commit f04a24249835096eea1a1a66e4af03cfec5ed32b Author: Artem Kliatchkine <artem.kliatchkine@gmail.com> Date: Tue Jan 18 18:18:45 2022 +0100 Set zero (infinite) options timeout in case of Timeout.InfiniteTimeSpan (#55984) (#63733) Co-authored-by: Artem Kliatchkine <eldog@rambler.ru> commit 2eb2e883dc807897fe07dd6559462e37e8613693 Author: Tomas Weinfurt <tweinfurt@yahoo.com> Date: Tue Jan 18 09:18:29 2022 -0800 improve protocol detection in jail (#63565) * improve protocol detection in jail * add comment commit d18d6c703295555d466fb159f8dec64857f68ed9 Author: Kevin Jones <kevin@vcsjones.com> Date: Tue Jan 18 12:15:11 2022 -0500 Update SAN test to account for OpenSSL 3 changes commit 64896116e66377aa8e951abb9e9505aff8a25f89 Author: Kevin Jones <kevin@vcsjones.com> Date: Tue Jan 18 11:36:15 2022 -0500 Fix OpenSSL 3 reporting an OutOfMemoryException for missing private key commit 5a12420546d7f0d963bcccf082400c1b057e38ef Author: Maxim Lipnin <v-maxlip@microsoft.com> Date: Tue Jan 18 18:21:33 2022 +0300 Remove individual exclusions for DllImportGenerator.Unit.Tests in favor of the general one for the entire set of mobile targets (#63924) commit 39ef452edcf90bae76a1e4c8c1c24209e17ac5f2 Author: Maxim Lipnin <v-maxlip@microsoft.com> Date: Tue Jan 18 18:20:15 2022 +0300 Disable DllImportGenerator.Unit.Tests test suite on macOS+arm64+CoreCLR (#63887) commit 856e8c3510cb0aaaa3b1a1679552c03ae5308b9e Author: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Tue Jan 18 17:16:10 2022 +0200 Fix compilation with older gcc (#63721) commit 2f366a85444570429f8739b13bde18226a10bc86 Author: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Tue Jan 18 17:12:47 2022 +0200 Delete a few unused PAL APIs (#63916) * Delete _fullpath PAL API * Delete PAL_wcscspn * Delete PAL_wcstok commit 207590a7b82afa086e889f3fc695b104713f7c8e Author: Michal Strehovský <MichalStrehovsky@users.noreply.github.com> Date: Wed Jan 19 00:10:36 2022 +0900 Fold coreclr/ToolBox into coreclr/tools (#63917) This separation only existed because of Razzle build sequencing of desktop CLR. It doesn't make sense for CoreCLR. The only thing the extra directory is doing now is that it breaks tab completion when navigating the CoreCLR source tree because ToolBox comes before tools alphabetically and most things live in tools. commit e30fe9b4d3afabc4acdfcaa539ecf213c16aea1a Author: Theodore Tsirpanis <teo@tsirpanis.gr> Date: Tue Jan 18 16:58:11 2022 +0200 Encapsulate the logic of caching the last synchronously completed task. (#61781) * Encapsulate the logic of caching the last synchronously completed task. * Apply suggestions from code review Co-authored-by: Adam Sitnik <adam.sitnik@gmail.com> commit e6ad043996419f04b1c0ae9fea113318f61e234f Author: Michal Strehovský <MichalStrehovsky@users.noreply.github.com> Date: Tue Jan 18 23:32:28 2022 +0900 Split CheckNotDisposed to allow inlining (#63863) * Split CheckNotDisposed to allow inlining `CheckNotDisposed` is not getting inlined because RyuJIT thinks it's not profitable (ldstr/newobj/throw is expensive). If we extract the rare path into a separate method, it changes the profitability math and allows inlining to happen. * Review feedback commit dfb36ae68d9a099c9b90317c97bdf485bab4121e Author: Stephen Toub <stoub@microsoft.com> Date: Tue Jan 18 09:31:12 2022 -0500 Fix a few IndexOf{Any} uses (#63852) commit 7a0388a9f1a11b723aa09aeae3436a078b32bb43 Author: Eirik Tsarpalis <eirik.tsarpalis@gmail.com> Date: Tue Jan 18 13:33:57 2022 +0000 Extend triage board automation to more pods (#63897) commit 8d8ef6dac58acf2ab944289c69dd46ee9e12d717 Author: Tom Deseyn <tom.deseyn@gmail.com> Date: Tue Jan 18 11:00:35 2022 +0100 FileSystemEntry.Unix: don't make a syscall to check hidden on Linux. (#63878) commit 24bdc3844c3de6d6a3c47534411c8322ae1a7bc6 Author: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue Jan 18 10:41:02 2022 +0100 [main] Update dependencies from dotnet/linker (#63445) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> commit 126db6dd10fcf618a9ab17ed93347044cc5a3a24 Author: Michal Strehovský <MichalStrehovsky@users.noreply.github.com> Date: Tue Jan 18 14:19:20 2022 +0900 Disable warnings as errors in the repro project (#63910) commit d0e2dac3a828b6afda5cff812b7b09b9dba213b7 Author: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com> Date: Tue Jan 18 01:23:41 2022 +0300 Actually properly type primary selectors (#63752) * Use only one [out] parameter in IsFieldAddr Since only one is needed. * Actually properly type primary selectors commit d48a44f2ee2f6b4b039ca10cfd5dc01c331669f5 Author: Michal Strehovský <MichalStrehovsky@users.noreply.github.com> Date: Tue Jan 18 02:11:44 2022 +0900 Separate variance information in mangled names (#63866) Fixes https://github.com/dotnet/runtimelab/issues/1821. Eventually we'll need to have a holistic look at how we mangle things. commit 6dcb03913c7d55dca824abcd21617212bef62553 Author: Jan Kotas <jkotas@microsoft.com> Date: Mon Jan 17 07:46:40 2022 -0800 Delete UMThkCallFrame (#63826) * Delete UMThkCallFrame * Place UnmanagedToManagedFrame under FEATURE_COMINTEROP commit 4fac9549fea1ccbf296aeaa0861478825d70c5c3 Author: Mandar Sahasrabuddhe <WinCPP@users.noreply.github.com> Date: Mon Jan 17 16:05:28 2022 +0530 Fix escaped strings for TryGetDateTime(Offset) (#63534) * Fix escaped strings for TryGetDateTime(Offset) Fix the exception thrown when the escaped DateTime(Offset) property value is unescaped and it becomes shorter than the minimum expected length. In such case the Try* method should fail and returns false. Fixes #62720 * Fix escaped strings for TryGetDateTime(Offset) Fix the exception thrown when the escaped DateTime(Offset) property value is unescaped and it becomes shorter than the minimum expected length. In such a case, the Try* method should fail and return false. Fixes #62720 * Fix escaped strings for TryGetDateTime(Offset) Fix the exception thrown when the escaped DateTime(Offset) property value is unescaped and it becomes shorter than the minimum expected length. In such a case, the Try* method should fail and return false. Fixes #62720 * Fix escaped strings for TryGetDateTime(Offset) Fix the exception thrown when the escaped DateTime(Offset) property value is unescaped and it becomes shorter than the minimum expected length. In such a case, the Try* method should fail and return false. Fixes #62720 * Fix escaped strings for TryGetDateTime(Offset) Fix the exception thrown when the escaped DateTime(Offset) property value is unescaped and it becomes shorter than the minimum expected length. In such a case, the Try* method should fail and return false. Fixes #62720 commit d72ed27cfe8656807ece255b275ca9d617af073b Author: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com> Date: Mon Jan 17 13:11:43 2022 +0300 Treat CLS_VAR_ADDR as never null (#63844) Allows the LIR DCE to remove some indirections that were previously incorrectly thought to be throwing. Contributes to CLS_VAR deletion (by minimizing the diffs). commit bf1d4a10b998a80b92728f80aa5ebbcd5138347a Author: Radek Zikmund <32671551+rzikm@users.noreply.github.com> Date: Mon Jan 17 11:11:10 2022 +0100 Fix generating RunTests.sh and RunTests.cmd scripts (#63875) This fixes issue where generated RunTests.sh in the "To repro directly: " section contained unevaluated variables like RUNTIME_PATH, which prevented simple copy-pasting the code into the terminal commit ae2f60c950cc021921fce83c796cbcb5ff96c658 Author: Andrii Kurdiumov <kant2002@gmail.com> Date: Mon Jan 17 09:57:15 2022 +0600 NativeAOT: Allow Delegate and MulticastDelegate marshalling (#63219) - Closes https://github.com/dotnet/runtimelab/issues/1107 - Progress towards https://github.com/GtkSharp/GtkSharp/issues/300 commit 84926be4243143b7830e78cb7727057ed711a3cc Author: Andrii Kurdiumov <kant2002@gmail.com> Date: Mon Jan 17 07:42:08 2022 +0600 Prevent assert if stack trace has function pointer (#63787) commit 217b288cfabd2368082343c7e36e7ac0a8f96db9 Author: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Mon Jan 17 03:10:54 2022 +0200 Convert h2inc to a cmake function (#63841) * Convert h2inc to a cmake function * Reuse preprocess_file commit ec349cd8e9960ec44bf528eef52c56a87e601207 Author: Tomáš Rylek <trylek@microsoft.com> Date: Sun Jan 16 20:50:01 2022 +0100 Fix a few IL tests using the namespace syntax without an actual namespace (#63772) commit 4f34cedc8eefb2a396646a67869e784f06d7def8 Author: Tomáš Rylek <trylek@microsoft.com> Date: Sun Jan 16 20:45:15 2022 +0100 Disable the Runtime_34587 regression test with GH issue #63818 (#63819) commit bf65675a8181d5448134788a148f844d35c4f091 Author: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com> Date: Sun Jan 16 20:21:52 2022 +0300 Compress operand kinds array and optimize `OperIsLocal` (#63253) * Delete GTK_CONST * Delete OperIsRelop * Delete GTK_RELOP * Delete GTK_LOGOP * Delete GTK_LOCAL * Compress oper kinds They now fit into 8 bits. commit 23de81782ca9cd24f024bd598563d363df29660c Author: Zoltan Varga <vargaz@gmail.com> Date: Sat Jan 15 22:05:07 2022 -0500 [mono] Disable partial generic sharing for gparams with non-enum constraints for method gparams too. (#63813) This is an optimization, but it also avoids hitting some gsharing limitations wrt calling abstract static methods from gshared code. Fixes https://github.com/dotnet/runtime/issues/60447. commit c5c7967ddccc46c84c98c0e8c7e00c3009c65894 Author: Stephen Toub <stoub@microsoft.com> Date: Sat Jan 15 20:35:25 2022 -0500 Unify string.{Last}IndexOfAny and span.{Last}IndexOfAny (#63817) * Unify string.{Last}IndexOfAny and span.{Last}IndexOfAny Currently, string.IndexOfAny delegates to span.IndexOfAny (MemoryExtensions) for 1 through 5 values, and for more than it, it falls back to its own "probabilistic map"-based implementation, which tries to avoid looping through each value character for each character in the input. span.IndexOfAny doesn't do that, instead always looping through every char for every input char. This PR moves the logic from string into MemoryExtensions and then has string unconditionally delegate to span. string.LastIndexOfAny in contrast would only delegate to span's implementation if the values list actually only had a single character in it; otherwise, it would again fall back to its own "probabilistic map"-based implementation. This PR again moves that fallback into MemoryExtensions, with string unconditionally delegating to it. MemoryExtensions also has LastIndexOf overloads for 2 and 3 items, so rather than using the probabilistic path for those, it delegates to the existing overloads. * Address PR feedback commit 1e22b3f00501e8263af571ad74cb043fb3407b70 Author: Jeremy Koritzinsky <jekoritz@microsoft.com> Date: Sat Jan 15 12:59:33 2022 -0800 Refactor the "produce an RSP file" step into a separate step from the "run ILC" step to make it easier to generate the RSP file on the fly (#63820) commit fd2883f7bb60e75df6edcec58ac7bc79ecd10196 Author: Jan Kotas <jkotas@microsoft.com> Date: Sat Jan 15 12:21:07 2022 -0800 Delete notifyexternals.* (#63835) Leftovers from loader lock MDA commit 78dea7ff6599dd851210df6db330ee3b58f5294c Author: Stephen Toub <stoub@microsoft.com> Date: Sat Jan 15 10:28:53 2022 -0500 Add Regex FindFirstChar optimization for a literal after an atomic loop (#63477) * Add Regex FindFirstChar optimization for a literal after an atomic loop If after all of our analysis we can't find anything to IndexOf{Any} as part of finding the next match location, we'll also look for a literal (a single char, a string of chars, or a set of a small number of chars) following an unbounded atomic set loop that starts the pattern. In that case, we can IndexOf for the literal, and then walk backwards through the characters prior to it looking for the beginning of the match. * Extend optimization to Setloop/lazy in addition to Setloopatomic commit c30d55ec5b584e26186a85adedf313c81a64269c Author: Tanner Gooding <tagoo@outlook.com> Date: Sat Jan 15 05:00:18 2022 -0800 Perform some minor code cleanup of the System.Numerics and System.Runtime.Intrinsics namespaces (#63753) * Ensure the System.Numerics and System.Runtime.Intrinsics namespaces are using explicit type when "not apparent" to match repo conventions * Ensure the System.Runtime.Intrinsics types are using TARGET_64BIT to match project convention * Improving some docs and simplifying names where possible commit a2e017dc876729678d7874706086bd444f010bcf Author: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com> Date: Sat Jan 15 15:42:31 2022 +0300 Fix MOffset size estimate (#63766) commit 9db60963097adac1c25a5117d3918de17e1b5fb1 Author: Egor Bogatov <egorbo@gmail.com> Date: Sat Jan 15 15:20:36 2022 +0300 JIT: Mark constant arguments of HWINTRINSIC nodes as DONT_CSE (#63442) commit 20e6ec1a43cab03cd2d48f9fad32d56e83787ea0 Author: Geoff Kizer <geoffrek@microsoft.com> Date: Sat Jan 15 04:03:03 2022 -0800 Avoid unnecessary string allocation in HttpRuleParser.GetHostLength (#63641) * avoid unnecessary string allocation in HttpRuleParser.GetHostLength Co-authored-by: Geoffrey Kizer <geoffrek@windows.microsoft.com> commit 25d999b5a6711fc6d2ffc42fa38a58ec865a7232 Author: Stephen Toub <stoub@microsoft.com> Date: Sat Jan 15 06:50:49 2022 -0500 Improve use of {Last}IndexOf{Any} in Regex loops (#63428) * Improve .*string to LastIndexOf "string" rather than just 's' * Enable .*string LastIndexOf optimization in the face of an UpdateBumpalong If the loop starts the expression, we will have inserted an UpdateBumpalong node, but that was then interfering with detecting a subsequent character/string. * Use IndexOf{Any} in lazy loop backtracking * Improve how sets are described in comments * Change RealWorld tests to be invoked once per engine To help with debugging * Address PR feedback commit 386f87139c7fe48f6b733e3cae6d09128c827192 Author: Aleksey Kliger (λgeek) <alklig@microsoft.com> Date: Sat Jan 15 04:05:03 2022 -0500 [metadata] Use MonoDefaults from components without hacks (#63822) commit 692052e016407e6eb11feeaee5269625c3ee741a Author: Ankit Jain <radical@gmail.com> Date: Fri Jan 14 23:52:13 2022 -0500 Split `sendtohelixhelp.proj` to extract wasm, and mobile bits to separate files. (#63373) Extract wasm, and mobile specific bits from sendtohelixhelp.proj into … .. separate files, so they can be easier to manage. - the platform specific properties are set in their respective files (for eg `sendtohelixhelp-wasm.proj`) - a new target `BuildHelixCommand` is extracted from `BuildHelixWorkItems`, which runs first - and essentially builds `@(HelixCommand)` - Platform specific targets can run via `$(BuildHelixWorkItemsDependsOn)` - which then add any "special" helix work items - `BuildHelixWorkItems` in the main file supports adding for the regular case, which is controlled by `$(EnableDefaultBuildHelixWorkItems)`. Also, fixes https://github.com/dotnet/runtime/issues/52137 commit 9daaab152ff1c0794ee21645bf57acf444f900ff Author: Anton Firszov <Anton.Firszov@microsoft.com> Date: Sat Jan 15 03:15:26 2022 +0100 serialize SendPacketsAsync tests (#63702) commit 40047f2a82595546eadbabf9e438f7592eb1f002 Author: Stephen Toub <stoub@microsoft.com> Date: Fri Jan 14 20:48:36 2022 -0500 Improve Regex UpdateBumpalong optimization for non-atomic and lazy loops (#63398) * Improve handling of UpdateBumpalong for non-atomic loops For atomic greedy loops, UpdateBumpalong is serving its purpose: upon consuming as much as possible for the loop, base.runtextpos is set to that position so that the next time FindFirstChar runs, it'll start from at least that location. However, for non-atomic greedy loops, with base.runtextpos being set to the ending position after each backtracking, we end up inadvertently voiding any benefits of the UpdateBumpalong, as we end up overwriting the further position with the shorter position. A simple tweak to that, only setting the position if it's greater, yields significant benefits, in particular when there's no match. * Add more tests for lazy loops These just duplicate the greedy loop tests and tweak them for lazy. * Insert UpdateBumpalong for lazy loops as well * Address PR feedback commit 513fe2863ad5ec6dc453d223d4b60f787a0ffa78 Author: Tomáš Rylek <trylek@microsoft.com> Date: Sat Jan 15 00:36:58 2022 +0100 More duplicate projects under JIT/Methodical/NaN to delete (#63771) commit 2692407f03ce8b648c54daa4d3a3eb534132edc9 Author: Santiago Fernandez Madero <safern@microsoft.com> Date: Fri Jan 14 13:36:50 2022 -0800 Build all packages on source-build even when in servicing (#63755) commit e1c69cc75a4c51ea3e3011a084f74b486b2dbc88 Author: Tomáš Rylek <trylek@microsoft.com> Date: Fri Jan 14 21:47:44 2022 +0100 Move localloc/common library under JIT folder (#63510) In today source tree we have five different libraries named 'common'. This change is a first step in deduplicating their names; I have also moved the library under the JIT/ folder as it's used not only by JIT/jit64 tests but also by Methodical and Regression tests. Thanks Tomas commit 3a83c5ca772a1a74e1707474c1d05c283f264a2f Author: Jan Kotas <jkotas@microsoft.com> Date: Fri Jan 14 12:47:18 2022 -0800 Delete unused method (#63797) commit 02e22b02975d50944220e6e9a494af491487c6a9 Author: Tomáš Rylek <trylek@microsoft.com> Date: Fri Jan 14 21:00:01 2022 +0100 Remove string[] args from Main methods under JIT/Methodical (#63770) In most cases the arguments were formal and not really used so I just fixed the Main method signature. In a bunch of cases the command-line arguments supported variant functionality of the test case but I haven't found any test projects that would be exercising this functionality. I don't think it makes sense to keep untested code paths so I deleted the logic pertaining to non-empty command-line arguments. In the particular case of stringintern tests, each test apparently had a TestSameObjRef and TestDiffObjRef variant, triggered by command-line arguments. I tried to run TestDiffObjRef but it ended up failing left and right - not suprising for untested code logic - so I also deleted the TestDiffObjRef variants as I suppose the invariants previously tested there no longer hold. Thanks Tomas commit 562606671166edb60234c5062f69b35f6b2ac5c9 Author: Egor Chesakov <Egor.Chesakov@microsoft.com> Date: Fri Jan 14 10:44:07 2022 -0800 Enable superpmi-collect pipeline on macOS arm64 (#63691) * Enable superpmi-collect on macOS Arm64 in eng/pipelines/coreclr/superpmi-collect.yml * Add -platform argument and use the value for determining what Helix queue to use in src/coreclr/scripts/superpmi_collect_setup.py * Pass platform to superpmi_collect_setup.py in eng/pipelines/coreclr/templates/run-superpmi-collect-job.yml * Copy *.dylib on macOS and *.so on Linux in src/coreclr/scripts/superpmi_collect_setup.py * Install azure-storage-blob in eng/pipelines/coreclr/templates/run-superpmi-collect-job.yml * Remove macOS/x64 from platforms list in eng/pipelines/coreclr/superpmi-collect.yml * Add "CoreCLR Product Build OSX x64 checked" that produces required artifacts that consumed by macOS/arm64 superpmi-collect-job * Fix typo in libraries_test_assets should correspond to target arch in eng/pipelines/coreclr/templates/superpmi-collect-job.yml * Update a comment indicating what Helix queues are used for macOS in src/coreclr/scripts/superpmi_collect_setup.py * Workaround https://github.com/dotnet/sdk/issues/23430 in src/coreclr/scripts/superpmi_benchmarks.py * Enable macOS/arm64 benchmarks collection in eng/pipelines/coreclr/superpmi-collect.yml commit a991e1349e4325770d8e2ddf085184a68cd2555b Author: Elinor Fung <elfung@microsoft.com> Date: Fri Jan 14 10:49:26 2022 -0500 Make ObjectiveC tests in System.Runtime.InteropServices.Tests check exit code for remote execution (#63769) commit 33179fa0ac1ab75bb09e5cc7ed63aa6629c51411 Author: Maksym Koshovyi <maximkoshevoi61@gmail.com> Date: Fri Jan 14 17:49:06 2022 +0200 [Group 5] Enable nullable annotations for `Microsoft.Extensions.Configuration.Ini` (#60368) * Add annotations * Use pattern matching * NetCoreAppMinimum * ReadLine won't return null * Update src/libraries/Microsoft.Extensions.Configuration.Ini/ref/Microsoft.Extensions.Configuration.Ini.csproj Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com> * Add comment * Revert non-nullable change Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com> commit 3956126d55e32203a8926a54a8ee3090b3e69749 Author: MSDN.WhiteKnight <35516665+MSDN-WhiteKnight@users.noreply.github.com> Date: Fri Jan 14 20:33:03 2022 +0500 Fix typo in SRM package description (#63782) commit d568a3fec2c9a2e7341466a28f88f52558fddf6c Author: Tarek Mahmoud Sayed <tarekms@microsoft.com> Date: Fri Jan 14 07:27:32 2022 -0800 Introduce Activity.IsStopped Property (#63713) Co-authored-by: Dan Moseley <danmose@microsoft.com> commit 0b527a201f4c286f13ef8b829bbd1651bdad7a52 Author: Zoltan Varga <vargaz@gmail.com> Date: Fri Jan 14 08:07:47 2022 -0500 Fix a style issue. (#63776) commit b184ee0393aaf0395a69e70590d5c529e8c93ccf Author: Adam Sitnik <adam.sitnik@gmail.com> Date: Fri Jan 14 10:04:11 2022 +0100 MemoryMappedFile: don't check for file existence if there is no need (#63754) Co-authored-by: Stephen Toub <stoub@microsoft.com> commit c96869a6d10a235b5a26c9e15d685fabc7f87cb0 Author: Michal Strehovský <MichalStrehovsky@users.noreply.github.com> Date: Fri Jan 14 17:03:22 2022 +0900 Disable annoying warnings in the repro project (#63777) We have repo-wide WarnAsError that makes this super annoying in a repro project. commit b7e0a85ab6111b77ad19a1c2db0dedcedded4940 Author: Qiao <35673267+shushanhf@users.noreply.github.com> Date: Fri Jan 14 14:33:20 2022 +0800 [LoongArch64] add all the coreclr-build-config files (#62889) commit 1ba80f698c85b525545f1a13c02eb405588b0461 Author: Andrii Kurdiumov <kant2002@gmail.com> Date: Fri Jan 14 12:20:45 2022 +0600 Remove errors during first run of runpaltests.h (#62642) * Remove errors during first run of runpaltests.h If you run `runpaltests.h` for first time, you will see 2 errors about file or folder not found. First error comes from using `RELATIVE_PATH_TO_PAL_TESTS` which does not used anywhere, except maybe some platform where you can `cd` to non-existing folder. In that case 3rd parameter to script would be interpreted incorrectly. I doubt that, but who know what's somewhere deep in infra. Second error is entirely preventable, since `cd $PAL_TEST_OUTPUT_DIR` does not affect anything until subsequent `cd $PAL_TEST_OUTPUT_DIR` on line 118. Discovered here https://github.com/dotnet/runtime/pull/62625#issuecomment-991172978 * Remove not nescessary cd * Fix * oopsie commit 27fdc2d22f8717c7b0ba254ae9ef2900d00f5e7a Author: Stephen Halter <halter73@gmail.com> Date: Thu Jan 13 17:20:28 2022 -0800 Avoid deadlock with ConfigurationManager (#62209) Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com> commit 2c28e63f9360280011a3b03c1ca6dc0edce1fae4 Author: Alexander Köplinger <alex.koeplinger@outlook.com> Date: Thu Jan 13 22:17:54 2022 +0100 Temporarily disable coredumps during library testing on macOS (#63742) System.Runtime.InteropServices.Tests seems to produce >10GB of coredumps which overwhelms CI. commit 79e40e35ce3e218ad2d81259572e462b56bfd807 Author: Kevin Jones <kevin@vcsjones.com> Date: Thu Jan 13 15:04:36 2022 -0500 Add public constants for HMAC and hash sizes commit c912a1532a1bb653a21a3749aaad7c5fb556ae01 Author: Kevin Jones <kevin@vcsjones.com> Date: Thu Jan 13 14:07:55 2022 -0500 Change non-breaking spaces (U00A0) to a plain space in code files (#63688) commit ec0c7f3a91b9fc47f7a867f0b997ba34560302e7 Author: Aaron Robinson <arobins@microsoft.com> Date: Thu Jan 13 12:20:43 2022 -0500 Add negative tests for by-ref in UnmanagedCallersOnly scenarios. (#63711) commit c78d9fa3edb2ae8e14f0529566c20d33a2512cab Author: Maxim Lipnin <v-maxlip@microsoft.com> Date: Thu Jan 13 19:08:27 2022 +0300 Disable System.Drawing.Common.Tests test suite on Windows+Mono (#63726) commit 048e1a395523f1855c054d01a3f1f4c55d873ea4 Author: Simon Rozsival <simon@rozsival.com> Date: Thu Jan 13 16:57:12 2022 +0100 [Android] Throw PNSE for unavailable network information (#63633) * Update tests * Add android specific implementation * Add UnsupportedOSPlatform attributes * Fix typo * Remove unnecessary file reference * Clean-up code * Minor code clean-up * Remove dictionary * Refactoring * Revert comment change commit 77bdad50a01f3a330c03b093544245d39620314b Author: Alexander Köplinger <alex.koeplinger@outlook.com> Date: Thu Jan 13 16:06:39 2022 +0100 Bump to macOS 10.14 minimum in libs and mono builds too (#63682) https://github.com/dotnet/runtime/pull/62822 bumped the minimum CMAKE_OSX_DEPLOYMENT_TARGET to 10.14, but the libs.native and mono parts of the build still used the old 10.13 value. In build-native.sh for libs.native we can actually remove the explicit setting since we're already setting it in eng/native/configurecompiler.cmake. commit 01cdd1dcaebcc9f2ab36027204142a6703a1b70b Author: Pavel Savara <pavelsavara@microsoft.com> Date: Thu Jan 13 15:42:08 2022 +0100 [wasm] Emscripten uses `require` even when targeting ES6. This deals with the consequences. (#63718) commit a13ee96335ea4c41cfe273855611caec4c35cae8 Author: Thays Grazia <thaystg@gmail.com> Date: Thu Jan 13 09:53:43 2022 -0300 [wasm][debugger] Fixing error after receiving loaded_files = null (#63591) * Fixing #39301 * Addressing @radical comments * Sending the error toconsole in the browser. * Applying @radical suggestion. * Update src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs Co-authored-by: Ankit Jain <radical@gmail.com> * Update src/mono/wasm/debugger/tests/debugger-test/wasm-page-without-assets.html Co-authored-by: Ankit Jain <radical@gmail.com> * Space -> tabs * Fix compilation error. Co-authored-by: Ankit Jain <radical@gmail.com> commit 64c05a3bcb4e71ee9972a3fb47eb4d3e061d3462 Author: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com> Date: Thu Jan 13 12:58:37 2022 +0300 Reconfigure the field sequences for statics (#62632) * Reconfigure the field sequences for statics To make the "boxed static" and, in the future, "shared" cases identical to simple ones. It used to be that we attached the field sequence to the "inner" constant, and then added the "#FirstElem" pseudo-field for the outer offset. This was causing complexity and mistakes in the pattern matching performed by "IsFieldAddr". The solution is straightforward: always use the outer offset for the sequence. The much simpler pattern is easier and cheaper to recognize, with less room for false positives. * Drop support for mutable RVA statics They were broken on 32 bit already, and this change does not break them on 64 bit, but we'll reserve the right to do that in the future as the scenario appears to be non-existent. commit 46db4aa3c505ac36cf8d0d612d4161bb7239ed87 Author: Michal Strehovský <MichalStrehovsky@users.noreply.github.com> Date: Thu Jan 13 15:28:38 2022 +0900 Add NativeAOT libraries tests annotations (#63668) Adds `ActiveIssue`/`Conditional` attributes to libraries tests so that we can get a clean run with NativeAOT. Starting with System.Collections, System.Runtime, and System.IO.FileSystem. commit f580068aa93fb3c6d5fbc7e33f6cd7d52fa86b24 Author: Dmitry Bogatykh <bogatykh@gmail.com> Date: Thu Jan 13 07:00:39 2022 +0300 Fix JsonObject constuctor (#63150) * Fix JsonObject constuctor * Fix constructor this * JsonObject constructor test * Augment tests Co-authored-by: Layomi Akinrinade <layomia@gmail.com> commit c7630198c93988fcf2cab2e6e30aadc76328e09a Author: Pavel Savara <pavelsavara@microsoft.com> Date: Thu Jan 13 02:55:18 2022 +0100 [wasm] Load assets earlier (#63623) - allow Module.config to have assets with buffer instead of url - change sample to show how emscripten callbacks are triggered - pass config into onConfigLoaded and made it async - split asset download from copying it into memory - moved startup s…
* #51371 fixed failing test in iossimulator * #51371 added skiptestexception * #51371 added space after reference * #51371 fixed remaining failing tests * #51371 whitespace issue * #51371 removed extra spaces * Squashed commit of the following: commit 36cdb5fc0c38cbb44291114e48e2b202ff37db01 Author: Ilona Tomkowicz <32700855+ilonatommy@users.noreply.github.com> Date: Thu Jan 20 11:03:02 2022 +0100 [wasm][debugger] Added support for stepper boundary attribute (#63991) * Hidden methods and step through methods behave the same way. * Perpared flow for setting JustMyCode in the future. * Tests for JustMyCode setting before debug launch. * Transformed into dynamic JustMyCode change flow. * JustMyCode disabled, first 3 cases solved. * Finished behavior for JMC disabled (with 1 difference). * JMC enabled: stepIn np bp + stepIn bp + resume bp. * Functional version (with minor deviations from expected behavior). * Refactoring. * All tests for NonUserCode work. * Fix line number after adding code above. * Stepper boundary with tests. * Save information about multiple decorators. * Fix error in merge. commit 5a523cf27a9b73e61adb1408f21b5e75a2246d9e Author: Ilona Tomkowicz <32700855+ilonatommy@users.noreply.github.com> Date: Thu Jan 20 10:26:06 2022 +0100 [debugger][wasm] Added support for non user code attribute (#63876) * Hidden methods and step through methods behave the same way. * Perpared flow for setting JustMyCode in the future. * Tests for JustMyCode setting before debug launch. * Transformed into dynamic JustMyCode change flow. * JustMyCode disabled, first 3 cases solved. * Finished behavior for JMC disabled (with 1 difference). * JMC enabled: stepIn np bp + stepIn bp + resume bp. * Functional version (with minor deviations from expected behavior). * Refactoring. * All tests for NonUserCode work. * Fix line number after adding code above. * Fix error in merge. * Removing duplicated tests. commit 8f2c84f02b74dbbe6e1f02dc9be37cf3ee288d6e Author: Peter Sollich <petersol@microsoft.com> Date: Thu Jan 20 10:06:45 2022 +0100 Fix issues with verify_regions, clear_batch_mark_array_bits. (#63798) Details: - we cannot verify the tail of the region list from background GC, as it may be updated by threads allocating. - fix case in clear_batch_mark_array_bits where end is equal to the very end of a segment and we write into uncommitted memory in the mark_array. - bgc_clear_batch_mark_array_bits did some checks and then called clear_batch_mark_array_bits which repeated the exact same checks. Renamed clear_batch_mark_array_bits to bgc_batch_mark_array_bits and removed the old copy, removed the declaration for clear_batch_mark_array_bits. commit e4bfedd847990795eb28cda4008b5ff4c58fd561 Author: Jeremy Barton <jbarton@microsoft.com> Date: Thu Jan 20 00:06:28 2022 -0800 Fix OpenSSL version check in GetAlpnSupport The previous check failed 3.0.0 because the Minor was 0 and Build was 0. It could probably be rewritten to be `>= new Version(1, 0, 2)`, but that'd require more thinking. commit 2cf6b0d07309a3c19938f4c886fe13e8d5cc28ee Author: Andrew Au <andrewau@microsoft.com> Date: Wed Jan 19 20:57:41 2022 -0800 Fix gc_heap::remove_ro_segment (#63473) commit 65a5d0e8a3027f2b240d098f47327ba3e1f743b1 Author: Tlakaelel Axayakatl Ceja <tlakaelel.ceja@microsoft.com> Date: Wed Jan 19 19:46:45 2022 -0800 Add ProcessLinkerXmlBase to NativeAOT (#63666) Add Xml Parsing linker files as a reference source to NativeAOT Rename NativeAOT ProcessLinkerXmlBase version to ProcessXmlBase (uses XmlReader) Add ProcessLinkerXmlBase from linker and fix it so it can be used in NativeAOT (uses XPath) commit f1c8b10ef824c5abf0c851f610ab0961ca31693f Author: Egor Chesakov <Egor.Chesakov@microsoft.com> Date: Wed Jan 19 19:43:26 2022 -0800 [Arm64] Keep unrolling InitBlock and CopyBlock up to 128 bytes (#63422) * Add INITBLK_LCL_UNROLL_LIMIT and CPBLK_LCL_UNROLL_LIMIT of 128 bytes in src/coreclr/jit/targetarm64.h * Keep unrolling InitBlock up to INITBLK_LCL_UNROLL_LIMIT bytes when dstAddr points to the stack in src/coreclr/jit/lowerarmarch.cpp * Keep unrolling CopyBlock up to CPBLK_LCL_UNROLL_LIMIT bytes when both srcAddr and dstAddr point to the stack in src/coreclr/jit/lowerarmarch.cpp commit a5158df084780e52005e4dcbd02ee091542e06d0 Author: Will Smith <lol.tihan@gmail.com> Date: Wed Jan 19 18:44:19 2022 -0800 'cmeq' and 'fcmeq' Vector64<T>.Zero/Vector128<T>.Zero ARM64 containment optimizations (#62933) * Initial work * Added a comma to display * Cleanup * Fixing build * More cleanup * Update comment * Update comment * Added CompareEqual Vector64/128 with Zero tests * Do not contain op1 for now * Wrong intrinsic id used * Removing generated tests * Removing generated tests * Added CompareEqual tests * Supporting containment for first operand * Fix test build * Passing correct register * Check IsVectorZero before not allocing a register * Update comment * Fixing test * Minor format change * Fixed formatting * Renamed test * Adding AdvSimd_Arm64 tests: * Adding support for rest of 'cmeq' and 'fcmeq' instructions * Removing github csproj * Minor test fix * Fixed tests * Fix print * Minor format change * Fixing test * Added some emitter tests * Feedback * Update emitarm64.cpp * Feedback commit 68a923a24edb47f1d0e3c38a69d4091a7587bfc4 Author: Andrew Au <andrewau@microsoft.com> Date: Wed Jan 19 17:59:07 2022 -0800 Check if the child object is in the heap range before object_gennum (#63970) commit 752569f66bcde98fcc4dd1e651f9f1f138184c5c Author: Andrew Au <andrewau@microsoft.com> Date: Wed Jan 19 17:58:39 2022 -0800 Check if the child object is in the heap range before get_region_plan_gen_num (#63828) commit 5cefc0f9e618e2d8b38d7de67bbd8a50adb9646f Author: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com> Date: Thu Jan 20 04:23:50 2022 +0300 Fix invalid threading of nodes in rationalization (#64012) The code in question assumes that the ASG will be reversed and thus threads "simdTree" before "location" in the linear order. That dependency, while valid, because "gtSetEvalOrder" will always reverse ASGs with locals on the LHS, is unnecessary and incorrect from the IR validity point of view. Fix this by using "InsertAfter" instead of manual node threading. commit 93dc760481bdde2c463d725c2927b9da8787eb98 Author: Tomáš Rylek <trylek@microsoft.com> Date: Thu Jan 20 01:52:15 2022 +0100 Fix Crossgen2 bug #61104 and add regression test (#63956) The issue tracks the runtime regression failure where Crossgen2-compiled app is unable to locate a type with non-ASCII characters in its name. The failure was caused by the fact that Crossgen2 was incorrectly zero-extending the individual UTF8 characters when calculating the hash whereas runtime is sign-extending them. Thanks Tomas commit 94b699cc6f6b88c6de1d13152143d32285c59555 Author: Jeremy Koritzinsky <jekoritz@microsoft.com> Date: Wed Jan 19 16:46:00 2022 -0800 Update StructMarshalling design now that DisableRuntimeMarshallingAttribute is approved (#63765) Co-authored-by: Elinor Fung <elfung@microsoft.com> commit a618086f53fa755732697fba171a16e8bf67900a Author: Andy Ayers <andya@microsoft.com> Date: Wed Jan 19 16:01:16 2022 -0800 JIT: fix up switch map for out-of-loop predecessor (#64014) If we have a loop where some of the non-loop predecessors are switchs, and we add pre-header to the loop, we need to update the switch map for those predecessors. Fixes #63982. commit 7f828a7e6b712bdeab02d75160249cd13c26a467 Author: Egor Bogatov <egorbo@gmail.com> Date: Thu Jan 20 02:08:10 2022 +0300 [arm64] JIT: Redundant zero/sign extensions after ldrX/ldrsX (#62630) commit ae1b755cd074745b0f09e826d3c7064b2a8f20dd Author: Dan Moseley <danmose@microsoft.com> Date: Wed Jan 19 16:07:53 2022 -0700 Retries for flaky WMI test (#64008) commit 54eec5d1f4d7ded21e33e65c63ada26afe80b208 Author: Elinor Fung <elfung@microsoft.com> Date: Wed Jan 19 14:23:48 2022 -0800 Make ILStubGenerated event log ModuleID corresponding to that on other events (#63974) commit 97fec41a752f067f4d6dde170073300e1184693b Author: Santiago Fernandez Madero <safern@microsoft.com> Date: Wed Jan 19 14:18:21 2022 -0800 Add runtime-extra-platforms pipeline to have matching runtime PR and Rolling builds (#62564) * Add runtime-extended-platforms pipeline to have matching runtime PR and Rolling builds * Fix evaluate changed paths condition for the extra pipeline * PR Feedback and fix condition * Move MacCatalyst back to staging, disable tvOS tests * Disable browser wasm windows legs commit 826e03e4b984d3bb76b2ead5f6ebb847be9c616f Author: Jeremy Koritzinsky <jekoritz@microsoft.com> Date: Wed Jan 19 14:08:07 2022 -0800 Bump Explicit-layout value types with no fields to at minimum 1 byte size. (#63975) commit 6f8d8b20a0c78dcfc09ea7a43db48a9a4e055e13 Author: Ankit Jain <radical@gmail.com> Date: Wed Jan 19 16:41:04 2022 -0500 Disable hot reload tests for AOT configurations (#64006) commit 675c16711007536120fa2ef7b69224e44299d1e3 Author: Egor Chesakov <Egor.Chesakov@microsoft.com> Date: Wed Jan 19 12:59:49 2022 -0800 [Arm64] Don't use D-copies in CopyBlock (#63588) * Increase the maximum number of internal registers allowd per node in src/coreclr/jit/lsra.h * Based on discussion in https://github.com/dotnet/runtime/issues/63453 don't allocate a SIMD register pair if the JIT won't be able to use Q-copies in src/coreclr/jit/lsraarmarch.cpp * Update CodeGen to reflect that Q-copies should be used only when size >= 2 * FP_REGSIZE_BYTES and using of them makes the instruction sequence shorter in src/coreclr/jit/codegenarmarch.cpp * Update comment - we don't use D-copies after that change in src/coreclr/jit/codegenarmarch.cpp commit ac4c7fb9457a8b0972686b017d82367d7a9bf1ca Author: Pavel Savara <pavelsavara@microsoft.com> Date: Wed Jan 19 20:59:01 2022 +0100 - mono_wasm_new_external_root for roots on stack (#63997) - temp_malloc helper via linear buffer in js - small refactorings Co-authored-by: Katelyn Gadd <kg@luminance.org> commit 65db54e2a92a2ef8ba8a75c70990e78f21818e18 Author: Egor Bogatov <egorbo@gmail.com> Date: Wed Jan 19 22:23:45 2022 +0300 Add IsKnownConstant jit helper and optimize 'str == ""' with str.StartsWith('c') (#63734) Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com> Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com> commit ded841a690e73c04ebdc86c681893bf9fd372751 Author: Egor Bogatov <egorbo@gmail.com> Date: Wed Jan 19 22:22:49 2022 +0300 Don't reuse registers in Debug mode (#63698) Co-authored-by: Bruce Forstall <brucefo@microsoft.com> commit 67848f23d51562bd2e54f6490f5aad22f57baffe Author: Brennan <brecon@microsoft.com> Date: Wed Jan 19 11:01:24 2022 -0800 [RateLimiting] Dequeue items when queuing with NewestFirst (#63377) commit 12f434db114e629854e7d5eb966e07d24e243712 Author: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Wed Jan 19 20:42:27 2022 +0200 Fix for Werror=use-after-free in PAL (#63954) * Fix for Werror=use-after-free in PAL * Delete Local{Alloc,Free} * Delete LMEM_* macros * Delete PAL_dladdr commit bbbfba31b61a2299c434172f709716325c073ef8 Author: Stephen Toub <stoub@microsoft.com> Date: Wed Jan 19 12:27:25 2022 -0500 Use IndexOf in StringBuilder.Replace(char, char) (#63913) commit df049b9a23c5182bf7f26f224b69bf1f47f9dc2f Author: Dan Moseley <danmose@microsoft.com> Date: Wed Jan 19 09:26:30 2022 -0700 Disable 2 SMTP tests on checked runtime (#63947) commit 8604989022950ef38f94b9150043b31d81f061a5 Author: Maksym Koshovyi <maximkoshevoi61@gmail.com> Date: Wed Jan 19 17:49:39 2022 +0200 [Group 5] Enable nullable annotations for `Microsoft.Extensions.Configuration.Json` (#63694) * Nullable enable commit a8c1408084714a7db13db7eb5cae10b209d9c096 Author: TobiasLaving <95348503+TobiasLaving@users.noreply.github.com> Date: Wed Jan 19 16:04:02 2022 +0100 Update runtime.json with manjaro information (#63338) Without specifying runtime on manjaro we cannot run the projects. FYI: Manjaro has a "ID_LIKE" param in os_release that has arch as input. Perhaps that would be another way forward. commit 31f20c54ad56946a506d705261a5445930b56d29 Author: Stephen Toub <stoub@microsoft.com> Date: Wed Jan 19 09:57:04 2022 -0500 Improve auto-atomicity for conditionals (#63299) - Allow for automatically making loops that end conditional branches be atomic - Allow for using a following expression conditional to make a prior loop atomic - Allow conditionals to influence the computed minimum length commit 8fe0467efd29d952fc2afbf302c1d8a1bb3b2fa5 Author: Maxim Lipnin <v-maxlip@microsoft.com> Date: Wed Jan 19 16:55:40 2022 +0300 Take MacCatalyst into account in EnvironmentTests.WorkingSet_Valid test (#63995) Follow-up on https://github.com/dotnet/runtime/pull/63934 commit b042bc3043f3f7f475f5bd6e8f58df2952dd9250 Author: Radek Zikmund <32671551+rzikm@users.noreply.github.com> Date: Wed Jan 19 14:15:57 2022 +0100 Avoid allocating byte array when setting ALPN list on Linux (#63674) * Avoid allocating byte array when setting ALPN list * Code review feedback * Apply suggestions from code review Co-authored-by: Stephen Toub <stoub@microsoft.com> * Slice the stackalloc'd buffer to correct length Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com> * Code review fixes Co-authored-by: Stephen Toub <stoub@microsoft.com> Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com> commit 34794bc5f2bcdbaa9057bb07b8764e2bb6a411a2 Author: Krzysztof Wicher <kwicher@microsoft.com> Date: Wed Jan 19 13:45:01 2022 +0100 Enable System.Text.Json tests on netfx (#63803) * Enable System.Text.Json tests on netfx * use NETFRAMEWORK define * disable another two test cases after rebase * disable last test case which repros only on CI for me * add p2p only on netfx commit e54df94bc9a5e1e064835be817d3e9ac773e1d9a Author: Eirik Tsarpalis <eirik.tsarpalis@gmail.com> Date: Wed Jan 19 11:59:34 2022 +0000 Replace "needs more info" label with "needs-author-action" (#63899) commit a5292a6b54ca743efe2e5b6776864efb7c7702a5 Author: Olivier Giniaux <oginiaux@gmail.com> Date: Wed Jan 19 12:56:54 2022 +0100 Fix profiling objectsallocatedbyclass (#63814) * Add test for ObjectsAllocatedByClass profiler callbacks * Fix ObjectsAllocatedByClass profiler callbacks based on wrong flag * Fix wrong args in test log Co-authored-by: Olivier Giniaux <oginiaux@smartadserver.com> commit 6e4dfbfe2db42c9c67f1094dd65ec683c44e3457 Author: Stephen Toub <stoub@microsoft.com> Date: Wed Jan 19 06:53:36 2022 -0500 Improve reductions for Regex empty / nothing nodes (#63695) commit 777c353c767c588824a489ad39238fef01c80f4e Author: Stephen Toub <stoub@microsoft.com> Date: Wed Jan 19 06:53:24 2022 -0500 Extend regex switch alternation optimization to IgnoreCase (#63756) IgnoreCase now results in producing sets (e.g. an 'a' becomes '[Aa]') but the source generator's optimization that produces a switch statements for alternations with non-overlapping branches doesn't yet understand such sets. This augments that logic to fix that. commit a25536f790258fe68240feff864713e8d20b418c Author: Stephen Toub <stoub@microsoft.com> Date: Wed Jan 19 06:52:15 2022 -0500 Improve auto-atomicity for Regex loops (#63986) - As part of recognizing loops that could be made atomic, we currently only look at the node guaranteed to come immediately after it, e.g. in a+b+c+, when analyzing a+ we only look at the b+. That's fine in many cases, but if our expression was instead e.g. a*b*c*, we couldn't make a* atomic because we wouldn't be guaranteed it'd be followed by a b, and we wouldn't look at the subsequent nodes to determine what else might follow. When that situation occurs, we can now walk the tree to find the next node, and repeatedly do so as much as is needed in order to find the next node, enabling us to make all of those loops atomic. - We currently perform the auto-atomicity reduction for single-char loops as part of reducing concatenations. But this means we're performing that transformation at a time when the tree isn't fully formed, which means we can't necessarily reach out of a concatenation to what comes after it and use that to influence the atomicity. It also means we might repeat the analysis unnecessarily multiple times, because it's done as part of parenting a node. We can instead do that optimization as part of the final optimization phase, after the tree is already created. - When we find a lazy loop at the end of an expression, we can treat it as atomic, which means we can lower its max bound to its min bound. - When we encounter a loop (lazy or greedy) at the end of an expression, if it has a max bound of 1 (i.e. it's optional), we can proceed to eliminate ending backtracking with its child regardless of whether the child could be made atomic with the start of the loop, since it won't ever repeat more than once. commit eeaee44e6fe4425db044967e025255e6a12c97a9 Author: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Wed Jan 19 11:20:02 2022 +0100 [main] Update dependencies from dotnet/runtime dotnet/arcade dotnet/xharness dotnet/icu dotnet/roslyn-analyzers dotnet/llvm-project (#63737) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com> commit 313baef638104ed64f93e077c84547421884c91b Author: Egor Bogatov <egorbo@gmail.com> Date: Wed Jan 19 13:16:28 2022 +0300 JIT: Fix repeatable failure for max CALLSITE_DEPTH (#63966) commit a354bb152f4e505d53034c3538f971ad4c2f18ac Author: Stephen Toub <stoub@microsoft.com> Date: Wed Jan 19 04:10:27 2022 -0500 Address follow-up feedback to CachedCompletedInt32Task (#63968) commit b68cf65634bb0d6a1a7e588568959cdc33a0322c Author: Adam Sitnik <adam.sitnik@gmail.com> Date: Wed Jan 19 08:58:20 2022 +0100 Reading beyond EOF should return 0 for FILE_FLAG_NO_BUFFERING (#63625) * move Length to SafeFileHandle, so it's cached value can be reused in more places commit ea2a98163327022e6cefb6a424de4cb4e9618277 Author: Ilona Tomkowicz <32700855+ilonatommy@users.noreply.github.com> Date: Wed Jan 19 08:55:35 2022 +0100 [wasm][debugger] Added support for StepThroughAttribute (#63679) * Hidden methods and step through methods behave the same way. * Perpared flow for setting JustMyCode in the future. * Tests for JustMyCode setting before debug launch. * Transformed into dynamic JustMyCode change flow. * JustMyCode disabled, first 3 cases solved. * Finished behavior for JMC disabled (with 1 difference). * JMC enabled: stepIn np bp + stepIn bp + resume bp. * Functional version (with minor deviations from expected behavior). * Refactoring. commit 00e13f5482ea1156e6b37ea5d242d7f27befb8d3 Author: Adam Sitnik <adam.sitnik@gmail.com> Date: Wed Jan 19 08:42:07 2022 +0100 Add tests for creating memory mapped files from non-seekable files (#63927) commit c66e3c49b59e0894ed3e7c41b0e78dcda22528ae Author: Michal Strehovský <MichalStrehovsky@users.noreply.github.com> Date: Wed Jan 19 15:01:43 2022 +0900 Add support for libraries testing with NativeAOT (#63781) This adds support for running libraries tests with NativeAOT. It reuses the single file xunit runner since we cannot `LoadFrom` the tests on NativeAOT. The strategy is the same as for single file testing: do a publish. To do the NativeAOT publish, we include the Microsoft.DotNet.ILCompiler.targets. commit 3104ed8a3579746eaadb6280acc4fae1ae0df6ed Author: Michal Strehovský <MichalStrehovsky@users.noreply.github.com> Date: Wed Jan 19 15:00:52 2022 +0900 Fix up warnings from delegate thunks (#63980) If we hit a p/invoke with a `System.Delegate` in a delegate marshalling stub, blame the delegate type, not the compiler-generated method. Apparently we marshal System.Delegate in MsQuick interop. commit 0b307c95286a4f468fbb627a66515054ff18dc87 Author: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Wed Jan 19 07:25:12 2022 +0200 Add managed implementation of Math/MathF.Abs (#63881) * Add managed implementation of Math/MathF.Abs * Cleanup trailing whitespaces in changeset * Delete unused _copysignf macro commit fc3875f14f310cdce716df30a94feb43db79a28a Author: Jose Perez Rodriguez <joperezr@microsoft.com> Date: Tue Jan 18 19:47:09 2022 -0800 Fix case where we incorrectly select a prefix as a FindFirstChar optimization when the pattern includdes an alternation that could lead to different prefixes. (#63976) commit 454ac0a6e7584e1c02677d459d20dae5df61fb47 Author: Stephen Toub <stoub@microsoft.com> Date: Tue Jan 18 22:15:32 2022 -0500 Revert "Improve auto-atomicity for Regex loops (#63518)" (#63984) This reverts commit 557901e779a009cf4a51327963727a4d1ded0094. commit da72791c37480532e647e8f69aff3f2b7eef6049 Author: Jan Kotas <jkotas@microsoft.com> Date: Tue Jan 18 18:59:04 2022 -0800 Fix System.Reflection.Metadata version in ILVerification nuget package metadata (#63965) Fixes #63944 commit b7d8f5ecfa7bceb8069448951c7fabd65bcf26a0 Author: Tarek Mahmoud Sayed <tarekms@microsoft.com> Date: Tue Jan 18 18:39:37 2022 -0800 Fix Failing Globalization Test on OSX (#63971) commit 546c23804538ee751e4bb419942bc0170c3e5e06 Author: Michal Strehovský <MichalStrehovsky@users.noreply.github.com> Date: Wed Jan 19 10:58:17 2022 +0900 Improve ILLink.targets integration (#63914) Runtime side of https://github.com/dotnet/sdk/pull/23470 (depends on that getting merged). Skip touching the IL Linker semaphore that tricks the target into not running. commit 557901e779a009cf4a51327963727a4d1ded0094 Author: Stephen Toub <stoub@microsoft.com> Date: Tue Jan 18 20:40:35 2022 -0500 Improve auto-atomicity for Regex loops (#63518) * Improve auto-atomicity for Regex loops - As part of recognizing loops that could be made atomic, we currently only look at the node guaranteed to come immediately after it, e.g. in a+b+c+, when analyzing a+ we only look at the b+. That's fine in many cases, but if our expression was instead e.g. a*b*c*, we couldn't make a* atomic because we wouldn't be guaranteed it'd be followed by a b, and we wouldn't look at the subsequent nodes to determine what else might follow. When that situation occurs, we can now walk the tree to find the next node, and repeatedly do so as much as is needed in order to find the next node, enabling us to make all of those loops atomic. - We currently perform the auto-atomicity reduction for single-char loops as part of reducing concatenations. But this means we're performing that transformation at a time when the tree isn't fully formed, which means we can't necessarily reach out of a concatenation to what comes after it and use that to influence the atomicity. It also means we might repeat the analysis unnecessarily multiple times, because it's done as part of parenting a node. We can instead do that optimization as part of the final optimization phase, after the tree is already created. - When we find a lazy loop at the end of an expression, we can treat it as atomic, which means we can lower its max bound to its min bound. - When we encounter a loop (lazy or greedy) at the end of an expression, if it has a max bound of 1 (i.e. it's optional), we can proceed to eliminate ending backtracking with its child regardless of whether the child could be made atomic with the start of the loop, since it won't ever repeat more than once. * Extend auto-atomicity to lazy loops commit 14ebc594b2757e29e1f73742ce37d68f855c0a3c Author: Jan Kotas <jkotas@microsoft.com> Date: Tue Jan 18 17:36:09 2022 -0800 Do not register ACTIVATION_SIGNAL for secondary PAL copies (#63961) Related to #63959 commit cde93b69b6b099627d3615ec7f54cfb28b25bcde Author: Andy Ayers <andya@microsoft.com> Date: Tue Jan 18 16:57:51 2022 -0800 JIT: yet another OSR stress mode (#62980) Existing OSR stress use existing patchpoint placement logic and alter the policy settings so that OSR methods are created more eagerly. This new version of OSR stress alters the patchpoint placement logic, to add patchpoints to more places. In conjunction with the eager policy stress above this leads to creation and execution of large numbers of OSR methods. Any IL offset in the method with an empty stack (and not in a handler) is fair game for a patchpoint, so this new method randomly adds patchpoints to the starts of blocks when stack empty (future work may extend this to mid-block stack empty points). The new mode is enabled by setting `COMPlus_JitRandomOnStackReplacement` to a non-zero value; this value represents the likelihood of adding a patchpoint at a stack-empty block start, and also factors into the random seed. (Recall this is parsed in hex, so 0x64 == 100 or larger will put a patchpoint at the start of every stack empty block). Various values are interesting because once a method reaches a patchpoint and triggers OSR, the remainder of that method's execution is in the OSR method, so later patchpoints in the original method may never be reached. So some sort of random/selective patchpoint approach (in conjunction with varying policy settings) is needed to ensure that we create an execute as many different OSR variants as possible. This PR also includes a couple of fixes exposed by local testing of this new stress mode: * The OSR prolog may end up empty, which gcencoder doesn't like. Detect this and add a `nop` for the prolog. * If we're importing the `fgEntryBB` during OSR, we don't need to schedule it for re-importation. This happens if we put a patchpoint at IL offset zero. * Update the selective dumping policy `COMPlus_JitDumpAtOSROoffset` to only dump OSR method compilations. A new test leg is added to `jit-experimental` to run with this mode enabled with a probability of 21% (0x15) and quick OSR triggers. Also included: * fix probability calc * remove obsolete assert * osr exposed does not apply to simd * only pad zero-sized OSR prolog if we're reporting generic context * Add ability to have patchpoint at specified offset. * Fix interaction of stress patchpoints and profile instrumentation. We need to force block-based instrumentation if we might have stress patchpoints. commit 93cb3559a17aca424e3ce1206a71496da2c34b69 Author: Honza Rameš <ramejan@gmail.com> Date: Wed Jan 19 01:12:18 2022 +0100 Reduce allocations in code generated by Logging generators (#61162) (#62011) commit c50185bb24ace683f2ce6c5e4351ce2104bd1349 Author: Aleksey Kliger (λgeek) <alklig@microsoft.com> Date: Tue Jan 18 18:40:42 2022 -0500 [mono] Hot Reload: initial push to support adding lambdas (#63513) Adds support for: * Adding static lambdas to existing methods, whether or not they had lambdas before. * Adding lambdas that capture `this` to existing methods that already captured `this` before * Adding new static or instance methods to existing types * Adding static fields to existing types * Adding new types (note that adding instance fields currently will fail. It'll go in in a future PR that will address https://github.com/dotnet/runtime/issues/63643). Note that reflection on newly added members isn't tested yet and likely doesn't work. Fixes https://github.com/dotnet/runtime/issues/50249 Contributes to https://github.com/dotnet/runtime/issues/57365 * Add AddStaticField test; cleanup AddLambdaCapturingThis * Add AddNestedClass testcase * hot_reload: add a comment about remaining work * move per-class metadata update info to MonoClassMetadataUpdateInfo Use a property on the class instead of a hash table in the baseline image to keep track of added fields and methods * Cleanup pass1 to check add/update against prior gen Instead of the baseline image * adding a class Working on making mono_metadata_nested_in_typedef do the right thing for nested classes Contributes to making mono_class_create_from_typedef do the right thing for nested classes. * fix: correct mutant table population when the baseline table is empty In that case the table row_size and size_bitmap of the baseline are both 0, so offset calculations don't work. In that case when we know we need to add rows to the mutant table, use the uncompressed layout (32-bit columns, always) same as the EnC delta. * Calling new methods on a nested class works * adding fields Doesn't work yet. Dies in mono_class_get_field, called from mono_field_from_token_checked. The problem we're going to have to deal with is that unlike MonoMethod which is allocated upon lookup, the MonoClassFields of a class are allocated contiguously in class initialization. And there are not really enough fields in MonoClassField to indicate "this is not an ordinary field, don't do pointer arithmetic with it". One idea is to steal a bit from MonoClassField:parent and always check it as a trigger to go on a slower path. * adding static fields Rework the delta info to store info about "members" (rather than methods and fields separately). Add a MonoClassMetadataUpdateField subclass of MonoClassField that has extra info. Add new component methods to go from a MonoClassField to an index, and from a field token to a MonoClassField. Set MonoClassField:offset to -1 to generally go down the "special static field" codepath since we will need to do some one-off work to make a storage area for added static fields. Instance fields are not supported yet and error out during the update pass for now. * fix custom attribute lookups on new classes/methods/fields * Add a sketch of HotReloadInstanceFieldTable This is a class that manages the lifetime for added instance fields for reference types that had new fields added to them by EnC It's basically ConditionalWeakTable<object, Dictionary<uint, Store>> where the outer key is the object instance, the inner key is the fielddef token, and the value is a Store. The store has a single object? field which the location where the field's value will go. For reference types this is the reference directly, and for valuetypes and primitives, this is the boxed object (so to get the actual storage address you need to add sizeof(MonoObject)). * mono_metadata_update_get_static_field_addr two reminders: 1. The static field area needs to be GC-visible 2. We should really handle added fields on un-inited classes by allocating the instances in the normal way - in the layout algorithm. * Free MonoClassMetadataUpdateInfo when BaselineInfo is destroyed * placeholder struct for runtime class data; instance offset placeholder * static field storage Need to store the fields in a GC root, and in pinned allocations. * Implement hot_reload_get_static_field_addr() * Add mono_metadata_update_find_method_by_name Now we can find .cctor This is enough that a basic sample with an added static lambda works * Fix infinite loop * fix build * fix dynamic components builds * fix windows build * Fix inadvertent fallthru in previous fix * Report new capabilities NewTypeDefinition is not completely functional because adding instance fields is not supported yet. But adding classes with only static methods works. * tests: describe what existing tests do, add placeholder static lambda test * tests: Add AddStaticLambda test case Adding a brand new static lambda to an existing method body is supported * Destroy the runtime part of MonoClassMetadataUpdateInfo, too * rename Mono.HotReload file it has more classes than just the instance table * tests: add ActiveIssue for supporting adding instance fields * ifdef out Mono.HotReload.InstanceFieldTable it's not ready yet * Remove get_added_members from hot reload component interface Doesn't seem necessary to expose this yet. It's only used in hot_reload.c right now * Change the AddStaticLambda sample to use Func<string,string> To check that lambdas with parameters work * Use a mempool allocated GSlist for the added members This avoids invalidating iterators in case we add members on one thread while another thread is iterating. If it turns out we need random access, we can switch to a GArray with locking. But so far we only ever iterate. * Use mono_get_corlib instead of passing MonoDefaults to hot_reload * use normal GENERATE_TRY_GET_CLASS_WITH_CACHE * [metadata] make m_field_set_parent and m_field_set_meta_flags inline m_ prefix functions are supposed to be inline commit d2844ebf57568de4926517c521a94a721d9c26a8 Author: Bradley Grainger <bgrainger@gmail.com> Date: Tue Jan 18 15:32:16 2022 -0800 Add `UnicodeRange.ArabicExtendedB` (#63901) commit 8d5f5267d33f7703c014cc89670f1f7aa47544f9 Author: Andrii Kurdiumov <kant2002@gmail.com> Date: Wed Jan 19 05:23:32 2022 +0600 Update links to the project for DllImportGenerator (#63940) As coincidence, I think `RestoreAdditionalProjectSources` not needed anymore. commit 83b52cdc310ebd77cddff7efd772a0800a403f47 Author: Alexander Köplinger <alex.koeplinger@outlook.com> Date: Tue Jan 18 23:13:58 2022 +0100 [iOS/tvOS] Remove P/Invokes to libproc from System.Private.CoreLib (#63934) They aren't allowed by Apple when submitting to the App Store. Finishes https://github.com/dotnet/runtime/issues/61265 commit b0de23b1677fbaf4fbcde814ec0bad6f60094920 Author: Andy Gocke <angocke@microsoft.com> Date: Tue Jan 18 13:37:41 2022 -0800 Revert "Enable GC Regions by default (#59283)" (#63935) This reverts commit cf91716. This looks to be creating a lot of crashes in a lot of different unit tests on Mac. Reverting seems to halt the Mac failures (see https://dev.azure.com/dnceng/public/_build/results?buildId=1557880) Fixes #63439 commit 0266f034221188bc7d0156ba76a571c71885c68f Author: Kunal Pathak <Kunal.Pathak@microsoft.com> Date: Tue Jan 18 11:04:48 2022 -0800 Fix decoding errors (#63929) commit 078da6c37e2ab602fe37ab699051ef71161ce2cc Author: Bruce Forstall <brucefo@microsoft.com> Date: Tue Jan 18 11:04:22 2022 -0800 Introduce `BasicBlock::KindIs()` for checking bbJumpKind (#63203) * Introduce `BasicBlock::KindIs()` for checking bbJumpKind This can simplify code that is checking for multiple `bbJumpKind` kinds with an `if` statement, where a `switch` is not warranted. It's the same usage model as `GenTree::OperIs()`. e.g., ``` if (block->KindIs(BBJ_COND, BBJ_SWITCH, BBJ_RETURN)) ``` * Fix argument name commit 82b8d79b6f858f0d44791e3eab36735b7093d935 Author: Shane Krueger <shane@acdmail.com> Date: Tue Jan 18 13:56:09 2022 -0500 Fix NullabilityInfoContext.Create to properly analyze types with nested generic types (#63556) commit f04a24249835096eea1a1a66e4af03cfec5ed32b Author: Artem Kliatchkine <artem.kliatchkine@gmail.com> Date: Tue Jan 18 18:18:45 2022 +0100 Set zero (infinite) options timeout in case of Timeout.InfiniteTimeSpan (#55984) (#63733) Co-authored-by: Artem Kliatchkine <eldog@rambler.ru> commit 2eb2e883dc807897fe07dd6559462e37e8613693 Author: Tomas Weinfurt <tweinfurt@yahoo.com> Date: Tue Jan 18 09:18:29 2022 -0800 improve protocol detection in jail (#63565) * improve protocol detection in jail * add comment commit d18d6c703295555d466fb159f8dec64857f68ed9 Author: Kevin Jones <kevin@vcsjones.com> Date: Tue Jan 18 12:15:11 2022 -0500 Update SAN test to account for OpenSSL 3 changes commit 64896116e66377aa8e951abb9e9505aff8a25f89 Author: Kevin Jones <kevin@vcsjones.com> Date: Tue Jan 18 11:36:15 2022 -0500 Fix OpenSSL 3 reporting an OutOfMemoryException for missing private key commit 5a12420546d7f0d963bcccf082400c1b057e38ef Author: Maxim Lipnin <v-maxlip@microsoft.com> Date: Tue Jan 18 18:21:33 2022 +0300 Remove individual exclusions for DllImportGenerator.Unit.Tests in favor of the general one for the entire set of mobile targets (#63924) commit 39ef452edcf90bae76a1e4c8c1c24209e17ac5f2 Author: Maxim Lipnin <v-maxlip@microsoft.com> Date: Tue Jan 18 18:20:15 2022 +0300 Disable DllImportGenerator.Unit.Tests test suite on macOS+arm64+CoreCLR (#63887) commit 856e8c3510cb0aaaa3b1a1679552c03ae5308b9e Author: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Tue Jan 18 17:16:10 2022 +0200 Fix compilation with older gcc (#63721) commit 2f366a85444570429f8739b13bde18226a10bc86 Author: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Tue Jan 18 17:12:47 2022 +0200 Delete a few unused PAL APIs (#63916) * Delete _fullpath PAL API * Delete PAL_wcscspn * Delete PAL_wcstok commit 207590a7b82afa086e889f3fc695b104713f7c8e Author: Michal Strehovský <MichalStrehovsky@users.noreply.github.com> Date: Wed Jan 19 00:10:36 2022 +0900 Fold coreclr/ToolBox into coreclr/tools (#63917) This separation only existed because of Razzle build sequencing of desktop CLR. It doesn't make sense for CoreCLR. The only thing the extra directory is doing now is that it breaks tab completion when navigating the CoreCLR source tree because ToolBox comes before tools alphabetically and most things live in tools. commit e30fe9b4d3afabc4acdfcaa539ecf213c16aea1a Author: Theodore Tsirpanis <teo@tsirpanis.gr> Date: Tue Jan 18 16:58:11 2022 +0200 Encapsulate the logic of caching the last synchronously completed task. (#61781) * Encapsulate the logic of caching the last synchronously completed task. * Apply suggestions from code review Co-authored-by: Adam Sitnik <adam.sitnik@gmail.com> commit e6ad043996419f04b1c0ae9fea113318f61e234f Author: Michal Strehovský <MichalStrehovsky@users.noreply.github.com> Date: Tue Jan 18 23:32:28 2022 +0900 Split CheckNotDisposed to allow inlining (#63863) * Split CheckNotDisposed to allow inlining `CheckNotDisposed` is not getting inlined because RyuJIT thinks it's not profitable (ldstr/newobj/throw is expensive). If we extract the rare path into a separate method, it changes the profitability math and allows inlining to happen. * Review feedback commit dfb36ae68d9a099c9b90317c97bdf485bab4121e Author: Stephen Toub <stoub@microsoft.com> Date: Tue Jan 18 09:31:12 2022 -0500 Fix a few IndexOf{Any} uses (#63852) commit 7a0388a9f1a11b723aa09aeae3436a078b32bb43 Author: Eirik Tsarpalis <eirik.tsarpalis@gmail.com> Date: Tue Jan 18 13:33:57 2022 +0000 Extend triage board automation to more pods (#63897) commit 8d8ef6dac58acf2ab944289c69dd46ee9e12d717 Author: Tom Deseyn <tom.deseyn@gmail.com> Date: Tue Jan 18 11:00:35 2022 +0100 FileSystemEntry.Unix: don't make a syscall to check hidden on Linux. (#63878) commit 24bdc3844c3de6d6a3c47534411c8322ae1a7bc6 Author: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Tue Jan 18 10:41:02 2022 +0100 [main] Update dependencies from dotnet/linker (#63445) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> commit 126db6dd10fcf618a9ab17ed93347044cc5a3a24 Author: Michal Strehovský <MichalStrehovsky@users.noreply.github.com> Date: Tue Jan 18 14:19:20 2022 +0900 Disable warnings as errors in the repro project (#63910) commit d0e2dac3a828b6afda5cff812b7b09b9dba213b7 Author: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com> Date: Tue Jan 18 01:23:41 2022 +0300 Actually properly type primary selectors (#63752) * Use only one [out] parameter in IsFieldAddr Since only one is needed. * Actually properly type primary selectors commit d48a44f2ee2f6b4b039ca10cfd5dc01c331669f5 Author: Michal Strehovský <MichalStrehovsky@users.noreply.github.com> Date: Tue Jan 18 02:11:44 2022 +0900 Separate variance information in mangled names (#63866) Fixes https://github.com/dotnet/runtimelab/issues/1821. Eventually we'll need to have a holistic look at how we mangle things. commit 6dcb03913c7d55dca824abcd21617212bef62553 Author: Jan Kotas <jkotas@microsoft.com> Date: Mon Jan 17 07:46:40 2022 -0800 Delete UMThkCallFrame (#63826) * Delete UMThkCallFrame * Place UnmanagedToManagedFrame under FEATURE_COMINTEROP commit 4fac9549fea1ccbf296aeaa0861478825d70c5c3 Author: Mandar Sahasrabuddhe <WinCPP@users.noreply.github.com> Date: Mon Jan 17 16:05:28 2022 +0530 Fix escaped strings for TryGetDateTime(Offset) (#63534) * Fix escaped strings for TryGetDateTime(Offset) Fix the exception thrown when the escaped DateTime(Offset) property value is unescaped and it becomes shorter than the minimum expected length. In such case the Try* method should fail and returns false. Fixes #62720 * Fix escaped strings for TryGetDateTime(Offset) Fix the exception thrown when the escaped DateTime(Offset) property value is unescaped and it becomes shorter than the minimum expected length. In such a case, the Try* method should fail and return false. Fixes #62720 * Fix escaped strings for TryGetDateTime(Offset) Fix the exception thrown when the escaped DateTime(Offset) property value is unescaped and it becomes shorter than the minimum expected length. In such a case, the Try* method should fail and return false. Fixes #62720 * Fix escaped strings for TryGetDateTime(Offset) Fix the exception thrown when the escaped DateTime(Offset) property value is unescaped and it becomes shorter than the minimum expected length. In such a case, the Try* method should fail and return false. Fixes #62720 * Fix escaped strings for TryGetDateTime(Offset) Fix the exception thrown when the escaped DateTime(Offset) property value is unescaped and it becomes shorter than the minimum expected length. In such a case, the Try* method should fail and return false. Fixes #62720 commit d72ed27cfe8656807ece255b275ca9d617af073b Author: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com> Date: Mon Jan 17 13:11:43 2022 +0300 Treat CLS_VAR_ADDR as never null (#63844) Allows the LIR DCE to remove some indirections that were previously incorrectly thought to be throwing. Contributes to CLS_VAR deletion (by minimizing the diffs). commit bf1d4a10b998a80b92728f80aa5ebbcd5138347a Author: Radek Zikmund <32671551+rzikm@users.noreply.github.com> Date: Mon Jan 17 11:11:10 2022 +0100 Fix generating RunTests.sh and RunTests.cmd scripts (#63875) This fixes issue where generated RunTests.sh in the "To repro directly: " section contained unevaluated variables like RUNTIME_PATH, which prevented simple copy-pasting the code into the terminal commit ae2f60c950cc021921fce83c796cbcb5ff96c658 Author: Andrii Kurdiumov <kant2002@gmail.com> Date: Mon Jan 17 09:57:15 2022 +0600 NativeAOT: Allow Delegate and MulticastDelegate marshalling (#63219) - Closes https://github.com/dotnet/runtimelab/issues/1107 - Progress towards https://github.com/GtkSharp/GtkSharp/issues/300 commit 84926be4243143b7830e78cb7727057ed711a3cc Author: Andrii Kurdiumov <kant2002@gmail.com> Date: Mon Jan 17 07:42:08 2022 +0600 Prevent assert if stack trace has function pointer (#63787) commit 217b288cfabd2368082343c7e36e7ac0a8f96db9 Author: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Mon Jan 17 03:10:54 2022 +0200 Convert h2inc to a cmake function (#63841) * Convert h2inc to a cmake function * Reuse preprocess_file commit ec349cd8e9960ec44bf528eef52c56a87e601207 Author: Tomáš Rylek <trylek@microsoft.com> Date: Sun Jan 16 20:50:01 2022 +0100 Fix a few IL tests using the namespace syntax without an actual namespace (#63772) commit 4f34cedc8eefb2a396646a67869e784f06d7def8 Author: Tomáš Rylek <trylek@microsoft.com> Date: Sun Jan 16 20:45:15 2022 +0100 Disable the Runtime_34587 regression test with GH issue #63818 (#63819) commit bf65675a8181d5448134788a148f844d35c4f091 Author: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com> Date: Sun Jan 16 20:21:52 2022 +0300 Compress operand kinds array and optimize `OperIsLocal` (#63253) * Delete GTK_CONST * Delete OperIsRelop * Delete GTK_RELOP * Delete GTK_LOGOP * Delete GTK_LOCAL * Compress oper kinds They now fit into 8 bits. commit 23de81782ca9cd24f024bd598563d363df29660c Author: Zoltan Varga <vargaz@gmail.com> Date: Sat Jan 15 22:05:07 2022 -0500 [mono] Disable partial generic sharing for gparams with non-enum constraints for method gparams too. (#63813) This is an optimization, but it also avoids hitting some gsharing limitations wrt calling abstract static methods from gshared code. Fixes https://github.com/dotnet/runtime/issues/60447. commit c5c7967ddccc46c84c98c0e8c7e00c3009c65894 Author: Stephen Toub <stoub@microsoft.com> Date: Sat Jan 15 20:35:25 2022 -0500 Unify string.{Last}IndexOfAny and span.{Last}IndexOfAny (#63817) * Unify string.{Last}IndexOfAny and span.{Last}IndexOfAny Currently, string.IndexOfAny delegates to span.IndexOfAny (MemoryExtensions) for 1 through 5 values, and for more than it, it falls back to its own "probabilistic map"-based implementation, which tries to avoid looping through each value character for each character in the input. span.IndexOfAny doesn't do that, instead always looping through every char for every input char. This PR moves the logic from string into MemoryExtensions and then has string unconditionally delegate to span. string.LastIndexOfAny in contrast would only delegate to span's implementation if the values list actually only had a single character in it; otherwise, it would again fall back to its own "probabilistic map"-based implementation. This PR again moves that fallback into MemoryExtensions, with string unconditionally delegating to it. MemoryExtensions also has LastIndexOf overloads for 2 and 3 items, so rather than using the probabilistic path for those, it delegates to the existing overloads. * Address PR feedback commit 1e22b3f00501e8263af571ad74cb043fb3407b70 Author: Jeremy Koritzinsky <jekoritz@microsoft.com> Date: Sat Jan 15 12:59:33 2022 -0800 Refactor the "produce an RSP file" step into a separate step from the "run ILC" step to make it easier to generate the RSP file on the fly (#63820) commit fd2883f7bb60e75df6edcec58ac7bc79ecd10196 Author: Jan Kotas <jkotas@microsoft.com> Date: Sat Jan 15 12:21:07 2022 -0800 Delete notifyexternals.* (#63835) Leftovers from loader lock MDA commit 78dea7ff6599dd851210df6db330ee3b58f5294c Author: Stephen Toub <stoub@microsoft.com> Date: Sat Jan 15 10:28:53 2022 -0500 Add Regex FindFirstChar optimization for a literal after an atomic loop (#63477) * Add Regex FindFirstChar optimization for a literal after an atomic loop If after all of our analysis we can't find anything to IndexOf{Any} as part of finding the next match location, we'll also look for a literal (a single char, a string of chars, or a set of a small number of chars) following an unbounded atomic set loop that starts the pattern. In that case, we can IndexOf for the literal, and then walk backwards through the characters prior to it looking for the beginning of the match. * Extend optimization to Setloop/lazy in addition to Setloopatomic commit c30d55ec5b584e26186a85adedf313c81a64269c Author: Tanner Gooding <tagoo@outlook.com> Date: Sat Jan 15 05:00:18 2022 -0800 Perform some minor code cleanup of the System.Numerics and System.Runtime.Intrinsics namespaces (#63753) * Ensure the System.Numerics and System.Runtime.Intrinsics namespaces are using explicit type when "not apparent" to match repo conventions * Ensure the System.Runtime.Intrinsics types are using TARGET_64BIT to match project convention * Improving some docs and simplifying names where possible commit a2e017dc876729678d7874706086bd444f010bcf Author: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com> Date: Sat Jan 15 15:42:31 2022 +0300 Fix MOffset size estimate (#63766) commit 9db60963097adac1c25a5117d3918de17e1b5fb1 Author: Egor Bogatov <egorbo@gmail.com> Date: Sat Jan 15 15:20:36 2022 +0300 JIT: Mark constant arguments of HWINTRINSIC nodes as DONT_CSE (#63442) commit 20e6ec1a43cab03cd2d48f9fad32d56e83787ea0 Author: Geoff Kizer <geoffrek@microsoft.com> Date: Sat Jan 15 04:03:03 2022 -0800 Avoid unnecessary string allocation in HttpRuleParser.GetHostLength (#63641) * avoid unnecessary string allocation in HttpRuleParser.GetHostLength Co-authored-by: Geoffrey Kizer <geoffrek@windows.microsoft.com> commit 25d999b5a6711fc6d2ffc42fa38a58ec865a7232 Author: Stephen Toub <stoub@microsoft.com> Date: Sat Jan 15 06:50:49 2022 -0500 Improve use of {Last}IndexOf{Any} in Regex loops (#63428) * Improve .*string to LastIndexOf "string" rather than just 's' * Enable .*string LastIndexOf optimization in the face of an UpdateBumpalong If the loop starts the expression, we will have inserted an UpdateBumpalong node, but that was then interfering with detecting a subsequent character/string. * Use IndexOf{Any} in lazy loop backtracking * Improve how sets are described in comments * Change RealWorld tests to be invoked once per engine To help with debugging * Address PR feedback commit 386f87139c7fe48f6b733e3cae6d09128c827192 Author: Aleksey Kliger (λgeek) <alklig@microsoft.com> Date: Sat Jan 15 04:05:03 2022 -0500 [metadata] Use MonoDefaults from components without hacks (#63822) commit 692052e016407e6eb11feeaee5269625c3ee741a Author: Ankit Jain <radical@gmail.com> Date: Fri Jan 14 23:52:13 2022 -0500 Split `sendtohelixhelp.proj` to extract wasm, and mobile bits to separate files. (#63373) Extract wasm, and mobile specific bits from sendtohelixhelp.proj into … .. separate files, so they can be easier to manage. - the platform specific properties are set in their respective files (for eg `sendtohelixhelp-wasm.proj`) - a new target `BuildHelixCommand` is extracted from `BuildHelixWorkItems`, which runs first - and essentially builds `@(HelixCommand)` - Platform specific targets can run via `$(BuildHelixWorkItemsDependsOn)` - which then add any "special" helix work items - `BuildHelixWorkItems` in the main file supports adding for the regular case, which is controlled by `$(EnableDefaultBuildHelixWorkItems)`. Also, fixes https://github.com/dotnet/runtime/issues/52137 commit 9daaab152ff1c0794ee21645bf57acf444f900ff Author: Anton Firszov <Anton.Firszov@microsoft.com> Date: Sat Jan 15 03:15:26 2022 +0100 serialize SendPacketsAsync tests (#63702) commit 40047f2a82595546eadbabf9e438f7592eb1f002 Author: Stephen Toub <stoub@microsoft.com> Date: Fri Jan 14 20:48:36 2022 -0500 Improve Regex UpdateBumpalong optimization for non-atomic and lazy loops (#63398) * Improve handling of UpdateBumpalong for non-atomic loops For atomic greedy loops, UpdateBumpalong is serving its purpose: upon consuming as much as possible for the loop, base.runtextpos is set to that position so that the next time FindFirstChar runs, it'll start from at least that location. However, for non-atomic greedy loops, with base.runtextpos being set to the ending position after each backtracking, we end up inadvertently voiding any benefits of the UpdateBumpalong, as we end up overwriting the further position with the shorter position. A simple tweak to that, only setting the position if it's greater, yields significant benefits, in particular when there's no match. * Add more tests for lazy loops These just duplicate the greedy loop tests and tweak them for lazy. * Insert UpdateBumpalong for lazy loops as well * Address PR feedback commit 513fe2863ad5ec6dc453d223d4b60f787a0ffa78 Author: Tomáš Rylek <trylek@microsoft.com> Date: Sat Jan 15 00:36:58 2022 +0100 More duplicate projects under JIT/Methodical/NaN to delete (#63771) commit 2692407f03ce8b648c54daa4d3a3eb534132edc9 Author: Santiago Fernandez Madero <safern@microsoft.com> Date: Fri Jan 14 13:36:50 2022 -0800 Build all packages on source-build even when in servicing (#63755) commit e1c69cc75a4c51ea3e3011a084f74b486b2dbc88 Author: Tomáš Rylek <trylek@microsoft.com> Date: Fri Jan 14 21:47:44 2022 +0100 Move localloc/common library under JIT folder (#63510) In today source tree we have five different libraries named 'common'. This change is a first step in deduplicating their names; I have also moved the library under the JIT/ folder as it's used not only by JIT/jit64 tests but also by Methodical and Regression tests. Thanks Tomas commit 3a83c5ca772a1a74e1707474c1d05c283f264a2f Author: Jan Kotas <jkotas@microsoft.com> Date: Fri Jan 14 12:47:18 2022 -0800 Delete unused method (#63797) commit 02e22b02975d50944220e6e9a494af491487c6a9 Author: Tomáš Rylek <trylek@microsoft.com> Date: Fri Jan 14 21:00:01 2022 +0100 Remove string[] args from Main methods under JIT/Methodical (#63770) In most cases the arguments were formal and not really used so I just fixed the Main method signature. In a bunch of cases the command-line arguments supported variant functionality of the test case but I haven't found any test projects that would be exercising this functionality. I don't think it makes sense to keep untested code paths so I deleted the logic pertaining to non-empty command-line arguments. In the particular case of stringintern tests, each test apparently had a TestSameObjRef and TestDiffObjRef variant, triggered by command-line arguments. I tried to run TestDiffObjRef but it ended up failing left and right - not suprising for untested code logic - so I also deleted the TestDiffObjRef variants as I suppose the invariants previously tested there no longer hold. Thanks Tomas commit 562606671166edb60234c5062f69b35f6b2ac5c9 Author: Egor Chesakov <Egor.Chesakov@microsoft.com> Date: Fri Jan 14 10:44:07 2022 -0800 Enable superpmi-collect pipeline on macOS arm64 (#63691) * Enable superpmi-collect on macOS Arm64 in eng/pipelines/coreclr/superpmi-collect.yml * Add -platform argument and use the value for determining what Helix queue to use in src/coreclr/scripts/superpmi_collect_setup.py * Pass platform to superpmi_collect_setup.py in eng/pipelines/coreclr/templates/run-superpmi-collect-job.yml * Copy *.dylib on macOS and *.so on Linux in src/coreclr/scripts/superpmi_collect_setup.py * Install azure-storage-blob in eng/pipelines/coreclr/templates/run-superpmi-collect-job.yml * Remove macOS/x64 from platforms list in eng/pipelines/coreclr/superpmi-collect.yml * Add "CoreCLR Product Build OSX x64 checked" that produces required artifacts that consumed by macOS/arm64 superpmi-collect-job * Fix typo in libraries_test_assets should correspond to target arch in eng/pipelines/coreclr/templates/superpmi-collect-job.yml * Update a comment indicating what Helix queues are used for macOS in src/coreclr/scripts/superpmi_collect_setup.py * Workaround https://github.com/dotnet/sdk/issues/23430 in src/coreclr/scripts/superpmi_benchmarks.py * Enable macOS/arm64 benchmarks collection in eng/pipelines/coreclr/superpmi-collect.yml commit a991e1349e4325770d8e2ddf085184a68cd2555b Author: Elinor Fung <elfung@microsoft.com> Date: Fri Jan 14 10:49:26 2022 -0500 Make ObjectiveC tests in System.Runtime.InteropServices.Tests check exit code for remote execution (#63769) commit 33179fa0ac1ab75bb09e5cc7ed63aa6629c51411 Author: Maksym Koshovyi <maximkoshevoi61@gmail.com> Date: Fri Jan 14 17:49:06 2022 +0200 [Group 5] Enable nullable annotations for `Microsoft.Extensions.Configuration.Ini` (#60368) * Add annotations * Use pattern matching * NetCoreAppMinimum * ReadLine won't return null * Update src/libraries/Microsoft.Extensions.Configuration.Ini/ref/Microsoft.Extensions.Configuration.Ini.csproj Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com> * Add comment * Revert non-nullable change Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com> commit 3956126d55e32203a8926a54a8ee3090b3e69749 Author: MSDN.WhiteKnight <35516665+MSDN-WhiteKnight@users.noreply.github.com> Date: Fri Jan 14 20:33:03 2022 +0500 Fix typo in SRM package description (#63782) commit d568a3fec2c9a2e7341466a28f88f52558fddf6c Author: Tarek Mahmoud Sayed <tarekms@microsoft.com> Date: Fri Jan 14 07:27:32 2022 -0800 Introduce Activity.IsStopped Property (#63713) Co-authored-by: Dan Moseley <danmose@microsoft.com> commit 0b527a201f4c286f13ef8b829bbd1651bdad7a52 Author: Zoltan Varga <vargaz@gmail.com> Date: Fri Jan 14 08:07:47 2022 -0500 Fix a style issue. (#63776) commit b184ee0393aaf0395a69e70590d5c529e8c93ccf Author: Adam Sitnik <adam.sitnik@gmail.com> Date: Fri Jan 14 10:04:11 2022 +0100 MemoryMappedFile: don't check for file existence if there is no need (#63754) Co-authored-by: Stephen Toub <stoub@microsoft.com> commit c96869a6d10a235b5a26c9e15d685fabc7f87cb0 Author: Michal Strehovský <MichalStrehovsky@users.noreply.github.com> Date: Fri Jan 14 17:03:22 2022 +0900 Disable annoying warnings in the repro project (#63777) We have repo-wide WarnAsError that makes this super annoying in a repro project. commit b7e0a85ab6111b77ad19a1c2db0dedcedded4940 Author: Qiao <35673267+shushanhf@users.noreply.github.com> Date: Fri Jan 14 14:33:20 2022 +0800 [LoongArch64] add all the coreclr-build-config files (#62889) commit 1ba80f698c85b525545f1a13c02eb405588b0461 Author: Andrii Kurdiumov <kant2002@gmail.com> Date: Fri Jan 14 12:20:45 2022 +0600 Remove errors during first run of runpaltests.h (#62642) * Remove errors during first run of runpaltests.h If you run `runpaltests.h` for first time, you will see 2 errors about file or folder not found. First error comes from using `RELATIVE_PATH_TO_PAL_TESTS` which does not used anywhere, except maybe some platform where you can `cd` to non-existing folder. In that case 3rd parameter to script would be interpreted incorrectly. I doubt that, but who know what's somewhere deep in infra. Second error is entirely preventable, since `cd $PAL_TEST_OUTPUT_DIR` does not affect anything until subsequent `cd $PAL_TEST_OUTPUT_DIR` on line 118. Discovered here https://github.com/dotnet/runtime/pull/62625#issuecomment-991172978 * Remove not nescessary cd * Fix * oopsie commit 27fdc2d22f8717c7b0ba254ae9ef2900d00f5e7a Author: Stephen Halter <halter73@gmail.com> Date: Thu Jan 13 17:20:28 2022 -0800 Avoid deadlock with ConfigurationManager (#62209) Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com> commit 2c28e63f9360280011a3b03c1ca6dc0edce1fae4 Author: Alexander Köplinger <alex.koeplinger@outlook.com> Date: Thu Jan 13 22:17:54 2022 +0100 Temporarily disable coredumps during library testing on macOS (#63742) System.Runtime.InteropServices.Tests seems to produce >10GB of coredumps which overwhelms CI. commit 79e40e35ce3e218ad2d81259572e462b56bfd807 Author: Kevin Jones <kevin@vcsjones.com> Date: Thu Jan 13 15:04:36 2022 -0500 Add public constants for HMAC and hash sizes commit c912a1532a1bb653a21a3749aaad7c5fb556ae01 Author: Kevin Jones <kevin@vcsjones.com> Date: Thu Jan 13 14:07:55 2022 -0500 Change non-breaking spaces (U00A0) to a plain space in code files (#63688) commit ec0c7f3a91b9fc47f7a867f0b997ba34560302e7 Author: Aaron Robinson <arobins@microsoft.com> Date: Thu Jan 13 12:20:43 2022 -0500 Add negative tests for by-ref in UnmanagedCallersOnly scenarios. (#63711) commit c78d9fa3edb2ae8e14f0529566c20d33a2512cab Author: Maxim Lipnin <v-maxlip@microsoft.com> Date: Thu Jan 13 19:08:27 2022 +0300 Disable System.Drawing.Common.Tests test suite on Windows+Mono (#63726) commit 048e1a395523f1855c054d01a3f1f4c55d873ea4 Author: Simon Rozsival <simon@rozsival.com> Date: Thu Jan 13 16:57:12 2022 +0100 [Android] Throw PNSE for unavailable network information (#63633) * Update tests * Add android specific implementation * Add UnsupportedOSPlatform attributes * Fix typo * Remove unnecessary file reference * Clean-up code * Minor code clean-up * Remove dictionary * Refactoring * Revert comment change commit 77bdad50a01f3a330c03b093544245d39620314b Author: Alexander Köplinger <alex.koeplinger@outlook.com> Date: Thu Jan 13 16:06:39 2022 +0100 Bump to macOS 10.14 minimum in libs and mono builds too (#63682) https://github.com/dotnet/runtime/pull/62822 bumped the minimum CMAKE_OSX_DEPLOYMENT_TARGET to 10.14, but the libs.native and mono parts of the build still used the old 10.13 value. In build-native.sh for libs.native we can actually remove the explicit setting since we're already setting it in eng/native/configurecompiler.cmake. commit 01cdd1dcaebcc9f2ab36027204142a6703a1b70b Author: Pavel Savara <pavelsavara@microsoft.com> Date: Thu Jan 13 15:42:08 2022 +0100 [wasm] Emscripten uses `require` even when targeting ES6. This deals with the consequences. (#63718) commit a13ee96335ea4c41cfe273855611caec4c35cae8 Author: Thays Grazia <thaystg@gmail.com> Date: Thu Jan 13 09:53:43 2022 -0300 [wasm][debugger] Fixing error after receiving loaded_files = null (#63591) * Fixing #39301 * Addressing @radical comments * Sending the error toconsole in the browser. * Applying @radical suggestion. * Update src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs Co-authored-by: Ankit Jain <radical@gmail.com> * Update src/mono/wasm/debugger/tests/debugger-test/wasm-page-without-assets.html Co-authored-by: Ankit Jain <radical@gmail.com> * Space -> tabs * Fix compilation error. Co-authored-by: Ankit Jain <radical@gmail.com> commit 64c05a3bcb4e71ee9972a3fb47eb4d3e061d3462 Author: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com> Date: Thu Jan 13 12:58:37 2022 +0300 Reconfigure the field sequences for statics (#62632) * Reconfigure the field sequences for statics To make the "boxed static" and, in th…
This PR is a follow-up of #62780.
I went through the Android APIs that provide information about IP interfaces' properties and network usage stats (e.g., ConnectivytManager, TrafficStats) and I couldn't find a way to populate most of the properties we expose in
IPGlobalProperties
,IPInterfaceProperties
,IPGlobalStatistics
, andIPInterfaceStatistics
. I updated the implementation to throw PNSE for those properties on Android and marked the properties withUnsupportedOSPlatform("android")
attributes.Closes #50567
Closes #51303
Closes #58374