* Fix zlib-ng build failure caught in the sdk repo.
Fixed by converting its NativeLibrary entry in Microsoft.NETCore.Native.Unix.targets to a NetCoreAppNativeLibrary, and place it after System.IO.Compression.Native, to ensure the linker detects the symbols, since it is unable to look back.
* Guard the call to `IsDefined(typeof(CompilerGeneratedAttribute))` from throwing.
An `IsDefinedSafe` method was added that returns false if checking for the attribute throws, and other usages in the file were updated as well. This also allows us to remove a big try catch block.
* Guard getting the `StateMachineAttribute`s from throwing.
Applications should include <procfs.h> not <sys/procfs.h>
If there's actually some need to directly include sys/procfs.h
then one should #define _STRUCTURED_PROC 1
as explained in the procfs.h file
* Disable (No)ClientCert_DefaultValue_ResumeSucceeds only on Ubuntu 18 ARM
* Update ubuntu images to 20.04 instead
* Use Ubuntu 22.04
* Revert "Use Ubuntu 22.04"
This reverts commit 0d421162f420cc1d1107b80453e787c8013da864.
Our target ISA is rv64gc, not gcv. If kernel can't detect RISC-V extensions, zlib-ng defaults has_rvv to true, which crashes on hardware without vector instructions like VisionFive 2.
When strength reduction has to find an insertion point for the new
primary IV update it needs to find a block that post-dominates all the
users of the IV. This was using `optReachable` before, but that is
conservative since it finds paths that may exit the loop. This
implements a more precise check.
* Bump the stj version to avoid error
* System.Net.Http.Json does not have version 8.0.4, changing to net9 prev 5
---------
Co-authored-by: Ilona Tomkowicz <32700855+ilonatommy@users.noreply.github.com>
* Rent object[] rather than (uint,uint)[][] from the ArrayPool
* Remove unnecessary TInputReader generic from functions
* Add more comments and do some renames
* Remove unused TFindOptimizationsHandler from FindEndPositionDeltasNFA
* Fix a stray input reader
* Some more renames
* Avoid duplicated reads of input character and nullability info
* Remove initialStateId from TryFindNextStartingPosition and make initial accelerators more similar
* Remove unused initialStatePos / initialStatePosCandidate
It's only ever written and not actually used for anything.
* Remove unnecessary generic args and remove resulting dead code
Multiple XxDfa / XxNfa methods took a TStateHandler, but it was only ever DfaStateHandler for XxDfa or NfaStateHandler for XxNfa. We can just use the types directly in those methods, rather than generically parameterizing. Doing that revealed all but one of the members of IStateHandler weren't needed on the interface. And removing those revealed a bunch of dead code on DfaStateHandler/NfaStateHandler, which were removed, as well as arguments to some methods that weren't used.
* Put GetStateFlags back in IStateHandler and use it to avoid duplication at call sites
* Put out argument last in TryCreateNewTransition
* Store state to local in FindStartPositionDeltasDFA
* Merge IAcceleratedStateHandler into IInitialStateHandler
* Remove MintermClassifier.IntLookup
* System.Runtime.Serialization.Formatters: fix target framework check for source-build.
The inbox implementation should no longer include a working binary formatter.
The check used to build a working formatter was '$(TargetFramework)' == '$(NetCoreAppMinimum)'.
Because NetCoreAppMinimum gets set to TargetFramework in the source-build configuration,
the source-build configuration unintentionally included a working binary formatter.
* Don't build the net8.0 target when DotNetBuildSourceOnly.
* Join lines.
* enable ShortDatePattern tests + refactor
* LongDatePattern correct format
* LongDatePattern tests
* fix EnumDatePatterns AddRange for Apple Hybrid
* remove duplicate invariant ShorDatePattern test
* remove duplicate en-US LongDatePattern case
* MonthDayPattern test cases
* add _ICU suffix to DatePattern names
* DayNames ICU test cases
* AbbreviatedDayNames ICU tests
* Move GetCalendarInfoNative to EnumCalendarInfo ICU
* MonthNames test suit for ICU
* AbbreviatedMonthGenitiveNames ICU test suit
* AbbreviatedMonthNames ICU test suit
* MonthGenitive ICU test suit
* refactor CalendarData.iOS.cs
to use more of the shared CalendarData.ICU code
* refactor new DateTiemFormatInfo* API tests
* Throw HttpProtocolException in case we get a GOAWAY frame while waiting for next frame on response
* Fix helper method names
* Apply suggestions from code review
Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>
* Code review feedback
* Revert method names
* Fix test with the new behavior
---------
Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>
* Fix ISOSDACInterface::GetThreadData reading the GC alloc context.
The RuntimeThreadLocals struct that the gc_alloc_context is in wasn't being added
to dump in Thread::EnumMemoryRegions.
* src/mono/mono/mini/mini-posix.c
- Add signal handler for SIGTERM
* src/mono/mono/mini/mini-windows.c
- Add signal handler for SIGTERM
- Use the correct signal for handler
* src/mono/mono/mini/mini-runtime.c
- Add mono_sigterm_signal_handler to process SIGTERM that will set a global variable
to be monitored by the GC finalizer thread
- Set a default exit code before setting the term_signaled variable that gets checked in gc
* src/mono/mono/mini/mini-runtime.h
- Define prototype for mono_sigterm_signal_handler()
* src/mono/mono/metadata/gc.c
- Monitor for sigterm and kick off the shutdown process when encountered by calling mono_runtime_try_shutdown().
- Exit with either the user set exitcode (System.Environment.ExitCode) or SIGTERM + 128.
- Simplify use of exit code now that a default is being set
- Rename term_signaled to match mono style
- Remove volatile attribute
- Move testing of shutdown until after the sem wait
* src/libraries/System.Runtime/tests/System/ExitCodeTests.Unix.cs
- Re-enable ExitCodeTests for mono
* src/mono/mono/mini/exceptions-amd64.c
src/mono/mono/mini/exceptions-x86.c
- Add control event handling for windows
Co-authored-by: Jo Shields <directhex@apebox.org>
* Don't dispose timers if we're in our UnhandledException handler.
* Account for non-fatal exceptions. Safer 'disposing' of timer handle ref.
* Volatile not necessary for single read of 32-bit int which is only updated with Interlocked.
* [ICorProfiler] Add new ICorProfilerInfo API to enumerate gc heap
* Update generated corprof.h
After making changes to corprof.idl and building the clr subset
the generated corprof.h needs to be manually copied over from
the artifacts obj directory into the prebuilt directory.
* [ICorProfiler] Extend header and source files to ICorProfilerInfo15
* [ICorProfiler] Add EnumerateGCHeapObjects skeleton
* [ICorProfiler] Add EnumerateGCHeapObjects implementation
Add parameter check
Add SuspendEE akin to SuspendRuntime
Add DiagWalkHeap
Add RestartEE akin to ResumeRuntime
* [GC] Add IGCHeap API to enumerate GC Heap objects outside of GC
* Cleanup
* [GC] Update gc interface minor version
* Match callback PascalCase
* Address feedback - naming and description
* Cleanup
* Add EEToProf EnumerateGCheapObjectsCallback wrapper
Profilers may want to inspect objects encountered through the callback
with synchronous ICorProfilerInfo APIs. Wrapping the GC Heap walk
within a EEToProfInterfaceImpl helper with a CLR_TO_PROFILER_ENTRYPOINT
macro allows proper setting of callback state flags.
* [Profiler][Tests] Add EnumerateGCHeapObjects unit test
* Address feedback
As EE may be suspended outside of ProfToEEInterfaceImpl::EnumerateGCHeapObjects,
conditionally suspend/resume EE if no prior suspension is in progress.
* [ICorProfiler] Mitigate runtime suspension racing with EnumerateGCHeapObjects
As the runtime may be suspended in other ways, error if not a profiler
requested suspension similar to ProfToEEInterfaceImpl::RuntimeSuspend
* [ICorProfiler] Update Callback helper contract
As EnumerateGCHeapObjectsCallback should only be invoked by
ProfToEEInterfaceImpl::EnumerateGCHeapObjects which suspends EE,
signal that no other EE suspension should occur with GC_NOTRIGGER
and kEE2PNoTrigger.
Inherit MODE_ANY from EnumerateGCHeapObjects
* Update test cases
* [ICorProfiler] Change Suspend/Resume Runtime to Asynchronous
* [Tests] Update profiler requested runtime test
* fixup
* Add test for background EnumerateGCHeapObject
* Set profiler requested runtime suspend flag
* Fix symbol exports
* Try fix compiler issues
* Allow runtime to resume before returning
* Fix compilation errors on non-windows platforms
* Lower expected object count
* Add profiler requested runtime suspension note
* [Tests] Protect custom test object from GC
* Fix Profiler Runtime Suspension test
* Expect to resolve classes during heap walk
* Address feedback
* Update EnumerateGCHeapObjects usage description
* Add validation to extract class fields from objects
* Cleanup
win-x86 tpdiff is hitting this timeout right towards the end of the last
collection it needs to run over. Up the limit by 2 hours like we did for
the pipeline itself in a33eb5c.
* Use latest released SDK for HttpStress.
This PR removes the .1xx suffix on the channel of the installed SDK to allow
installing more recent SDKs.
* Apply to SslStress as well
- Raise limits for when to switch from DFA to NFA and for when to fail to build because the predicted NFA size is too large to handle.
- Cache nullability information for each minterm to make computing it cheaper.
- Cache minterm information for all characters that map to a minterm other than zero, avoiding expensive computation per step for each non-ASCII character encountered.
- Reduce inner hot loop overhead for patterns not containing an end Z anchor and for having fewer than 256 minterms (more than that is rare).
- Reduce the frequency of timeout checks that were both costly and unnecessarily frequent to achieve the goal
---------
Co-authored-by: ieviev <ieviev@users.noreply.github.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Dan Moseley <danmose@microsoft.com>
* Use ARM64 tools when building on ARM64 hosts
* Fix cross-compiling arm64 from x64
* Update src/coreclr/build-runtime.cmd
Co-authored-by: Steve <hez2010@outlook.com>
---------
Co-authored-by: Steve <hez2010@outlook.com>
* Ensure that we create a valid GT_IND node
* Remove a bad assert in the associative morphs
* Ensure that we check for GT_NULLCHECK when handling containment
* Fix a bad assert for x64
* Ensure we properly check for ConvertMaskToVector
* Fix the memory size used for some vbroadcast instructions in disasm and asserts
* Ensure rewriting WithElement takes into account unsupported ISAs
* Ensure we check FEATURE_HW_INTRINSICS
* Apply formatting patch
DSA parameters have a very rigid structure. We can do some checks
before we create a lot of `byte[]` to package the data to pack into
a different buffer to send to the OS library.
Checking primality and any other actual value coherency is left to
the underlying cryptographic library, these just filter egregious errors.
* Revert "Add Avx512 support to IndexOfAnyAsciiSearcher (#103710)"
This reverts commit ce1ae77f9f.
* Keep the test improvements
* Keep the inlining changes
* Keep the shift improvements
Assuming we don't run across a case where we need to service in
an AppContext switch for compat, we should look at replacing BigInteger
with Int128 in a subsequent release.