Ravi Eda [Thu, 17 Sep 2015 16:09:02 +0000 (11:09 -0500)]
Remove Clean Target in Test Build Proj.
Jan Kotas [Thu, 17 Sep 2015 14:57:10 +0000 (07:57 -0700)]
Merge pull request #1578 from dotnet-bot/from-tfs
Merge changes from TFS
Jan Kotas [Thu, 17 Sep 2015 12:27:09 +0000 (05:27 -0700)]
Fix build break on arm
[tfs-changeset: 1526208]
Jan Kotas [Thu, 17 Sep 2015 02:42:32 +0000 (19:42 -0700)]
Merge pull request #1575 from benpye/arm-unwind-regression
Fix ARM unwind regression
Jan Kotas [Thu, 17 Sep 2015 02:38:27 +0000 (19:38 -0700)]
Merge pull request #1568 from dotnet-bot/from-tfs
Merge changes from TFS
Ben Pye [Wed, 16 Sep 2015 23:38:18 +0000 (23:38 +0000)]
Fix ARM build regression
Eric Erhardt [Wed, 16 Sep 2015 20:06:03 +0000 (15:06 -0500)]
Merge pull request #1559 from eerhardt/Fix2788
Time Zone transitions are 1 tick off on Linux
Lakshmi Priya [Wed, 16 Sep 2015 19:06:13 +0000 (12:06 -0700)]
Merge pull request #1560 from Priya91/longpath-test
Replace MAX_PATH with new defines in rest of coreclr.
Gaurav Khanna [Wed, 16 Sep 2015 18:45:06 +0000 (11:45 -0700)]
Fix for GH issue 410 - https://github.com/dotnet/coreclr/issues/410
Whenever a managed exception is thrown, the details about the thrown exception are also saved off the managed thread object (as LastThrownObject). The VM also has an exception tracker that tracks its dispatch across the managed frames and incase of nested exceptions, the trackers are collapsed correctly, when the nested exception is handled, and last thrown object is updated correctly. The VM works on the premise that the LastThrownObject is updated correctly.
Incase of this bug, a method (M1)is invoked via Reflection and has an exception E1. During exception dispatch for E1, an IL filter is invoked that, in turn, has an exception (E2) that remains unhandled. While this is swallowed by the VM (as expected), the LastThrownObject is not updated to reflect the active exception to be E1. Thus, when the dispatch for original exception E1 completes and no managed handler is found, the exception is caught by Reflection subsystem that extracts the thrown exception using the GET_THROWABLE macro that uses the LastThrownObject to determine the thrown exception. Since the LTO was not updated, it still reflects E2.
The fix is to update the managed exception state, if the filter has an unhandled exception, similar to how we do when a managed catch block successfully handles the exception. I have refactored the code to make the semantic cleaner.
[tfs-changeset: 1525835]
Eric Erhardt [Tue, 15 Sep 2015 22:49:54 +0000 (17:49 -0500)]
Time Zone transitions are 1 tick off on Linux
When we build the AdjustmentRules up, we set the StartDate to be the Transition Time that comes from the tzfile, and we set the EndDate to the be (the next Transition Time - 1 tick). That way the next AdjustmentRule goes into effect at the exact transition time. The issue is that the code in CheckIsDst uses a less than operator when comparing the endTime, but for these rules it should be less than or equal to.
Fix https://github.com/dotnet/corefx/issues/2788.
Jan Kotas [Wed, 16 Sep 2015 18:17:53 +0000 (11:17 -0700)]
Merge pull request #1564 from dotnet-bot/from-tfs
Merge changes from TFS
Vance Morrison [Wed, 16 Sep 2015 16:09:56 +0000 (09:09 -0700)]
Merge pull request #1562 from cshung/EventCounterWork
Port bug fixes and add hooks for EventCounter work
Jan Kotas [Wed, 16 Sep 2015 16:07:48 +0000 (09:07 -0700)]
Merge pull request #1553 from paulnice/patch-1
Fix runtime versions in the Console example
Jan Kotas [Wed, 16 Sep 2015 16:06:37 +0000 (09:06 -0700)]
Merge pull request #1557 from ravimeda/master
Update Build CoreCLR Instructions on Mac OS X.
Andrew Au [Wed, 16 Sep 2015 14:59:03 +0000 (07:59 -0700)]
Port bug fixes and add hooks for EventCounter work
Stephen Toub [Wed, 16 Sep 2015 13:13:53 +0000 (09:13 -0400)]
Merge pull request #1554 from kouvel/WaitAllCheckForDuplicates
Check for duplicate handles in PAL's implementation of a wait-all opeā¦
Eugene Zemtsov [Tue, 15 Sep 2015 22:09:35 +0000 (15:09 -0700)]
Merge pull request #1538 from Djuffin/get_context2
Make DBI/SOS stackwalk work when thread is running native code
Aditya Mandaleeka [Tue, 15 Sep 2015 21:21:38 +0000 (14:21 -0700)]
Merge pull request #1555 from richlander/roadmap
Add link to .NET Core Roadmap
Ravi Eda [Tue, 15 Sep 2015 21:10:33 +0000 (16:10 -0500)]
Update Build CoreCLR Instructions on Mac OS X.
Rebuild option is not handled in build.sh. Hence removing the sentence
that suggests using a rebuild option that will delete previously built
assemblies.
Eugene [Fri, 21 Aug 2015 04:11:31 +0000 (21:11 -0700)]
Use out-of-proc libunwind to unwind native stack from DAC
Implementation of PAL_VirtualUnwindOutOfProc that uses ptrace libunwind
to be able to unwind native stack in debugee. This allows to get valid managed
stack for threads that passed HelperMethodFrames.
Eugene Zemtsov [Fri, 7 Aug 2015 08:08:37 +0000 (01:08 -0700)]
Use Frame list context when GetThreadContext is unavailable
When DAC tries to obtain thread context for debugee thread on the system without working GetThreadContext, it uses filter context
and if it is NULL, it goes through thread Frame list looking for a Frame that can provide meaningful CONTEXT to start the stackwalk.
Filter context can be NULL if the thread is currently running native code, or manage exception just has been thrown (first chance).
Before this change DBI stackwalker would fail to provide stack trace in such cases.
Bruce Forstall [Tue, 15 Sep 2015 18:31:37 +0000 (11:31 -0700)]
Merge pull request #1540 from BruceForstall/FixPow1TestForLinux
Fix pow1 test to run on Linux
Matt Mitchell [Tue, 15 Sep 2015 17:30:33 +0000 (10:30 -0700)]
Merge pull request #1144 from mmitche/real-debug-build
Do not pass /O1 except in release/release with debug info modes
Koundinya Veluri [Mon, 14 Sep 2015 20:55:30 +0000 (13:55 -0700)]
Check for duplicate handles in PAL's implementation of a wait-all operation
Matt Mitchell [Tue, 16 Jun 2015 16:45:18 +0000 (09:45 -0700)]
Do not pass /O1 except in release/release with debug info modes
Richard Lander [Tue, 15 Sep 2015 04:45:44 +0000 (21:45 -0700)]
Add link to .NET Core Roadmap
Bruce Forstall [Tue, 15 Sep 2015 01:01:32 +0000 (18:01 -0700)]
Minor change to SystemV structs declarations in JIT-EE interface
Pull over a couple changes from the work-in-progress git branch.
[tfs-changeset: 1525036]
Wes Haggard [Tue, 15 Sep 2015 00:48:18 +0000 (17:48 -0700)]
Fix build break on ARM.
[tfs-changeset: 1525030]
paulnice [Mon, 14 Sep 2015 15:07:24 +0000 (08:07 -0700)]
Fix runtime versions
1. Fix the sample output of 'dnvm list' command with the latest one.
2. Fix the 'dnvm use' commands with the current runtime versions.
Gaurav Khanna [Mon, 14 Sep 2015 14:23:12 +0000 (07:23 -0700)]
This fixes the case of 64bit (to be in sync with Arm/Arm64) failures when, due to Jit optimizations, the return address of two successive frames are the same, resulting in incorrect current context initialization. As a result, CrawlFrame specific lookup of data (e.g. GenericArgType) are incorrect and fails tests.
I have refactored the code to be common for X64/Arm/Arm64 as much as possible.
X64 EH Selfhost is clean (and so is DDR).
[tfs-changeset: 1524814]
Jan Kotas [Mon, 14 Sep 2015 10:07:35 +0000 (03:07 -0700)]
Merge pull request #1547 from jkotas/standalone-gc
Initial port of GC sample to Linux
Jan Kotas [Mon, 14 Sep 2015 08:20:09 +0000 (01:20 -0700)]
Merge pull request #1546 from dotnet-bot/from-tfs
Merge changes from TFS
Jan Kotas [Sat, 12 Sep 2015 18:31:02 +0000 (11:31 -0700)]
Initial port of GC sample to Linux
- Add CMake build for the GC sample
- Add Unix clone of the GC environment. The Unix GC environment is partially
implemented, enough to make GC sample to compile and run on Linux.
dotnet-bot [Mon, 14 Sep 2015 02:48:24 +0000 (19:48 -0700)]
Fix mscorlib asmmeta and add SecurityCritical attribute to the two new functions in AssemblyExtensions
[tfs-changeset: 1524637]
Jan Kotas [Sat, 12 Sep 2015 22:59:30 +0000 (15:59 -0700)]
Merge pull request #1543 from mikedn/unboxmsg
Improve the invalid cast message generated by unbox
Mike Danes [Sat, 12 Sep 2015 09:01:35 +0000 (12:01 +0300)]
Improve the invalid cast message generated by unbox
Change JIT_Unbox to use COMPlusThrowInvalidCastException instead of
COMPlusThrow(kInvalidCastException). This mirrors the behavior of
the normal cast by including the source and destination types in
the exception message.
Fix #1453
Jan Kotas [Sat, 12 Sep 2015 17:12:46 +0000 (10:12 -0700)]
Merge pull request #1544 from jkotas/standalone-gc
GC sample improvements
Jan Kotas [Sat, 12 Sep 2015 15:50:59 +0000 (08:50 -0700)]
Move sample GC environment to separate directory
Jan Kotas [Sat, 12 Sep 2015 14:59:37 +0000 (07:59 -0700)]
Use NULL for consistency
Jan Kotas [Sat, 12 Sep 2015 06:14:00 +0000 (23:14 -0700)]
Replace unsigned __int64/__int64 with UINT64/INT64
Jan Kotas [Sat, 12 Sep 2015 08:39:03 +0000 (01:39 -0700)]
Merge pull request #1539 from BruceForstall/DeleteBadTests
Delete two bad tests
Jan Kotas [Sat, 12 Sep 2015 03:24:32 +0000 (20:24 -0700)]
Merge pull request #1542 from jkotas/gcsample
Upgrade GCSample project to VS2015
Jan Kotas [Sat, 12 Sep 2015 03:16:17 +0000 (20:16 -0700)]
Upgrade GCSample project to VS2015
Bruce Forstall [Sat, 12 Sep 2015 00:04:24 +0000 (17:04 -0700)]
Fix pow1 test to run on Linux
This tests queries PROCESSOR_ARCHITECTURE to see if it is running on ARM. This returns a null string on Linux. So, check for null on continue. If necessary, this could be adjusted later if we need to do something special for non-Windows .NET Core on ARM.
Bruce Forstall [Fri, 11 Sep 2015 23:30:43 +0000 (16:30 -0700)]
Delete two bad tests
These tests were deleted from internal runs long ago and should not have been ported.
Bruce Forstall [Fri, 11 Sep 2015 20:28:32 +0000 (13:28 -0700)]
Merge pull request #1536 from BruceForstall/FixLinuxNullRefCheck
Fix JIT null reference checking for large field accesses on PAL
Bruce Forstall [Fri, 11 Sep 2015 20:27:53 +0000 (13:27 -0700)]
Merge pull request #1537 from BruceForstall/FixLinuxIntLongDifference
Replace 'long' by 'int' to avoid bug on Linux
Bruce Forstall [Fri, 11 Sep 2015 19:04:31 +0000 (12:04 -0700)]
Replace 'long' by 'int' to avoid bug on Linux
In GetSignedMagicNumberDivide(), a cast to (unsigned long) was doing a sign extend instead of a zero extend, leading
to an apparent infinite loop with test case b147814_il.exe. This change replaces the cast with (unsigned int), which
matches Windows behavior.
Bruce Forstall [Fri, 11 Sep 2015 18:13:54 +0000 (11:13 -0700)]
Fix JIT null reference checking for large field accesses on PAL platforms
The JIT needs to do explicit null checks for large field accesses if such an
access might exceed the unmapped zero page in the OS. On Windows, that means
fields over 32KB. On PAL platforms, we use 1/2 the OS page size. As far as I
can tell, the reason we use 1/2 the known unmapped page size is for "defense
in depth", in case we get it wrong somehow.
Jan Kotas [Fri, 11 Sep 2015 18:06:20 +0000 (11:06 -0700)]
Merge pull request #1523 from dotnet-bot/from-tfs
Merge changes from TFS
Sridhar Periyasamy [Fri, 11 Sep 2015 17:15:24 +0000 (10:15 -0700)]
Merge pull request #1495 from Sridhar-MS/code-coverage
Build Code Coverage instrumented binaries for native binaries in Linux and OSX
Jan Vorlicek [Fri, 11 Sep 2015 00:20:21 +0000 (02:20 +0200)]
Merge pull request #1533 from janvorli/fix-native-unwind-issue
Fix null reference exception handling in JIT_WriteBarrier
Jan Vorlicek [Thu, 10 Sep 2015 22:56:25 +0000 (00:56 +0200)]
Fix null reference exception handling in JIT_WriteBarrier
This change fixes an issue when a null reference exception happens in the first
instruction of the JIT_WriteBarrier. There were two problems.
First problem was that the native unwinder didn't know that it is unwinding a
frame where the PC is an address of a failing instruction instead of the next
address after a call instruction. So it decremented the PC before looking up the
unwind info. Unfortunately, that means that if the hardware exception happens
in the first instruction, the unwind info is not found and the unwinder resorts
to RBP chain unwinding, which effectively skips one managed frame.
The second problem was that the FaultingExceptionFrame we create when handling
the hardware exception had context pointing to the JIT_WriteBarrier. But that
breaks the stack walker. When it arrives at the FaultingExceptionFrame, it
calls its ReturnAddress method and expects to get a managed code address.
However, in this case, it was getting the address of the JIT_WriteBarrier instead
and that made the stack walker to skip to the next explicit frame, effectively
skipping multiple managed frames that it should have reported.
Koundinya Veluri [Thu, 10 Sep 2015 08:04:12 +0000 (01:04 -0700)]
Merge pull request #1499 from kouvel/TryGetRawMetadata
Add AssemblyExtensions.TryGetRawMetadata to the System.Reflection.Metā¦
Koundinya Veluri [Thu, 10 Sep 2015 06:28:47 +0000 (23:28 -0700)]
Merge pull request #1522 from kouvel/AssemblyLoadNullVersion
Allow loading assemblies on the TPA list without specifying a version
Lakshmi Priya Sekar [Tue, 8 Sep 2015 23:19:52 +0000 (16:19 -0700)]
Respond to PR feedback.
Venkata Sivaramakrishna Ramadugu [Wed, 9 Sep 2015 22:49:08 +0000 (15:49 -0700)]
Fix to correctly spill a special putarg_reg when the fixed register assigned to it is getting killed before its GT_CALL.
Essentially in execution order we have the following nodes
RCX <-- GT_PUTARG_REG(lcl var V07) here V07 is 'this' object
R8 <-- GT_PUTARG_REG(GT_AND(GT_LSH,...))
ControlExpr of call (i.e. call target) is a vtable call and uses 'this' object to get to the right virtual method. Essentially a GT_IND(GT_LEA(V07))
GT_CALL
While building ref positions for first putarg_reg, it is flagged as "special" and preferenced to its source lcl var V07 if it is the non-last use. The hope is that if there are further uses of V07 before the kill of fixed reg assigned to V07, they can continue to be in that register.
While allocating a register to a special putarg_reg, lsra checks that a) source lcl var's interval is active and b) register assigned to source lcl var is the same as putarg_reg
Second putarg_reg (to R8) has an operand which needs CL (shift operation) and hence will kill RCX before GT_CALL. As a result, V07 is marked for spilling after its use in special putarg_reg but not first putarg_reg. Further since next kill of RCX (GT_LSH) is well before the next use of source lcl var (in controlExpr), putarg_reg cannot be marked as isBusyUntilNextKill. As a result, LSRA would think that RCX is available for allocation after the last use of V07 in controlExpr and hence GT_IND is allocated RCX thereby thrashing 'this' object passed in RCX. This leads to an AV for the repro case while executing jitted code.
Fix is that while allocating LSRA also needs to check that the next use of special putarg_reg is same as the next kill of the fixed register assigned to it. Since first putarg_reg is not marked as special, kill of RCX by GT_SH would lead to spilling of putarg_reg into a tree temp.
Fix #1475
[tfs-changeset: 1523584]
Sridhar Periyasamy [Wed, 9 Sep 2015 21:20:07 +0000 (14:20 -0700)]
Address code coverage builds feedback
- Move the build type check to unix only.
- Remove the global fPIC compiler option and add it as compile flags for libcorguids @ src/inc/CMakeLists.txt
- Use add_compiler_options instead of add_definitions.
Koundinya Veluri [Fri, 4 Sep 2015 05:06:56 +0000 (22:06 -0700)]
Add AssemblyExtensions.TryGetRawMetadata to the System.Reflection.Metadata namespace.
This patch contains has the necessary changes in coreclr and mscorlib. Tests will be added separately, once the new API is
published and can be consumed.
Part of dotnet/corefx#2768
Koundinya Veluri [Wed, 9 Sep 2015 06:52:15 +0000 (23:52 -0700)]
Allow loading assemblies on the TPA list without specifying a version
When comparing the bound assembly's version against the requested assembly name, removed the distinction between platform
assemblies and app assemblies when the bound assembly is on the TPA list. A requested version of null behaves equivalently to
a requested version of 0.0.0.0.
Jan Kotas [Wed, 9 Sep 2015 15:13:46 +0000 (08:13 -0700)]
Merge pull request #1520 from sergey-raevskiy/clarify-comment
Clarify comment
sergey-raevskiy [Wed, 9 Sep 2015 10:48:59 +0000 (13:48 +0300)]
Clarify comment
Jan Vorlicek [Wed, 9 Sep 2015 00:53:19 +0000 (02:53 +0200)]
Merge pull request #1518 from janvorli/fix-some-printf-formats
Fix printf formatting for ll, I and I32 length modifiers
Jan Vorlicek [Tue, 8 Sep 2015 22:53:41 +0000 (00:53 +0200)]
Reflect PR feedback
Aditya Mandaleeka [Tue, 8 Sep 2015 22:42:57 +0000 (15:42 -0700)]
Merge pull request #1497 from adityamandaleeka/fix_warnings
Fix the remaining unused variable/label warnings
Jan Vorlicek [Tue, 8 Sep 2015 22:04:14 +0000 (00:04 +0200)]
Fix printf formatting for ll, I and I32 length modifiers
These modifiers were not handled at all.
Jan Vorlicek [Tue, 8 Sep 2015 21:46:22 +0000 (23:46 +0200)]
Merge pull request #1516 from janvorli/fix-managed-exception-dispatch-2
Fix missing uses of the INSTALL_MANAGED_EXCEPTION_DISPATCHER
Lakshmi Priya Sekar [Tue, 8 Sep 2015 19:01:33 +0000 (12:01 -0700)]
Replace MAX_PATH with new defines, rest of coreclr.
Jan Vorlicek [Tue, 8 Sep 2015 21:04:28 +0000 (23:04 +0200)]
Fix missing uses of the INSTALL_MANAGED_EXCEPTION_DISPATCHER
This fixes issues stemming from my recent changes in managed exception dispatching
where I have missed few places where we need to perform managed exception dispatching
or unhandled exception reporting.
Aditya Mandaleeka [Fri, 4 Sep 2015 01:11:49 +0000 (18:11 -0700)]
Fix the remaining unused variable/label warnings
Sridhar Periyasamy [Tue, 8 Sep 2015 18:12:29 +0000 (11:12 -0700)]
Change warning to error for platforms not supporting code coverage at this time. This is make sure that the warning does not get accidently swallowed at some point in the future.
Jan Vorlicek [Tue, 8 Sep 2015 16:57:10 +0000 (18:57 +0200)]
Merge pull request #1515 from janvorli/fix-funceval-personality-routine
Remove FuncEvalHijackPersonalityRoutine for PAL
Jan Vorlicek [Tue, 8 Sep 2015 12:01:30 +0000 (14:01 +0200)]
Remove FuncEvalHijackPersonalityRoutine for PAL
The personality routine on Windows is responsible for redirecting exception unwinding
to a different context when function evaluation is injected into a managed thread and
there is an exception that escapes the evaluation. However, the FuncEvalHijackRealWorker
catches all exceptions that happen during the function evaluation, so nothing should
escape.
Moreover, if anything escaped, it would go to the original hijacked code which is not
expected.
So I am replacing the personality routine for PAL with UnhandledExceptionHandlerUnix
to guard against unexpected exception escaping.
I am also setting the same personality routine to the ExceptionHijack function. Some
time ago, it was removed completely there as a temporary fix for a problem with limited
max number of personality routines in single executable. I have looked at it
again and I can see that no exception should escape the ExceptionHijackWorker either and
so the same thing as for FuncEvalHijack applies for ExceptionHijack too.
Jan Vorlicek [Tue, 8 Sep 2015 12:50:24 +0000 (14:50 +0200)]
Merge pull request #1496 from janvorli/fix-exception-memleak
Fix memory leak from managed exceptions
Jan Vorlicek [Tue, 8 Sep 2015 12:26:39 +0000 (14:26 +0200)]
Merge pull request #1514 from janvorli/fix-managed-exception-dispatch-way-2
Fix managed exception dispatching
Jan Vorlicek [Tue, 8 Sep 2015 11:23:13 +0000 (13:23 +0200)]
Fix managed exception dispatching
The managed exception dispatching is initiated from the UNINSTALL_MANAGED_EXCEPTION_DISPATCHER
macro and it should be used only at the border between managed and native code, when managed
code calls native one. This macro is part of the UNINSTALL_UNWIND_AND_CONTINUE_HANDLER_NO_PROBE
macro. However, it turns out that the UNINSTALL_UNWIND_AND_CONTINUE_HANDLER_NO_PROBE
(or the UNINSTALL_UNWIND_AND_CONTINUE_HANDLER that uses it) is also used at places where
there is no managed / native border. In that case, the managed dispatching results incorrectly
in skipping native frames that would otherwise handle the exception.
The fix removes the INSTALL_MANAGED_EXCEPTION_DISPATCHER / UNINSTALL_MANAGED_EXCEPTION_DISPATCHER
from the INSTALL_UNWIND_AND_CONTINUE_HANDLER_NO_PROBE / UNINSTALL_UNWIND_AND_CONTINUE_HANDLER_NO_PROBE
and puts them to specific places where INSTALL_UNWIND_AND_CONTINUE_HANDLER_NO_PROBE /
UNINSTALL_UNWIND_AND_CONTINUE_HANDLER_NO_PROBE and INSTALL_UNWIND_AND_CONTINUE_HANDLER /
UNINSTALL_UNWIND_AND_CONTINUE_HANDLER are used at the border between managed and native code.
Mike McLaughlin [Mon, 7 Sep 2015 17:27:16 +0000 (10:27 -0700)]
Merge pull request #1507 from mikem8361/fixosx
Fix debugger/debuggee connection on OS X
Mike McLaughlin [Sat, 5 Sep 2015 22:39:17 +0000 (15:39 -0700)]
Fix debugger/debuggee connection on OSx.
The reason there were problems connecting on OS X was that the read
on the debugger/debuggee pipe didn't return the full number of bytes
requested on the first read. There are times (depending on the size
of the read request) that multiple reads to be made to get all the
bytes requested. This change adds code to retry the read or write
until all the bytes requested are read or written.
Jan Vorlicek [Mon, 7 Sep 2015 06:52:06 +0000 (08:52 +0200)]
Merge pull request #1503 from benpye/arm-strike-build-fix
Fix ARM Strike build
Jan Kotas [Sun, 6 Sep 2015 00:02:43 +0000 (17:02 -0700)]
Merge pull request #1501 from erozenfeld/ReadyToRunThrowHelpers
Add mappings for ReadyToRun helpers used by llilc.
Ben Pye [Sat, 5 Sep 2015 23:56:17 +0000 (23:56 +0000)]
Fixes ARM Strike build
Eugene Rozenfeld [Fri, 14 Aug 2015 06:14:09 +0000 (23:14 -0700)]
Add mappings for ReadyToRun helpers used by llilc:
READYTORUN_HELPER_ThrowNullRef and READYTORUN_HELPER_ThrowDivZero.
Allow ReadyToRun tests to be run with llilc.
Jan Vorlicek [Fri, 4 Sep 2015 13:19:46 +0000 (15:19 +0200)]
Fix memory leak from managed exceptions
Handling thrown PAL_SEHException was causing leaks for all exceptions thrown due to
two aspects:
1) PAL_GetStackBase() and PAL_GetStackLimit() were missing calls to pthread_attr_destroy()
2) We were calling the DispatchManagedException from C++ catch handlers and this function
never returns. So the C++ exception handling never called __cxa_end_catch that is
responsible for freeing the exception storage allocated by the C++ runtime.
The fix to the 2nd aspect was to store a copy of the exception in the catch handler, let it
complete and then call the DispatchManagedException with the copy. It was also necessary to
slightly modify the unwinding of sequences of native frames since there is now no rethrowable
exception and the StartUnwindingManagedFrames has to throw a new one.
This change has a secondary benefit - the StartUnwindingManagedFrames no longer calls
__cxa_rethrow, but rather a helper C++ function that uses regular "throw" keyword.
That makes the code more portable.
Jan Vorlicek [Fri, 4 Sep 2015 19:52:54 +0000 (21:52 +0200)]
Merge pull request #1491 from janvorli/unix-remove-thread-affinity-and-critical-region
Remove thread affinity and critical region stuff for Unix
Jan Vorlicek [Fri, 4 Sep 2015 08:16:37 +0000 (10:16 +0200)]
Remove thread affinity and critical region stuff for Unix
The WaitHandleNative::CorWaitMultipleNative was calling Thread::BeginThreadAffinityAndCriticalRegion
that results in incrementing the Thread::m_dwCriticalRegionCount. However, there is nothing
that would decrement it on CoreCLR, so if the WaitHandleNative::CorWaitMultipleNative is called,
in debug build we get an assert in Thread::InternalReset.
It turns out that the critical region and thread affinity stuff is not to be used in CoreCLR,
so I have disabled handling of that in CoreCLR for Unix.
The only remainder are the static methods Thread::BeginThreadAffinity and Thread::EndThreadAffinity
which are used in the ThreadAffinityHolder. Conditionally removing the holder usage would be messy,
so I have rather kept those methods and made their bodies empty.
Sridhar Periyasamy [Thu, 3 Sep 2015 23:38:54 +0000 (16:38 -0700)]
Build Code Coverage instrumented binaries for native bianries in Linux and OSX.
Add an option in build.sh called 'coverage' to produce gcov-style instrumented builds.
Example usage - ./build.sh debug coverage clean
This will generate the '.gcno' notes files for each object file in the same directory along with the instrumented native binaries. These .gcno files contain some of the coverage data like source line mappings, basic block graphs info etc.
Each time these instrumented binaries are run, a separate .gcda file is created for each object file in the same directory. These .gcda files contain arc transition counts, and some summary information.
Code Coverage reports can be generated from the .gcno and .gcda files using a tool like gcovr or lcov. *But this commit is only for generated the .gcno files while compiling with the 'coverage' option.*
The next steps
- Add option in run-test.sh to generate code-coverage reports using the instrumented native binaries.
- Integrate with Jenkins CI to do code-coverage runs.
Jan Kotas [Fri, 4 Sep 2015 18:15:54 +0000 (11:15 -0700)]
Merge pull request #1484 from gitchomik/master
Documentation - building mscorlib.dll using Mono on Linux
gitchomik [Thu, 3 Sep 2015 19:10:02 +0000 (21:10 +0200)]
Building mscorlib.dll using Mono on Linux
Some information about building mscorlib.dll without Windows
Update linux-instructions.md
some @ellismg suggestions
Jan Kotas [Fri, 4 Sep 2015 17:46:39 +0000 (10:46 -0700)]
Merge pull request #1493 from christos-P/patch-1
minor correction
Matt Mitchell [Fri, 4 Sep 2015 16:44:02 +0000 (09:44 -0700)]
Merge pull request #1490 from BruceForstall/FixILTests
Fix IL JIT tests
christos-P [Fri, 4 Sep 2015 15:39:12 +0000 (18:39 +0300)]
minor correction
Jan Kotas [Fri, 4 Sep 2015 12:13:43 +0000 (05:13 -0700)]
Merge pull request #1492 from benjamin-hodgson/patch-1
Fix link to API review process documentation
Jan Kotas [Fri, 4 Sep 2015 12:12:42 +0000 (05:12 -0700)]
Merge pull request #1489 from kangaroo/arm-clang-fixes
[arm] Fix RtlRestoreContext on ARM with newer clang
Benjamin Hodgson [Fri, 4 Sep 2015 10:57:44 +0000 (11:57 +0100)]
Fix link to API review process documentation
Geoff Norton [Fri, 4 Sep 2015 03:26:34 +0000 (03:26 +0000)]
[arm] Fix RtlRestoreContext on ARM with newer clang
Bruce Forstall [Fri, 4 Sep 2015 04:19:49 +0000 (21:19 -0700)]
More System.Console IL test cleanup
Bruce Forstall [Fri, 4 Sep 2015 01:42:49 +0000 (18:42 -0700)]
Fix more System.Console references
Bruce Forstall [Fri, 4 Sep 2015 00:36:18 +0000 (17:36 -0700)]
Add System.Console references and replace usages with [System.Console]
Bruce Forstall [Fri, 4 Sep 2015 00:14:24 +0000 (17:14 -0700)]
Canonicalize appearance of empty mscorlib assembly references in .il tests
Andy Ayers [Thu, 3 Sep 2015 22:26:21 +0000 (15:26 -0700)]
Merge pull request #1486 from AndyAyersMS/FixWarnings
Fix compilation warnings in gcinfoencoder.