platform/upstream/coreclr.git
7 years agoMerge pull request #8073 from dotnet/enablebinclash
chcosta [Mon, 14 Nov 2016 23:17:54 +0000 (15:17 -0800)]
Merge pull request #8073 from dotnet/enablebinclash

Enable binclash logger

7 years agoMerge pull request #8086 from pgavlin/VSO278523
Pat Gavlin [Mon, 14 Nov 2016 23:15:34 +0000 (15:15 -0800)]
Merge pull request #8086 from pgavlin/VSO278523

Admit more dest addresses in block assign value-numbering.

7 years agoAdmit more dest addresses in block assign value-numbering.
Pat Gavlin [Fri, 11 Nov 2016 18:20:59 +0000 (10:20 -0800)]
Admit more dest addresses in block assign value-numbering.

Internal testing revealed an assertion when computing the value number
for block assignments: the VN framework expected any block assignments
to a tracked lclVar to have a destination address of the form
`(addr (lclVar))` or `(addr (lclFld))`. However, the check that it
uses to determine whether or not a block assignment targets a lclVar
also admits addresses formed by some combination of adds of constants
to these patterns (e.g. `(add (const 4) (add (addr lclVar) (const 4)))`.

This fix admits these additional patterns in value numbering by allowing
`ExtendPtrVN(GenTree*, GenTree*)` to supply `NotAField` to
`ExtendPtrVN(GenTree*, FieldSeqNode*)`.

7 years agoMerge pull request #8111 from BruceForstall/FixTestNewlines
Bruce Forstall [Mon, 14 Nov 2016 21:44:06 +0000 (13:44 -0800)]
Merge pull request #8111 from BruceForstall/FixTestNewlines

Don't generate explicit newlines in SIMD tests

7 years agoMerge pull request #8115 from chcosta/updatebuildtools
chcosta [Mon, 14 Nov 2016 21:40:51 +0000 (13:40 -0800)]
Merge pull request #8115 from chcosta/updatebuildtools

Update buildtools to version 01008-01

7 years agoMerge pull request #8031 from pgavlin/VSO283795
Pat Gavlin [Mon, 14 Nov 2016 21:10:52 +0000 (13:10 -0800)]
Merge pull request #8031 from pgavlin/VSO283795

Do not fold `(x + null)` in certain cases.

7 years agoMerge pull request #8101 from sivarv/rmwOpt
Sivarv [Mon, 14 Nov 2016 19:07:36 +0000 (11:07 -0800)]
Merge pull request #8101 from sivarv/rmwOpt

Generate "inc/dec [mem]" instead of "add/sub [mem], 1" for Read-Modify-Write (RMW) operations.

7 years agoFix test exclusions.
Pat Gavlin [Mon, 14 Nov 2016 19:02:12 +0000 (11:02 -0800)]
Fix test exclusions.

The new regression test should only be disabled for builds that use the
legacy backend.

7 years agoMerge pull request #8100 from rahku/reflection
Rahul Kumar [Mon, 14 Nov 2016 18:17:28 +0000 (10:17 -0800)]
Merge pull request #8100 from rahku/reflection

Expose Assembly::GetFile(s) apis

7 years agoUpdate buildtools to version 01008-01
Christopher Costa [Mon, 14 Nov 2016 16:40:16 +0000 (08:40 -0800)]
Update buildtools to version 01008-01

7 years agoMerge pull request #8108 from gkhanna79/Arm32Test
Gaurav Khanna [Mon, 14 Nov 2016 05:21:07 +0000 (21:21 -0800)]
Merge pull request #8108 from gkhanna79/Arm32Test

Enable WinArm32 P1 Test Build

7 years agoDon't generate explicit newlines in SIMD tests
Bruce Forstall [Mon, 14 Nov 2016 03:20:55 +0000 (19:20 -0800)]
Don't generate explicit newlines in SIMD tests

Use Console.WriteLine() instead.

7 years agoEnable WinArm32 P1 Test Build
Gaurav Khanna [Sun, 13 Nov 2016 23:47:11 +0000 (15:47 -0800)]
Enable WinArm32 P1 Test Build

7 years agoInliner: ensure all statements have an inline context (#8064)
Andy Ayers [Sun, 13 Nov 2016 22:15:14 +0000 (14:15 -0800)]
Inliner: ensure all statements have an inline context (#8064)

* JIT: Retype fgMorphStmt and related variables

There are quite a few variables typed as `GenTreePtr` that must point
at statements -- for instance `fgMorphStmt`. Retype these as `GenTreeStmt*`.
Cleanup dereferences which no longer require a `gtStmt`.

* Inliner: ensure all statements have an inline context

We would previously allow some statements inserted by the inliner
"between" the caller and callee to have a null inline context. This
lack of context could lead to incomplete or misleading inline trees
if the inserted code included calls. In particular some failed inlines
might not show up in the trees.

Set the context for these inserted statements to be the context for the
call being inlined (thus they logically "belong" to the caller).

7 years agoAdd implementation for AssemblyName::EscapedCodeBase (#8072)
Rahul Kumar [Sun, 13 Nov 2016 17:34:58 +0000 (09:34 -0800)]
Add implementation for AssemblyName::EscapedCodeBase (#8072)

7 years agoRemove conflicting proj files (#8090)
John Chen [Sun, 13 Nov 2016 00:20:14 +0000 (16:20 -0800)]
Remove conflicting proj files (#8090)

Some test cases have both .ilproj and .csproj files, resulting
in a race condition during build. Removing the .csproj files,
as the MSIL versions appear to be the intended ones.

7 years agoMerge pull request #8085 from stephentoub/daylight_alloc
Stephen Toub [Sat, 12 Nov 2016 14:19:33 +0000 (09:19 -0500)]
Merge pull request #8085 from stephentoub/daylight_alloc

Avoid allocations in DateTime.Now

7 years agoAvoid allocations in DateTime.Now
Stephen Toub [Sat, 12 Nov 2016 12:51:08 +0000 (07:51 -0500)]
Avoid allocations in DateTime.Now

Every call to DateTime.Now ends up allocating a DaylightTime as it computes the offset from UtcNow.  DaylightTime is just a plain old object that stores two DateTimes and a Timespan.  Ideally we could just change it to be a struct, but it's public.  Instead, this commit adds an internal DaylightTimeStruct, which is the same as DaylightTime except as a value type, and changes some of the internal uses of DaylightTime to instead use DaylightTime.  As a result, DateTime.Now is allocation-free.

7 years agoInliner: updates to random inlining (#8088)
Andy Ayers [Sat, 12 Nov 2016 03:52:24 +0000 (19:52 -0800)]
Inliner: updates to random inlining (#8088)

Cache the random state on the InlineStrategy instead of on the compiler
instance so that the state is reinitialized and private to each jit request.
That way the random policy evaluations made compiling one method won't
alter the evaluations for subsequent methods. This should make it somewhat
easier to do A/B comparisons under jit stress when changing the jit.

Make it possible to enable the RandomPolicy outside of stress. This may
prove useful in various randomized inline performance studies or as
a simple stress mode on its own.

Random state seed is built from an external seed value (via JitStress or
JitInlinePolicyRandom) and an internal seed value (method hash), so that
random sequences potentially differ for each method but are deterministic
across runs and changes to the jit.

7 years agoRemove redundant statement (#7900)
Dmitry-Me [Sat, 12 Nov 2016 00:54:37 +0000 (03:54 +0300)]
Remove redundant statement (#7900)

7 years agoGenerate inc/dec [mem] instead of add/sub [mem], 1 for read-modify-write operations.
sivarv [Sat, 12 Nov 2016 00:41:16 +0000 (16:41 -0800)]
Generate inc/dec [mem] instead of add/sub [mem], 1 for read-modify-write operations.

7 years agoEnable the rest if TimeZoneInfo APIs (#8096)
Tarek Mahmoud Sayed [Fri, 11 Nov 2016 23:46:47 +0000 (15:46 -0800)]
Enable the rest if TimeZoneInfo APIs (#8096)

7 years agoExpose Assembly::GetFile(s) apis
Rahul Kumar [Fri, 11 Nov 2016 20:10:16 +0000 (12:10 -0800)]
Expose Assembly::GetFile(s) apis

7 years agoRename gitmirrorfile
Matt Ellis [Fri, 11 Nov 2016 22:20:40 +0000 (14:20 -0800)]
Rename gitmirrorfile

7 years agoMerge pull request #8087 from ellismg/selective-mirror-sketch
Matt Ellis [Fri, 11 Nov 2016 21:52:11 +0000 (13:52 -0800)]
Merge pull request #8087 from ellismg/selective-mirror-sketch

Update .gitmirror metadata

7 years agoMerge pull request #8001 from JosephTremoulet/UnrollSimd
Joseph Tremoulet [Fri, 11 Nov 2016 19:37:45 +0000 (14:37 -0500)]
Merge pull request #8001 from JosephTremoulet/UnrollSimd

Enable unrolling of SIMD_LIMIT loops

7 years agoEnable unrolling of SIMD_LIMIT loops
Joseph Tremoulet [Fri, 14 Oct 2016 18:53:52 +0000 (14:53 -0400)]
Enable unrolling of SIMD_LIMIT loops

Since the Vector<T> abstraction has a `Count` that is not a
C#-compile-time constant, it encourages use of iteration to
search/aggregate individual elements using symbolic indexing, which in
turn leads to codegen that spills the vector to memory for each element
access, and performs bounds checks for each access.  These loops will have
low trip counts that are jit-compile-time constant, and constant indexing
into Vector<T> allows more efficient register-to-register sequences and
bounds-check elision.  This change enables RyuJit's loop unroller when
such a loop is discovered, and increases the size threshold to target
optimizing such loops much more aggressively than the unroller's previous
incarnation.

Add a test with a motivating loop to the Performance/CodeQuality/SIMD
suite.

Closes #7843.

7 years agoDetect overflow in unroller cost computation
Joseph Tremoulet [Thu, 10 Nov 2016 21:37:05 +0000 (16:37 -0500)]
Detect overflow in unroller cost computation

Make sure to avoid trying to unroll cases so large as to overlow the cost.

7 years agoAllow unrolling loops with multiple branches
Joseph Tremoulet [Fri, 14 Oct 2016 18:47:20 +0000 (14:47 -0400)]
Allow unrolling loops with multiple branches

Lift both the single-exit restriction and the no-internal-branching
restriction.  Share some utilities with the loop cloner to facilitate
this (particularly `CloneBlockState` and `fgUpdateChangedFlowGraph`).

7 years agoUnroll loops in inner-to-outer order
Joseph Tremoulet [Wed, 19 Oct 2016 18:21:07 +0000 (14:21 -0400)]
Unroll loops in inner-to-outer order

There's no need for fixpoint iteration; the loop indices are a pre-order,
so walking them in reverse order will visit inner loops before outer ones.

7 years agoStop expecting ASG_ operators in loop unroller
Joseph Tremoulet [Fri, 14 Oct 2016 18:31:45 +0000 (14:31 -0400)]
Stop expecting ASG_ operators in loop unroller

Expect instead to see arithmetic nodes that are arguments of separate
assign nodes.

7 years agoMerge pull request #7788 from AndyAyersMS/InlinePins
Andy Ayers [Fri, 11 Nov 2016 19:24:05 +0000 (11:24 -0800)]
Merge pull request #7788 from AndyAyersMS/InlinePins

Inliner: support inlining of methods with pinned locals

7 years agoUpdate .gitmirror metadata
Matt Ellis [Thu, 10 Nov 2016 01:27:35 +0000 (17:27 -0800)]
Update .gitmirror metadata

We no longer have the need to mirror anything into TFS (since we do all
work in the open now) except for the JIT and SuperPMI which want to
continue to use some validation that we can only do out of TFS.

7 years agoMerge pull request #8042 from kouvel/Api
Koundinya Veluri [Fri, 11 Nov 2016 10:25:31 +0000 (02:25 -0800)]
Merge pull request #8042 from kouvel/Api

Expose some things for ns2.0

7 years agoExpose some things for ns2.0
Koundinya Veluri [Mon, 7 Nov 2016 03:25:29 +0000 (19:25 -0800)]
Expose some things for ns2.0

Mostly:
- Exposed flow-related methods on `ExecutionContext`
- Enabled and exposed `SynchronizationContext` wait overriding

Realted issues:
- dotnet/corefx#11638
- dotnet/corefx#11633
- dotnet/corefx#11635
- dotnet/corefx#11636
- dotnet/corefx#13484

7 years agoSave registers xmm8..15 on Mac OSX (#8078)
John Chen [Fri, 11 Nov 2016 01:49:02 +0000 (17:49 -0800)]
Save registers xmm8..15 on Mac OSX (#8078)

On x64, JIT can generate code that uses all 16 xmm registers.
However, on Mac OSX, we currently only save 8 of these registers.
Thus after a context save/restore, xmm8 through xmm15 are
corrupted. This commit fixes the code to save all 16 xmm
registers. It resolves issue #2266.

7 years agoEnable time zone for netstandard1.7 (#8074)
Tarek Mahmoud Sayed [Fri, 11 Nov 2016 00:58:28 +0000 (16:58 -0800)]
Enable time zone for netstandard1.7 (#8074)

* Expose and reimplement TimeZone class

The change is exposing the missing TimeZone APIs from corelib so can be useded in netstandard 1.7.
The change here is re-implementing CurrentTimeZone class to be simpler and also to make it work for Linux platforms. we used TimeZoneInfo class to reimplement it and also cleaned up all used internal calls as not needed anymore.

* Small delta fix

* Fix the code according to the review comments

7 years agoSOS: Automatically find a managed thread with an exception on Linux/OSX core dumps...
Mike McLaughlin [Thu, 10 Nov 2016 23:44:11 +0000 (15:44 -0800)]
SOS: Automatically find a managed thread with an exception on Linux/OSX core dumps (#8075)

SOS: Automatically find a managed thread with an exception on Linux/OSX core dumps

To be used in the debugger tests repo for SOS dump testing on Linux/OSX.

Added the "clrthreads -managedexception" option to switch to the first managed thread
that has thrown an exception.

Issue #6518

7 years agoFormat the code and disable the regression test.
Pat Gavlin [Thu, 10 Nov 2016 22:58:32 +0000 (14:58 -0800)]
Format the code and disable the regression test.

The regression test currently fails due to issue #8077.

7 years agoMerge pull request #8056 from adiaaida/updateFormattingJobPatch
Michelle McDaniel [Thu, 10 Nov 2016 22:52:32 +0000 (14:52 -0800)]
Merge pull request #8056 from adiaaida/updateFormattingJobPatch

Create patches in formatting job

7 years agoREADME.md is the idiomatic approach for github (#8076)
Dan Moseley [Thu, 10 Nov 2016 22:35:55 +0000 (14:35 -0800)]
README.md is the idiomatic approach for github (#8076)

7 years agoCreate patches in formatting job
Michelle McDaniel [Tue, 8 Nov 2016 21:37:20 +0000 (13:37 -0800)]
Create patches in formatting job

In the formatting job, if there are formatting errors, we will run the
formatter in --fix mode and generate a patch which will be uploaded to
azure storage.

7 years agoMerge pull request #8046 from rahku/_resolveAssembly
Rahul Kumar [Thu, 10 Nov 2016 21:46:29 +0000 (13:46 -0800)]
Merge pull request #8046 from rahku/_resolveAssembly

Expose AppDomain::AssemblyResolve

7 years agoEnable binclash logger
Christopher Costa [Thu, 10 Nov 2016 19:20:50 +0000 (11:20 -0800)]
Enable binclash logger

7 years agoExpose AppDomain::AssemblyResolve
Rahul Kumar [Tue, 8 Nov 2016 19:13:33 +0000 (11:13 -0800)]
Expose AppDomain::AssemblyResolve

7 years agoUpdate IntrospectionExtensions.cs (#8029)
Greg G [Thu, 10 Nov 2016 15:03:24 +0000 (16:03 +0100)]
Update IntrospectionExtensions.cs (#8029)

1. A few tweaks were made to follow the [Coding Style](https://github.com/dotnet/corefx/blob/master/Documentation/coding-guidelines/coding-style.md).
2. A `null` check was done after doing a simple cast (`(IReflectableType)type`), but `rcType` cannot be `null` (it could only be `null` if a [`as`](https://msdn.microsoft.com/en-us/library/cc488006.aspx) cast was done).

7 years agoBinaryReader: Use cached default encoding instance (#8017)
Justin Van Patten [Thu, 10 Nov 2016 14:58:33 +0000 (06:58 -0800)]
BinaryReader: Use cached default encoding instance (#8017)

A new instance of UTF8Encoding used to be created every time
BinaryReader.ctor(Stream) was called, which created an instance of
UTF8Encoding that has no preamble. However, BinaryReader does not use
the preamble at all, so it doesn't matter if the encoding has a preamble
or not. Thus, the cached Encoding.UTF8 instance can be used (which has a
preamble).

7 years agoUpdate CoreClr, CoreFx to beta-24709-03, beta-24710-01, respectively (#7922)
dotnet bot [Thu, 10 Nov 2016 07:52:57 +0000 (23:52 -0800)]
Update CoreClr, CoreFx to beta-24709-03, beta-24710-01, respectively (#7922)

7 years agoRemove unneeded field from BinaryWriter (#8015)
Justin Van Patten [Thu, 10 Nov 2016 04:08:45 +0000 (20:08 -0800)]
Remove unneeded field from BinaryWriter (#8015)

The field only exists in .NET Framework for serialization compat. It
isn't needed on CoreCLR.

7 years agoStreamWriter/BinaryWriter: Use same cached encoding instance (#8018)
Justin Van Patten [Thu, 10 Nov 2016 04:08:00 +0000 (20:08 -0800)]
StreamWriter/BinaryWriter: Use same cached encoding instance (#8018)

StreamWriter lazily allocates and caches a UTF8NoBOM instance, while
BinaryWriter always allocates new instances. Instead, the same cached
instance can be shared between both writers.

7 years agoAvoid repeated delegate allocations in FileStream.FlushAsync (#8048)
Justin Van Patten [Thu, 10 Nov 2016 04:05:11 +0000 (20:05 -0800)]
Avoid repeated delegate allocations in FileStream.FlushAsync (#8048)

Avoid the `Action<object>` allocation on each invocation of
`FileStream.FlushAsync` on Windows. This change makes the Win32
implementation match Unix.

7 years agoARM-CI : Fix segmentation faults on running tests (#8019)
Sujin Kim [Thu, 10 Nov 2016 04:00:22 +0000 (13:00 +0900)]
ARM-CI : Fix segmentation faults on running tests (#8019)

* ARM-CI : Fix segmentation faults on running tests

To make sure the reason of test failure ramdomly( #6298 ),
We checked segmentation faults occurred from mounted rootfs and the multi thread processing.

So I changed root-fs to the archived root-fs and run tests with --sequential option.

PS. The location of root-fs folder was changed from '/opt' wrote on reverted commit(#7991) to '/mnt' for resolving no space issue.

7 years agoRemove unnecessary newline in WriteLine (#8047)
Bruce Forstall [Thu, 10 Nov 2016 03:58:31 +0000 (19:58 -0800)]
Remove unnecessary newline in WriteLine (#8047)

7 years agoAdd missing ref emit enum members for ns2.0 (#8062)
Alex Perovich [Thu, 10 Nov 2016 03:57:13 +0000 (19:57 -0800)]
Add missing ref emit enum members for ns2.0 (#8062)

7 years agoAdd IntPtr constructors to FileStream (#8063)
Jeremy Kuhne [Thu, 10 Nov 2016 03:54:36 +0000 (19:54 -0800)]
Add IntPtr constructors to FileStream (#8063)

7 years agoDon't turn off compCanUseSSE2 on x86 RyuJIT under jit stress. (#8068)
Sivarv [Thu, 10 Nov 2016 03:53:24 +0000 (19:53 -0800)]
Don't turn off compCanUseSSE2 on x86 RyuJIT under jit stress. (#8068)

7 years agoPort Marshal.GenerateProgIdForType in CoreCLR (#8070)
Faizur Rahman [Thu, 10 Nov 2016 03:52:41 +0000 (19:52 -0800)]
Port Marshal.GenerateProgIdForType in CoreCLR (#8070)

7 years agoMerge pull request #8069 from shrah/master
Faizur Rahman [Thu, 10 Nov 2016 02:01:15 +0000 (18:01 -0800)]
Merge pull request #8069 from shrah/master

Return Type.GUID for Marshal.GenerateGuidForType in CoreCLR

7 years agoFix missing exports in mscordaccore.so (#8058)
Jan Vorlicek [Thu, 10 Nov 2016 01:28:29 +0000 (17:28 -0800)]
Fix missing exports in mscordaccore.so (#8058)

I have recently added some exports to the mscordaccore.so and it was
found that they were not honored and libsos.so got some unresolved
symbols.
I have found that the issue is that unlike for libcoreclr.so, we
were not asking linker to include the whole PAL and so it has
eliminated those functions due to the fact they were not called
from the PAL itself.
This change fixes it.

7 years agoReturn Type.GUID for Marshal.GenerateGuidForType in CoreCLR
Faizur Rahman [Thu, 10 Nov 2016 01:20:37 +0000 (17:20 -0800)]
Return Type.GUID for Marshal.GenerateGuidForType in CoreCLR

7 years agoMemory growth algorithm improvement in coreconsole (#7870)
Roman Shchekin [Thu, 10 Nov 2016 00:06:40 +0000 (03:06 +0300)]
Memory growth algorithm improvement in coreconsole (#7870)

* Now Append will work properly if strLen is big (for example 3xm_capacity). And value 1.5 is better for memory growth.

* Correct way of calculating 1.5 (without floating point calculation, thanks mikedn)

* After long discussion we decided that simple and aggressive allocation is better for this case

7 years agoInliner: support inlining of methods with pinned locals
Andy Ayers [Sat, 22 Oct 2016 01:46:50 +0000 (18:46 -0700)]
Inliner: support inlining of methods with pinned locals

The inliner now can inline a subset of methods with pinned locals --
namely those where the language compiler (eg CSC) can determine that a
try/finally is not necessary to ensure unpinning, and where the jit
likewise an determines that a try/finally is likewise not needed in
the root method.

Generally speaking this allows inlining in cases where the inline method
is fairly simple and does not any contain exception handling, and the
call site is not within a try region.

When inlining methods that have pinned locals and also return a value,
the jit ensures that the return value is spilled to a temp so that the
unpins can be placed just after the inlined method body and won't alter
the return value.

Mark FixedAddressValueType as GCStressIncompatible since the "unfixed"
class static may get re-allocated at the same address. This seems to
happen even without these changes but happens much more frequently with
them.

Closes #7774.

7 years agoInliner: enable inlining of methods with conditional throws (#8038)
Andy Ayers [Wed, 9 Nov 2016 23:03:23 +0000 (15:03 -0800)]
Inliner: enable inlining of methods with conditional throws (#8038)

* Inliner: enable inlining of methods with conditional throws

Remove inlining limitation for methods that return values and have
conditional throws. This limitation was most likely a vestige of an
older inlining implementation that did not break trees at inline
call sites.

Also removed the now-unused observation and the `seenConditionalJump`
member variable. Merged ifdef blocks in `impInit`.

Ran full desktop testing, no issues.

Enables a handful of inlines in the various code size suites. For the
most part these slightly increase code size but can often shorten the
non-EH paths in the code.

7 years agoMerge pull request #7981 from sandreenko/fix_vn_in_cse
sandreenko [Wed, 9 Nov 2016 22:49:51 +0000 (14:49 -0800)]
Merge pull request #7981 from sandreenko/fix_vn_in_cse

Don't transform GT_SUB tree outside the global morph phase.

7 years agoMerge pull request #8033 from RussKeldorph/nopopup
Russ Keldorph [Wed, 9 Nov 2016 21:25:23 +0000 (13:25 -0800)]
Merge pull request #8033 from RussKeldorph/nopopup

Disable GUI dialogs for assertion failures on Windows by default

7 years agoMerge pull request #8041 from ericstj/updateBuildTools
Eric StJohn [Wed, 9 Nov 2016 20:15:06 +0000 (12:15 -0800)]
Merge pull request #8041 from ericstj/updateBuildTools

Update BuildToolsVersion to 01007-02

7 years agoMerge pull request #8049 from sivarv/lsraAssertFix
Sivarv [Wed, 9 Nov 2016 18:20:47 +0000 (10:20 -0800)]
Merge pull request #8049 from sivarv/lsraAssertFix

If the very first ref position of an interval has a register assignment of RBM_NONE indicate it could also be a regOptional

7 years agoDisable GUI dialogs on Windows by default
Russ Keldorph [Mon, 7 Nov 2016 22:40:14 +0000 (14:40 -0800)]
Disable GUI dialogs on Windows by default

This change disables creating pop-up dialog boxes by default on Windows
when assertions fail.  The change consists of two pieces:

1) Make COMPlus_NoGuiOnAssert effective in Release builds (currently only
Debug/Checked builds)
2) Make DebuggerAssert::ShowDefaultAssertDialog honor the
COMPlus_NoGuiOnAssert variable.
3) Make COMPlus_NoGuiOnAssert=1 by default.

Note that COMPlus_NoGuiOnAssert was already honored for assertions
originating from native code such as the JIT.  If pop-ups are desired,
one can still set COMPlus_NoGuiOnAssert=0.

Fixes #7678

7 years agoMerge pull request #8022 from mmitche/disable-email-pub
Matt Mitchell [Wed, 9 Nov 2016 17:31:19 +0000 (09:31 -0800)]
Merge pull request #8022 from mmitche/disable-email-pub

Remove email publishing calls

7 years ago[Linux][GDBJIT] Fix crashes related with locals debug info generation (#7874)
Evgeny Pavlov [Wed, 9 Nov 2016 17:08:49 +0000 (20:08 +0300)]
[Linux][GDBJIT] Fix crashes related with locals debug info generation  (#7874)

* [GDBJIT] Fix several issues related with generation debug info for locals:
* Fix crash on generics static
* Add support of pointer type
* Fix incorrect processing of classes when we have several locals with the same class type

* Move gdbjit.cpp from VM_SOURCES_DAC_AND_WKS_COMMON to VM_SOURCES_WKS

7 years agoFix IntermediateOutputPath for mscorlib facade
Eric St. John [Wed, 9 Nov 2016 16:48:31 +0000 (08:48 -0800)]
Fix IntermediateOutputPath for mscorlib facade

Previously we were working around this by using double backslash but
GenFacades broke this when adding response file support and double-
unescaping.  Workaround using a forward slash instead.

7 years agoAvoid failures when allocate memory in native (#8028)
Tarek Mahmoud Sayed [Wed, 9 Nov 2016 04:38:41 +0000 (20:38 -0800)]
Avoid failures when allocate memory in native (#8028)

* Avoid failures when allocate memory in native

using new in the native side can throw and the app will shutdown. instead we detect the failure and throw a managed exception

* Use same mechanism we return the error code from GetSortHandle

* Add assert

* Dispose the safeHandle

7 years agoMerge pull request #8043 from stephentoub/remove_delegate_alloc
Stephen Toub [Wed, 9 Nov 2016 03:29:51 +0000 (22:29 -0500)]
Merge pull request #8043 from stephentoub/remove_delegate_alloc

Remove delegate allocation per ThreadPoolBoundHandleOverlapped

7 years agoIf the very first ref position of an interval has a register assignment of RBM_NONE...
sivarv [Wed, 9 Nov 2016 02:08:31 +0000 (18:08 -0800)]
If the very first ref position of an interval has a register assignment of RBM_NONE indicate it could also be a regOptional

7 years agoMerge pull request #8040 from sandreenko/additional-commit-for-PR-8014
sandreenko [Tue, 8 Nov 2016 23:50:11 +0000 (15:50 -0800)]
Merge pull request #8040 from sandreenko/additional-commit-for-PR-8014

additional commit to PR 8014

7 years agoMerge pull request #8023 from pgavlin/MoveAltJitCrossgen
Pat Gavlin [Tue, 8 Nov 2016 23:33:11 +0000 (15:33 -0800)]
Merge pull request #8023 from pgavlin/MoveAltJitCrossgen

Use the alt JIT for S.P.CoreLib if altjitcrossgen is specified and change crossgen to always pass USE_SSE2 to the JIT.

7 years agoMerge pull request #8035 from hseok-oh/fix_7871
Bruce Forstall [Tue, 8 Nov 2016 22:13:14 +0000 (14:13 -0800)]
Merge pull request #8035 from hseok-oh/fix_7871

SuperPMI: Support GetHFAType for ARM32 hardFP

7 years agoRemove delegate allocation per ThreadPoolBoundHandleOverlapped
Stephen Toub [Tue, 8 Nov 2016 21:36:56 +0000 (16:36 -0500)]
Remove delegate allocation per ThreadPoolBoundHandleOverlapped

7 years agoUpdate BuildToolsVersion to 01007-02
Eric St. John [Tue, 8 Nov 2016 20:51:42 +0000 (12:51 -0800)]
Update BuildToolsVersion to 01007-02

7 years agoMerge pull request #8004 from shrah/master
Faizur Rahman [Tue, 8 Nov 2016 20:50:52 +0000 (12:50 -0800)]
Merge pull request #8004 from shrah/master

Expose Marshal.CleanupUnusedObjectsInCurrentContext

7 years agoRevert Michal jit changes
Sergey Andreenko [Tue, 8 Nov 2016 20:41:45 +0000 (12:41 -0800)]
Revert Michal jit changes

7 years agoReport CORINFO_FLG_CONTAINS_GC_PTR for TypedReference (#8014)
Michal Strehovský [Tue, 8 Nov 2016 19:16:41 +0000 (11:16 -0800)]
Report CORINFO_FLG_CONTAINS_GC_PTR for TypedReference (#8014)

7 years agoExpose Marshal.CleanupUnusedObjectsInCurrentContext
Faizur Rahman [Fri, 4 Nov 2016 21:50:02 +0000 (14:50 -0700)]
Expose Marshal.CleanupUnusedObjectsInCurrentContext

This change exposes Marshal.CleanupUnusedObjectsInCurrentContext. Also it a GetHINSTANCE implementation for non-windows platform by throwing
ArgumentNullException as per https://msdn.microsoft.com/en-us/library/system.runtime.interopservices.marshal.gethinstance(v=vs.110).aspx.

7 years ago[Linux][GDB-JIT] Fix lldb stepping issues (#7777)
Igor Kulaychuk [Tue, 8 Nov 2016 16:24:08 +0000 (19:24 +0300)]
[Linux][GDB-JIT] Fix lldb stepping issues (#7777)

* Pass more info about source to native line mapping from SymbolReader

Pass mapping info for zero and HiddenLine line numbers.
Also supply ICorDebugInfo::SourceTypes info for each line.
Lines are reorganized to have ascending native addresses.

* Fix DWARF line info generation for negative line change

* Add prologue_end and epilogue_begin to DWARF line info

* Generate DWARF method description for each code range with PROLOG and EPILOG

* Map each called __thunk symbol as a separate section

Special .thunk sections from different methods may overlap which
prevent the debugger from correctly resolving symbols (__thunk_*)
from those sections.
Mapping each called __thunk symbol as a separate section (.thunk_#)
allows the debugger to resolve __thunk* symbols correctly.

The code for searching first valid line number of a method
now checks only line numbers. There is no need for additional
check of non-empty filename.
If no valid line number was found then do not generate debug info at all.

* Fix buffer overrun when generating ELF symbol name

* Fix memory leak when generating ELF symbol name

* Fix memory leak when NotifyGdb::MethodCompiled fails

Manage array of FunctionMember pointers with NewArrayHolder.

* Refactor counting number of ELF sections in GDBJIT

* Refactor building ELF section names and headers

* Refactor hardcoded ELF section indeces

* Refactor memory allocation for ELF section names

When currently allocated memory is not enough for next
section name, the memory is reallocated with some
extra amount which grows twice on each reallocation.

7 years agofix typo
Hyeongseok Oh [Tue, 8 Nov 2016 04:37:08 +0000 (13:37 +0900)]
fix typo

7 years agoSupport GetHFAType in SuperPMI for ARM32 hardFP
Hyeongseok Oh [Tue, 8 Nov 2016 02:31:29 +0000 (11:31 +0900)]
Support GetHFAType in SuperPMI for ARM32 hardFP

7 years agoMerge pull request #7988 from ramarag/lockjson
Rama krishnan Raghupathy [Tue, 8 Nov 2016 00:42:06 +0000 (16:42 -0800)]
Merge pull request #7988 from ramarag/lockjson

Removing the copy of project.lock.json to bin folder

7 years agoMerge pull request #8026 from jashook/arm64_g_flag_multiregstructarg
Jarret Shook [Mon, 7 Nov 2016 23:24:58 +0000 (15:24 -0800)]
Merge pull request #8026 from jashook/arm64_g_flag_multiregstructarg

Arm64 add missing G flag and possibly X flags

7 years agoDo not fold `(x + null)` in certain cases.
Pat Gavlin [Mon, 7 Nov 2016 22:00:01 +0000 (14:00 -0800)]
Do not fold `(x + null)` in certain cases.

Morph attempts to fold `(x + null)` into `null` under the logic that the
resulting address is out-of-bounds by definition (in other words, adding
an offset to `null` always produces `null`). Under certain
circumstances, however, this transformation is either incorrect or
undesirable:
- If `x` contains side effects, the add should not be folded, as doing
  so incorrectly discards the side effects
- If we have called morph during CSE, the add should not be folded, as
  doing so may invalidate some of CSE's internal state (in particular,
  the removed tree may contain a subtree that is scheduled for CSE)

This change excludes the folding transformation in both of these cases.

7 years agoUpdate testing-with-corefx.md
Carol Eidt [Mon, 7 Nov 2016 21:47:52 +0000 (13:47 -0800)]
Update testing-with-corefx.md

Clarify the way the `BUILDTOOLS_OVERRIDE_RUNTIME` option is passed.

7 years agoArm64 add missing G flag and possibly X flags
jashook [Mon, 7 Nov 2016 21:06:20 +0000 (13:06 -0800)]
Arm64 add missing G flag and possibly X flags

For indirections created by morphing obj(16) make sure the G and
X flag are set.

7 years agoChange crossgen to always pass USE_SSE2 to the JIT.
Pat Gavlin [Mon, 7 Nov 2016 20:08:00 +0000 (12:08 -0800)]
Change crossgen to always pass USE_SSE2 to the JIT.

.NET Core and the RyuJIT x86/x64 backends require SSE2. Always pass this
flag to the JIT.

7 years agoSet VN argument for changeOper during morph.
Sergey Andreenko [Thu, 3 Nov 2016 00:33:04 +0000 (17:33 -0700)]
Set VN argument for changeOper during morph.

7 years agoMerge pull request #8011 from sivarv/lsraFix
Sivarv [Mon, 7 Nov 2016 19:17:41 +0000 (11:17 -0800)]
Merge pull request #8011 from sivarv/lsraFix

While unassigning a phyReg, establish association with a previous interval only if it is different from the one it is being unassigned

7 years agoRemove email publishing calls
Matt Mitchell [Mon, 7 Nov 2016 19:07:49 +0000 (11:07 -0800)]
Remove email publishing calls
The new server's email plugin version has different syntax and the email publishing doesn't work currently anyway.  Will be re-enabled at a future time

7 years agoUse the alt JIT for S.P.CoreLib if altjitcrossgen is specified.
Pat Gavlin [Mon, 7 Nov 2016 19:01:53 +0000 (11:01 -0800)]
Use the alt JIT for S.P.CoreLib if altjitcrossgen is specified.

The check for altjitcrossgen was previously located s.t. only mscorlib
was being crossgen'd using the alt JIT (which is not very insteresting,
as mscorlib is just a facade these days). This change moves the check
back s.t. the alt JIT is also used for System.Private.CoreLib.

7 years agoMerge pull request #8006 from pgavlin/VSO278369
Pat Gavlin [Mon, 7 Nov 2016 18:55:24 +0000 (10:55 -0800)]
Merge pull request #8006 from pgavlin/VSO278369

Fix VN propagation for binops.

7 years agoEnforces aligned access for Single/Double values (#7993)
Jonghyun Park [Mon, 7 Nov 2016 18:04:39 +0000 (03:04 +0900)]
Enforces aligned access for Single/Double values (#7993)

7 years agoMerge pull request #8007 from pgavlin/VSO284785
Pat Gavlin [Mon, 7 Nov 2016 17:15:34 +0000 (09:15 -0800)]
Merge pull request #8007 from pgavlin/VSO284785

Add a regression test for VSO 284785.

7 years agoMerge pull request #7949 from hqueue/arm/sizeof
Russ Keldorph [Mon, 7 Nov 2016 16:51:58 +0000 (08:51 -0800)]
Merge pull request #7949 from hqueue/arm/sizeof

Exclude six sizeof related tests from ARM