Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
CrossGen /CreatePDB command gives preference to the TPA list while loading assemblies. So if the TPA contains the IL version of the input assembly but not the NI version, we would end up loading the IL instead of NI. This causes the CreatePDB command to fail, since it can't operate on IL images. This is fixed by putting the input file as the first entry in the TPA list.
Another issue is when the above error does occur, the error message is very unclear (it only shows "Unspecified error"). This is fixed with a better error message.
[tfs-changeset: 1587876]
|
|
Fix instantiating stub for methods of value types
|
|
This change fixes a problem with instantiating stubs for methods of value types.
The problem was that the CreateInstantiatingILStub didn't take into account the
fact that methods of value types need to have "this" passed "byref".
The issue manifested itself as a rare corruption of references in array of structs
that were thin wrappers for string reference during GC stack scan. GC thought that
the reference to an array entry is an object reference that starts with method table.
GC marks method table pointers by setting their bit zero to 1. But in this case,
it has accidentally modified an object reference instead and a test was crashing
with wrong object address.
The root cause of the problem is that the instantiating stubs were placed on a global
singleton reference class no matter whether the target method was on a reference class
or a value type.
I have fixed it by putting the stubs on the instantiated target generic type instead.
|
|
Fixed problem with bpmd not working sometimes.
|
|
Fix some too earlier SOS initialization problem. Now returns an error.
The DAC interface (IXCLRDataProcess) was being created everytime an command was run and the JIT and GC notification tables where being reinitialized each time losing any JIT notifications needed to resolve a breakpoint. Only create the DAC interface instance once. It does need to be flushed each time sos is entered though.
Enable the module load and unload and exception callbacks when the DAC instance is created. This is what windbg does on Windows (along with flushing the DAC each time the target is restarted). It simplifies the breakpoint code; it no longer needs to enable/disable these notification flags.
Cleaned up places where the DAC instance (direct calls to LoadClrDebugDll) and not released properly.
|
|
|
|
CodeCLR always skips strongname validation. Some code for strong name validation was still compiled for Windows, but not for Unix. This change removes the differences between Windows and Unix by never compiling the strong name validation code in.
|
|
|
|
Use Default Stack Size for Multi-Core JIT Playback Thread
|
|
Delete dead code
|
|
|
|
Assembly routines DelayLoad_Helper* were putting an argument at a
wrong location on the stack. This resulted in a GC hole that caused
random crashes, such as dotnet/cli#1785 and dotnet/roslyn#9632.
|
|
- Delete BINDER, STANDALONE_BINDER and MDIL ifdefs
|
|
Fix stack walking on Unix in case of finally
|
|
The issue is that the code in the StackFrameIterator::Filter that handles cases
when a funclet frame that was already removed from the stack due to native frames
unwinding works for catch funclets only and not for finally ones.
The ExceptionTracker::GetCallerOfActualHandlingFrame is set for catch funclets
only. To make it work for the finally funclets as well, we need to use information
from the ExceptionTracker::m_EnclosingClauseInfoForGCReporting instead.
There was also another problem in the Filter method that caused the function to
spin in an infinite loop when a parent of a funclet was also a funclet. In
such case, the code in the method rechecks the current frame but the special
functionality to check the exception trackers data needs to be skipped for
the recheck.
And finally, when we find that the current frame was a parent of an unwound
funclet from the evidence in the exception trackers, we also need to set
the fSkippingFunclet.
|
|
When unhandled exception happens in a finalizer thread and there are
no managed frames till the bottom of the stack,
the Thread::VirtualUnwindToFirstManagedCallFrame then fails fast.
The fix is to make the Thread::VirtualUnwindToFirstManagedCallFrame to
return even in case no managed frame is called, which is indicated by
its returning 0 as the resulting IP address. The DispatchManagedException
then checks that and rethrows the exception instead of trying to call
UnwindManagedExceptionPass1.
I have also added INSTALL_UNHANDLED_MANAGED_EXCEPTION_TRAP to the
FinalizerThread::FinalizerThreadStart so that the unhandled exception
doesn't escape the stack.
And I also needed to modify the UNINSTALL_UNHANDLED_MANAGED_EXCEPTION_TRAP
to detect case when the unhandled exception filter was already executed so
that it doesn't double-report the unhandled exception.
|
|
Address issue #3527.
|
|
[tfs-changeset: 1581565]
|
|
- `DefaultAllocator` has been replaced with `HostAllocator` in RyuJIT, which
uses the JIT hosting interface to allocate and free memory.
- The definition of `DefaultAllocator` has been moved into its own file, as it
remains in use by the interpreter and the binder.
- `ProcessHeapAllocator` has been moved into JIT32, as that was its only
remaining user.
- `AllowZeroAllocator`'s static field has been changed to an instance field
to avoid the need to define storage for the static field in Utilcode.
[tfs-changeset: 1581242]
|
|
Pulling down coredistool package for gcstress test
|
|
[tfs-changeset: 1580785]
|
|
Port String.Replace(char, char) from CoreRT
|
|
|
|
|
|
The CoreCLR runtime is updated to support long file paths on Windows.
Pending updates to mscorlib.dll, the following scenarios are supported:
* Run managed apps from a long path.
* Load CoreCLR runtime and framework from a long path.
* Load user assemblies from a long path.
* Run CrossGen from a long path, with its input/output from a long path.
* Generate debug log file at a long path.
The following scenarios are not yet supported, and will be fixed in
future commits:
* Mscorlib.dll and framework assemblies are not yet long path compatible.
Note that until mscorlib.dll is fixed, most of the runtime changes can't
actually be used.
* Support on non-Windows platforms.
* Support for debugging and error reporting.
* Tools such as ilasm or ildasm.
|
|
|
|
Fix CoreCLR altjit loading that was broken by LongFile work
|
|
Fix stack walker on Unix
|
|
|
|
This change fixes the stack walker on Unix to properly account for the cases
when funclet frames were reclaimed due to native frames unwinding and so
they are not on the stack anymore. The stack walker needs to know that to
properly skip reporting GC references for the parent frame of the funclet.
While there was already code attempting to do that, it was incorrectly
skipping some exception trackers and not skipping the current tracker
in case the catch handler was not called yet.
This problem was discovered while running stress tests with GCStress 3.
|
|
|
|
Update GC from CoreRT
|
|
Merge changes from TFS
|
|
|
|
|
|
Fix PerfMap::GetNativeImageSignature to work for ready to run images
|
|
Revert "Revert "Remove useless security checks""
|
|
to unblock System.Reflection change. However, crossgen.exe trips on this mscorlib.dll since some of the methods it uses is not part of the FEATURE_CORECLR. This change simply exposes these APIs for now.
[tfs-changeset: 1578199]
|
|
|
|
This is the first significant step towards removing the JIT's dependence on utilcode.
This change introduces a new interface, `ICorJitHost`, that allows functionality that
would usually be provided by the OS to be overridden by the program that is hosting
the JIT. At the moment, this is limited to memory allocation and configuration value
(e.g. environment variable) access. If the JIT exports a function named `jitStartup`,
an instance of the `ICorJitHost` must be provided via that function before the first
call to `getJit`.
The VM and other implementors of the JIT interface have been updated accordingly.
Most implementors should use the common implementation of `ICorJitHost` (cleverly
named `JitHost`) in utilcode which respects the CLR's hosting policy.
Note that this change does not update RyuJIT (or any other JITs) to use any of the
functionality exposed by `ICorJitHost`; that work is left for future changes.
[tfs-changeset: 1578176]
|
|
Initial Support for LongFile in the VM
|
|
They are:
1. Wrappers for OS APIs which take or return PATHS
2. Fixing the usage of following Api's:
GetEnvironmentVariableW
SearchPathW
GetShortPathNameW
GetLongPathNameW
GetModuleFileName
Work remaining:
Remove fixed size buffers in the VM
|
|
Fix the explicit frames unwinding on Unix
|
|
This change fixes a problem when exception unwinds native frames of code that contains
explicit frames. There were two issues. First, the destructor of the explicit frame
base class Frame that was responsible for popping the frames was missing switch to
GC cooperative mode and so it could pop frames that GC was currently walking.
And second, after adding the switch to cooperative mode, it turned out that if a
thread gets blocked in the Frame destructor due to GC and the stack walker tries to
get stack cookie from FrameWithCookie wrapper of a class derived from the Frame,
it fails since the vtable pointer was already reset to the vtable of the base Frame
class and it detects that as an invalid case.
The fix was to add destructors to all final classes derived from Frame and perform
the frame popping from there.
|
|
|
|
This reverts commit a5e803cf70d861022f3b6cddb9045edb8a222e78.
Remove more calls to PerformSecurityCheck
|
|
Save/restore floating point arguments in asm macros on Linux arm and arm64
|
|
The transition block prolog/epilog macros were not correctly saving and restoring the floating point arguments on arm and arm64 on Unix.
|
|
Currently intrinsic is disabled under MIN_OPT while being enabled under OPT.
There is no way to enforce intrinsic expansion where non-intrinsic (call) path is not yet implemented.
This adds an optional output boolean argument to getIntrinsicID that tells JIT whether to enforce intrinsic expansion.
If JIT cannot expand intrinsic for such case, fatal error occurs.
There is no functional change the argument is default to false.
[tfs-changeset: 1575973]
|