Jan Kotas [Mon, 14 Sep 2015 10:07:35 +0000 (03:07 -0700)]
Merge pull request dotnet/coreclr#1547 from jkotas/standalone-gc
Initial port of GC sample to Linux
Commit migrated from https://github.com/dotnet/coreclr/commit/
98c63c1612b2635a40d9a719c1505e0ad4bef08a
Jan Kotas [Mon, 14 Sep 2015 08:20:09 +0000 (01:20 -0700)]
Merge pull request dotnet/coreclr#1546 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
8b45ec0f0213f9b85b1f38c606e8d25a68a5bc58
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
eeb7076e3993ca3fea11ee599a272d985eb3d4d4
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]
Commit migrated from https://github.com/dotnet/coreclr/commit/
8d7491b0ac6f7569f5a04587e5e0e3165066c5e6
Jan Kotas [Sat, 12 Sep 2015 22:59:30 +0000 (15:59 -0700)]
Merge pull request dotnet/coreclr#1543 from mikedn/unboxmsg
Improve the invalid cast message generated by unbox
Commit migrated from https://github.com/dotnet/coreclr/commit/
003a8b171a4fcac4907fe03facf4c84246435985
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 dotnet/coreclr#1453
Commit migrated from https://github.com/dotnet/coreclr/commit/
6732963050da5881f380ede3ab3f491a64fd04ce
Jan Kotas [Sat, 12 Sep 2015 17:12:46 +0000 (10:12 -0700)]
Merge pull request dotnet/coreclr#1544 from jkotas/standalone-gc
GC sample improvements
Commit migrated from https://github.com/dotnet/coreclr/commit/
320ee7e64cc6304e7b01948dabbc5e9e26f9bf45
Jan Kotas [Sat, 12 Sep 2015 15:50:59 +0000 (08:50 -0700)]
Move sample GC environment to separate directory
Commit migrated from https://github.com/dotnet/coreclr/commit/
1d78cb898e00369d6894af174d5727fc6660a211
Jan Kotas [Sat, 12 Sep 2015 14:59:37 +0000 (07:59 -0700)]
Use NULL for consistency
Commit migrated from https://github.com/dotnet/coreclr/commit/
3691f2a234c0ef361a54a946098ebdfdcf4fc391
Jan Kotas [Sat, 12 Sep 2015 06:14:00 +0000 (23:14 -0700)]
Replace unsigned __int64/__int64 with UINT64/INT64
Commit migrated from https://github.com/dotnet/coreclr/commit/
b9e4ab6395587064d99820f33b807abe20124dc2
Jan Kotas [Sat, 12 Sep 2015 08:39:03 +0000 (01:39 -0700)]
Merge pull request dotnet/coreclr#1539 from BruceForstall/DeleteBadTests
Delete two bad tests
Commit migrated from https://github.com/dotnet/coreclr/commit/
58748f0c50e71aed5ed2a3e35feb0a9eb719eaa6
Jan Kotas [Sat, 12 Sep 2015 03:24:32 +0000 (20:24 -0700)]
Merge pull request dotnet/coreclr#1542 from jkotas/gcsample
Upgrade GCSample project to VS2015
Commit migrated from https://github.com/dotnet/coreclr/commit/
12d294af33553f6f9b93491143733ca78a85aef8
Jan Kotas [Sat, 12 Sep 2015 03:16:17 +0000 (20:16 -0700)]
Upgrade GCSample project to VS2015
Commit migrated from https://github.com/dotnet/coreclr/commit/
6169f97d41b1de101a884a3035804d893878bf54
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
2bb5c8c5cded8f6849bebf0ae5eb0c9e75ac37aa
Bruce Forstall [Fri, 11 Sep 2015 20:28:32 +0000 (13:28 -0700)]
Merge pull request dotnet/coreclr#1536 from BruceForstall/FixLinuxNullRefCheck
Fix JIT null reference checking for large field accesses on PAL
Commit migrated from https://github.com/dotnet/coreclr/commit/
0554a236ffe62e68f09969df4249a22bdf6ddc2c
Bruce Forstall [Fri, 11 Sep 2015 20:27:53 +0000 (13:27 -0700)]
Merge pull request dotnet/coreclr#1537 from BruceForstall/FixLinuxIntLongDifference
Replace 'long' by 'int' to avoid bug on Linux
Commit migrated from https://github.com/dotnet/coreclr/commit/
54913c983114fb451c8c55b3c51290b5512a4e59
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
81291720abef64f07db0b01162b4ee1bde4ff7f8
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
26a4e5fd0f5eefc91d1b46e2505290723b01780e
Jan Kotas [Fri, 11 Sep 2015 18:06:20 +0000 (11:06 -0700)]
Merge pull request dotnet/coreclr#1523 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
ff51d9e5384a61d22342aa640deafe62ec5a8754
Sridhar Periyasamy [Fri, 11 Sep 2015 17:15:24 +0000 (10:15 -0700)]
Merge pull request dotnet/coreclr#1495 from Sridhar-MS/code-coverage
Build Code Coverage instrumented binaries for native binaries in Linux and OSX
Commit migrated from https://github.com/dotnet/coreclr/commit/
79880beb8c6d12b385db08ad1120d7edf7812b41
Jan Vorlicek [Fri, 11 Sep 2015 00:20:21 +0000 (02:20 +0200)]
Merge pull request dotnet/coreclr#1533 from janvorli/fix-native-unwind-issue
Fix null reference exception handling in JIT_WriteBarrier
Commit migrated from https://github.com/dotnet/coreclr/commit/
fd27971f925051dac191d429c5fdadc61adbd960
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
af76ec004c3d7c50abe29ddbfd3be37df30e21cb
Koundinya Veluri [Thu, 10 Sep 2015 08:04:12 +0000 (01:04 -0700)]
Merge pull request dotnet/coreclr#1499 from kouvel/TryGetRawMetadata
Add AssemblyExtensions.TryGetRawMetadata to the System.Reflection.Met…
Commit migrated from https://github.com/dotnet/coreclr/commit/
f7d9f0b298f7801344172fbaa5ec435be7e7171f
Koundinya Veluri [Thu, 10 Sep 2015 06:28:47 +0000 (23:28 -0700)]
Merge pull request dotnet/coreclr#1522 from kouvel/AssemblyLoadNullVersion
Allow loading assemblies on the TPA list without specifying a version
Commit migrated from https://github.com/dotnet/coreclr/commit/
cd2e9f19be91127f448708ab81aca0b25011d981
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 dotnet/coreclr#1475
[tfs-changeset: 1523584]
Commit migrated from https://github.com/dotnet/coreclr/commit/
698641c0a7807b7f37143b923f8926c8f90a0f42
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
2d433c12a29a68e8f9d03ed40e55acbfb601556e
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/corefxdotnet/coreclr#2768
Commit migrated from https://github.com/dotnet/coreclr/commit/
2f042a1212137e558fca716dbb92197f7a770e55
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
fda827e5f6c732472b95a3672cc888f28e02a0ec
Jan Kotas [Wed, 9 Sep 2015 15:13:46 +0000 (08:13 -0700)]
Merge pull request dotnet/coreclr#1520 from sergey-raevskiy/clarify-comment
Clarify comment
Commit migrated from https://github.com/dotnet/coreclr/commit/
b4c53d212ab86bdc1b9b948b22f88a0aea894fab
sergey-raevskiy [Wed, 9 Sep 2015 10:48:59 +0000 (13:48 +0300)]
Clarify comment
Commit migrated from https://github.com/dotnet/coreclr/commit/
f7ae389b4272fe7f95c69ca640516068fb044844
Jan Vorlicek [Wed, 9 Sep 2015 00:53:19 +0000 (02:53 +0200)]
Merge pull request dotnet/coreclr#1518 from janvorli/fix-some-printf-formats
Fix printf formatting for ll, I and I32 length modifiers
Commit migrated from https://github.com/dotnet/coreclr/commit/
bb260291f7b2dd7744a7ddd950c3b7ae00259611
Jan Vorlicek [Tue, 8 Sep 2015 22:53:41 +0000 (00:53 +0200)]
Reflect PR feedback
Commit migrated from https://github.com/dotnet/coreclr/commit/
7c07014c9967063adbc80295856086f214fd1885
Aditya Mandaleeka [Tue, 8 Sep 2015 22:42:57 +0000 (15:42 -0700)]
Merge pull request dotnet/coreclr#1497 from adityamandaleeka/fix_warnings
Fix the remaining unused variable/label warnings
Commit migrated from https://github.com/dotnet/coreclr/commit/
6c29dd0322d3377db1c2ec2ead8bfd173a353f2e
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f4686f5f908d6e7c33655953395ed51f0bbba4d2
Jan Vorlicek [Tue, 8 Sep 2015 21:46:22 +0000 (23:46 +0200)]
Merge pull request dotnet/coreclr#1516 from janvorli/fix-managed-exception-dispatch-2
Fix missing uses of the INSTALL_MANAGED_EXCEPTION_DISPATCHER
Commit migrated from https://github.com/dotnet/coreclr/commit/
9b316806a1cb13c47e622377b9c4cd1989faffb6
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
731957fdf39aa0afd30e415c97bcdd3c7aeac137
Aditya Mandaleeka [Fri, 4 Sep 2015 01:11:49 +0000 (18:11 -0700)]
Fix the remaining unused variable/label warnings
Commit migrated from https://github.com/dotnet/coreclr/commit/
a650e9afdfabce811db9bed39ccffe5904cc75ee
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e75e5007860e2afd356721010a583ce3b4af5fc1
Jan Vorlicek [Tue, 8 Sep 2015 16:57:10 +0000 (18:57 +0200)]
Merge pull request dotnet/coreclr#1515 from janvorli/fix-funceval-personality-routine
Remove FuncEvalHijackPersonalityRoutine for PAL
Commit migrated from https://github.com/dotnet/coreclr/commit/
2d2d0a5b512e2832565c448d9b4c6d6c1897f150
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
b7bcb50634745d5280386fb8b03e204896d54df3
Jan Vorlicek [Tue, 8 Sep 2015 12:50:24 +0000 (14:50 +0200)]
Merge pull request dotnet/coreclr#1496 from janvorli/fix-exception-memleak
Fix memory leak from managed exceptions
Commit migrated from https://github.com/dotnet/coreclr/commit/
508454cc76e1bd35c07521ebfc73617c00c5bcb3
Jan Vorlicek [Tue, 8 Sep 2015 12:26:39 +0000 (14:26 +0200)]
Merge pull request dotnet/coreclr#1514 from janvorli/fix-managed-exception-dispatch-way-2
Fix managed exception dispatching
Commit migrated from https://github.com/dotnet/coreclr/commit/
f7552e5a5076b63d88886f9d4ec5c781508e307e
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
468666bc8bd0c58268187cea5749cef63479b30e
Mike McLaughlin [Mon, 7 Sep 2015 17:27:16 +0000 (10:27 -0700)]
Merge pull request dotnet/coreclr#1507 from mikem8361/fixosx
Fix debugger/debuggee connection on OS X
Commit migrated from https://github.com/dotnet/coreclr/commit/
969a31785514ce05777f0894cac1c7b933a4e227
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
101564176e170f639053f9ed8155d962cd8275c5
Jan Vorlicek [Mon, 7 Sep 2015 06:52:06 +0000 (08:52 +0200)]
Merge pull request dotnet/coreclr#1503 from benpye/arm-strike-build-fix
Fix ARM Strike build
Commit migrated from https://github.com/dotnet/coreclr/commit/
284f3314bbb2dc70db52887f58ff1faab4373cd2
Jan Kotas [Sun, 6 Sep 2015 00:02:43 +0000 (17:02 -0700)]
Merge pull request dotnet/coreclr#1501 from erozenfeld/ReadyToRunThrowHelpers
Add mappings for ReadyToRun helpers used by llilc.
Commit migrated from https://github.com/dotnet/coreclr/commit/
bbc0fc2db020796fee2c686e82a7e13af1482f81
Ben Pye [Sat, 5 Sep 2015 23:56:17 +0000 (23:56 +0000)]
Fixes ARM Strike build
Commit migrated from https://github.com/dotnet/coreclr/commit/
8848ab12e6659ac5c6ccc57b9c4aa2d1d4ec9d8b
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0e5fe01c33eb4f008f4d626e5d7ccdb1c1410a18
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
88cf961965911b21f26699ac35ad5223e6f4496a
Jan Vorlicek [Fri, 4 Sep 2015 19:52:54 +0000 (21:52 +0200)]
Merge pull request dotnet/coreclr#1491 from janvorli/unix-remove-thread-affinity-and-critical-region
Remove thread affinity and critical region stuff for Unix
Commit migrated from https://github.com/dotnet/coreclr/commit/
248e8e447409274392ff284e58dfc2202fa0a15f
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0aaf0a793e95fbef99c2c7e7e68fb3e1e91adcff
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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
38f82df88a37fa4f47bd1b01b0faad9970b00476
Jan Kotas [Fri, 4 Sep 2015 18:15:54 +0000 (11:15 -0700)]
Merge pull request dotnet/coreclr#1484 from gitchomik/master
Documentation - building mscorlib.dll using Mono on Linux
Commit migrated from https://github.com/dotnet/coreclr/commit/
b6c0cdc4d52455dbff31cfe621149be348150728
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
Commit migrated from https://github.com/dotnet/coreclr/commit/
d1ce284a0824250a32711fa7abf04aff051fb290
Jan Kotas [Fri, 4 Sep 2015 17:46:39 +0000 (10:46 -0700)]
Merge pull request dotnet/coreclr#1493 from christos-P/patch-1
minor correction
Commit migrated from https://github.com/dotnet/coreclr/commit/
1f609113d5bbf2036b3a51391755c2c9646165c8
Matt Mitchell [Fri, 4 Sep 2015 16:44:02 +0000 (09:44 -0700)]
Merge pull request dotnet/coreclr#1490 from BruceForstall/FixILTests
Fix IL JIT tests
Commit migrated from https://github.com/dotnet/coreclr/commit/
a94621aa1fd7544490009baaf00ef3a3536052fc
christos-P [Fri, 4 Sep 2015 15:39:12 +0000 (18:39 +0300)]
minor correction
Commit migrated from https://github.com/dotnet/coreclr/commit/
090aa8e939a5fcd83b75350ab8dcab95c60a4f65
Jan Kotas [Fri, 4 Sep 2015 12:13:43 +0000 (05:13 -0700)]
Merge pull request dotnet/coreclr#1492 from benjamin-hodgson/patch-1
Fix link to API review process documentation
Commit migrated from https://github.com/dotnet/coreclr/commit/
6668a9b85352920a958fa5527dda12dc2f5886aa
Jan Kotas [Fri, 4 Sep 2015 12:12:42 +0000 (05:12 -0700)]
Merge pull request dotnet/coreclr#1489 from kangaroo/arm-clang-fixes
[arm] Fix RtlRestoreContext on ARM with newer clang
Commit migrated from https://github.com/dotnet/coreclr/commit/
e2f05c3549a9547129b952b4c1927a32a101eba9
Benjamin Hodgson [Fri, 4 Sep 2015 10:57:44 +0000 (11:57 +0100)]
Fix link to API review process documentation
Commit migrated from https://github.com/dotnet/coreclr/commit/
01959412e9d2e270bfa54b256072b102a6c660ac
Geoff Norton [Fri, 4 Sep 2015 03:26:34 +0000 (03:26 +0000)]
[arm] Fix RtlRestoreContext on ARM with newer clang
Commit migrated from https://github.com/dotnet/coreclr/commit/
7436b1ab19a090317f1cd3c8917cf0671ce1963c
Bruce Forstall [Fri, 4 Sep 2015 04:19:49 +0000 (21:19 -0700)]
More System.Console IL test cleanup
Commit migrated from https://github.com/dotnet/coreclr/commit/
769fdfe5fbab359d5722c099ed1607dd2b7ebe6e
Bruce Forstall [Fri, 4 Sep 2015 01:42:49 +0000 (18:42 -0700)]
Fix more System.Console references
Commit migrated from https://github.com/dotnet/coreclr/commit/
7e6b9a3d7b78fb5fa275988e0b686222c4e91460
Bruce Forstall [Fri, 4 Sep 2015 00:36:18 +0000 (17:36 -0700)]
Add System.Console references and replace usages with [System.Console]
Commit migrated from https://github.com/dotnet/coreclr/commit/
cc9fcb43ed083d97ed337e9a617728da03cde55d
Bruce Forstall [Fri, 4 Sep 2015 00:14:24 +0000 (17:14 -0700)]
Canonicalize appearance of empty mscorlib assembly references in .il tests
Commit migrated from https://github.com/dotnet/coreclr/commit/
3913d10b8cfdc5927872e5d63bb994ceaf0e21b3
Andy Ayers [Thu, 3 Sep 2015 22:26:21 +0000 (15:26 -0700)]
Merge pull request dotnet/coreclr#1486 from AndyAyersMS/FixWarnings
Fix compilation warnings in gcinfoencoder.
Commit migrated from https://github.com/dotnet/coreclr/commit/
1165038551b7ca20f230d867dc5fd2357ede14fe
Andy Ayers [Thu, 3 Sep 2015 21:11:36 +0000 (14:11 -0700)]
Fix compilation warnings in gcinfoencoder.
Add fake uses for two variables referenced only in asserts.
Commit migrated from https://github.com/dotnet/coreclr/commit/
72d82fa84a58034a1317ababa18562ba60d23d6e
Aditya Mandaleeka [Thu, 3 Sep 2015 21:00:36 +0000 (14:00 -0700)]
Merge pull request dotnet/coreclr#1483 from adityamandaleeka/unused_pc_functions
Fix warnings about Get/SetPc functions
Commit migrated from https://github.com/dotnet/coreclr/commit/
7e856a7d3b15bbc33544b66c8f2efdc23a792d9d
Matt Mitchell [Thu, 3 Sep 2015 20:17:38 +0000 (13:17 -0700)]
Merge pull request dotnet/coreclr#1481 from mmitche/fix-strike-build-arm-cross
Fix the SOS strike build on arm/arm64 cross
Commit migrated from https://github.com/dotnet/coreclr/commit/
b1305dfa2df32e90f9e4fc28ea7cdc2d155672dc
Lakshmi Priya [Thu, 3 Sep 2015 19:32:18 +0000 (12:32 -0700)]
Merge pull request dotnet/coreclr#1451 from Priya91/longpath
Replace MAX_PATH defines with new defines in pal.
Commit migrated from https://github.com/dotnet/coreclr/commit/
3e3abf456867d20a8c18b2bb8e1fbdee760f3033
Aditya Mandaleeka [Thu, 3 Sep 2015 19:01:13 +0000 (12:01 -0700)]
Fix warnings about Get/SetPc functions
Commit migrated from https://github.com/dotnet/coreclr/commit/
3213f33e1a6990046c295ef27e0984d54d30c885
Matt Mitchell [Thu, 3 Sep 2015 17:33:33 +0000 (10:33 -0700)]
Fix the SOS strike build on arm/arm64 cross
Fix wrong casing for filename and remove bailing for non-x64
Commit migrated from https://github.com/dotnet/coreclr/commit/
fffdd84334a1269e33b02fb6286058bdce576b82
Matt Mitchell [Thu, 3 Sep 2015 16:24:20 +0000 (09:24 -0700)]
Merge pull request dotnet/coreclr#1479 from mmitche/fix-package-issues
Package updates and fixes
Commit migrated from https://github.com/dotnet/coreclr/commit/
b2964aff2a5a77b1df87b94005face366921a9b8
Lakshmi Priya Sekar [Tue, 1 Sep 2015 00:23:01 +0000 (17:23 -0700)]
Fix directory longname test failures on Linux.
Commit migrated from https://github.com/dotnet/coreclr/commit/
33da3375532bdc404fe305a8eb6f1ba8bf07efa0
Matt Mitchell [Wed, 2 Sep 2015 23:18:14 +0000 (16:18 -0700)]
Package updates and fixes
1) Float package versions
2) Change readytorun packages to use project.json. The versions that were referenced in the packages.config didn't actually exist anyway, and on machines with cleaner caches, might cause a build breka
3) Lock SIMD packages
Commit migrated from https://github.com/dotnet/coreclr/commit/
0bdc2dbc959cbdf09b9eabcf262cede1d9cac671
Matt Mitchell [Wed, 2 Sep 2015 15:07:32 +0000 (08:07 -0700)]
Merge pull request dotnet/coreclr#1450 from ww898/build_with_spaces
Update build.cmd to support spaces in coreclr checkout directory
Commit migrated from https://github.com/dotnet/coreclr/commit/
cdfee7fc437221bed7877bfe05f4ad33978d6a17
Matt Mitchell [Wed, 2 Sep 2015 15:06:51 +0000 (08:06 -0700)]
Merge pull request dotnet/coreclr#1472 from ellismg/cleanup-msbuild-build-args
Fix release build of mscorlib from build.sh
Commit migrated from https://github.com/dotnet/coreclr/commit/
ebd5a2cfd3fec3e7bf782b8dfdf6e8c3a7787c55
Mike McLaughlin [Wed, 2 Sep 2015 02:45:16 +0000 (19:45 -0700)]
Merge pull request dotnet/coreclr#1471 from mikem8361/modenumosx
Added process module enumeration for OSx.
Commit migrated from https://github.com/dotnet/coreclr/commit/
498476a11041a72a2d83ae34362db0180cd6bfe3
Mike McLaughlin [Wed, 2 Sep 2015 02:42:36 +0000 (19:42 -0700)]
Changed popen to execute "/usr/bin/vmmap".
Commit migrated from https://github.com/dotnet/coreclr/commit/
83105bba0f65cb8f6a1359a663fa575c8349a28e
Matt Ellis [Wed, 2 Sep 2015 00:03:27 +0000 (17:03 -0700)]
Merge pull request dotnet/coreclr#1470 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
638cb90b625b9c04dbda1b0608702224d2a25cfa
Matt Ellis [Wed, 2 Sep 2015 00:02:43 +0000 (17:02 -0700)]
Merge pull request dotnet/coreclr#1464 from gitchomik/patch-1
Update linux-instructions.md
Commit migrated from https://github.com/dotnet/coreclr/commit/
c7a61c3b27e139cdc7de99fbe289b23f662993f4
Mike McLaughlin [Sat, 29 Aug 2015 00:51:53 +0000 (17:51 -0700)]
Added process module enumeration for OSx.
Enable building dbi and dbgshim on OSx. Cache the process module list in the local process data because EnumProcessModules/GetModuleFileNameExW are called by dbgshim a lot and building the list every time really affected performance especially on OSx.
Commit migrated from https://github.com/dotnet/coreclr/commit/
2ac3e423930c81de80aa441dfd8ba05ea0ad571e
Matt Ellis [Tue, 1 Sep 2015 22:17:54 +0000 (15:17 -0700)]
Fix release build of mscorlib from build.sh
The mscorlib build in build.sh was not correctly flowing __BuildType
into MSBuild, which caused us to always build a Debug mscorlib.
While I was in the area, I removed the defines for OSGroup (which are
unused, as we use __BuildOS instead) and cleaned up some of the property
switches so we always pass prefixed properties (the bare names are the
computed ones from our targets in msbuild).
Commit migrated from https://github.com/dotnet/coreclr/commit/
37e660b61ccf1c0e31f22a0b9bde3f9fc5023218
Mike McLaughlin [Tue, 1 Sep 2015 21:10:21 +0000 (14:10 -0700)]
Merge pull request dotnet/coreclr#1469 from mikem8361/freebsdfix
Fix FreeBSD build after merge of my changes from the ProjectK branch.
Commit migrated from https://github.com/dotnet/coreclr/commit/
a12d44f2c6c41d1435c77d2862b13b90f1e0e02a
Pat Gavlin [Tue, 1 Sep 2015 18:33:15 +0000 (11:33 -0700)]
Merge pull request dotnet/coreclr#1458 from ANDREENKOS/SIMDTests
delete fixed tests from issue list
Commit migrated from https://github.com/dotnet/coreclr/commit/
958d6ce8b010178dbc1c894b923cd86386650f97
Mike McLaughlin [Tue, 1 Sep 2015 16:47:47 +0000 (09:47 -0700)]
Fix FreeBSD build after merge of my changes from the ProjectK branch.
Commit migrated from https://github.com/dotnet/coreclr/commit/
9a75aa888ba231905ac9b8c0d416976f19004f66
Stephen Toub [Tue, 1 Sep 2015 14:54:41 +0000 (10:54 -0400)]
Merge pull request dotnet/coreclr#1467 from janvorli/fix-curl-pinvoke
Fix PInvokes into libraries using pthread locks
Commit migrated from https://github.com/dotnet/coreclr/commit/
76295f3b8cac44666b79a65339df408b3ca6f192
Jan Vorlicek [Tue, 1 Sep 2015 11:25:55 +0000 (13:25 +0200)]
Fix pthread locks initialization issue
This change fixes a problem on Linux when pinvoke loads a shared library and
that library transitively uses pthread locks. In that case, the locks may
not be initialized yet and behave as nops, causing the thread synchronization
to not to work.
Linking corerun / coreconsole with pthreads ensures that the locks are always
properly initialized.
Commit migrated from https://github.com/dotnet/coreclr/commit/
c1f78205448365fc47dd5b802b6812bd78b109a8
Zhicheng Zhu [Tue, 1 Sep 2015 03:03:00 +0000 (20:03 -0700)]
The UPDATE_CONTEXT_POINTERS actually breaks lots of debuggers tests. The root problem is that when arm unwind the stack, we will call this function
hr = RtlpUnwindFunctionFull(pContext->Pc - (ULONG)ImageBase,
(ULONG)ImageBase,
&Rfe,
pContext,
&DummyEstablisherFrame,
&DummyHandlerRoutine,
&DummyHandlerData,
NULL); <-- UnwindParams
This will set UnwindParams as NULL, and eventually passed to UPDATE_CONTEXT_POINTERS and UPDATE_FP_CONTEXT_POINTERS in RtlpPopRegisterMask. This will generate the AV.
The fix is just simply checking the whether the Params is NULL or not.
[tfs-changeset: 1520758]
Commit migrated from https://github.com/dotnet/coreclr/commit/
7c0a1e4c90c626d569a60a1431a48b0a620e51d5
Mike McLaughlin [Mon, 31 Aug 2015 20:24:29 +0000 (13:24 -0700)]
Fix the build break caused by my recent xplat SOS changes.
[tfs-changeset: 1520601]
Commit migrated from https://github.com/dotnet/coreclr/commit/
1d5dcc52c7a2661bbda732c98c511f4e6f2ce6f8
gitchomik [Mon, 31 Aug 2015 19:39:11 +0000 (21:39 +0200)]
Update linux-instructions.md
Added information about Native Components in runtime directory
Commit migrated from https://github.com/dotnet/coreclr/commit/
7924e3e105d8166c5b64241f21391dd713b4849e
Sergey Andreenko [Fri, 28 Aug 2015 20:58:18 +0000 (13:58 -0700)]
delete fixed tests from issue list
According to https://github.com/dotnet/corefx/pull/2971 remove tests
that were affected by https://github.com/dotnet/coreclr/issues/1441 from
issues.
Commit migrated from https://github.com/dotnet/coreclr/commit/
2542cab546e1a217c6fe5d488225b9aa92110b10
Lakshmi Priya Sekar [Fri, 28 Aug 2015 20:46:30 +0000 (13:46 -0700)]
Respond to PR feedback.
Commit migrated from https://github.com/dotnet/coreclr/commit/
231685d34201bb09bfd964eb3baf52ffe904a8e6
Jan Vorlicek [Fri, 28 Aug 2015 19:28:21 +0000 (21:28 +0200)]
Merge pull request dotnet/coreclr#1455 from janvorli/ready-to-run-tests-2
Ensure ReadyToRun test verifies version resiliency
Commit migrated from https://github.com/dotnet/coreclr/commit/
7b5e558e092b0afef8c2cdba0ba32e0e45308b90
Jan Vorlicek [Fri, 28 Aug 2015 10:12:28 +0000 (12:12 +0200)]
Ensure ReadyToRun test verifies version resiliency
This change modifies the ReadyToRun test so that it verifies assembly version resiliency.
Commit migrated from https://github.com/dotnet/coreclr/commit/
b842c006b4231fcfcb9fb6e9872d895e34759d4a
Jan Kotas [Fri, 28 Aug 2015 04:29:00 +0000 (21:29 -0700)]
Merge pull request dotnet/coreclr#1446 from benpye/arm-regression-fix
Fix build regression for ARM.
Commit migrated from https://github.com/dotnet/coreclr/commit/
bb1f4addbad0e14f3ce2cddbdf101d65fc3c0627
Mike McLaughlin [Fri, 28 Aug 2015 01:40:22 +0000 (18:40 -0700)]
Merge pull request dotnet/coreclr#1442 from mikem8361/cmdaliases
Enabled GCInfo, EEHeap, DumpRuntimeTypes and EHInfo SOS commands
Commit migrated from https://github.com/dotnet/coreclr/commit/
3d16b922cf95b5a4df899def1f5a15acf1083df7
Lakshmi Priya Sekar [Fri, 28 Aug 2015 00:46:38 +0000 (17:46 -0700)]
Replace MAX_PATH defines with new defines in pal.
Commit migrated from https://github.com/dotnet/coreclr/commit/
2e21c332cc3df2f8629df144dfa597c8f0dfd7e2
Lakshmi Priya [Thu, 27 Aug 2015 23:42:55 +0000 (16:42 -0700)]
Merge pull request dotnet/coreclr#1449 from Priya91/longpath-binder
Replace missed MAX_PATH defines with new defines in vm.
Commit migrated from https://github.com/dotnet/coreclr/commit/
d1ca7f37e23cbf50f48031ae202411f66b17808a