Sergey Andreenko [Mon, 23 May 2022 13:47:22 +0000 (09:47 -0400)]
Allow StoreLclVar src to be IND/FLD. (#59315)
* Allow StoreLclVar src to be IND/FLD.
* disable for arm64
* use OperIsInitVal
* fix format
dotnet-maestro[bot] [Mon, 23 May 2022 08:22:56 +0000 (10:22 +0200)]
[main] Update dependencies from dotnet/linker (#69644)
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Aaron Robinson [Mon, 23 May 2022 00:52:04 +0000 (17:52 -0700)]
Rename and reenable test (#69648)
SingleAccretion [Sun, 22 May 2022 18:37:49 +0000 (21:37 +0300)]
Clear NO_CSE on struct addrs in MorphCommaBlock (#69210)
A small CQ improvement for cases where we set it unnecessarily.
Jakob Botsch Nielsen [Sun, 22 May 2022 18:18:25 +0000 (20:18 +0200)]
Fix R2RDump (#69656)
Looks like the default for these changes to empty array instead of null.
Fixes #69655
SingleAccretion [Sun, 22 May 2022 17:55:27 +0000 (20:55 +0300)]
Start morphing `TYP_STRUCT` local indirections in `LocalAddressVisitor` (#68515)
* Refactor "MorphLocalIndir"
Separate the transformation from "analysis".
This will be helpful when we start morphing TYP_STRUCT indirections,
which have a complex matrix of supported IR shapes.
No diffs.
* Don't use types of location nodes
They're meaningless.
Couple small positive diffs from more folding taking place.
* Fold local struct field access to OBJ(ADDR(LCL_FLD))
Only when used by ASGs for now.
* Delete NO_LAYOUT
* Do not create handle-less OBJ nodes
Fixes the asserts uncovered by stress.
* Delete obsolete code
Aleksey Kliger (λgeek) [Sun, 22 May 2022 17:31:45 +0000 (13:31 -0400)]
[wasm-mt] Add coop GC transitions to various EMSCRIPTEN_KEEPALIVE functions; define to noop if no threads (#69515)
* [wasm-mt] fix GC transition in mono_set_timeout_exec
It's called from JS
* Add GC transitions to other EMSCRIPTEN_KEEPALIVE functions in the runtime
* define GC Safe / Unsafe macros to no-ops if DISABLE_THREADS is defined
We don't need to do GC transitions if there's no threading since we won't ever suspend ourselves
Stephen Halter [Sun, 22 May 2022 01:38:50 +0000 (18:38 -0700)]
Fix Create/StartActivity parentId nullability (#69636)
Elinor Fung [Sat, 21 May 2022 18:42:41 +0000 (11:42 -0700)]
Style improvements for generated p/invokes (#69638)
- Remove '_gen` part of suffix
- Remove unnecessary braces in fixed block
David Wrighton [Sat, 21 May 2022 17:37:46 +0000 (10:37 -0700)]
Profiler RequestReJITWithInliners did not work properly if all methods in the module were not loaded (#69634)
- Add unused functions into rejit.cs test to expose the problematic behavior
- Fix by using tokens throughout the handling of R2R inlining information instead of converting to MethodDescs at times
Kunal Pathak [Sat, 21 May 2022 15:14:39 +0000 (08:14 -0700)]
Move dead code removal in lower after last updategraph (#69421)
* Move dead code removal in lower after last updategraph
* Add back in non-optimizing
Andy Ayers [Sat, 21 May 2022 15:06:50 +0000 (08:06 -0700)]
Fix IsSupported guard check for use of Ssse3.Shuffle in Span.Reverse (#69623)
We were checking for SSE2 support and then using SSSE3 instructions.
Fixes #68880.
Alexander Köplinger [Sat, 21 May 2022 09:00:51 +0000 (11:00 +0200)]
Fix SystemNative_SendFile on iOS/tvOS devices (#69436)
Even though the `sendfile()` function exists it causes a SIGSYS signal which crashes the process on devices whenever you use it (this doesn't happen on simulators).
Implement a read/write loop as a fallback to fix this, loosely based on CopyFile_ReadWrite in pal_io.c.
See similar issues in other projects:
- https://github.com/golang/go/commit/
029dfbcc83123cb62e52f2aaedc46397815e3fa6
- https://github.com/ndfred/iperf-ios/issues/17
Tanner Gooding [Sat, 21 May 2022 04:54:11 +0000 (21:54 -0700)]
Updating to a version of Roslyn that contains the NumericIntPtr feature (#69627)
* Update MicrosoftNetCompilersToolsetVersion to 4.3.0-2.22270.2
* Updating IntPtr/UIntPtr and a handful of tests to handle the numeric-intptr feature
* Ensure IntPtr.TestExplicitCast and UIntPtr.TestExplicitCast correctly check the overflow exception
* Update the Microsoft.Dotnet.Compatibility analyzer to 2.0.0-preview.4.22252.4
* Updating the CompatibilitySuppressions for the NumericIntPtr feature
* Handle a difference in how the OverflowException is thrown for a reflected call on Mono
* Use Assert.ThrowsAny as that includes derived types for xUnit
Ankit Jain [Fri, 20 May 2022 22:18:01 +0000 (18:18 -0400)]
[wasm] CI build improvements (#69519)
- Run all the debugger tests in one helix job, because most of them take a couple of minutes to run. And this would avoid the overhead of individual helix jobs
- Add a no-workloads variant for `Wasm.Build.Tests`, instead of `EMSDK`
- This replaces the job that used `WasmApp.LocalBuild*` stuff to build
with a `EMSDK` checkout. That case already gets tested with library tests.
- The `EMSDK` case had been disabled recently due to an Arcade issue
- Since we have very few tests to run for the noworkloads case, they are
all run in a single helix work item.
Fixes https://github.com/dotnet/runtime/issues/58159
Fixes https://github.com/dotnet/runtime/issues/67887 (by completely removing the `EMSDK` run)
Tanner Gooding [Fri, 20 May 2022 22:02:27 +0000 (15:02 -0700)]
Refactoring which numeric interface exposes which methods to match latest API review decisions (#69582)
* Refactoring which numeric interface exposes which methods to match latest API review decisions
* Refactoring the generic math tests to have a consistent order, allowing coverage to be more easily seen
* Adding test coverage for the APIs that were moved down to INumber and INumberBase
* Adding generic-math tests for System.Numerics.Complex
* Fixing some copy/paste issues that came about from resolving the Int128/UInt128 merge conflicts
dotnet-maestro[bot] [Fri, 20 May 2022 21:54:55 +0000 (14:54 -0700)]
[main] Update dependencies from dotnet/linker (#69246)
* Update dependencies from https://github.com/dotnet/linker build
20220511.1
Microsoft.NET.ILLink.Tasks
From Version 7.0.100-1.22260.1 -> To Version 7.0.100-1.22261.1
* Update dependencies from https://github.com/dotnet/linker build
20220512.1
Microsoft.NET.ILLink.Tasks
From Version 7.0.100-1.22260.1 -> To Version 7.0.100-1.22262.1
* Update dependencies from https://github.com/dotnet/linker build
20220513.1
Microsoft.NET.ILLink.Tasks
From Version 7.0.100-1.22260.1 -> To Version 7.0.100-1.22263.1
* Update dependencies from https://github.com/dotnet/linker build
20220515.1
Microsoft.NET.ILLink.Tasks
From Version 7.0.100-1.22260.1 -> To Version 7.0.100-1.22265.1
* Update dependencies from https://github.com/dotnet/linker build
20220516.1
Microsoft.NET.ILLink.Tasks
From Version 7.0.100-1.22260.1 -> To Version 7.0.100-1.22266.1
* Update dependencies from https://github.com/dotnet/linker build
20220518.1
Microsoft.NET.ILLink.Tasks
From Version 7.0.100-1.22260.1 -> To Version 7.0.100-1.22268.1
* Update dependencies from https://github.com/dotnet/linker build
20220519.1
Microsoft.NET.ILLink.Tasks
From Version 7.0.100-1.22260.1 -> To Version 7.0.100-1.22269.1
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Andrew Au [Fri, 20 May 2022 21:09:19 +0000 (14:09 -0700)]
GetTotalPauseDuration implementation (#68835)
Huo Yaoyuan [Fri, 20 May 2022 19:31:10 +0000 (03:31 +0800)]
Use span to pass type modifiers in RuntimeTypeHandle.GetTypeHelper (#69425)
* Use span to pass type modifiers
* Use switch statement
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Eric Erhardt [Fri, 20 May 2022 18:56:49 +0000 (13:56 -0500)]
ZipFile UnixCreateSetsPermissionsInExternalAttributes test fails on Apple OSes (#69583)
* ZipFile UnixCreateSetsPermissionsInExternalAttributes test fails on Apple OSes
There are scenarios where chmod succeeds, but the OS clears certain bits, like S_ISGID and S_ISUID. When this happens, the ZipFile tests fail because the .zip file doesn't contain the expected ExternalAttributes.
To fix this, read the file mode after calling chmod, and update the expected file mode so the tests still pass.
Fix #68293
Fix #60581
* Fix the tests to expect the correct file name
Pavel Savara [Fri, 20 May 2022 18:49:54 +0000 (20:49 +0200)]
[wasm] improve memory access and marshaling range checks (#64845)
* new memory accessors setI52, setI64Big, getI52, getI64Big
* removed support for long form automatic marshaler. It has impact to mono_bind_static_method
* made assert silent on Release config
* test for not marshaling long from C# to JS
* negative test for marshaling NaN as long
* fixed marshaling of uint32, uint16 and byte to be unsigned
* implemented range check on all set memory operations
* implemented also uint52
* differentiated bool marshaling because it shoud have different validation and message
* inlined asserts
* rename assert to mono_assert
Aaron Robinson [Fri, 20 May 2022 14:58:35 +0000 (07:58 -0700)]
Add `BStrStringMarshaller` to source generator (#69213)
* Add BStrStringMarshaller to source generator
* Convert to use void* for BStr and Utf16 marshallers' native types.
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Eric Erhardt [Fri, 20 May 2022 14:20:06 +0000 (09:20 -0500)]
Add Stream ReadAtLeast and ReadExactly (#69272)
* Add Stream ReadAtLeast and ReadExactly
Adds methods to Stream to read at least a minimum amount of bytes, or a full buffer, of data from the stream.
ReadAtLeast allows for the caller to specify whether an exception should be thrown or not on the end of the stream.
Make use of the new methods where appropriate in net7.0.
Fix #16598
* Add ReadAtLeast and ReadExactly unit tests
* Add XML docs to the new APIs
* Preserve behavior in StreamReader.FillBuffer when passed 0.
* Handle ReadExactly with an empty buffer, and ReadAtLeast with minimumBytes == 0.
Both of these cases are a no-op. No exception is thrown. A read won't be issued to the underlying stream. They won't block until data is available.
Radek Zikmund [Fri, 20 May 2022 10:46:48 +0000 (03:46 -0700)]
Fix HTTP3 stress (#69182)
* Build msquic locally
* Use IPv4 addresses only when testing HTTP3
* Code review changes
* fixup! Use IPv4 addresses only when testing HTTP3
* Make listening on IPv6Any accept IPv4 connections as well
* Minor changes
* Don't continue if runtime image build fails
* Switch to 1es-ubuntu-1804-open image
* Code review feedback
Stephen Toub [Fri, 20 May 2022 10:35:47 +0000 (06:35 -0400)]
Enable analyzers for System.Text.Json.SourceGeneration (#69581)
* Enable analyzers for System.Text.Json.SourceGeneration
* Fix another warning in release builds
David Mason [Fri, 20 May 2022 07:26:52 +0000 (00:26 -0700)]
Change location where we output message about notification profilers being disabled (#69538)
Tomas Weinfurt [Fri, 20 May 2022 05:23:40 +0000 (22:23 -0700)]
avoid pulling Ssl internals to other assemblies (#69539)
Levi Broderick [Fri, 20 May 2022 05:21:16 +0000 (22:21 -0700)]
Optimize string.EndsWith(char) for const values (#69038)
Sergio Pedri [Fri, 20 May 2022 04:32:05 +0000 (21:32 -0700)]
Add NativeMemory.ZeroMemory API (#69500)
* Add NativeMemory.ZeroMemory API
* Replace Random.NextBytes with Span<byte>.Fill
* Add ZeroMemory unit tests for zeroed region within buffer
* Add remarks for ptr and byteCount parameters
* Add test for ZeroMemory(null, 0) not throwing
* Add unit tests for zeroing memory with a size of 0
* Move test cases with 0 byte count to separate method
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Stephen Toub [Fri, 20 May 2022 02:28:07 +0000 (22:28 -0400)]
Enable analyzers for Microsoft.Extensions.Logging.Generators (#69579)
Tomas Weinfurt [Fri, 20 May 2022 01:06:58 +0000 (18:06 -0700)]
fix GetContentAsync_ErrorStatusCode_ExpectedExceptionThrown test (#69228)
* fix GetContentAsync_ErrorStatusCode_ExpectedExceptionThrown test
* feedback from ewview
Tomas Weinfurt [Fri, 20 May 2022 01:05:49 +0000 (18:05 -0700)]
make sure socket is intialized before connecting TCPClient (#69540)
* make sure socket is intialized before connecting TCPClient
* feedback from review
Julie Lee [Fri, 20 May 2022 00:51:27 +0000 (17:51 -0700)]
[RyuJIT] Emit shlx, sarx, shrx on x64 (#67182)
* Emit shlx, sarx, shrx: resolve merge conflict in emitxarch.cpp.
* Shrx: Swap operand and ShiftBy registers to swap rcx and rdx in correct order.
* Change only TYP_LONG to Shlx, Sarx and Shrx.
* Shlx, Sarx, Shrx test cases
* Shlx, sarx, shrx code clean-up
* Emit shlx, sarx, shrx: Enable 32 bit shifts and addressed feedback.
* [shlx/sarx/shrx] Addressed CR feedback.
- Removed some tests from Arm/Arm64 due to a known undefined behavior
- Excluded the test from Mono due to a known undefined behavior
- Resolved merge conflict
* shlx, sarx, shrx: added ifdef to target x64 only
* shlx, sarx, shrx jit-format fix
* [shlx/sarx/shrx] Addressed feedback.
* [Emit shlx, sarx, shrx] addressed feedback on unit test
* [Emit shlx, sarx, shrx] Removed x86 unit tests.
* [Emit shlx, sarx, shrx] Remove 32bit test cases.
* [Emit shlx, sarx, shrx] Update a comment in lsraxarch.cpp
Co-authored-by: Kunal Pathak <Kunal.Pathak@microsoft.com>
* [Emit shlx, sarx, shrx] Added uint, int, ushort and short test cases.
Co-authored-by: Kunal Pathak <Kunal.Pathak@microsoft.com>
Tanner Gooding [Thu, 19 May 2022 22:26:24 +0000 (15:26 -0700)]
Iterative generic math changes to match API review (#69391)
* Change GetShortestBitLength to return int and add WriteBigEndian APIs
* Add WriteExponentBigEndian and WriteSignificandBigEndian APIs
* Update System.Char to explicitly implement the numeric interfaces
* Ensure BigInteger.TryWriteBigEndian correctly offsets the address
* Fixing two usages of `var` in decimal
* Ensure lo64 is ulong and hi32 is uint
* Ensure Int128/UInt128 implement TryWriteBigEndian and return `int` for `GetShortestBitLength`
* Ensure that `GetByteCount` and `GetShortestBitLength` correctly handle the one's complement format
* Ensure the ReverseEndianness calls in TryWrite* for Int128/UInt128 are correct
* Ensure BigInteger.TryWriteLittleEndian has a correct assert
Stephen Toub [Thu, 19 May 2022 21:48:53 +0000 (17:48 -0400)]
Enable analyzers for regex generator project (#69564)
Weihan Li [Thu, 19 May 2022 19:30:52 +0000 (03:30 +0800)]
Fix dependencymodel typo (#69566)
Jo Shields [Thu, 19 May 2022 19:27:40 +0000 (15:27 -0400)]
Linux-bionic (Android libc w/o Android interop) initial implementation (#66147)
Implement support for "Linux Bionic", a RID which builds a Linux runtime against an Android libc but without Android OS functions like JNI, Dalvik, Instrumentation, etc. This configuration has been requested by a team working on an IoT scenario.
* The new RID is linux-bionic-arm64/linux-bionic-x64.
* The build reuses the existing Android build dockerfiles and Helix queues
* Since we don't have JNI, we don't have Android Crypto - instead, use an Android build of OpenSSL. As an errata, it is incumbent upon the end user to supply this in their OS environment (we download one ad-hoc for testing purposes, which was compiled by Google)
* Some tests cannot be completed due to SELinux policies affecting the shell user executing tests via adb shell in the world-writable /data/local/tmp directory. We expect those tests would pass if they pass on Android, in a real-world IoT scenario with a custom OS (rather than recycling Google's OS images intended for phones)
Closes: #66027
Matt Galbraith [Thu, 19 May 2022 16:33:45 +0000 (09:33 -0700)]
Revert "[main] Update dependencies from dotnet/arcade (#69126)" (#69535)
This reverts commit
c481c04c279c22d9f0c6b496231470c356df0e6b.
Mitchell Hwang [Thu, 19 May 2022 16:26:53 +0000 (12:26 -0400)]
[mono][eventpipe] Implementing MethodDetails and BulkType events (#68571)
* [coreclr]Extend lttngDataTypeMapping for mono
Writing arrays in generateWriteEventBody had not been previously hit on Mono.
With a goal of emitting MethodDetails events on Mono, lttngDataTypeMapping
needs to be extended to be compatible with mono types.
* [mono][eventpipe] Implement SendMethodDetailsEvents on mono
* [mono][eventpipe] Utilize method signature getter to avoid uncreated signature
* [mono][eventpipe] Implement BulkType on mono
* debug traces
* Address struct tab formatting feedback
* Address rg_type_parameter preallocated stack array size
* [mono][eventpipe] Add helper function to get mono type unique type identifier
* [mono][eventpipe] Differentiate MonoType and TypeID and pass separately
* Address array max rank feedback
* Address byte_count bug feedback
* Address Etw Type Flags feedback
* Address cor_element_type underlying type feedback
* Address logger instance and if_necessary feedback
* Fix s_name
* Cleanup comment tab spacing
* Address feedback
Fix bulk type event buffer
Fix mono type check
Fix mono type check
Clear bulk type event logger
Debug bulktype event firing
Fix tab bulktype firing
Fix fixed_sized_data byte copy
Address constants feedback
Add maximum event size constant
Add maximum bulk type value type parameters constant
Add maximum method type argument count constant
Fix typo
Address BulkType Value s_name type size feedback
Address softcode buffer size increment
Address switch case feedback
Address fixed sized array feedback
Fix spacing
Add init/fini for BulkTypeEventLogger and BulkTypeValue instances
Fix return type ep_rt_mono_log_single_type
Add get_typeid_for_class helper
Add assertion for large types
Fix lttng map
Use helper methods to write into bulk type event logger buffer
Fix typo ep_rt_mono_send_method_details_event definition
Change s_name to ep_char8_t and write with gunichar2
* Removed temporary debug traces
Set BulkTypeValue s_name to null for now
Fixed debug trace formatting for pointers
Fix type_name_id for types with no token
Remove write_event_buffer_intptr as the size is different on Windows x86
Rename ep_rt_bulk_type_value_init to ep_rt_bulk_type_value_clear
* Utilize macros for array size initialization
Cleanup formatting and style
Remove unused write_event_buffer_utf16_str
Add BulkTypeEventLogger pointer to function description
* [mono] Mark mono_class_has_finalizer as MONO_COMPONENT_API
* Set global static const to macros
Change ep_rt_mono_get_byte_count_in_event type
* Address feedback
Drop variable prefixes
Clear BulkTypeValue via memset
Rename bulk_type_event_logger helpers to alloc and free
Remove redundant bulk type value byte count calculation
Utilize memcpy to copy type parameter arrays
Reduce padding by moving bulk_type_event_buffer field in struct
* Change Event struct parameter _ElementSize type to size_t
* Remove parallel type id array to reduce bookkeeping and create type ids from mono types when needed
Change type id type from intptr_t to uint64_t as ids in eventpipe are standardized to uint64_t
* [mono][eventpipe] Add dedicated mempool for BulkTypeEventLogger to dynamically allocate enough space for type parameters
* Revert "Change Event struct parameter _ElementSize type to size_t"
This reverts commit
87f87f2f93457bed292d979668dbad01beb1e5f1.
* Fix write_event_buffer parameter type to avoid C4267 error on windows
* Move mem_pool under BulkTypeEventLogger
Kevin Jones [Thu, 19 May 2022 16:22:12 +0000 (12:22 -0400)]
Allocate less with X500DistinguishedName
This cleanup happens to break parsing strings like OID.STREET=something on macOS and Linux, which was not an intentional feature.
It's not expected that this functionality was ever utilized, and it doesn't work on Windows (or .NET Framework).
Adeel Mujahid [Thu, 19 May 2022 15:16:52 +0000 (18:16 +0300)]
Update libraries build instructions on Unix (#69553)
Delete platform specific ones which are no longer relavant to this
repository.
Jerry King [Thu, 19 May 2022 15:03:41 +0000 (11:03 -0400)]
Correct MSVC version in requirements documentation (#68078)
* Correct MSVC version in requirements documentation
* Fix version constraint
Elinor Fung [Thu, 19 May 2022 14:46:45 +0000 (07:46 -0700)]
Fix check in test for output on unhandled exception (#69528)
Jakob Botsch Nielsen [Thu, 19 May 2022 13:17:58 +0000 (15:17 +0200)]
Make superpmi.py collect easier to use (#69487)
* Add COMPlus_JitPath variable in debug/checked builds and use it from SuperPMI
* Do not change current dir for SPMI collections
Radek Zikmund [Thu, 19 May 2022 12:47:46 +0000 (14:47 +0200)]
Add AppContext data support for DefaultMaxConnectionsPerServer (#68952)
* Add AppContext data support for DefaultMaxConnectionsPerServer
* Move code to GlobalHttpSettings
* Rename the switch
* Fix build
* Fix build of System.Net.Http.WinHttpHandler
* Remove changes from WinHttpHandler
* Cleanup
* Merge new GlobalHttpSettings into SocketsHttpHandler inner class
* Code review feedback
Anton Lapounov [Thu, 19 May 2022 06:23:17 +0000 (23:23 -0700)]
Clean up code for CPU_Group_Info structs (#69533)
Tanner Gooding [Thu, 19 May 2022 04:41:17 +0000 (21:41 -0700)]
Adding Int128 and UInt128 with a base software implementation (#69204)
* Adding barebones Int128 and UInt128 structs
* Special case Int128 and UInt128 alignment on x64 Unix and Arm64
* Implementing Int128 and UInt128
* Adding tests for Int128 and UInt128
* Updating Int128/UInt128 to respect the System V ABI ordering
* Fixing an issue with UInt128->BigInteger setting the wrong sign
* Don't use Unsafe.As in the Int128/UInt128 hex parsing logic
* Adding Int128 P/Invoke tests and ensure R2R correctly sets the packing
* Fixing some issues with the Int128 interop test for non-Windows
* Ensure that floating-point conversions exist for Int128 and UInt128
* Fixing the casing of a couple fields
* Revert "Don't use Unsafe.As in the Int128/UInt128 hex parsing logic"
This reverts commit
09e8bfc52d5b1b7f7b341f318bf1046b19768dd3.
* Adjusting the Int128/UInt128 generic math tests to have consistent ordering
* Responding to PR feedback
* Ensure that pNativeLayoutInfo alignment is initialized for Int128/UInt128
* Don't use Unsafe.As in the Int128/UInt128 hex parsing logic
* Skip the Interop/PInvoke/Int128 tests on Mono
Kevin Jones [Thu, 19 May 2022 03:00:38 +0000 (23:00 -0400)]
Use span instead of array in PublicKey
Elinor Fung [Thu, 19 May 2022 02:02:11 +0000 (19:02 -0700)]
Run host tests with dotnet test and enable crash/hang dumps (#69340)
Jeff Handley [Thu, 19 May 2022 01:11:08 +0000 (18:11 -0700)]
Do not automatically mark Stephen Toub as the issue triager or PR champion (#69452)
Aleksey Kliger (λgeek) [Thu, 19 May 2022 00:27:44 +0000 (20:27 -0400)]
[wasm-ep] Minimal diagnostic tracing configuration and sample (#69158)
* Adds a `/p:WasmEnablePerfTracing=true` configuration.
In this configuration the runtime is built with threading (`MonoWasmThreads` property is true), but user C# code is not allowed to start threads and doesn't use the portable threadpool (`MonoWasmThreadsNoUser` property is also true).
The upshot is that EventPipe can start threads but user code is still single-threaded.
* Adds a `MONO.diagnostics` interface in JavaScript. There's a single method for now `createEventPipeSession` which creates a session that can save a trace to a file on the virtual file system. JS code (or a user in a dev console) needs to call `start()` and `stop()` on the session object to begin collecting samples. The data is saved temporarily to the Emscripten VFS and can be retrived into a JavaScript Blob (and from there downloaded to a file outside the browser).
* Adds a sample that runs an async task for five seconds and collects samples and then triggers a `click()` to download the trace file out of the browser.
* Adds a TS module to help with working with uint64_t values in the emscripten heap.
* Exposes empscripten Module.stackSave, stackRestore and stackAlloc operations to the runtime TS modules. Use for working with event pipe session ID outparam.
---
* add DISABLE_WASM_USER_THREADS mono cmake option
* Disable Thread.StartInternal icall if DISABLE_WASM_USER_THREADS
if threading is enabled for the runtime internally, but disabled for user code, throw PNSE
* add an eventpipe sample
* [wasm-ep] (browser-eventpipe sample) run loop for longer
* [samples/wasm-eventpipe] make an async task sample
change the sample to do some work asynchronously using setTimeout instead of blocking
* [wasm] Add MONO.diagnostics interface
Binds enable, start, disable methods defaulting to non-streaming FILE mode
* if wasm threads are disabled, but perftracing is enabled, don't log overlapped io events
* fix whitespace and nits
* don't need try/finally in the sample anymore
* more whitespace
* add start method to EventPipeSession interface
* don't run wasm-eventpipe sample on CI lanes without perftracing
* more whitespace
* fix eslint warnings, default rundown to true, allow callback for traceFilePath option
* add EventPipeSession.getTraceBlob
for retrieving the collected traces instead of exposing the emscripten VFS directly.
update the sample to use URL.createObjectURL (session.getTraceBlob()) to create the download link
* [browser-eventpipe sample] remove unnecessary ref assemblies
* use ep_char8_t for C decls of event pipe wasm exports
* Use stack allocation for temporaries
Expose the emscripten stack allocation API
* Use 32-bit EventPipe session ID on WASM
64 bit integers are awkward to work with in JavaScript.
The EventPipe session ID is derived from a pointer address, so even though it is nominally a 64-bit value, in practice the top bits are zero.
Use a 32-bit int to represent the session ID on the javascript side and convert to 64-bit in C when calling down to the EventPipe APIs
* Make the sample do more work in managed
give the sample profiler some non-empty samples to collect
* Move withStackAlloc to memory.ts
* simplify VFS .nettrace file naming
Just use consecutive integers to uniquify the session traces. Dont' need a fancy timestamp in the VFS (which would also not be unique if you create sessions below the timestamp resolution)
* Add overloads to memory.withStackAlloc to avoid creating closures
Pass additional arguments to the callback function
* sample: explain why there's a 10s pause
* move createEventPipeSession callback to a function
ensures the closure is created once
* Use a tuple type for withStackAlloc
* use unsigned 32-bit get/set in cuint64 get/set
* fix whitespace
Elinor Fung [Wed, 18 May 2022 23:27:38 +0000 (16:27 -0700)]
Use shared settings for enabling analyzers in LibraryImportGenerator (#69511)
John Salem [Wed, 18 May 2022 23:04:03 +0000 (16:04 -0700)]
Disable nativeruntimeeventsource test on unix arm and arm64 (#69510)
Andy Ayers [Wed, 18 May 2022 22:44:06 +0000 (15:44 -0700)]
JIT: Abandon loop search if we are about to walk off end of the bbNext chain (#69503)
In #69323 the 6.0.4 jit caused an AV because it walked off the end of the
bbNext chain during `optFindNaturalLoops`.
Analysis of a customer-provided dump showed that `MakeCompactAndFindExits`
might fail to find an expected loop block and so walk the entire bbNext chain
and then fall off the end. Details from the dump suggested that this happened
because a prior call to `MakeCompactAndFindExits` had moved most but not all of
a loop's blocks later in bbNext order, leaving that loop's bottom block earlier
in the bbNext chain then it's top. This ordering was unexpected.
I cannot repro this failure. The customer was using PGO and it's likely that
earlier PGO-driven block reordering contributed to this problem by interleaving
the blocks from two loops. We can recover the root method PGO schema from the
dump, but applying this is insufficient to cause the problem. This method does
quite a bit of inlining so it's likely that some inlinee PGO data must also be
a contributing factor.
At any rate, we can guard against this case easily enough, and simply abandon
recognition of any loop where we fail to find an expected loop block during
the bbNext chain walk.
SingleAccretion [Wed, 18 May 2022 20:40:46 +0000 (23:40 +0300)]
Expand the GC hole fix for explicitly initialized structs (#69501)
* Expand the fix for explicitly initialized structs
Liveness code already recognizes that it cannot delete certain local
stores with the implicit side effect of "explicit initialization".
However, it was only doing that for indirect "InitBlk" forms, while
the store can have more or less arbitrary shape (the only requirement
is that is must be "entire").
Fix this by not constraining the check to "InitBlk"s.
* Add a test
Kevin Jones [Wed, 18 May 2022 19:52:18 +0000 (15:52 -0400)]
Minor cleanup and reduce allocations in managed X.509 certificate PAL
Removes a few allocations, pre-sizes a list to the correct size, and remove redundant debugging code.
Radek Zikmund [Wed, 18 May 2022 16:15:20 +0000 (18:15 +0200)]
Fix data race on incoming MsQuicStream abort event (#69483)
* Fix data race on MsQuicStream abort
* fixup! Fix data race on MsQuicStream abort
Stephen Toub [Wed, 18 May 2022 15:04:39 +0000 (11:04 -0400)]
Add more char.Is* helpers for common ASCII sets (#69318)
* Add more char.Is helpers for common ASCII sets
* Fix hex tests
Ilona Tomkowicz [Wed, 18 May 2022 14:33:42 +0000 (16:33 +0200)]
Fixing problem for decimals. (#66979)
Miha Zupan [Wed, 18 May 2022 14:01:15 +0000 (16:01 +0200)]
Add current-outgoing-connect-attempts counter to Sockets (#66651)
* Add current-outgoing-connect-attempts counter to Sockets
* Use instance methods, add early exit to hot path
* Add comment about Accept/Connect check
* Fix race in test
Aleksey Kliger (λgeek) [Wed, 18 May 2022 12:43:46 +0000 (08:43 -0400)]
[wasm] Give is_nullish() a type guard type (#69473)
* [wasm] Give is_nullish() a type guard type
allow callers to refine the type of the argument to just `T` on the false
brach
```
let obj: number | null | undefined = ...
if (is_nullish (obj))
return;
// otherwise obj is known to TS to be 'number'.
```
Aleksey Kliger (λgeek) [Wed, 18 May 2022 12:42:58 +0000 (08:42 -0400)]
[monoapi] Add MONO_IMAGE_NOT_SUPPORTED to MonoImageOpenStatus (#69062)
* [monoapi] Add MONO_IMAGE_NOT_SUPPORTED to MonoImageOpenStatus
Use it as a return value for public API functions that pass `ref_only` set to `TRUE`. We don't support opening assemblies for reflection-only in .NET 6+
dotnet-maestro[bot] [Wed, 18 May 2022 12:24:33 +0000 (14:24 +0200)]
[main] Update dependencies from dotnet/arcade (#69126)
* Update dependencies from https://github.com/dotnet/arcade build
20220509.5
Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.GenAPI , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.GenFacades , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk
From Version 2.5.1-beta.22255.2 -> To Version 2.5.1-beta.22259.5
* Update dependencies from https://github.com/dotnet/arcade build
20220510.2
Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.GenAPI , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.GenFacades , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk
From Version 2.5.1-beta.22255.2 -> To Version 2.5.1-beta.22260.2
* Update dependencies from https://github.com/dotnet/arcade build
20220511.14
Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.GenAPI , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.GenFacades , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk
From Version 2.5.1-beta.22255.2 -> To Version 2.5.1-beta.22261.14
* Update dependencies from https://github.com/dotnet/arcade build
20220512.8
Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.GenAPI , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.GenFacades , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk
From Version 2.5.1-beta.22255.2 -> To Version 2.5.1-beta.22262.8
* Update dependencies from https://github.com/dotnet/arcade build
20220516.1
Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.GenAPI , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.GenFacades , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk
From Version 2.5.1-beta.22255.2 -> To Version 2.5.1-beta.22266.1
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Marek Safar <marek.safar@gmail.com>
Vitek Karas [Wed, 18 May 2022 11:07:16 +0000 (04:07 -0700)]
Do not print anything to stderr running SCD app without deps.json (#69314)
When we're running self-contained app the `hostfxr` tries to figure out the location of `hostpolicy.dll`. This is done also by looking into the `.deps.json` for the app (which should have a record for `hostpolicy.dll` in it). If the file is missing the code will move on and find the `hostpolicy.dll` in the app's folder, but it will also print out a message to stderr.
This means that running such app will actually work, but the host outputs a message to stderr - effectively "corrupting" the app's own output.
Note that this doesn't affects framework dependent apps without `.deps.json` since they look into the framework's `.deps.json` for `hostpolicy.dll`.
Jan Kotas [Wed, 18 May 2022 10:44:45 +0000 (03:44 -0700)]
Disable System.Reflection tests on NativeAOT (#69477)
Workarounds #69476
Stephen Toub [Wed, 18 May 2022 10:04:15 +0000 (06:04 -0400)]
Fix several regex loop issues (#69413)
* Fix several regex loop issues
1. Atomic greedy loop stack fixing. We were leaving some state on the backtracking stack after an atomic greedy loop successfully matched; if an earlier construct needed to pop something from the stack, it could end up getting state from that loop rather than its own.
2. Lazy loop backtracking pos. When a lazy loop backtracks to add an additional iteration, it needs to pick up where the previous iteration left off, but it wasn't properly storing/restoring the pos.
3. Improve RightToLeft (lookbehind) backreference matching. This wasn't broken, but it was unnecessarily complex and making the resulting code harder to debug through. This only affects the source generator, as RegexCompiler uses slightly different codegen due to also handling IgnoreCase.
4. Reuse loop logic for repeater atomic lazy loops. Atomic lazy loops end up being functionally identical to the equivalent greedy loop due to having the lazy upper bound lowered to the lazy lower bound. We can consolidate the implementations to avoid duplication.
5. .* Singeline loop in RightToLeft (lookbehind). Mainly to reduce the noise while investigating these issues, but it avoids an unnecessary loop.
* Address PR feedback
Will Smith [Wed, 18 May 2022 08:03:39 +0000 (01:03 -0700)]
ARM64 - Do not emit possible DIV_BY_ZERO/OVERFLOW exception blocks for non-zero/non-(negative one) constants (#68945)
* Do not emit possible DIV_BY_ZERO exception for non-zero constants
* Added overflow check
* Added second divzero check change
* Update morph.cpp
* Update morph.cpp
Elinor Fung [Wed, 18 May 2022 04:10:31 +0000 (21:10 -0700)]
Delete securitywrapper/securityutil (#69468)
Kevin Jones [Wed, 18 May 2022 03:05:40 +0000 (23:05 -0400)]
Spanify some Windows X.509 PAL and improve formatting
Kevin Jones [Wed, 18 May 2022 02:51:29 +0000 (22:51 -0400)]
Use Rfc3279DerSequence for signatures in ECDsaX509SignatureGenerator
William Godbe [Tue, 17 May 2022 22:44:56 +0000 (15:44 -0700)]
Add comment about PipeReader.ReadAtLeastAsync(0) (#69217)
* Add comment about PipeReader.ReadAtLeastAsync(0)
* Update PipeReader.cs
* Update PipeReader.cs
* Update PipeReader.cs
* Fixup
Maoni Stephens [Tue, 17 May 2022 22:27:01 +0000 (15:27 -0700)]
UOH alloc fix for hardlimit (#69345)
Kunal Pathak [Tue, 17 May 2022 22:20:31 +0000 (15:20 -0700)]
Arm64: Make unroll code for cpblk non-interruptible (#69202)
* make unroll code non-interruptible
* jit format
* Disable GC only in specific scenarios:
* add a comment
Eric Erhardt [Tue, 17 May 2022 22:01:04 +0000 (17:01 -0500)]
Reuse the throw away buffer in ZipHelper (#69439)
* Reuse the throw away buffer in ZipHelper
ZipHelper.AdvanceToPosition was allocating a new temporary buffer every time through the loop while reading from the stream. Changing the code to reuse the same buffer through the loop.
Meri Khamoyan [Tue, 17 May 2022 20:30:53 +0000 (00:30 +0400)]
#69424 disabled failing equals nan tests on tvos (#69429)
Disabling failing tests on tvos for issue #69424
Jan Vorlicek [Tue, 17 May 2022 20:22:14 +0000 (22:22 +0200)]
Fix executable memory reservation when range is not requested (#69430)
The VMToOSInterface::ReserveDoubleMappedMemory on Unix currently
doesn't use the range of memory reserved for executable purposes
in PAL in case there was no specific range of memory requested.
This is incorrect and it leads to steady state performance
degradation when W^X is enabled.
This change fixes it by using the PAL reserved memory even for
requests without specified range. This makes the steady state
performance the same both with and without W^X enabled.
This is very well visible on the Orchards and Fortunes benchmarks
performance where the regression was 17% resp 12% with W^X enabled.
Katelyn Gadd [Tue, 17 May 2022 20:05:05 +0000 (13:05 -0700)]
Wasm conditional audit + remove CompileFunction (#69283)
* Revise some if statements that implicitly treat the empty string as null
Add is_nullish utility function
Fix string decoder's handling of empty strings and query of string length
* Fix some uses of the logical or operator
* Remove unused CompileFunction interop API
Jan Kotas [Tue, 17 May 2022 19:21:16 +0000 (12:21 -0700)]
Wrap exceptions from array constructors in TargetInvocationException (#69440)
Fixes #69336
Zoltan Varga [Tue, 17 May 2022 18:42:16 +0000 (14:42 -0400)]
[mono] Fix a crash during stack trace construction if a this object is null. (#69292)
Fixes https://github.com/dotnet/runtime/issues/67354.
Adam Sitnik [Tue, 17 May 2022 18:27:52 +0000 (20:27 +0200)]
Reduce max shared memory object name length (#68541)
* reduce max shared memory object name to 30
* use the fallback to be 100% safe
Carlos Sanchez [Tue, 17 May 2022 17:37:21 +0000 (10:37 -0700)]
Revert "Address some System.Formats.Tar TODOs (infra and syscalls) (#69107)" (#69442)
This reverts commit
54083237da17f8ce04a98bf70ddd716d604ce628.
Ankit Jain [Tue, 17 May 2022 17:01:00 +0000 (13:01 -0400)]
[wasm][debugger] Extract the main run loop from DevToolsClient, and (#69219)
* [wasm][debugger] Extract the main run loop from DevToolsClient, and
.. DevToolsProxy into a separate class, which would allow having the
same features, and having only one place for the fixes.
* Fix harness tests
* fix merge error
Tom Deseyn [Tue, 17 May 2022 16:34:49 +0000 (18:34 +0200)]
Add clang 14 to known compiler versions. (#69249)
* Add clang 14 to known compiler versions.
* NativeExports: strip 'unknown compiler' and other stderr output when determining compiler path.
Theodore Tsirpanis [Tue, 17 May 2022 16:31:36 +0000 (19:31 +0300)]
Support ref fields in `System.Reflection.Metadata.Ecma335.BlobEncoder`. (#69378)
* Support ref fields in `System.Reflection.Metadata.Ecma335.BlobEncoder`.
Fixes #68309.
A test case was added.
Tomas Weinfurt [Tue, 17 May 2022 16:22:41 +0000 (09:22 -0700)]
remove duplicate Connect logic from TcpClient (#67951)
Lakshan Fernando [Tue, 17 May 2022 14:28:28 +0000 (07:28 -0700)]
Fix for GetMemberWithSameMetadataDefinitionAs (#69284)
* Test fix for GetMemberWithSameMetadataDefinitionAs
* get reflection tests clean
* add doc info to test a library in native aot
Marie Píchová [Tue, 17 May 2022 14:17:47 +0000 (16:17 +0200)]
Fixed work with QUIC_BUFFER (#69351)
Eric Erhardt [Tue, 17 May 2022 13:27:07 +0000 (08:27 -0500)]
Add some assertions to Stream.Read in System.Text.Encoding.CodePages (#69414)
* Add some assertions to Stream.Read in System.Text.Encoding.CodePages
BaseCodePageEncoding is relying on Stream.Read to read a full buffer of data in a single read. This is safe to assume because the only stream ever used is an UnmanagedMemoryStream, which will just copy the data to the buffer.
Adding some asserts to the code to make this assumption explicit.
CyrusNajmabadi [Tue, 17 May 2022 13:19:12 +0000 (06:19 -0700)]
Make json source generation cancellable (#69332)
* Make json generation cancellable
* Simplify
* no var
* Update src/libraries/System.Text.Json/gen/JsonSourceGenerator.Roslyn3.11.cs
* Update src/libraries/System.Text.Json/gen/JsonSourceGenerator.Roslyn3.11.cs
* Update src/libraries/System.Text.Json/gen/JsonSourceGenerator.Roslyn3.11.cs
Co-authored-by: Sam Harwell <sam@tunnelvisionlabs.com>
Co-authored-by: Sam Harwell <sam@tunnelvisionlabs.com>
Eric Erhardt [Tue, 17 May 2022 10:55:34 +0000 (05:55 -0500)]
Optimize ManifestResourceStream.Read(Span<byte>) (#69412)
ManifestResourceStream is derived from UnmanagedMemoryStream. UnmanagedMemoryStream optimizes Read(Span<byte>), but only if the instance is concretely an UnmanagedMemoryStream. This is to protect in case the derived Stream overriddes Read(byte[], int, int) prior to the Read(Span<byte>) overload being introduced.
Optimize ManifestResourceStream by overriding Read(Span<byte>) and call ReadCore, so the Stream.Read(Span<byte>) logic of using a pooled byte[] buffer isn't used.
Jakob Botsch Nielsen [Tue, 17 May 2022 10:19:18 +0000 (12:19 +0200)]
Allow the inliner to substitute for small arguments (#69068)
Since we no longer have contextual nodes to indicate small arguments,
this should be safe to do. For register arguments it does not matter and
for stack arguments it is handled in codegen (for macOS arm64).
Kunal Pathak [Tue, 17 May 2022 03:30:02 +0000 (20:30 -0700)]
Use intrinsic for genLog2() (#69333)
* Use intrinsic for genLog2()
* Use correct macro
* Fix non-msvc build
* fix 32-bit build
* just do for TARGET_64BIT
* Review comments
Carlos Sanchez [Tue, 17 May 2022 02:45:30 +0000 (19:45 -0700)]
Address some System.Formats.Tar TODOs (infra and syscalls) (#69107)
* Fix Design time build errors by removing src project as dependency of the test project.
* Add Browser to target platform identifiers. Ensure Browser can consume the Unix specific ArchivingUtils file too.
* Remove nullable enable from csproj since it's now default
* Use FileStream constructor with FileMode.CreateNew to detect and throw if destination file exists when creating archive.
* No error checking on syscalls that do not set errno.
* Add RDev field in FileStatus and retrieve it with stat/lstat so devmajor and devminor get their correct values.
* Simplify some File.Open calls with direct FileStream constructor calls. Simplify FileStreamOptions objects too.
* Implement and consume p/invokes to retrieve uname from uid and gname from gid.
* size_t variables should not be checked for negative values
* FileStream calls simplified to File.OpenRead
* Remove check for RDev > 0
* Use dictionary to preserve repeated unames and gnames mapped to uids and gids
* Missing documentation in pal_uid.h new PALEXPORT methods.
* Adjust syscalls to thread-safe ones. Start with stackalloc, then use loop.
* Make dicts readonly and non-nullable, use TryGetValue
* Reuse 'GetNameFromUid' from pal_networking.c, move to pal_uid.c, use similar logic for Gid method. Simplify Interop.Sys method.
* Remove unnecessary comment
Co-authored-by: Adam Sitnik <adam.sitnik@gmail.com>
* Put TargetFrameworks back in the first position of the PropertyGroup.
* Address eerhardt suggestions
* Update src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntry.File.Tests.Unix.cs
* Clarify in pal_uid.h methods comments that new memory is returned
Co-authored-by: carlossanlop <carlossanlop@users.noreply.github.com>
Co-authored-by: Adam Sitnik <adam.sitnik@gmail.com>
Adeel Mujahid [Tue, 17 May 2022 01:43:57 +0000 (04:43 +0300)]
Delete ClrDirectoryEnumerator (#69400)
* Delete unused PAL functions
* Delete ClrDirectoryEnumerator
Aaron Robinson [Tue, 17 May 2022 01:38:26 +0000 (18:38 -0700)]
Add support for marshalling signed/unsigned boolean types. (#69402)
Kevin Jones [Tue, 17 May 2022 00:33:55 +0000 (20:33 -0400)]
Cleanup some X509 PAL allocations
Jan Kotas [Mon, 16 May 2022 23:57:47 +0000 (16:57 -0700)]
Add correct assembly context name to InvalidCastException message (#69346)
* Add correct assembly context name to InvalidCastException message
Fixes #69341
* Move GetNameForDiagnostics to assemblybinder.cpp/assemblybinder.h
Elinor Fung [Mon, 16 May 2022 23:23:34 +0000 (16:23 -0700)]
Fix LibraryImportGenerator.UnitTests.Compiles.ValidateSnippetsFallbackForwarder (#69398)
Mike McLaughlin [Mon, 16 May 2022 22:11:36 +0000 (15:11 -0700)]
Fix ASAN violation under Samsung's netcoredbg (#69339)
* Fix ASAN violation under Samsung's netcoredbg
Fixes issue https://github.com/dotnet/runtime/issues/62281
The wrong holder was being used in DacDbiInterfaceImpl::GetNativeVarData(); change to NewArrayHolder.
Added new/delete operators to Exception so when it is thrown from the DAC and caught/deleted in DBI, the
correct C++ allocator is used. When the DAC is called by DBI, g_pAllocator points to the DBI allocator.
* Code review feedback
Mike McLaughlin [Mon, 16 May 2022 22:10:16 +0000 (15:10 -0700)]
Workaround crash in Microsoft.DiaSymReader.Native (#68990)
* Workaround crash in Microsoft.DiaSymReader.Native
Issue: https://github.com/dotnet/runtime/issues/59077
The fix is to check if the module has a portable PDB in the debug directory
and use the well-tested managed portable PDB source/line number code.
Add support for in-memory embedded PDBs.