Age | Commit message (Collapse) | Author | Files | Lines |
|
Staging change of System.Private.CoreLib for CoreFX #20846
|
|
We're not setting the member field until the end of construction.
|
|
(#12381)
Fix event, semaphore, mutex create/open to request the maximum allowed access
Functional fix for #11306
- Ported dotnet/corert@78fae17f5434839a8720603973ff53f27e27f916 to CoreCLR, see that commit for details on the hang during mutex creation that is also fixed by this change.
- Replaced all uses of the *_ALL_ACCESS flags relevant to events, semaphores, and mutexes
|
|
We're not going to get exemptions for these inside appcontainers
so we'll change them to behave as they do on Unix (present
an empty reg key that eats writes requests.)
|
|
Optimized Math.Sign
|
|
* Don't close passed in FileStream handles in constructor
As the finalizer will run when throwing we need to be
careful to make sure we don't put the passed-in handle
in the member field until we're sure we've succeeeded.
Additionally we need to make sure any wrapping SafeHandle
we create on a passed in IntPtr isn't collected.
* Move platform specific assertion and add comment.
* Comment- fix mistake in CanSeekCore
|
|
(#12365)
* Fixing CompareInfo AssemblyMode.Full serialization
* Adding reason why culture field is introduced
|
|
* Cleanup most code in StringBuilder
* Respond to PR feedback
* Document StringBuilder's fields
* VerifyClassInvariant -> AssertInvariants
* Fix always-true assert
* Respond to PR feedback from @stephentoub
|
|
IsWhiteSpaceLatin1 is not being inlined. By changing a range check done with two comparison operations to instead be done with a subtraction and a single comparison, the code is shortened to not only be less expensive but also then get inlined into IsWhiteSpace and then further into String.IsNullOrWhiteSpace. The net result is a measurable throughput improvement for IsNullOrWhiteSpace.
|
|
Merge nmirror to master
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
(#12349)
* Remove dead comparisons of unsigned primitive less than zero
* Delete bad assertition that is consistently hit using the Debug coreclr using the tests
|
|
|
|
(#12329)
|
|
We call Windows to get the sort version. We call Windows passing the structure NlsVersionInfoEx but Windows expect we have to initialize the size of this structure which we are missing.
|
|
* Remove dead code
* Arg_PathIllegal
* IO_PathTooLong
* Remove no longer necessary path sanitization
* Argument_PathFormatNotSupported
* Arg_PathIllegalUNC
* Arg_InvalidSearchPattern
* Dead strings
* Missing nameof
|
|
Small cleanup to Char.IsWhiteSpaceLatin1
|
|
Avoid duplicated computations with DateTime.GetDatePart
|
|
For some reason this is resulting in measurably better throughput, in particular for non-whitespace chars, so much so that it's visible in microbenchmarks against string.IsNullOrWhiteSpace.
If nothing else, it's cleaner.
|
|
Merge nmirror to master
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
- Remove duplicate code in GregorianCalendar. GetDatePart is identical to the implementation in DateTime. Just reuse it via the Year/Month/Day properties. Also avoids an unnecessary virtual call.
- Then copy GetDatePart into a version that returns year/month/day rather than just one of them.
- And use that in several places throughout corelib where all three are retrieved, avoiding redoing all of the calculations three times.
|
|
CurrentCulture used the static field s_userDefaultCulture which used to store the current culture. We always ensure this field is initialized all the time. When we introduced the v2.0 added APIs, we have added ClearCachedData(). This method was setting s_userDefaultCulture to null which can cause any other thread to throw this NullReferenceException if it is using s_userDefaultCulture. Here is example of such stack
System.NullReferenceException : Object reference not set to an instance of an object.
Stack Trace :
at System.Globalization.NumberFormatInfo.get_CurrentInfo()
at System.Double.ToString(String format, IFormatProvider provider)
|
|
|
|
Fix GetHashCode for ordinal comparer
|
|
* Rewrite of OpCodeGen.pl script to generate correctly IL OpCodes related C# code: FlowControl.cs, OpCodes.cs, OpCodeTypes.cs, OperandType.cs, StackBehaviour.cs from opcode.def file
* Update OpcodeType.cs to OpCodeType.cs in System.Private.CorLib.csproj
|
|
* Remove serializable attribute from OrdinalIgnoreCaseComparer
* Introducing OrdinalCaseSensitiveComparer to serialize correctly with netfx
* Updated PR feedback
|
|
The __arglist version of varargs is not supported on CoreCLR
Fixes issue #12146 - crossgen warning - Vararg calling convention not supported.
Added a new test case for String Concat
Added <DebugType>None
Fixed src\JIT\Directed\Misc\gettype csproj as well
|
|
This is a port a change from the Nuget version of this library.
Bascially it hashs in the process ID into the activity ID GUID. This make collisions across processes unlikely.
|
|
|
|
(#12181)
* DateTime serialization fixed, added attention labels to serialized fields
* CultureAwareComparer serialization fix
* Order or property fixed
|
|
Merge nmirror to master
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
Remove unused cache of Assembly flags while I was on it
|
|
* TypeForwardedFrom attributes on coretypes for NetFX serialization
* ValueTuple added
* Removed StubEnvironment typeforwards
* Modified FQAN for some special type forwards
* Support desktop to core serialization with InternalsVisibleTo for mscorlib
* Remove typeforwards from nested types
* Removed unused file
|
|
Merge nmirror to master
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
* Addtional fix for ETW failure in 32 process on 64 bit machines.
The commit associated with Pull Request
Fix failures in ETW logging on 4GB aware 32 bit processes #11941
Was incorrect. Some long were changed to ulong, but the critical casting an IntPtr to ulong still does
sign extention and not zero extension. Need to cast to a void* first. This fixes this.
|
|
|
|
|
|
Merge nmirror to master
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
IDeserializationCallback.OnDeserialization method. (#12024)
|
|
This is based on the following principles:
- We should not be making changes to instance/virtual methods
in the abstract base types for Reflection. These are apis
in themselves to third party classes that subclass these types.
Even if the Runtime chooses not to make its own implementations
of these type serializable, third party classes have the right
to make that choice for themselves and build off the base class
serialization infrastructure that was shipped before.
RuntimeAssembly and RuntimeModule still override with PNSE
so we'll get the desired exception for those cases.
- The Runtime's own implementations of these types will not be
serializable. Removing all [Serializable] attributes and
serialization interfaces. Runtime types are internal types and
thus have no duty to implement ISerializable if the public
abstract base type does not.
|
|
Expose Enumerator members out of EnvironmentAugments.
|
|
|
|
serialization (#11910)
* Variables renamed for reflection based serialization
* Make EqualityComparers serialize like desktop
* add missing interfaces
* TimeZone serializable added
* Internal hashtable serializable
* Removed TimeZone as serializable type
* Remove Lazy<T>'s [Serializable] attribute for 2.0
For performance, Lazy was completely rewritten for .NET Core 2.0 and has an entirely different format than desktop; trying to get it to match the desktop serialization format would require either reverting or providing a complicated custom serialization/deserialization implementation to try to match. Lazy can also wrap an Exception that occurred from trying to instantiate the object, and the only exception types that are serializable as of now in core are the base Exception and AggregateException. As such, we're cutting it from the list of supported types in 2.0. An easy workaround is simply to do what the implementation does: serialize lazy.Value instead of lazy.
* tiny fixes to equalitycomparer.cs
|
|
|
|
|
|
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
We incorrectly cast a 32 bit pointer to a 64 bit poitner using as a SIGNED integer.
If this is a 32 bit process that is using more than 2GB of memory this can result in
sign rather than zero extension. This makes the poitner invalid at the OS level
and causes the OS API to fail.
We disovered this in Visual Studio when debugging large (Rosyln) scenarios.
There were numerous failures which causes sever slowdowns becasue the
EventSource logged OutputDebugString events when the OS API failed.
The fix is to use unsigned extension. Note that I have confirmed that casting
from a IntPtr or a void* to a ulong does zero extension (that is it uses the target type
to determine whether to use sign or zero extension).
To be useful for Visual Studio, this needs to be ported to the desktop runtime.
|
|
* Remove UnitySerializationHolder references
* Remove the fields of StrongNameKeyPair
* Initialize BadImageFormatException._fusionLog
* Remove MemberInfoSerializationHolder references
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
|
Throws PlatformNotSupportedException from IDeserializationCallback and IObjectReference implementations on types that are no longer serializable.
|
|
Changes to throw PlatformNotSupportedException from ISerializable.GetObjectData and serialization constructors on non-Serializable types. Also removes private serialization constructors and some unneeded code that was used to support serializing non-serializable types. A few tests testing GetObjectData implementations are also removed. For Exception types, we call base instead of throwing from GetObjectData to be consistent with the many Exceptions that don't override GetObjectData
|
|
Merge nmirror to master
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|