sivarv [Wed, 21 Dec 2016 01:25:29 +0000 (17:25 -0800)]
Fix GT_LOCKADD register specification.
Gaurav Khanna [Thu, 15 Dec 2016 21:36:26 +0000 (13:36 -0800)]
Merge pull request #8649 from dotnet-bot/master-UpdateDependencies
Update CoreClr, CoreFx to beta-24815-03, beta-24815-03, respectively (master)
Carol Eidt [Thu, 15 Dec 2016 19:02:19 +0000 (11:02 -0800)]
Merge pull request #8642 from CarolEidt/Fix359736
Correctly sequence fgMorphModToSubMulDiv
dotnet-bot [Thu, 15 Dec 2016 17:39:00 +0000 (17:39 +0000)]
Update CoreClr, CoreFx to beta-24815-03, beta-24815-03, respectively
John Chen [Thu, 15 Dec 2016 16:47:23 +0000 (08:47 -0800)]
Remove API Set dependency (#8624)
Carol Eidt [Thu, 15 Dec 2016 16:38:57 +0000 (08:38 -0800)]
Merge pull request #8207 from CarolEidt/StreamlineResolution
Streamline LSRA resolution
Sivarv [Thu, 15 Dec 2016 15:37:02 +0000 (07:37 -0800)]
Merge pull request #8329 from litian2025/Fix_SIMDScalarMoveEncoding
Fix SIMD Scalar Move Encoding: VEX.L should be 0
Gaurav Khanna [Thu, 15 Dec 2016 05:08:28 +0000 (21:08 -0800)]
Merge pull request #8645 from dotnet-bot/master-UpdateDependencies
Update CoreFx to beta-24815-01 (master)
dotnet-bot [Thu, 15 Dec 2016 03:48:47 +0000 (03:48 +0000)]
Update CoreFx to beta-24815-01
Sasha Semennikov [Thu, 15 Dec 2016 01:09:20 +0000 (17:09 -0800)]
Merge pull request #8546 from alsemenn/debuggertests_generate_scripts_win
Add script generator and generate test scripts to adapt debuggertests…
Pat Gavlin [Thu, 15 Dec 2016 00:14:46 +0000 (16:14 -0800)]
Merge pull request #8640 from pgavlin/VSO359734
Fix ref count adjustment in `fgMorphBlockStmt`.
Li Tian [Mon, 28 Nov 2016 22:48:01 +0000 (14:48 -0800)]
Fix SIMD Scalar Move Encoding: VEX.L should be 0
For SIMD Scalar Move instructions such as vmovlpd, vmovlps, vmovhps,
vmovhps and vmovss on AVX system, JIT should ensure that those
instructions are encoded with VEX.L=0, because encoding them with
VEX.L=1 may encounter unpredictable behavior across different
processor generations. The reason of VEX.L is encoded with 1 is
because JIT calls compiler->getSIMDVectorType() which returns
EA_32BYTE, and it is been passed into emitter AddVexPrefix() which
ends up encoded VEX.L=1, the fix is to pass target type and base
type for those instructions to ensure that VEX.L=0 at emitter
AddVexPrefix()
Fix #8328
Carol Eidt [Wed, 14 Dec 2016 21:58:11 +0000 (13:58 -0800)]
Correctly sequence fgMorphModToSubMulDiv
This method was creating a temp, but the final result was a GT_SUB with
a use of the temp as its op1, and it was not setting GTF_REVERSE_OPS.
This led to a liveness assert in LSRA.
Pat Gavlin [Wed, 14 Dec 2016 21:52:50 +0000 (13:52 -0800)]
Add a regression test.
Gaurav Khanna [Wed, 14 Dec 2016 21:32:00 +0000 (13:32 -0800)]
Merge pull request #8582 from dotnet-bot/master-UpdateDependencies
Update CoreClr, CoreFx to beta-24814-03, beta-24814-02, respectively (master)
Pat Gavlin [Wed, 14 Dec 2016 20:23:54 +0000 (12:23 -0800)]
Fix ref count adjustment in `fgMorphBlockStmt`.
LclVar ref counts must be incremented before attempting to remove the
morphed statement, since doing so decrements ref counts (and thus
requires refcounts to be conservatively correct).
Fixes VSO 359734.
Igor Kulaychuk [Wed, 14 Dec 2016 19:38:11 +0000 (22:38 +0300)]
[Linux][GDB-JIT] Add simple C++ mangling of method names in GDBJIT DWARF (#8638)
* Add simple C++ mangling of method names in GDBJIT DWARF
Example:
Namespace1.Class1.Method -> void Namespace1_Class1::Method()
* Do not convert a name during mangling if target buffer is NULL
Pat Gavlin [Wed, 14 Dec 2016 19:21:17 +0000 (11:21 -0800)]
Merge pull request #8601 from pgavlin/gh7963
Fix consume-order checking in codegen.
Michal Strehovský [Wed, 14 Dec 2016 18:03:53 +0000 (10:03 -0800)]
Add support for R2R ldvirtftn helpers (#8608)
The codegen for the non-readytorun path (used on CoreCLR) requires the
runtime to support general purpose virtual method resolution based on a
method handle. CoreRT doesn't have such helpers.
dotnet-bot [Wed, 14 Dec 2016 17:26:31 +0000 (17:26 +0000)]
Update CoreClr, CoreFx to beta-24814-03, beta-24814-02, respectively
Jonghyun Park [Wed, 14 Dec 2016 10:35:21 +0000 (19:35 +0900)]
Move RUNTIME_FUNCTION__BeginAddress into clrnt.h (#8632)
RUNTIME_FUNCTION__BeginAddress is defined in corcompile.h for x86, but
is defined in clrnt.h for all the other architectures.
This commit moves RUNTIME_FUNCTION__BeginAddress defines for x86 into
clrnt.h to make it consistent.
Jonghyun Park [Wed, 14 Dec 2016 10:29:32 +0000 (19:29 +0900)]
[x86/Linux] Adds Dummy Exception Handler (#8613)
This commit adds a dummy exeption handler to enable x86/Linux build.
This commit also reverts
7b92136d5ee to make it easy to enable
WIN64EXCEPTIONS in x86/Linux.
mskvortsov [Wed, 14 Dec 2016 02:26:32 +0000 (05:26 +0300)]
[ARM32/Linux] Initial bring up of FEATURE_INTERPRETER (#8594)
* Bring up FEATURE_INTERPRETER for ARM32/Linux
* Add a disclaimer message for GC preemption workaround
ahsonkhan [Wed, 14 Dec 2016 02:25:29 +0000 (18:25 -0800)]
Adding method implementations to fast span/readonlyspan (#8607)
Jonghyun Park [Wed, 14 Dec 2016 02:15:21 +0000 (11:15 +0900)]
[x86/Linux] Enforce 16-byte stack alignment (#8587)
Clang (and GCC) requires 16-byte stack alignment, but the current
implementation of CallDescrInternal and ThePreStub does not provide any
guarantee on stack alignment.
This commit adds 16-byte stack alignment adjust code inside these functions.
Jonghyun Park [Wed, 14 Dec 2016 01:26:14 +0000 (10:26 +0900)]
[x86/Linux] Fix incorrect __fastcall definition (#8585)
In x86/Linux, __fastcall is defined as __stdcall which causes stack
corruption issue for the following functions:
- HelperMethodFrameRestoreState
- LazyMachStateCaptureState
This commit removes __fastcall definition as clang recognize __fastcall.
Jonghyun Park [Wed, 14 Dec 2016 00:46:40 +0000 (09:46 +0900)]
[x86/Linux] Fix "Bad opcode" assert in unwindLazyState (#8609)
* [x86/Linux] Fix "Bad opcode" assert in unwindLazyState
This commit suppresses "Bad opcode" assert while runing "Hello, World" example.
This commit address the following three code patterns discovered while
digging the assert failure:
- and $0x1, %al
- xor $0xff, %al
- stack protection code:
mov %gs:<off>, <reg>
cmp <off>(%esp), <reg>
mov <reg>, <off>($esp)
jne <disp32>
This commit revises LazyMachState::unwindLazyState to handle the first two patterns,
and revises compile options not to emit the third pattern.
Bruce Forstall [Tue, 13 Dec 2016 23:59:02 +0000 (15:59 -0800)]
Merge pull request #8617 from hqueue/arm/test20161210/IsContainableImmed
Ryujit/ARM32 Initial Lowering::IsContainableImmed for ARM
Jonghyun Park [Tue, 13 Dec 2016 23:36:06 +0000 (08:36 +0900)]
[x86/Linux] Port jithelp.asm (#8491)
* [x86/Linux] Port jithelp.asm
This commit ports jithelp.asm for x86/Linux
The following Tailcall helpers are marked as NYI:
- JIT_TailCall
- JIT_TailCallReturnFromVSD
- JIT_TailCallVSDLeave
- JIT_TailCallLeave
* Revise macro and indentation
Pat Gavlin [Tue, 13 Dec 2016 23:30:09 +0000 (15:30 -0800)]
Fix the ARM32 build.
Jeremy Kuhne [Tue, 13 Dec 2016 22:40:23 +0000 (14:40 -0800)]
Remove no-op file security (#8611)
Deletes FileSecurityState and pulls redundant methods. Also
removes DriveInfo, which isn't in use in Core.
Pat Gavlin [Mon, 12 Dec 2016 19:34:26 +0000 (11:34 -0800)]
Fix consume-order checking in codegen.
The switch to LIR invalidated the correspondence between a node's
sequence number and the order in which it must be consumed with respect
to other nodes. This in turn made the consume-order checks during code
generation incorrect.
This change introduces a new field, `gtUseNum`, that is used during code
generation to check the order in which nodes are consumed. Re-enabling
these checks revealed a bug in code generation for locked instructions
on x86, which were consuming their operands out-of-order; this change
also contains a fix for that bug.
Fixes #7963.
Wes Haggard [Tue, 13 Dec 2016 21:34:16 +0000 (13:34 -0800)]
Merge pull request #8560 from AlexRadch/Deconstruction
Supporting C# 7 deconstruction of KeyValuePair and DictionaryEntry
Sivarv [Tue, 13 Dec 2016 19:39:02 +0000 (11:39 -0800)]
Merge pull request #8621 from mikedn/cmp-cast-drop
Fix incorrect compare narrowing in TreeNodeInfoInitCmp
Mike Danes [Tue, 13 Dec 2016 12:45:13 +0000 (14:45 +0200)]
Fix incorrect compare narrowing in TreeNodeInfoInitCmp
TreeNodeInfoInitCmp attempts to eliminate the cast from
`cmp(cast<ubyte>(x), icon)` by narrowing the compare to ubyte. This should
only happen if the constant fits in a byte so it can be narrowed too,
otherwise codegen produces an int sized compare. (or a byte sized compare
with a truncated constant if we try to use GTF_RELOP_SMALL).
Mike McLaughlin [Tue, 13 Dec 2016 17:11:57 +0000 (09:11 -0800)]
Enable interop debugging for Windows amd64 and x86. (#8603)
Found sos portable pdb problem on x86. Fixed interop problems between the native sos and SOS.NetCore managed helper assembly.
Jan Kotas [Tue, 13 Dec 2016 16:35:56 +0000 (08:35 -0800)]
Synchronize src\mscorlib\corefx with the CoreRT fork (#8619)
Jeremy Kuhne [Tue, 13 Dec 2016 12:51:28 +0000 (04:51 -0800)]
Remove managed environment cache (#8604)
The PAL already caches- no need to do it in managed.
Fold the code back into Environment.cs.
Jan Kotas [Tue, 13 Dec 2016 12:19:55 +0000 (04:19 -0800)]
Delete HostProtection attributes (#8610)
Hyung-Kyu Choi [Tue, 13 Dec 2016 06:27:01 +0000 (15:27 +0900)]
Ryujit/ARM32 Initial Lowering::IsContainableImmed for ARM
Initial implementation of IsContainableImmed for ARM.
Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
Carol Eidt [Tue, 13 Dec 2016 02:48:18 +0000 (18:48 -0800)]
Merge pull request #8520 from hqueue/arm/test20161208/lowercast
Ryujit/ARM32: Implement Lowering::LowerCast for ARM
Hyung-Kyu Choi [Tue, 13 Dec 2016 00:36:33 +0000 (09:36 +0900)]
Ryujit/ARM32 Implement Lowering::LowerCast for ARM
Simple integer to interger type conversion is passed.
Add comment for LowreCast with C++ comment style.
Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
Drew Scoggins [Tue, 13 Dec 2016 00:30:34 +0000 (16:30 -0800)]
Merge pull request #8510 from DrewScoggins/CommitNameFix
Add ability to give a name to a manual PR run
When using the PR leg of the Jenkins performance jobs it is now possible to specify a name that will be used when inserting the data into the perf database.
Drew Scoggins [Thu, 8 Dec 2016 00:12:14 +0000 (16:12 -0800)]
Add ability to give a name to a PR run
Jan Kotas [Mon, 12 Dec 2016 23:43:49 +0000 (15:43 -0800)]
Rename Contract.Assert to Debug.Assert (#8600)
SaeHie Park [Mon, 12 Dec 2016 23:22:29 +0000 (08:22 +0900)]
[x86/Linux] implement TheUMEntryPrestub (#8589)
Initial code for x86 TheUMEntryPrestub, UMThunkStub
Davis Goodin [Mon, 12 Dec 2016 21:50:05 +0000 (15:50 -0600)]
Fix longname DAC to enable arm[64] symbol packages (#8574)
Sivarv [Mon, 12 Dec 2016 21:36:43 +0000 (13:36 -0800)]
Merge pull request #8532 from sivarv/fixedRegFix
Fix to issue 8286.
Michelle McDaniel [Mon, 12 Dec 2016 21:26:02 +0000 (13:26 -0800)]
Merge pull request #8598 from adiaaida/disableGetGeneration
Disable GetGenerationWR2 for GCStress on x86
Brian Sullivan [Mon, 12 Dec 2016 19:43:10 +0000 (11:43 -0800)]
Merge pull request #8541 from briansull/vso-287671
Fix missing flags on GT_DYN_BLK node
Alexander Radchenko [Mon, 12 Dec 2016 19:27:49 +0000 (02:27 +0700)]
// BLOCKED (do not add now): [EditorBrowsable(EditorBrowsableState.Never)]
Michelle McDaniel [Mon, 12 Dec 2016 19:01:47 +0000 (11:01 -0800)]
Disable GetGenerationWR2 for GCStress on x86
Disable this test for GCStress on x86 until the cause for its failure
can be investigated.
Gaurav Khanna [Mon, 12 Dec 2016 18:54:13 +0000 (10:54 -0800)]
Merge pull request #8421 from hseok-oh/enable_arm_linux_nupkg
First step to create nuget packages for ARM32/Linux
Matt Warren [Mon, 12 Dec 2016 17:30:58 +0000 (17:30 +0000)]
Span<T> api update (#8583)
* Changing method/property order to match CoreFX impl
To make diffing the files easier
* Added other missing methods to match CoreFX impl
Added:
- public void CopyTo(Span<T> destination)
- public static bool operator ==(Span<T> left, Span<T> right)
- public static bool operator !=(Span<T> left, Span<T> right)
- public override bool Equals(object obj)
- public override int GetHashCode()
Also removed 'public void Set(ReadOnlySpan<T> values)' and it's no
longer part of the Span<T> public API, see
https://github.com/dotnet/apireviews/tree/master/2016/11-04-SpanOfT#spantset
Evgeny Pavlov [Mon, 12 Dec 2016 12:27:49 +0000 (15:27 +0300)]
[x86/Linux][SOS] Don't include utilcode.h in gcdumpx86.cpp and gcdump.cpp (#8475)
Evgeny Pavlov [Mon, 12 Dec 2016 10:55:15 +0000 (13:55 +0300)]
[x86/Linux][SOS] Add CALLBACK (aka stdcall) to function declarations (#8476)
Sean Gillespie [Sun, 11 Dec 2016 01:50:06 +0000 (17:50 -0800)]
Local GC: Decouple write barrier operations between the GC and EE (#8568)
* Decouple write barrier operations between the GC and EE
* Address code review feedback
* Address code review feedback
* Repair the standalone GC build
Andy Ayers [Sat, 10 Dec 2016 18:11:04 +0000 (10:11 -0800)]
Fix typo in clang-format directive and reformat end of flowgraph.cpp (#8573)
Last 4K or so lines of flowgraph.cpp were not being formatted because
the clang-format on directive had a typo.
Fix the typo and reformat the latter part of the file.
Stephen Toub [Sat, 10 Dec 2016 16:03:19 +0000 (11:03 -0500)]
Merge pull request #8581 from stephentoub/cwt_unsafecast
Use JitHelpers.UnsafeCast in ConditionalWeakTable
Stephen Toub [Sat, 10 Dec 2016 14:54:15 +0000 (09:54 -0500)]
Use JitHelpers.UnsafeCast in ConditionalWeakTable
We know the types and can use UnsafeCast when reading out the objects as TKey and TValue. This improves reading speed by ~30%.
Stephen Toub [Sat, 10 Dec 2016 13:35:29 +0000 (08:35 -0500)]
Merge pull request #8420 from dotnet-bot/master-UpdateDependencies
Update CoreClr, CoreFx to beta-24810-01, beta-24810-02, respectively (master)
Jan Kotas [Sat, 10 Dec 2016 08:31:20 +0000 (00:31 -0800)]
Improve ConditionalWeakTable.Remove (#8580)
Clear the key of the deleted entry to allow GC collect objects pointed to by it
Fixes #8577
Justin Van Patten [Sat, 10 Dec 2016 06:27:54 +0000 (22:27 -0800)]
TimeZoneInfo: Avoid cloning privately-created ArgumentRule[] arrays (#8575)
TimeZoneInfo currently always creates a defensive copy of the specified
ArgumentRule[] array when created. This makes sense for the public
static factory methods. However, there's no need to create a defensive
copy of arrays created privately as part of its implementation (e.g.
reading the rules from the registry/disk). This change avoids the
unnecessary cloning.
Derek Beattie [Sat, 10 Dec 2016 06:17:15 +0000 (00:17 -0600)]
Fix typos and grammer in coreclr README.md (#8561)
* Fix typeos and grammer in README.md
* Fix a small grammar issue and remove a comma
Justin Van Patten [Sat, 10 Dec 2016 06:15:56 +0000 (22:15 -0800)]
Fix misguided lock in CurrentTimeZone (#8569)
CurrentTimeZone locks against a static lock object when modifying a
non-static Hashtable. Instead, use the Hashtable instance itself as the
lock object.
Jeremy Kuhne [Sat, 10 Dec 2016 05:11:20 +0000 (21:11 -0800)]
Removes final FEATURE_CORECLR defines (#8555)
Santiago Fernandez Madero [Sat, 10 Dec 2016 05:11:05 +0000 (21:11 -0800)]
Adding API ConditionalWeakTable.AddOrUpdate (#8490)
* Added ConditionalWeakTable.AddOrUpdate
dotnet-bot [Sat, 10 Dec 2016 04:00:24 +0000 (04:00 +0000)]
Update CoreClr, CoreFx to beta-24810-01, beta-24810-02, respectively
sivarv [Thu, 8 Dec 2016 20:12:35 +0000 (12:12 -0800)]
Fix to issue 8286.
Stephen Toub [Sat, 10 Dec 2016 01:41:08 +0000 (20:41 -0500)]
Merge pull request #8576 from stephentoub/cwt_clear
Change ConditionalWeakTable.Clear
Stephen Toub [Sat, 10 Dec 2016 00:00:50 +0000 (19:00 -0500)]
Change ConditionalWeakTable.Clear
The original CoreRT implementation just dropped the current table and replaced it with a new one. In the process of porting the CoreRT implementation to CoreCLR, I'd changed it to instead remove each item from the table (by setting its hashcode to -1, as does Remove), in order to work around some code in the finalizer that would null out te parent's reference to the container, and that would cause problems with dropping this table... but that code in the finalizer changed before it got merged, and in its current form, the old CoreRT clear implementation was fine. It's also likely better, as it'll let the handles be cleaned up earlier, and it's simple. So reverting back to it.
Stephen Toub [Fri, 9 Dec 2016 23:42:10 +0000 (18:42 -0500)]
Merge pull request #8572 from stephentoub/cwt_gpas
Change CWT use of GetPrimaryAndSecondary to GetPrimary
Jeremy Kuhne [Fri, 9 Dec 2016 21:42:16 +0000 (13:42 -0800)]
Strip some security related attributes (#8571)
Strips SecurityCritical, SecuritySafeCritical, SecurityPermission,
EnvironmentPermission, and PermissionSet attributes.
Also removes empty defines these left behind.
Patterns used:
^.*\[(System\.Security\.)?SecurityCritical\](\s*//.*|\s*)$[\r\n]*
^.*#if FEATURE_CORECLR[\s\r\n]*(#else)?[\s\r\n]*#endif.*[\r\n]*
^.*\[(System\.Security\.Permissions\.)?SecurityPermission(Attribute)?\([^)]*\)\](\s*//.*|\s*)$[\r\n]*
Stephen Toub [Fri, 9 Dec 2016 21:09:26 +0000 (16:09 -0500)]
Change CWT use of GetPrimaryAndSecondary to GetPrimary
This snuck in as part of my previous ConditionalWeakTable changes. We don't need the secondary here, and it's more expensive to get than just the primary.
John Chen [Fri, 9 Dec 2016 17:20:39 +0000 (09:20 -0800)]
Fix path separator in CrossGen help on Linux
Alexander Radchenko [Fri, 9 Dec 2016 19:33:44 +0000 (02:33 +0700)]
Make it easier to iterate through an ArraySegment (#8559)
* Make it easier to iterate through an ArraySegment. See Make it easier to iterate through an ArraySegment
Sivarv [Fri, 9 Dec 2016 19:30:30 +0000 (11:30 -0800)]
Merge pull request #8544 from sivarv/moveRegFix
Fix to issue 8287.
Stephen Toub [Fri, 9 Dec 2016 18:04:01 +0000 (13:04 -0500)]
Merge pull request #8507 from stephentoub/portcorert_cwt
Make ConditionalWeakTable reads lock-free
Alexander Radchenko [Fri, 9 Dec 2016 17:37:23 +0000 (00:37 +0700)]
StringBuilder.AppendJoin (appending lists to StringBuilder) (#8350)
Adding StringBuilder.AppendJoin
Gaurav Khanna [Fri, 9 Dec 2016 16:24:31 +0000 (08:24 -0800)]
Merge pull request #8563 from xoofx/TPA_glossary
Add TPA/Trusted Platform Assemblies description to the glossary
Alexandre Mutel [Fri, 9 Dec 2016 16:17:46 +0000 (17:17 +0100)]
Add TPA/Trusted Platform Assemblies description to the glossary (From https://github.com/dotnet/coreclr/issues/6470#issuecomment-
235161459 )
Alexander Radchenko [Fri, 9 Dec 2016 15:14:37 +0000 (22:14 +0700)]
model.xml
Jonghyun Park [Fri, 9 Dec 2016 12:27:03 +0000 (21:27 +0900)]
[x86/Linux] Port ResolveWorkerAsmStub (#8557)
Jonghyun Park [Fri, 9 Dec 2016 12:22:06 +0000 (21:22 +0900)]
[x86/Linux] Use Portable FastGetDomain (#8556)
FastGetDomain function (with __declspec(naked)) causes segmentation
fault.
Jan Vorlicek [Fri, 9 Dec 2016 09:50:01 +0000 (10:50 +0100)]
Fix incremental build when dummy version.cpp is generated (#8547)
This change fixes a problem with incremental build on Unix. When the
version.cpp is generated by the build.sh as a dummy one with no real
version stamp in it, it is recreated every time the build.sh is run.
That means that build needs to rebuild that file and also re-link
all the components that include it.
This change tests the file presence and contents before actually
regenerating it.
SaeHie Park [Fri, 9 Dec 2016 09:29:16 +0000 (18:29 +0900)]
[x86/Linux] Fix getcpuid calling convention (#8552)
Fix getcpuid(), getextcpuid() with STDCALL
Fix xmmYmmStateSupport() with STDCALL
Jeremy Kuhne [Fri, 9 Dec 2016 05:39:00 +0000 (21:39 -0800)]
Strip more defines from CoreLib (#8545)
* Strip more defines from CoreLib
Removes the rest of
FEATURE_CAS_POLICY
FEATURE_REMOTING
FEATURE_MACL
And another significant chunk of
!FEATURE_CORECLR
* Address feedback
Stephen Toub [Wed, 7 Dec 2016 21:35:03 +0000 (16:35 -0500)]
Fix perf regression with lots of objects in a ConditionalWeakTable
The CoreRT implementation of ConditionalWeakTable that was ported back to CoreCLR uses a special scheme to make reads lock-free. When the container needs to grow, it allocates new arrays and duplicates all of the dependency handles from the previous array, rather than just copying them. This avoids issues stemming from a thread getting a dependency handle in an operation on the container, then having that handle destroyed, and then trying to use it; the handle won't be destroyed as long as the container is referenced.
However, this also leads to a significant cost in a certain situation. Every time the container grows, it allocates another N dependency handles where N is the current size of the container. So, for example, with an initial size of 8, if 64 objects are added to the container, it'll allocate 8 dependency handles, then another 16, then another 32, and then another 64, resulting in significantly more handles than in the old implementation, which would only allocate 64 handles total.
This commit fixes that by changing the scheme slightly. A container still frees its handles in its finalizer. However, rather than duplicating all handles, that responsibility for freeing is transferred from one container to the next. Then to avoid issues where, for example, the second container is released while the first is still in use, a reference is maintained from the first to the second, so that the second can't be finalized while the first is still in use.
The commit also fixes a race condition with resurrection and finalization, whereby dependency handles could be used while or after they're being freed by the finalizer. It's addressed by only freeing handles in a second finalization after clearing out state in the first finalization to guarantee no possible usage during the second.
Stephen Toub [Wed, 7 Dec 2016 20:43:05 +0000 (15:43 -0500)]
Port ConditionalWeakTable from CoreRT
The CoreRT ConditionalWeakTable was modified to support lock-free reads. This ports the implementation back to coreclr.
sivarv [Thu, 8 Dec 2016 23:40:20 +0000 (15:40 -0800)]
Fix to issue 8287.
sandreenko [Fri, 9 Dec 2016 01:56:58 +0000 (17:56 -0800)]
Merge pull request #8539 from sandreenko/fix-unix-unwind-info
Fix unix unwind info
SaeHie Park [Fri, 9 Dec 2016 01:09:48 +0000 (10:09 +0900)]
[x86/Linux] Fix PAL unit test paltest_pal_sxs_test1 (#8522)
Fix unit test error for x86/Linux
- fix fail of exception_handling/pal_sxs/test1/paltest_pal_sxs_test1
Jonghyun Park [Fri, 9 Dec 2016 01:03:07 +0000 (10:03 +0900)]
[x86/Linux] Revise asmhelper.S using macro (#8523)
* [x86/Linux] Revise asmhelper.S using macro
This commit revises asmhelper.S using macros that inserts CFI
directives.
Pat Gavlin [Fri, 9 Dec 2016 01:02:11 +0000 (17:02 -0800)]
Merge pull request #8537 from pgavlin/VSO299202
Disable special put args for LIMIT_CALLER on x86.
Pat Gavlin [Fri, 9 Dec 2016 00:57:14 +0000 (16:57 -0800)]
Merge pull request #8543 from pgavlin/VSO299207
Correct an assertion in LSRA.
Justin Van Patten [Fri, 9 Dec 2016 00:46:23 +0000 (16:46 -0800)]
Make TimeZoneInfo fields readonly (#8526)
TimeZoneInfo is immutable. Help enforce this by making its fields
readonly.
Justin Van Patten [Fri, 9 Dec 2016 00:44:20 +0000 (16:44 -0800)]
TimeZoneInfo: Use string.Concat instead of string.Format (#8540)
It's more efficient to concatenate the strings.
Justin Van Patten [Fri, 9 Dec 2016 00:43:45 +0000 (16:43 -0800)]
Make TimeZoneInfo.TransitionTime fields readonly (#8529)
TransitionTime is immutable. Help enforce this by making its fields
readonly.
Jonghyun Park [Fri, 9 Dec 2016 00:43:00 +0000 (09:43 +0900)]
[x86/Linux] Port Several Stubs as NYI (#8515)
This commit adds SinglecastDelegateInvokeStub and VSD-related Stubs as NYI.
Justin Van Patten [Fri, 9 Dec 2016 00:39:28 +0000 (16:39 -0800)]
Make TimeZoneInfo.AdjustmentRule fields readonly (#8528)
AdjustmentRule is immutable. Help enforce this by making its fields
readonly.