Michal Strehovský [Tue, 2 Aug 2022 23:17:42 +0000 (08:17 +0900)]
Fix sealing of types that were not concretely instantiated (#73218)
Tomáš Rylek [Tue, 2 Aug 2022 23:09:22 +0000 (01:09 +0200)]
Fix execution of ilverify tests in outerloop runs (#73132)
As JanK noticed in #73109, outerloop tests don't run the
ilverify/ILVerificationTests.csproj test project. This is because
the project is somewhat atypical in residing just one directory
level beneath the test binary root folder; all other tests reside
under at least two directory levels and the legacy XUnit wrapper
generator reflects it so that each wrapper corresponds to
a two-level directory subtree.
The pre-existing logic for determining active two-level test
directories was quite hacky and perf-costly; I probably accidentally
removed the support for single-subfolder tests in one of my
refactorings of the src/tests/build.proj script. This change fixes
it and makes the construction of TestDirectories much more efficient
as we no longer construct a Carthesian product of all tests
and all two-level folder directories.
Thanks
Tomas
Jeremy Koritzinsky [Tue, 2 Aug 2022 22:56:43 +0000 (15:56 -0700)]
Make diagnostic checks more reliable with more exact result matching. (#73178)
Adam Sitnik [Tue, 2 Aug 2022 21:59:24 +0000 (23:59 +0200)]
avoid string concatenation in case when there are no Extended Strings (typical scenario) (#73239)
Andy Gocke [Tue, 2 Aug 2022 21:32:02 +0000 (14:32 -0700)]
Bring back live host change (#73095)
This reverts commit
63692cd725a2bf36e896c78f9709c5474af0b6c1.
Re-try the change to remove the usage of pre-built hosts and instead always
use the live host. This PR doesn't contain the change to move the host into
liveBuild placement as that would place the host in the shared framework packages
instead of just in the runtime pack. This change also leaves the DotNetHost packages
building, but not being consumed, because the packages may be used for symbol
acquisition. The packages can probably be removed if the symbol problems are
resolved.
Brennan [Tue, 2 Aug 2022 21:28:31 +0000 (14:28 -0700)]
Fix typo in Quic resource string (#73249)
David Wrighton [Tue, 2 Aug 2022 19:28:03 +0000 (12:28 -0700)]
Describe the validity of null managed pointers (#71794)
* Describe the validity of null managed pointers
- Declare that it is valid to have a null managed pointer, but declare it invalid to actually read from such a pointer
- In practice this has always been legal, as it has been legal to managed pointer locals for years, and they are included in the list of values that are zeroinitialized on method start
- Also clarify the rules to permit a managed pointer to the location directly following a managed object.
- This is a new capability in the spec that will likely be useful for accessing fixed size data buffers held in objects of the GC heap. However, the GC has been able to tolerate this behavior for many years, so there is no code change necessary.
Fixes #69690
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Co-authored-by: Aaron Robinson <arobins@microsoft.com>
Stephen Toub [Tue, 2 Aug 2022 18:54:34 +0000 (14:54 -0400)]
Enable HTTP/3 support by default (#73153)
Krzysztof Wicher [Tue, 2 Aug 2022 17:38:11 +0000 (19:38 +0200)]
JSON support required properties (#73063)
* Support RequiredAttribute for reflection serialization
* Re-use existing tests for source gen
* Source-gen support and address feedback
* polymorphic cases testing, address other feedback
Thays Grazia [Tue, 2 Aug 2022 17:18:09 +0000 (14:18 -0300)]
[mono][debugger] Fix infinite recursion and null pointer access while debugging (#73024)
* Fix recursive IntPtr and fix jit_failed
* Fix because on debugger-libs side is waiting for this field content, so we cannot skip
* Remove unnecessary change
* Adding test as suggested by @radical offline.
* Adding a not default intptr value.
Alexander Köplinger [Tue, 2 Aug 2022 17:15:09 +0000 (19:15 +0200)]
Update ApiCompat baselines for NativeAOT System.Private.CoreLib (#73248)
Fixed build break caused by merging https://github.com/dotnet/runtime/pull/73131 and https://github.com/dotnet/runtime/pull/73131 around the same time.
Jakob Botsch Nielsen [Tue, 2 Aug 2022 16:30:07 +0000 (18:30 +0200)]
JIT: Disallow return buffer aliasing for unmanaged calls (#73059)
Native calling conventions disallow the return buffer from aliasing
anything else. The managed ABI allows this so we need to handle
unmanaged calls specially.
Fix #72270
Jeff Handley [Tue, 2 Aug 2022 16:19:06 +0000 (09:19 -0700)]
Update fabricbot config per dotnet/fabricbot-config#59 (#73207)
Qiao Pengcheng [Tue, 2 Aug 2022 16:06:19 +0000 (00:06 +0800)]
[LoongArch64] amend the LA-ABI for GCStress testing and the tuple args. (#73205)
Miha Zupan [Tue, 2 Aug 2022 15:58:47 +0000 (17:58 +0200)]
Respect the Keep-Alive response header on HTTP/1.0 (#73020)
* Respect the Keep-Alive response header on HTTP/1.0
* Remove TimeoutOffset
* Update Trace message
* Update tests
* Adjust test timeouts
Alexander Köplinger [Tue, 2 Aug 2022 15:58:13 +0000 (17:58 +0200)]
Add reference assembly for System.Private.CoreLib.dll (#72143)
We now compile against the reference assembly in all places where we were compiling against the mono/coreclr System.Private.CoreLib.dll implementation assembly before.
The new reference assembly consumes sources from the existing contracts to avoid checking in a generated version of SPC.dll (this would add ~20k lines of .cs which is mostly duplicated with System.Runtime.cs)
Since a few contracts have only partially moved types to SPC we wrap contract types with `#if !BUILDING_CORELIB_REFERENCE` so we can hide them when compiling the SPC reference assembly. This needed a few GenAPI changes which are implemented here: https://github.com/dotnet/arcade/pull/10003.
Note that this means that the types which live in CoreLib are moved to the end of the ref .cs file which causes a GitHub diff to show up, but it is actually a no-op.
Regenerating the ref .cs files works the same way as before, by running the `GenerateReferenceAssemblySource` target in the contract's src\ folder.
Fixes https://github.com/dotnet/runtime/issues/67660
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
Mitchell Hwang [Tue, 2 Aug 2022 15:28:00 +0000 (11:28 -0400)]
[mono] Skip .mibc profile methods when not found (#73066)
* [mono] Skip .mibc profile methods when not found
* Remove warning for normal behavior case
Viktor Hofer [Tue, 2 Aug 2022 15:13:10 +0000 (17:13 +0200)]
Consume renamed ApiCompat.Task package (#72464)
* Consume renamed ApiCompat.Task package
Adam Sitnik [Tue, 2 Aug 2022 14:39:52 +0000 (16:39 +0200)]
Remove reflection usage from Console tests (#73224)
* perform one sys-call instead of two to get file length
* use RandomAccess.Read and properly handle partial reads
* include TermInfo in the test project, stop using reflection to test it
Zoltan Varga [Tue, 2 Aug 2022 14:37:47 +0000 (10:37 -0400)]
[mono][aot] AOT ptr-to-structure and structure-to-ptr wrappers for non-valuetypes with (#73013)
sequential layout as well.
Fixes https://github.com/dotnet/runtime/issues/73008.
Radek Zikmund [Tue, 2 Aug 2022 14:24:34 +0000 (16:24 +0200)]
Reenable MsQuicTests.ConnectWithClientCertificate on Windows (#70015)
Aleksey Kliger (λgeek) [Tue, 2 Aug 2022 13:43:10 +0000 (09:43 -0400)]
[wasm-mt] Fixup C exports initialization after startup.ts refactoring (#73158)
* [wasm] Fix missing DS cwraps after
d7c8bc10ac00fe330daa633f8a2b16ba208e6e56
* Copy mono_wasm_pre_init_essential to workers; lazy init cwraps
1. Copy the mono_wasm_pre_init_essential code into mono_wasm_pthread_worker_init in order to set up the C bindings infrastructure in the workers.
2. Because `mono_wasm_pthread_worker_init` runs in the middle of Emscripten's initialization (before all the Emscripten properties on `Module` are assigned) always use lazy cwraps initialization (the issue is `Module["cwrap"]` hasn't been set yet)
* fix ESLint warnings
* don't initialize legacy c wrappers
Jan Kotas [Tue, 2 Aug 2022 12:54:51 +0000 (05:54 -0700)]
[NativeAOT] Reflection Invoke refactoring (#73131)
- Refactored reflection Invoke in NativeAOT to be similar to how it is done in CoreCLR.
- All argument validation and coercion is done via static code now. This makes the reflection invoke stubs much smaller and the AOT compiler side a lot simpler.
- The invoke stub is minimal now and just takes the arguments for the methods to invoke as "Span of byrefs". The two notable differences with CoreCLR are:
- The invoke stub takes the function pointer to call as an argument to allow sharing of the stubs between methods with the same signature. CoreCLR has the thunks non-sharable currently. We have discussed sharing them among methods with the same signature like it is done here.
- The return value is returned as byref. CoreCLR thunk does boxing of the return value as part of the stub. Again, we have discussed to do it this way in CoreCLR too, we just did not have time to do it yet.
Fixes #72548
Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
Pavel Savara [Tue, 2 Aug 2022 12:41:14 +0000 (14:41 +0200)]
[wasm] re-try downloading assets (#72933)
configurable max_parallel_downloads + 2x retry
Tlakaelel Axayakatl Ceja [Tue, 2 Aug 2022 12:12:50 +0000 (05:12 -0700)]
Enable AOT analyzer in System.Net.HttpListener and System.Net.Http.Json (#73191)
* Enable AOT analyzer in System.Net.HttpListener and System.Net.Http.Json
Refactor code in System.Net.HttpListener to be AOT safe
Add annotations to System.Net.Http.Json to mark API as unsafe for AOT
Co-authored-by: Tlakollo <tlcejava@microsoft.com>
Carol Wang [Tue, 2 Aug 2022 09:12:32 +0000 (17:12 +0800)]
Add setter to TransactionManager.DefaultTimeout and MaxTimeout. (#71703)
* Add setter to TransactionManager.DefaultTimeout and MaxTimeout.
* Address review feedback.
* Interlocked access timespan to avoid data tear on x86 machine.
* Remove redundant Interlocked.Read.
Vlad Brezae [Tue, 2 Aug 2022 08:20:46 +0000 (11:20 +0300)]
[mono][interp] Throw exception if stack is not empty after localloc (#73176)
Fixes https://github.com/dotnet/runtime/issues/54382
dotnet bot [Tue, 2 Aug 2022 07:28:46 +0000 (00:28 -0700)]
Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 1916844 (#73202)
Zoltan Varga [Tue, 2 Aug 2022 06:09:30 +0000 (02:09 -0400)]
[mono] Don't allow interfaces as catch classes to catch anything. (#73165)
Fixes https://github.com/dotnet/runtime/issues/72827.
Steve Pfister [Tue, 2 Aug 2022 02:48:04 +0000 (19:48 -0700)]
[iOS] Remove unnecessary newline from CI script (#67861)
A newline was incorrectly added to the script that executes xharness, causing it to return a 0 exit code even if there was a crash. This caused CI to report a pass no matter what.
The change also disables tests that were causing crashes.
GitHubPang [Tue, 2 Aug 2022 02:18:01 +0000 (10:18 +0800)]
Fix grammar typo in comment in TplEventSource.cs (#73201)
Jan Kotas [Tue, 2 Aug 2022 02:10:51 +0000 (19:10 -0700)]
Wrap FileSystemEntry buffer in a struct to workaround visibility issues with api compat (#73182)
Jan Kotas [Tue, 2 Aug 2022 02:09:31 +0000 (19:09 -0700)]
Add all memory allocation ucrtbase APIs to the hardbound list (#73190)
* Add all memory allocation ucrtbase APIs to the hardbound list
Also included basic memory manipulation APIs for a good measure.
Fixes #73143
Levi Broderick [Tue, 2 Aug 2022 01:17:56 +0000 (18:17 -0700)]
Fix xxHash64 handling of large (> 4GB) inputs (#73093)
Drew Scoggins [Tue, 2 Aug 2022 00:49:47 +0000 (17:49 -0700)]
Fix duplicate reference issue (#73193)
If you have two references that are idetentical, except for casing then
when we insert that value into the Hashset that comparison is not done
ignoring case. And since the Dictionary comparison does, this causes
multiple references that are otherwise identical to be inserted.
This fix just adds the `OrdinalIgnoreCase` comparer to the `HashSet`
Stephen Toub [Tue, 2 Aug 2022 00:30:42 +0000 (20:30 -0400)]
Tweak XML comments on BrotliStream and ZLibStream (#73179)
Stephen Toub [Mon, 1 Aug 2022 23:22:56 +0000 (19:22 -0400)]
Fix local initialization in generated regex conditional backreferences in loops (#73164)
The variable is later read if there's any backtracking and/or the conditional backreference is in a loop, but it was only being initialized if there was backtracking.
Anton Lapounov [Mon, 1 Aug 2022 23:12:04 +0000 (16:12 -0700)]
Fix handling process affinity mask on Windows 11 (#69548)
Eirik Tsarpalis [Mon, 1 Aug 2022 23:04:58 +0000 (00:04 +0100)]
Refine wording in RequiresDynamicCode annotation in JsonStringEnumConverter. (#73161)
* Refine wording in RequiresDynamicCode annotation in JsonStringEnumConverter.
* Address feedback
* Remove string constant.
* address feedback
Eirik Tsarpalis [Mon, 1 Aug 2022 23:04:39 +0000 (00:04 +0100)]
Disable SourceGen unit tests in non-release runtime builds (#73181)
Eirik Tsarpalis [Mon, 1 Aug 2022 23:04:27 +0000 (00:04 +0100)]
Remove buffer copying from Utf8JsonReader Deserialize methods. (#73092)
Adeel Mujahid [Mon, 1 Aug 2022 22:30:17 +0000 (01:30 +0300)]
Delete duplicate unwind info files (#73129)
* Delete duplicate unwind info files
* Add after prefix
* Add RISC-V machine value in remote unwind
Tlakaelel Axayakatl Ceja [Mon, 1 Aug 2022 22:26:20 +0000 (15:26 -0700)]
Add more tests that have been enabled by recent changes (#73175)
Tlakaelel Axayakatl Ceja [Mon, 1 Aug 2022 22:11:56 +0000 (15:11 -0700)]
Descriptor parser support (#72975)
Add DescriptorMarker support from linker, this allows the NativeAOT compiler to read embedded xml files in an assembly called ILLink.Descriptors.xml. Then this file will be processed and used to add members to the compilation as roots. Is a very similar functionality to rd.xml with the difference that this format is Cecil based and embedded in the assemblies. Several of the libraries already insert this xml into the assembly to be trimming safe. This PR allows reading those XML files.
Add node to represent loading an assembly embedded file and checking for its dependencies
Verify for embedded files every time a module constructor is called
Support for events and properties in the XML reading
Add nodes to the dependency graph instead of marking logic
Add tests for embedded descriptor file in the NativeAOT smoke tests infra
Jakob Botsch Nielsen [Mon, 1 Aug 2022 22:03:16 +0000 (00:03 +0200)]
Revert "Consolidate importer spilling code V2 (#72744)" (#73146)
This reverts commit
cea17b2ac2886a154aa813bcfa2fac386ed9f10a.
Adeel Mujahid [Mon, 1 Aug 2022 21:56:33 +0000 (00:56 +0300)]
Fix typos (#73122)
Marek Safar [Mon, 1 Aug 2022 21:05:43 +0000 (23:05 +0200)]
Remove all pinvoke source generator attributes in aggresive trimming mode (#72952)
David Wrighton [Mon, 1 Aug 2022 20:21:40 +0000 (13:21 -0700)]
Use UnrelatedR2RCode flag when --compilebubblegenerics is specified (#71798)
* Use UnrelatedR2RCode flag when --compilebubblegenerics is specified
Meri Khamoyan [Mon, 1 Aug 2022 20:09:11 +0000 (00:09 +0400)]
#73041 exclude Microsoft.CSharp.Tests for tvOS (#73061)
The vast majority of tests are failing because it's trying to JIT and that is not supported on devices.
Aleksey Kliger (λgeek) [Mon, 1 Aug 2022 19:45:35 +0000 (15:45 -0400)]
[eventpipe] Use MonoImage:module_name when filename is NULL (#73018)
* [eventpipe] Use MonoImage:module_name when available, if MonoImage:filename is null
When assemblies are bundled (for example in WASM), the filename field
is set to NULL. The module name comes from the metadata Module table and is something like
"Foo.dll" even if the assembly is loaded from a bundle or from
Assembly.Load(byte[]), whereas image->name might be "data-0x00abcdef" for byte loads
Eduardo Velarde [Mon, 1 Aug 2022 19:41:29 +0000 (12:41 -0700)]
Remove ActiveIssue tag in ThreadPoolBoundHandle_IntegrationTests.netcoreapp.cs test (#72973)
madelson [Mon, 1 Aug 2022 18:03:22 +0000 (14:03 -0400)]
Reduce the cost of adding many unnamed parameters to an OdbcCommand. (#66869)
Fix #28693
dotnet bot [Mon, 1 Aug 2022 16:51:28 +0000 (09:51 -0700)]
Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 1912601 (#73091)
Mukund Raghav Sharma (Moko) [Mon, 1 Aug 2022 16:39:18 +0000 (09:39 -0700)]
Fixed a WKS specific issue by not clobbering the heap_segment_saved_allocated (#72923)
* Fixed the WKS issue by not clobbering the heap_segment_saved_allocated
* Addressed feedback:
Andy Ayers [Mon, 1 Aug 2022 16:16:36 +0000 (09:16 -0700)]
Update the asp.net spmi collection script (#73125)
* update the sets of complus flags to reflect that OSR is now enabled by default
* add some new scenarios like orchard
This increases the number of collected MCs from ~68K to ~120K.
Eric Erhardt [Mon, 1 Aug 2022 15:22:21 +0000 (09:22 -0600)]
Make IHostEnvironment.ApplicationName non-nullable (#72945)
* Make IHostEnvironment.ApplicationName non-nullable
It is not intended that normal execution has a null ApplicationName, so don't make callers need to check for null. When an ApplicationName is not available, it is set to string.Empty.
Fix #68512
* Make the other string properties in HostingEnvironment default to string.Empty.
Jo Shields [Mon, 1 Aug 2022 14:27:35 +0000 (10:27 -0400)]
Don't hardcode /tmp in named pipe tests, it's not for us on Android (#73067)
Closes: #49873
Shay Rojansky [Mon, 1 Aug 2022 14:17:44 +0000 (17:17 +0300)]
Remove 1024 character limit on ODBC connection strings (#73149)
Fixes #63630
Kevin Jones [Mon, 1 Aug 2022 13:46:14 +0000 (09:46 -0400)]
Remove cctor from X500NameEncoder (#73115)
Adam Sitnik [Mon, 1 Aug 2022 12:48:33 +0000 (14:48 +0200)]
[Unix] Console.ReadKey rewrite (#72193)
* split TermInfo related logic into separate files, so they can be referenced from test project
* move the key mapping logic to a separate class, do NOT change it
* simple tests for ASCII characters
* test cases for xterm and xterm-256color
* add PuTTY
* add Windows Terminal data
* add more PuTTY test cases
* add mappings for single characters
* add mappings for 3 characters
* fix test cases where pressing Ctrl/Alt/Shift + other key produces two bytes which represent single UTF8 character by design
* handle more complex sequences (with modifiers)
* handle edge cases properly
* add tmux test data
* add rxvt-unicode test data and implementation for rxvt modifiers
* switch to the new implementation and allow the users to differentiate between Enter (\r) and Ctrl+Enter (\n) like we do on Windows
* add way more test cases and fix identified issues
* add more SCO mappings
* Numeric Keypad
* add Tmux 256 color test cases (TERM=screen-256color)
* fix issue discovered by adding more tmux test cases: ^[OM should be mapped to Enter
* address code review feedback
* add .NET 6 compat switch
* Apply suggestions from code review
Co-authored-by: David Cantú <dacantu@microsoft.com>
* address code review feedback
Co-authored-by: David Cantú <dacantu@microsoft.com>
Vitek Karas [Mon, 1 Aug 2022 08:26:50 +0000 (01:26 -0700)]
Add more DataFlow tests from linker to NativeAOT (#72777)
This adds several dataflow tests from linker - only those which are passing with the fixes in this change. More will be added later.
Fixes:
- Correctly handle Requires attributes in generic types
- Recognize `ref Type` as interesting for data flow
- Fix generic parameter propagation for compiler generated types
- Treat multi-dimensional arrays as "Unknown" values (to match linker behavior)
- Improve origin of warnings generated from attributes
Vlad Brezae [Mon, 1 Aug 2022 08:18:14 +0000 (11:18 +0300)]
[mono][interp] Improve tiering performance (#70649)
* [mono][interp] Don't allocate some vars as execution stack
It is not really true and it serves no purpose here.
* [mono][interp] Print code before any optimizations take place
Fix bitrotten mono_interp_print_td_code. Don't print IL_SEQ_POINT opcodes since they are too noisy.
* [mono][interp] Use td->optimized directly in more places
* [mono][interp] Add dummy MINT_LDNULL instruction
We were pushing local that wasn't defined by any instruction, potentially confusing the var offset allocator.
* [mono][interp] Add fast offset allocator, to be used by unoptimized code
This is the old offset allocation scheme that we were using originally, before the var offset allocator was added. Vars have the same offset as they would have in IL code, based on their position on the execution stack at the moment when they are pushed. Whenever we push/pop on the execution stack we keep track of the used stack size. Every var pushed on the execution stack will therefore have this stack_offset remembered. Once the entire IL code is traversed and we have all the global locals allocated, the real offset of the execution stack locals can be determined. It is computed as the originally determined stack_offset added with the offset of the execution stack start (size of the global locals space).
With this offset allocator, calls no longer need to store all the call args sregs and the return_offset is always the same as call_args_offset. This is because all vars are directly placed in the right position and no optimizations can move them around. The offset of the return value will therefore be also the offset where all the args are placed.
The limitation with this way of allocating offsets is that we run into the same problems with opcodes that don't have typical stack usage (use values, pop them, store result). This happens with newobj opcodes. The opcode receives the params, and then it needs to call a ctor with these same params and a newly allocated this object. Since we can't use a var offset allocation pass to compute the offset ideally, the newobj opcodes in the case of unoptimized code must move these params around on the stack, in order to make room for `this`.
* [mono][interp] Add dreg to all calls in unoptimized code
All calls need to have a dreg (a dummy one if it is void call), in order for unoptimized offset allocator to determine the offset of the call. In unoptimized code, the offset of the first argument is always the same as the offset of the return, if any.
* [mono][interp] Fix issue with passing of exvars
Unoptimized code can't use a global local directly (like the exvar), it must first be pushed to a new var on the execution stack. Add a mov instruction when we start executing the basic block for a handler.
Denis Proshutinskii [Mon, 1 Aug 2022 08:12:24 +0000 (15:12 +0700)]
Add localloc empty stack verification (#73109)
* Add localloc empty stack verification
* Update error message
* Add more tests
* Fix tests
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Co-authored-by: Dan Moseley <danmose@microsoft.com>
Radek Zikmund [Mon, 1 Aug 2022 07:13:37 +0000 (09:13 +0200)]
Add some QuicListener tests (#73072)
Michal Strehovský [Mon, 1 Aug 2022 05:36:38 +0000 (14:36 +0900)]
Link issue to the RDC attribute on DispatchProxy (#73137)
Vitek Karas [Mon, 1 Aug 2022 05:35:14 +0000 (22:35 -0700)]
Fix assert in NativeAOT when handling data flow on compiler generated code. (#73085)
The problem occurs when an entire type/assembly is preserved through explicit rooting (command line, rd.xml, ...). If such type contains a local function (for example) which is only called from a branch which is going to be removed by constant-prop/branch removal the internal tracking of compiler generated methods will see this local function as orphaned (not belonging to any user method). This leads to a case where we will try to run data flow on the local function - but that should never happen for compiler generated methods directly -> assert.
The fix is (just like in the linker), to never run data flow on compiler generated methods directly - they should only run data flow as part of their respective user method.
Fixes https://github.com/dotnet/runtime/issues/73027
Michal Strehovský [Mon, 1 Aug 2022 04:08:19 +0000 (13:08 +0900)]
Enable more libraries tests (#73104)
Aaron Robinson [Mon, 1 Aug 2022 00:35:11 +0000 (17:35 -0700)]
Update CLRConfig knob description (#73133)
Dan Moseley [Sun, 31 Jul 2022 20:38:01 +0000 (21:38 +0100)]
Add TPN entry for Date/Time processing algorithm (#73128)
Aman Khalid [Sun, 31 Jul 2022 15:26:46 +0000 (08:26 -0700)]
Add documentation for hot/cold splitting (#73029)
* Add documentation for hot/cold splitting
* Address feedback
* Improve phrasing
Sergei Pavlov [Sun, 31 Jul 2022 15:07:22 +0000 (08:07 -0700)]
30% optimization of `DateTime.GetDate()`/`.Year/.Month/.Day/.DayOfYear` by 'Euclidean affine functions' (#72712)
* Optimize DateTime.GetDate()/.GetDatePart() by 'Euclidean affine functions'
* Code style
* Refactoring: avoid switch and 'var' keyword; add March1BasedDayOfNewYear constant
* Fix build
* Add [MethodImpl(MethodImplOptions.AggressiveInlining)] to GetDatePart()
* revert relevant comments from original code
* Inline calculations into properties: Year, Month, Day, DayOfYear instead of Common GetDatePart() function
* Fix indentation
* align comment
Andy Ayers [Sun, 31 Jul 2022 15:04:13 +0000 (08:04 -0700)]
JIT: have jit tail call stress avoid creating loops in some cases (#73114)
Don't create a loop via tail call stress if the method didn't already have a loop and could have patchpoints.
Fixes #73090.
Jo Shields [Sun, 31 Jul 2022 12:39:41 +0000 (08:39 -0400)]
[Android] Don't exclude .gz files from assets.zip (#73077)
Closes: #36845
Egor Bogatov [Sun, 31 Jul 2022 05:42:25 +0000 (07:42 +0200)]
[GC] Handle objects from frozen segments in GCHeap::IsEphemeral (#73110)
Aaron Robinson [Sun, 31 Jul 2022 03:34:07 +0000 (20:34 -0700)]
Remove undefined behavior for address of null reference (#73113)
Tomáš Rylek [Sat, 30 Jul 2022 15:39:54 +0000 (17:39 +0200)]
Implement test checking whether CET is active (#71509)
As part of Control Flow Enforcement Technology (CET) testing we need
to make sure that CET is actually active on the execution machines;
otherwise subtle infra changes could easily regress the testing by
inadvertently deactivating CET without anyone noticing. This change
introduces an initial CET availability test for this purpose.
Thanks
Tomas
Dan Moseley [Sat, 30 Jul 2022 07:04:11 +0000 (01:04 -0600)]
Add retry to symlink test (#73042)
Gregg Miskelly [Sat, 30 Jul 2022 02:52:48 +0000 (19:52 -0700)]
Move System.ValueType.s_seed into System.Runtime.CompilerServices.RuntimeHelpers (#73080)
PR https://github.com/dotnet/runtime/pull/69723 added a 's_seed' field to
System.ValueType. This causes the debugger to show all structs as having
static members. This PR moves the field and the function that used it into RuntimeHelpers.
Andy Gocke [Sat, 30 Jul 2022 00:40:35 +0000 (17:40 -0700)]
Annotate System.Linq.Queryable with RDC (#72899)
Annotates for RequiresDynamicCode, which represents AOT safety.
Jeremy Barton [Fri, 29 Jul 2022 21:55:54 +0000 (14:55 -0700)]
Appropriately free temporary values on EC import
EC import from parameters calls into a series of set-routines that neither
self-describe their ownership of the reference counted inputs (`set0` vs `set1`)
nor document them.
Looking at code usage examples, and underlying code, they are all logically
`set1`-style routines, in that they do not take ownership of the inputs, which
means we need to free the BN values on both success and failure. This assertion
was verified by an intermediate change that reset all numbers to 1
(e.g. `BN_one(qxBn)`) and watched for test failures. When none of our tests
failed with that change, it moved to the freeing form.
Verified with importing the cross-product of:
{ secp256r1, sect163k1 }
x
{ named curve, explicit parameters }
x
{ q + d, q only, d only }
Tarek Mahmoud Sayed [Fri, 29 Jul 2022 21:36:15 +0000 (21:36 +0000)]
Disable NJulianRuleTest on Android (#73030)
Co-authored-by: Ilona Tomkowicz <32700855+ilonatommy@users.noreply.github.com>
Egor Bogatov [Fri, 29 Jul 2022 21:29:50 +0000 (23:29 +0200)]
Add EH filters for generic catch(T) blocks (#72721)
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Jeremy Koritzinsky [Fri, 29 Jul 2022 21:21:34 +0000 (14:21 -0700)]
Add stateful marshaller support to the CustomMarshallerAttributeAnalyzer (#72888)
Jeremy Koritzinsky [Fri, 29 Jul 2022 21:18:59 +0000 (14:18 -0700)]
Update ConvertToLibraryImport analyzer and fixer to limit false-positives/code breaks (#72965)
froce [Fri, 29 Jul 2022 20:32:53 +0000 (22:32 +0200)]
Fix incremental XxHash32/XxHash64 (#69185)
Egor Bogatov [Fri, 29 Jul 2022 20:20:04 +0000 (22:20 +0200)]
Fix crc32 issues found in #62692 (#73005)
Eirik Tsarpalis [Fri, 29 Jul 2022 19:32:35 +0000 (20:32 +0100)]
Refactor root-level serialization logic and polymorphic value handling. (#72789)
* Refactor root-level serialization logic and polymorphic value handling.
* Address feedback
* Do not consult metadata LRU cache in JsonResumableConverter bridging logic.
* Use secondary LRU cache when resolving root-level polymorphic types.
* Add test coverage for root-level polymorphic values in JsonTypeInfo<T> JsonSerializer methods.
* Change caching strategy for root-level polymorphic values.
* Update src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializer.Helpers.cs
* Remove commented out code
Vladimir Sadov [Fri, 29 Jul 2022 18:17:05 +0000 (11:17 -0700)]
recursive generic fix (#73071)
Pavel Savara [Fri, 29 Jul 2022 17:48:06 +0000 (19:48 +0200)]
[wasm] `JSImport` generator `AllowUnsafeBlocks` diagnostic (#72996)
- added `JSImportAttribute requires unsafe code` + unit test
- fixed Diagnostic IDs + reservation
- moved System.Runtime.InteropServices.JavaScript.UnitTests to subfolder
Adeel Mujahid [Fri, 29 Jul 2022 16:34:00 +0000 (19:34 +0300)]
Define __cpuid{ex} only when there's no builtin one (#73065)
* Define __cpuid{ex} only when there's no builtin one
Fix clang 15 RC1 build: `error: definition of builtin function '__cpuid'`
* Add clang-15 autodetection
dotnet bot [Fri, 29 Jul 2022 14:10:10 +0000 (07:10 -0700)]
Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 1910260 (#73028)
Krzysztof Wicher [Fri, 29 Jul 2022 13:23:45 +0000 (15:23 +0200)]
re-enable tests for 66421 (#73052)
Aleksey Kliger (λgeek) [Fri, 29 Jul 2022 13:06:14 +0000 (09:06 -0400)]
[wasm-ep] diagnostic server IPC fixups (#72859)
* [wasm-ep] Trim trailing nul when parsing IPC command strings
The protocol spec says there's a length and a nul terminator, but sending that literal UTF-16 nul to ep_enable_2 means we use an incorrect name when looking for the provider.
* [wasm-ep] Fix formating of event pipe provider strings
convert the 64-bit "keywords" mask into a hex string properly by padding both halves with zeroes after calling the JS Number.toString() method
* use Array splice instead of String substring
* Address review feedback
Radek Zikmund [Fri, 29 Jul 2022 10:56:02 +0000 (12:56 +0200)]
Fix UnsupportedOSPlatformAttribute usage in System.Net.NetworkInformation.cs (#72792)
* Test attribute on IsDnsEligible
* Add more attributes
* Icmp statistics
* IPGlobalProperties
* IPInterfaceProperties
* IPInterfaceStatistics
* Replace unsupportedOS attribute by SupportedOS attribute
* IPv4/6InterfaceProperties
Vladimir Sadov [Fri, 29 Jul 2022 09:57:56 +0000 (02:57 -0700)]
[NativeAOT] Fix assert in Thread.SpinWait(0) (#73033)
* do not inline long wait
Krzysztof Wicher [Fri, 29 Jul 2022 08:06:08 +0000 (10:06 +0200)]
Make JSON support required properties (#72937)
* Throw exception when 'required' keyword used but ctor does not have 'SetsRequiredMembers'
* Support required keyword (and internal IsRequired)
* remove local variable (forgot to press Save All)
* revert added namespaces in two files
* Apply feedback
* apply second round of feedback (minus HashSet optimization)
* Use BitArray rather than HashSet
* simplify validation code
* Truncate the message if too long, flip meaning of bit array bits
* remove default value, add description for BitArray
* for compiler attributes check for full type name rather than using typeof on net7.0
Michal Strehovský [Fri, 29 Jul 2022 06:00:55 +0000 (15:00 +0900)]
Unblock tests blocked on 70012 (#73044)
Andrew Au [Fri, 29 Jul 2022 05:36:01 +0000 (22:36 -0700)]
Fixing the per object hard limit support for regions (#72229)
Alhad Deshpande [Fri, 29 Jul 2022 04:55:15 +0000 (10:25 +0530)]
Implementation of opcode OP_GC_SAFE_POINT for ppc64le (#72997)
* Avoid transformation from multiplication to left shift in case of 64 bit value
* Fixed System.Collections.Concurrent.Tests timeout issue
Michal Strehovský [Fri, 29 Jul 2022 04:16:32 +0000 (13:16 +0900)]
Run more test on NativeAOT Linux (#72832)