* Bring in the zlib-ng source code into the repo but without plugging it in yet.
* Include the required zlib-ng license and version changes.
* Remove the zlib-ng/doc/ and zlib-ng/tests/ folders and mention this in the newly added zlib-ng-version.txt file.
* Initial fuzzing setup
* Initial pipeline
* Install sharpfuzz to the working directory
* Initial instructions
* Add a few helpful links
* Enable OneFuzz deployment task
* Remove BlameAlias default
* Speed up headers fuzzer
* Add BoundedMemory reference
* Use BoundedMemory in SearchValues targets
* Swap property order
* Add a UTF8 fuzzing target
* Reuse instrumented assemblies when unchanged
* Add support for using dictionaries
* Add simple json fuzzing target
* Mention SharpFuzz in THIRD-PARTY-NOTICES.TXT
* Tweak readme
* Don't reuse assembly if prefixes changed
* Temporarily disable dictionary files
* Avoid name conflicts between CI jobs and test submissions
* Add some basic OneFuzz docs
* Add PooledBoundedMemory to fuzzer sample
* Typo
* More docs
* Avoid transcoding overhead in Json fuzzer
* Enable cron schedule
* Tweak docs
* Fix OneFuzz dictionary file paths
* Workaround OneFuzz issue with multiple jobs in deployment
* Clarify what alias to use
* Test JsonDocument instead of JsonSerializer
* Get rid of BlameAlias
* Tweak getters
* Remove a few unused helpers
* Tweak OneFuzz workaround comment
* Remove StringBuilder use
* Avoid misaligned-span UB
* Upgrade zlib to 1.3.1
* Update cgmanifest.json and THIRD-PARTY-NOTICES.TXT
* [PATCH] Make zlib compile clean against C4244 clang equivalent is
"implicit-int-conversion" warning
The change to deflate.c is legal because 'len' has an upper bound of
MAX_STORED, which means it fits cleanly into a 16-bit integer. So
writing out 2x 8-bit values will not result in data loss.
The change to trees.c is legal because within this loop, 'count' is
intended to have an upper bound of 138, with the target assignment
only executing if 'count' is bounded by 4. Neither the 'count' local
in isolation nor the addition that's part of the target line is
expected to result in integer overflow. But even if it did, that's a
matter for a different warning code and doesn't impact the correctness
of the narrowing cast being considered here.
Co-authored by: Levi Broderick <levib@microsoft.com>
* Merge and remove common files
Remove arcade eng\common directory in src\tools\illink since now we will use the runtime arcade infra
Remove build.cmd/build.sh and lint.cmd/lint.sh in src\tools\illink directory since now they will execute via a subset
Remove/Merge common files from src\tools\illink root:
- .gitattributes
- .gitignore
- .github
- .gitmodules
- after.illink.sln.targets
- code_of_conduct.md
- global.json
- LICENSE.txt
- NuGet.config
- THIRD-PARTY-NOTICES.TXT
Remove/Merge common files from src\tools\illink\eng:
- Build.props
- Publishing.props
- Signing.props
- SourceBuild.props
- SourceBuildPrebuiltBaseline.xml
- Tools.props
- Version.Details.xml
- Versions.props
* Create subsets to be able to build illink
Create a variable for the tools folder in runtime
Add subsets tools.illink and tools.illinktests for building illink and unitest it
Add Microsoft.DotNet.Cecil dependencies to runtime and to illink projects
Some workarounds to be able to build illink
Delete some cecil information from the external folder since now its a package
* Refactorings to make test work
Test projects use to have relative paths based on the current working directory to know where to find stuff, now that the project is in a different place things are not found, this commit changes to instead use MSBuild variables to calculate where things are
Add the cecil package to tests
Change a cecil test that verify the official package name to only care about the important pieces
* Enable pipeline
Add a variable to recognize when illink contains a change, and set an exclusion of the src/tools/* for other repos
Reuse the dotnet-linker-tests pipeline file to also run illink unitests every time there are illink changes
* Fix Markdown lint
* Remove checked-in binaries
* Use nunit for linker tests and fix cecil version test
* Add XxHash3
* Add more XxHash3 test cases
* Cull back volume of test cases, and line wrap to help editor performance
* Address PR feedback
Co-authored-by: Eugene Sirkiza <esirkiza@microsoft.com>
* Improve performance of integer formatting
1. The DivRem(..., 10) for each digit in the number ends up being the most expensive aspect of formatting. This employs a trick other formatting libraries use, which is to have a table for all the formatted values between 00 and 99, and to then DivRem(..., 100) to cut the number of operations in half, which for longer values is meaningful.
2. Avoids going through the digit counting path when we know at the call site it won't be needed.
3. Employs a branch-free, table-based lookup for CountDigits(ulong) to go with a similar approach added for uint.
* Address PR feedback (move license notice)
- zlib updated to v1.2.12
- zlib-intel updated to v1.2.12_jtk.1
Also required additional minor tweaks (documented in zlib-version.txt and zlib-intel-version.txt) to get the build to work.
* Remove unused AllowZeroAllocator and
DefaultAllocator.
* Remove static_assert_n.
* Remove the native Regex implementation and replace
with a minimal version from TPOP.
Add attribution in third party notices.
* 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
Can not properly triage VS4Mac failures.
The amd64 frameless compact encoding is being used now in MacOS version 12 and needed to be implemented.
Issue: https://github.com/dotnet/diagnostics/issues/2924
* Including FastFloat in parsing process
* PR step 1 - adjusting code in regards to received comments.
* DigitsToUInt64 : Parsing batches of 8 digits with SWAR
* Update src/libraries/System.Private.CoreLib/src/System/Number.NumberToFloatingPointBits.cs
Co-authored-by: Günther Foidl <gue@korporal.at>
* Update src/libraries/System.Private.CoreLib/src/System/Number.NumberToFloatingPointBits.cs
Co-authored-by: Günther Foidl <gue@korporal.at>
* MaxMantissaFastPath fix
* merge problem...
* Revert "merge problem..."
This reverts commit 1b5fd5136a5396c6439ffd47ef46d0c8b3134693.
* removing an extra comparison for fast path.
* According to PR review, all requested changes are in this commit.
* According to new serie of comments on this PR.
* Fixing formatting.
* fixing sentence ending in comments
* Update THIRD-PARTY-NOTICES.TXT
Adding license notice for FastFloat algorithm
* Update src/libraries/System.Private.CoreLib/src/System/Number.NumberToFloatingPointBits.cs
Co-authored-by: Tanner Gooding <tagoo@outlook.com>
* Identation of power of 5 table
* some adjustements according to reviewer's requests.
* Unnecessary assignment of a value to 'exponent'
* removing excedent path for total digits < 7
* removing path for totaldigits <7
* getting rid of unused power of 10 table
* Renaming FastFloat specific values
Specifying infinitePower param as hexa
* renaming some variables and adjusting comments.
* Handle endianness swapping for BigEndian systems.
Co-authored-by: Günther Foidl <gue@korporal.at>
Co-authored-by: Tanner Gooding <tagoo@outlook.com>
* Improve "lastChar == firstChar" case, also, use IndexOf directly if value.Length == 1
* Try plain IndexOf first, to optimize cases where even first char of value is never met
* add 1-byte implementation
* copyrights
* fix copy-paste mistake
* Initial LastIndexOf impl
* More efficient LastIndexOf
* fix bug in Char version (we need two clear two lowest bits in the mask) & temporarily remove AdvSimd impl
* use ResetLowestSetBit
* Fix bug
* Add two-byte LastIndexOf
* Fix build
* Minor optimizations
* optimize cases with two-byte/two-char values
* Remove gotos, fix build
* fix bug in LastIndexOf
* Make sure String.LastIndexOf is optimized
* Use xplat simd helpers - implicit ARM support
* fix arm
* Delete \
* Use Vector128.IsHardwareAccelerated
* Fix build
* Use IsAllZero
* Address feedback
* Address feedback
* micro-optimization, do-while is better here since mask is guaranteed to be non-zero
* Address feedabc
* Use clever trick I borrowed from IndexOfAny for trailing elements
* give up on +1 bump for SequenceCompare
* Clean up
* Clean up
* fix build
* Add debug asserts
* Clean up: give up on the unrolled trick - too little value from code bloat
* Add a test
* Fix build
* Add byte-specific test
* Fix build
* Update IndexOfSequence.byte.cs
* Implement NativeMemory
* Exposing additional APIs as approved
* Ensure we have a test covering alignment and size being less than sizeof(void*)
* Update src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/NativeMemory.Unix.cs
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* Responding to PR feedback
* Adding additional alignment test coverage for 1 to 16384
* Add coverage for 65k and 1/2/4MB alignments
* Fixing the Native\Unix\System.Native\CMakeLists.txt
* Update src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/NativeMemory.Unix.cs
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* Don't call Buffer.Memmove in NativeMemory.AlignedRealloc if ptr is null
* Updating NativeMemory.AlignedRealloc to correctly copy only the size of the last allocation
* Ensure check_symbol_exists(HAVE_ALIGNED_ALLOC) is under the non-apple paths
* Check for malloc_usable_size in malloc_np for FreeBSD and ensure tests compile
* Fix the ReallocSmallerToLargerTest test
* Handle that posix_memalign differs from aligned_alloc for size == 0
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* Added C# implementation of System.Math.ScaleB and System.MathF.ScaleB, removed old bindings, added test cases.
* Moved tests into System.Runtime.Extensions tests.
* Removed unmanaged scalbn and scalbnf from pal and mono
* Update src/libraries/System.Private.CoreLib/src/System/Math.cs
Co-authored-by: Adeel Mujahid <adeelbm@outlook.com>
* Styling changes.
* Conditionally include ScaleB for Mono.
* Update src/mono/mono/metadata/sysmath.c
Tabs, not spaces.
Co-authored-by: Adeel Mujahid <adeelbm@outlook.com>
* Removing more scalb from PAL
* Completely removed ScaleB from Mono
* Cleaning up more scalbn
* Added comments for ScaleB, updated licenses for musl and Sun
* Fixed whitespace.
* Removing old references, fixing double ScaleB definition that merge didn't resolve
Co-authored-by: Adeel Mujahid <adeelbm@outlook.com>
* Initial snapshort of vxsort implementation incorporating source code from Dan Shechter.
* Bug fix from Dan.
* Use bigger mark list for experiments.
* Give up if the mark list size is bigger than a reasonable fraction of the ephemeral space.
* Latest version from Dan, disable for ARM64.
* Fixes for Linux compile, ended up disabling vxsort for Linux for now.
* Experimenting with 32-bit sort - the variation that gathers mark list entries pertaining to the local heap by reading the mark lists from all the heaps appears to be too slow and scales very badly with increasing number of heaps.
* 32-bit sort - preserve failing case.
* Do the pointer compression/decompression in place, to improve performance, optionally write mark lists and associated information to binary files for further analysis.
* Introduce runtime check whether CPU supports AVX2 instruction set.
* Implement mark list growth.
* Integrate new version including AVX512 code path.
* Implement runtime test for AVX512 support.
* Move the files for the vectorized sort to their own directory, add stubs to call AVX2 or AVX512 flavor of the sort.
* Get rid of unneeded #include statement in two files.
* Address codereview feedback to specifically say AVX512F instead of just AVX512 as there are multiple subsets.
* Fix CMakeLists.tx files for non-x64 non-Windows targets, introduce separate max mark list sizes for WKS, remove dead code from grow_mark_list, add #ifdef to AVX512 detection to make the other architectures build.
* Instead of modifying the tool-generated header file corinfoinstructionset.h, modify InstructionSetDesc.txt that it is generated from, and run the tools that generates all the files from it.
* Move AVX2/AVX512 instruction set detection to GC side.
* Use vectorized packer, switch packed range from uint32_t to int32_t, because that makes the sorting a bit more efficient.
* Add GCConfig setting to turn vectorized sorting off, streamline ISA detection (but require initialization), rename to IsSupportedInstructionSet.
* Several small improvements:
- Don't waste time sorting the mark list if background GC is running as we are not going to use it.
- Use smaller max mark list size if we cannot use AVX2/AVX512 instruction sets
- Fix mark list overflow detection for server GC.
* Address codereview feedback - add constants for the thresholds above which we use AVX/AVX512F instruction sets.
Add space before parameter lists as per GC codebase coding conventions.
Improve some comments.
* Add license headers and entry in THIRD-PARTY_NOTICES.TXT for Dan's vectorized sorting code.
* Update license headers
* Address code review feedback:
- fix typo in comment in InitSupportedInstructionSet
- move test for full GC to beginning of sort_mark_list
- in WKS GC, we can use the tighter range shigh - slow for the surviving objects instead of the full ephemeral range.
- make the description for the new config setting GCEnabledInstructionSets more explicit by enumerating the legal values and their meanings.
* Snapshot for Linux changes
* Add more definitions to immintrinh.h
* Fix cmake warnings about mismatched endif clauses.
* Disable Linux support for now due to multiple compile & link errors.
* Address code review feedback:
- add instructions to bitonic_gen.py
- centralize range and instruction set checks in do_vxsort
- add parentheses around expressions.
- removed some printfs, converted others to dprintf
- strengthened assert
* Add SIMD acceleration for Matrix4x4.Invert #34394
Fix for #34394.
Added SIMD hardware acceleration support to the Matrix4x4.Invert function.
* Add link to source and update THIRD-PARTY-NOTICES.TXT
Added the link to Microsoft/DirectXMath source code and appended license to THIRD-PARTY-NOTICES.TXT
* Add test for non-invertable matrix.
Given a Matrix4x4 of only rank 3 test to see the matrix is non-invertable.
* Typo fixed in new test case
* Fixed formating for test matrix.
* Fix for missing return statement.
* Add suggested fixes to Matrix4x4.Invert
Update containing all suggested fixes.
* Added missing using statement
Added missing using statement for Internal.Runtime.CompilerServices.Unknown static object.
* Use abbreviated constructor for Vector128
* Moved implementations into local functions
Moved the SSE implementation and SoftwareFallback to local functions of Invert.
* Adding the support of reusing machine-wide credentials in the case where
the machine is already domain-joined to the LDAP Server.
Co-authored-by: Alexander Chermyanin <flamencist@mail.ru>
* Addressing feedback and adding ldap4net to TPN
Co-authored-by: Alexander Chermyanin <flamencist@mail.ru>