forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 9
Sync with upstream main branch #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
joshpeterson
merged 162 commits into
unity-main
from
bot-upstream-main-merge-2022-01-29
Jan 31, 2022
Merged
Sync with upstream main branch #37
joshpeterson
merged 162 commits into
unity-main
from
bot-upstream-main-merge-2022-01-29
Jan 31, 2022
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…56696) * Add custom attribute test * Adding test demonstrating issue dotnet#34267 * Solution for issue dotnet#34267 Replacing all values in property with the new collection, instead of just appending new values, leaving old values in place. * Incorporate review feedback Changing the variable name
…6670) Removing old, redundant unit tests that were actually never executed Migrating old tests to new test infrastructure with configurable LDAP/AD connections
* Dead code in native assembly name parsing * disallow `\u` escaping in assembly names * misc cleanup * forward slash is illegal escaped or not * ignore "language" attribute in assembly name ("culture" must be used) * duplicate attributes are ok if unrecognized (just add tests) * drop support for "custom" blob attribute * drop support for publickey[token]=neutral ("null" must be used) * ignore unknown assembly name attributes in mono (compat) * disallow \0 anywhere in the assembly name * disallow \0 in assembly names on mono (compat) * only check for embedded nulls when parsing * fix mono build * make GCC happy * couple test scenarios for publickey vs. publickeytoken (CoreRT parser might trip on these) * produce errors on duplicate known attributes in mono
Ensure that cached LdapConnection instances created by PrincipalContext.ValidateCredentials are disposed when the corresponding PrincipalContext is disposed. Fix dotnet#62035
* Add mono and coreclr runtime support for ref fields * Update Reflection.Emit tests to validate ref fields. Add test for TypedReference as a ref field.
* Split unix-arm64 into linux-arm64 and osx-arm64 in src/coreclr/scripts/superpmi-replay.proj * Split unix-arm64 into linux-arm64 and osx-arm64 in src/coreclr/scripts/superpmi-asmdiffs.proj * Add all subdirectories of $(SuperPMIDirectory) as PMIPATH in src/coreclr/scripts/superpmi-collect.proj
- Make sure FieldRVA pointers remain aligned as required by the code generator - Use the same Packing Size approach as the IL Linker will use (See jbevain/cecil#817 for details) - Compilers that generate CreateSpan will need to follow that trick to be compatible with rewriters. - Provide ECMA spec augment describing packing size detail
* Align MappeFieldDataStream at 8 byte boundary * Add test to verify that the mapped field rva data blob is aligned to ManagedPEBuilder.MappedFieldDataAlignment * Only align when the mapped field data is of size not equal to 0
This implements hashing and HMAC statics for streams. Additionally, "LiteHmac" and "LiteHash" were introduced. The existing HMAC and hash provider functionality do some bookkeeping we don't need for resetting. Since we do not need to use these hash handles after the digest has been finalized, resetting is unnecessary work. For HMAC, that also means keeping a copy of the key around for some implementations which we don't need to do. The LiteHash and LiteHmac types are implemented as structs with a common interface. To avoid boxing, generics are used and constrained to the interface where possible. The Browser implementation just defers to the existing HashDispenser rather than do anything novel. The HashProviderCng is somewhat specialized in its ability to reset. It did up-front check to determine if the platform supported reusable hash providers, and further had a single implementation for HMAC and Digests. The current Lite hash design requires that they remain separate types.
…inting empty messages (dotnet#64151) Sync ILLink.Shared folder with the latest version in dotnet/linker main branch List of changes include: - Enforce title and message resources to exist to prevent printing empty messages - All diagnostics produced by linker now have a DiagnosticId, a title and a message - Schema for xml link attributes file - Added a readme file to the ILLink.Shared project to keep track of the commit is being used from dotnet/linker
Porting MD4 managed implementation from mono/mono (MD4.cs and MD4Managed.cs). It adds: - an internal class in the System.Net.Security with a single HashData method for now; - a set of related MD 4 unit tests to System.Net.Security.Unit.Tests project.
…System.Collections.CtorFromCollectionNonGeneric<Int32> family of benchmarks. (dotnet#64091) These benchmarks manage to make GCHeap::Alloc into a hotspot, so the call to IsHeapPointer() at the end matters for performance.
…otnet#61297) * Make FileSecurity parameter nullable. * Add missing ArgumentException message for FileMode.Append. * Refactor tests to ensure FileSecurity is tested with all FileMode and FileSystemRights combinations. Separate special cases. * Remove exception that throws when FileSecurity is null. Ensure we have logic that can create a FileHandle when FileSecurity is null. Fix bug where FileShare.Inheritable causes IOException because it is being unexpectedly passed to the P/Invoke (it should just be saved in the SECURITY_ATTRIBUTES struct). Add documentation to mention this parameter as optional. Ensure all exceptions match exactly what we have in .NET Framework, with simpler logic. * Address suggestions Co-authored-by: carlossanlop <[email protected]>
The problem was that the comparison of a weighted refcount, which usually has the order of hundreds or tens, with a small digit like "4" was too weak and missed some cases where we were still trying to CSE cheaps floats across calls and ending up with lots of stack shuffling. Fix this by using different tuning parameters, namely the costs estimated for the uses and defs (increase them to account for the spills and reloads).
…ess dotnet/emsdk (dotnet#64098) Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…eTime update fails (dotnet#63912)
) The current choice of AsyncBufferSize resulted in the character buffer in the XmlTextReader being allocated on the Large Object Heap (LOH) Fixes dotnet#61459
* ignoring leading dot when comparin cookie domain * Simplify cookie comparing logic to equality and moving it to CookieComparer to fix the build * Domain comparing optimizarion and more unit tests * small check optimization * Renaming method
The mono_field_static_get_value method uses a handle, but did not set up enter/exit macros properly, so this handle was leaked. Some code in Unity calls this embedding API method pretty often, which can lead to the mark stack overflowing in the GC code.
Official builds are currently not building NativeAOT CoreLib. For unknown reasons the official build splits native build and managed build of the CoreCLR partition. We had a convenient clr.nativeaotlibs subset that built both the native part and managed part. Managed part can't be built without the native part, so it makes sense. To satisfy official build's weirdness, we need to split this into two subsets so that we can tell the official build to build the managed part. (Official builds already build everything in the native part, so we're good there.)
…LoggerMessageGeneratorEmitterTests with ActiveIssue (dotnet#64436) Addresses dotnet#64344 (comment) ... and skips System.Reflection.Emit.Tests.ModuleBuilderDefineInitializedData.DefineInitializedData_EnsureAlignmentIsMinimumNeededForUseOfCreateSpan test which requires reflection emit and fails on tvOS arm64 leg.
…net#64359) When hot-reloading code with new lines added, VS automatically updates the breakpoints by sending Remove/SetBreakpoint commands. Add a test case for the reload, with simulated VS part.
This allows for AttributeCertificateV1/AttributeCertificateV2/OtherCertificate entries in the SignedCms without causing a decode error. That data is not presented to callers via the SignedCms object, but the behavior is consistent with SignedCms on .NET Framework and its underlying WinCryptMsg counterpart. Co-authored-by: Jeremy Barton <[email protected]>
…ired by Xamarin (dotnet#64234) * Expand System.Runtime.InteropServices.NFloat to support the APIs required by Xamarin * Apply suggestions from code review Co-authored-by: Rolf Bjarne Kvinge <[email protected]> * Adding NFloat tests (p1) * Temporarily disable negative conversions involving nfloat->nint * Adjusting the skip condition for the Mono failures * Adding additional tests covering the NFloat.Is* APIs * Fixing the IsNormal and IsSubnormal test to account for 64-bit vs 32-bit Co-authored-by: Rolf Bjarne Kvinge <[email protected]>
Adds ArgumentException.ThrowIfNullOrEmpty and then uses it in a bunch of places around the tree. Most of the replaced places used a resource string for the message, and I used it in places where it didn't feel like we were losing any meaningful information by centralizing on the single shared string, but I didn't use it in places where the resource string message used in the empty case conveyed something that seemed useful, e.g. a recommendation on what to use instead of an empty string. There are a few places where I allowed for order of exception throws to change in the case where there were multiple user errors and the validation for a single argument was split, e.g. I changed a few cases of: ```C# if (arg1 is null) throw new ArgumentNullException(...); if (arg2 is null) throw new ArgumentNullException(...); if (arg1.Length == 0) throw new ArgumentException(...); if (arg2.Length == 0) throw new ArgumentException(...); ``` to: ```C# ArgumentException.ThrowIfNullOrEmpty(arg1); ArgumentException.ThrowIfNullOrEmpty(arg2); ``` even though it'll produce a different exception for `M("", null)` than it would previously. Technically a breaking change, but given this is a case of multiple usage errors and all the exceptions are ArgumentException-based, I think it's acceptable. I wanted to get this in before we do the massive !! conversion, as I expect !! auto-fixes will make it a bit harder to roll this out. I explicitly did not do anything to roll out use of ArgumentNullException.ThrowIfNull, except in cases where I was modifying a method to use ArgumentException.ThrowIfNullOrEmpty, in which case for consistency I changed anything else in the function that could have been using ThrowIfNull to do so.
* Optimize order of morphing "fgMorphCommutative" exposes information to the later transforms that make them more precise. For example, "MUL(MUL(X, CONST1), CONST2)" is now morphed properly into a single "mul" instead of one "mul" plus a shift and lea in case "CONST2" was a viable candidate for "mulshift". Another example is how "fgMorphCommutative" can end up with an "ADD(X, 0)" that was only being discarded in lowering. * Fold (x + 0) => 0 for LONGs on 32 bit * Enable one opt outside global morph No reason not to. Just a few diffs. * Disable mulshift on ARM/64 No LEAs - no point.
Switch from pointers to refs to avoid pinning the inputs. As part of this, I also consolidated the fast-path that was there specifically for string inputs to also apply to span inputs, char arrays, pointers, etc.
* Check for CMAKE_C_COMPILER_ID not CXX In some cases, CMAKE_CXX_COMPILER_ID might not be populated, which causes the toolchaine prefix checks to be ignored, which causes the build to look for `ranlib` not `llvm-ranlib`, which causes it to use XCode ranlib instead of Android NDK ranlib for builds, which doesn't work. Hopefully (we'll see what CI says) this doesn't regress other builds. Closes: dotnet#55412 * Update eng/native/configuretools.cmake Co-authored-by: Adeel Mujahid <[email protected]> * Use llvm-objcopy, not GNU, on Android It's available in r21 (which we use today) and works for r23 (which has no GNU objcopy any more and breaks without this change) Co-authored-by: Adeel Mujahid <[email protected]>
* remove support for Ssl2 * update test * update exeception type * remove Sslv2 test
When uploading a JIT rolling build, use the git hash of the most recent JIT change, not the git hash that was actually built. This handles the case where a JIT change kicked off an AzDO pipeline, but the pipeline didn't start until after one or more additional changes were merged. The AzDO pipelines appear to fetch with `-depth=20`, which should provide enough history for almost any case. Fixes dotnet#64392
* GetManifestFile() --> GetPEAssembly() * GetManifestImport() -> GetMDImport() * removed GetCurrentAssembly(), GetLoadedAssembly() * removed GetCurrentModule(), GetLoadedModule() * fix * removed DomainFile::ModuleIterator * renamed Assembly::GetManifestModule() --> GetModule() * Removed Assembly::ModuleIterator * move most fields off DomainAssembly * DomainAssembly is a complete proxy * some DomainFile --> DomainAssembly renames. * deleted DomainFile class * renamed files * a few minor cleanups * DomainAssembly does not need to have VPTR_. Couple other changes. * More DomainFile --> DomainAssembly renames * More DomainFile --> DomainAssembly renames * a few more renames * removed domainassembly.inl * domainassembly.h cleanup * make gcc happy * couple more changes * fixed build after rebasing * PR feedback * more PR feedback
We were not calling `genProduceReg` in one case, leading to a missing def and liveness assert. Normally this would have been a temp assign followed by a copy to a local; evidently we don't track liveness for temps and so don't notice the missing def, and the subsequent copy defs the local and all seems well. Forward sub gets rid of the copy and exposes the issue under jit stress.
* Remove set false to CheckForOverflowUnderflow due to it is disabled by default * Use checked instead of CheckForOverflowUnderflow
UnityAlex
approved these changes
Jan 31, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an automatically generated pull request to merge changes from the upstream main branch.