platform/upstream/coreclr.git
8 years agoCast function pointer to void*
Kamil Rytarowski [Wed, 20 Apr 2016 01:57:28 +0000 (03:57 +0200)]
Cast function pointer to void*

Fix issue building mscorlib.dll

/home/kamil/tmp/coreclr/src/vm/win32threadpool.cpp:2672:13: error: no matching function for call to 'FireEtwThreadPoolIOEnqueue'
            FireEtwThreadPoolIOEnqueue((LPOVERLAPPED)waitInfo, Callback, (dwFlag & WAIT_SINGLE_EXECUTION) == 0, reinterpret_cast<void*>(GetClrInstanceId()));
            ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kamil/tmp/coreclr/bin/obj/Linux.x64.Debug/src/inc/clretwallmain.h:972:14: note: candidate function not viable: no known conversion from
      'WAITORTIMERCALLBACK' (aka 'void (*)(void *, unsigned char)') to 'const void *' for 2nd argument; take the address of the argument with &
inline ULONG FireEtwThreadPoolIOEnqueue(
             ^
/home/kamil/tmp/coreclr/src/vm/win32threadpool.cpp:3236:13: error: no matching function for call to 'FireEtwThreadPoolIODequeue'
            FireEtwThreadPoolIODequeue(waitInfo, waitInfo->Callback, reinterpret_cast<void*>(GetClrInstanceId()));
            ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kamil/tmp/coreclr/bin/obj/Linux.x64.Debug/src/inc/clretwallmain.h:985:14: note: candidate function not viable: no known conversion from
      'WAITORTIMERCALLBACK' (aka 'void (*)(void *, unsigned char)') to 'const void *' for 2nd argument; take the address of the argument with &
inline ULONG FireEtwThreadPoolIODequeue(
             ^

Reported on Ubuntu-14.04.2 LTS with clang 3.8.0

8 years agoMerge pull request #4342 from ZhichengZhu/clrstackr
Jan Vorlicek [Fri, 15 Apr 2016 23:20:33 +0000 (01:20 +0200)]
Merge pull request #4342 from ZhichengZhu/clrstackr

add sos clrstack -r option

8 years agoMerge pull request #4368 from swgillespie/long-running-gc-fixes
Sean Gillespie [Fri, 15 Apr 2016 23:19:52 +0000 (16:19 -0700)]
Merge pull request #4368 from swgillespie/long-running-gc-fixes

Fix a difference in passing the sequential parameter between Bash and…

8 years agoMerge pull request #4372 from krytarowski/netbsd-support-66
Aditya Mandaleeka [Fri, 15 Apr 2016 22:45:07 +0000 (15:45 -0700)]
Merge pull request #4372 from krytarowski/netbsd-support-66

NetBSD has RAND_MAX = 0x7fffffff

8 years agoThe RAND_MAX value can vary by platform
Kamil Rytarowski [Fri, 15 Apr 2016 21:17:38 +0000 (23:17 +0200)]
The RAND_MAX value can vary by platform

Noted on NetBSD where it is 0x7FFFFFFF.

8 years agoMerge pull request #4347 from ramarag/zapnyi
Rama krishnan Raghupathy [Fri, 15 Apr 2016 21:52:11 +0000 (14:52 -0700)]
Merge pull request #4347 from ramarag/zapnyi

Removing NYI for ZapUnwindData

8 years agoMerge pull request #4140 from myungjoo/implement/4040
Jan Vorlicek [Fri, 15 Apr 2016 21:33:39 +0000 (23:33 +0200)]
Merge pull request #4140 from myungjoo/implement/4040

Implement StartUnwindingNativeFrames Linux/ARM

8 years agoMerge pull request #3240 from krytarowski/netbsd-support-50
Jan Kotas [Fri, 15 Apr 2016 21:18:17 +0000 (14:18 -0700)]
Merge pull request #3240 from krytarowski/netbsd-support-50

Fix issue unveiled on NetBSD: Add PAL__vsnprintf shadow in PAL

8 years agoFix a difference in passing the sequential parameter between Bash and Batch
Sean Gillespie [Fri, 15 Apr 2016 20:44:12 +0000 (13:44 -0700)]
Fix a difference in passing the sequential parameter between Bash and Batch

8 years agoadd clrstack -r option
Zhicheng Zhu [Thu, 14 Apr 2016 21:42:23 +0000 (14:42 -0700)]
add clrstack -r option

8 years agoMerge pull request #4359 from gkhanna79/ROLibFix2
Gaurav Khanna [Fri, 15 Apr 2016 19:35:57 +0000 (12:35 -0700)]
Merge pull request #4359 from gkhanna79/ROLibFix2

DelayLoadAndFixWinRTInterop

8 years agoMerge pull request #4361 from joperezr/AddServiceableAttribute
Jose Perez Rodriguez [Fri, 15 Apr 2016 18:05:40 +0000 (11:05 -0700)]
Merge pull request #4361 from joperezr/AddServiceableAttribute

Adding Serviceable attribute to mscorlib

8 years agoMerge pull request #4352 from kouvel/ArmAssertFix
Koundinya Veluri [Fri, 15 Apr 2016 17:12:07 +0000 (10:12 -0700)]
Merge pull request #4352 from kouvel/ArmAssertFix

Fix assertion failure on ARM

8 years agoMerge pull request #4338 from pgavlin/AddJit32Build
Pat Gavlin [Fri, 15 Apr 2016 16:55:56 +0000 (09:55 -0700)]
Merge pull request #4338 from pgavlin/AddJit32Build

Make it possible to build JIT32 in the OSS tree.

8 years agoMerge pull request #4363 from mmitche/update-corefx-paths
Matt Mitchell [Fri, 15 Apr 2016 16:20:25 +0000 (09:20 -0700)]
Merge pull request #4363 from mmitche/update-corefx-paths

Update the corefx copy steps to point to the new location

8 years agoUpdate the corefx copy steps to point to the new location
Matt Mitchell [Fri, 15 Apr 2016 16:09:41 +0000 (09:09 -0700)]
Update the corefx copy steps to point to the new location

8 years agoAdding Serviceable attribute to mscorlib
Jose Perez Rodriguez [Fri, 15 Apr 2016 15:52:51 +0000 (08:52 -0700)]
Adding Serviceable attribute to mscorlib

8 years agoDelayLoadAndFixWinRTInterop
Gaurav Khanna [Fri, 15 Apr 2016 14:26:17 +0000 (07:26 -0700)]
DelayLoadAndFixWinRTInterop

8 years agoMerge pull request #4355 from dotnet-bot/from-tfs
Jan Kotas [Fri, 15 Apr 2016 12:48:39 +0000 (05:48 -0700)]
Merge pull request #4355 from dotnet-bot/from-tfs

Merge changes from TFS

8 years agoImplement StartUnwindingNativeFrames Linux/ARM
MyungJoo Ham [Tue, 5 Apr 2016 02:25:36 +0000 (11:25 +0900)]
Implement StartUnwindingNativeFrames Linux/ARM

StartUnwindingNativeFrames for Unix/Linux ARM.
The code is ported from AMD64 code of the same function and OS.

CONTEXT_* are moved from context2.S to asmconstants.h so that
the same macros may be sharaed between multiple files.

Fix #4040

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
8 years agoMerge pull request #4260 from myungjoo/fix/4259
Jan Vorlicek [Fri, 15 Apr 2016 09:47:04 +0000 (11:47 +0200)]
Merge pull request #4260 from myungjoo/fix/4259

ARM: fix build warning for unw usage

8 years agoFix assertion failure on ARM
Koundinya Veluri [Fri, 15 Apr 2016 02:52:55 +0000 (19:52 -0700)]
Fix assertion failure on ARM

StompWriteBarrierEphemeral may be called on the init path, where the runtime is technically not suspended, but has not started yet. Added a check for g_fEEInit in the call.

8 years agoMerge pull request #4340 from jkotas/equality-comparer
Jan Kotas [Fri, 15 Apr 2016 05:41:24 +0000 (22:41 -0700)]
Merge pull request #4340 from jkotas/equality-comparer

Use beforefieldinit field for Comparer/EqualityComparer.Default

8 years agoMerge pull request #4353 from myungjoo/fix/4107
Jan Kotas [Fri, 15 Apr 2016 05:37:00 +0000 (22:37 -0700)]
Merge pull request #4353 from myungjoo/fix/4107

ARM/Linux: Mark r0-r3 Saved

8 years agoARM/Linux: Mark r0-r3 Saved
MyungJoo Ham [Fri, 15 Apr 2016 04:28:29 +0000 (13:28 +0900)]
ARM/Linux: Mark r0-r3 Saved

Without this, exception handlers (try-catch) that
try to get SP of ThePreStub's caller (managed frame) mislocate
the caller's SP by 4 words (0x10) and get lost while
traversing managed frames.

Fix #4107

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
8 years agoMerge pull request #4343 from pgavlin/SeparateBitPosition
Pat Gavlin [Fri, 15 Apr 2016 04:04:33 +0000 (21:04 -0700)]
Merge pull request #4343 from pgavlin/SeparateBitPosition

Move `BitPosition` into its own file.

8 years agoFix razzle build breaks in bcl.win
Jan Kotas [Fri, 15 Apr 2016 01:46:52 +0000 (18:46 -0700)]
Fix razzle build breaks in bcl.win

[tfs-changeset: 1596379]

8 years agoStyle fix: remove obsolete contents
MyungJoo Ham [Fri, 15 Apr 2016 01:00:40 +0000 (10:00 +0900)]
Style fix: remove obsolete contents

We no longer have StartUnwindingNativeFrames.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
8 years agoUse beforefieldinit field for Comparer/EqualityComparer.Default
Jan Kotas [Thu, 14 Apr 2016 21:35:35 +0000 (14:35 -0700)]
Use beforefieldinit field for Comparer/EqualityComparer.Default

8 years agoMerge pull request #4326 from dotnet-bot/from-tfs
Matt Ellis [Thu, 14 Apr 2016 22:59:13 +0000 (15:59 -0700)]
Merge pull request #4326 from dotnet-bot/from-tfs

Merge changes from TFS

8 years agoMerge pull request #4335 from AndyAyersMS/InlineStrategy
Andy Ayers [Thu, 14 Apr 2016 22:57:39 +0000 (15:57 -0700)]
Merge pull request #4335 from AndyAyersMS/InlineStrategy

Inliner: introducing InlineStrategy

8 years agoRemoving NYI for ZapUnwindData
Rama Krishnan Raghupathy [Wed, 6 Apr 2016 22:36:42 +0000 (15:36 -0700)]
Removing NYI for ZapUnwindData

8 years agoMake it possible to build JIT32 in the OSS tree.
Pat Gavlin [Thu, 14 Apr 2016 19:57:41 +0000 (12:57 -0700)]
Make it possible to build JIT32 in the OSS tree.

This change adds a new argument to build.cmd, buildjit32, that configures
the build to build and link JIT32 instead of RyuJIT if the sources are
available in `src/jit32`.

8 years agoMerge pull request #4339 from fadimounir/deltests
Fadi Hanna [Thu, 14 Apr 2016 21:18:21 +0000 (14:18 -0700)]
Merge pull request #4339 from fadimounir/deltests

Delete fragile tests (will fix tests in a later PR)

8 years agoDelete fragile tests (will fix tests in a later PR)
Fadi Hanna [Thu, 14 Apr 2016 21:14:52 +0000 (14:14 -0700)]
Delete fragile tests (will fix tests in a later PR)

8 years agoMove `BitPosition` into its own file.
Pat Gavlin [Mon, 11 Apr 2016 17:24:23 +0000 (10:24 -0700)]
Move `BitPosition` into its own file.

This will allow the GC info encoder and the JIT to use this
function without pulling in the entire utilcode header.

8 years agoInliner: introducing InlineStrategy
Andy Ayers [Tue, 12 Apr 2016 20:30:07 +0000 (13:30 -0700)]
Inliner: introducing InlineStrategy

Create the `InlineStrategy` class to hold inline-relevant data that
spans multiple inlines. It tracks the number of inline candidates,
attempts, successes, last successful policy, and holds onto the root
context, and so on. The strategy is responsible for creating contexts
and reporting overall results for a method (either tree-based or
data-based).

The strategy also includes a simple jit time estimate. From various
observations, post-inline jit time can be modelled acceptably by simple
linear relationships on the input IL size. The strategy uses these models
to estimate the initial and current jit time. Estimate units are roughly
microseconds.

The strategy creates a time budget to flag cases where the estimated
jit time increase due to inlining is unreasonbly large. The budget
is initially based on the root method size, and may increase if there
are non-discretionary force inlines.

Once we have a bit more vetting of the budgeting mechanism, policies
will use it to limit inlining in a small number of runaway inlining cases
(see for example #2472).

Remove code under MEASURE_INLINING since the strategy plus the context
tree (optionally extended via policies) contains all that data and more.
Likewise, consolidate a number of the compiler's inlining-related member
variables into the strategy.

8 years agoMerge pull request #4330 from janvorli/fix-sigsegv-deadlock
Jan Vorlicek [Thu, 14 Apr 2016 20:36:08 +0000 (22:36 +0200)]
Merge pull request #4330 from janvorli/fix-sigsegv-deadlock

Fix possibility of deadlock in the SIGSEGV handler

8 years agoFix full framework build break
Jan Kotas [Thu, 14 Apr 2016 19:59:17 +0000 (12:59 -0700)]
Fix full framework build break

[tfs-changeset: 1596259]

8 years agoMerge pull request #4322 from pgavlin/TlsLogEnv
Pat Gavlin [Thu, 14 Apr 2016 19:57:01 +0000 (12:57 -0700)]
Merge pull request #4322 from pgavlin/TlsLogEnv

Collect the JIT's TLS variables in a single type.

8 years agoMerge pull request #4314 from pgavlin/GcInfoSList
Pat Gavlin [Thu, 14 Apr 2016 17:58:36 +0000 (10:58 -0700)]
Merge pull request #4314 from pgavlin/GcInfoSList

Replace `SList` in the GC info encoders.

8 years agoFix potential deadlock when calling ExecutionManager::IsManagedCode
Jan Vorlicek [Thu, 14 Apr 2016 17:44:56 +0000 (19:44 +0200)]
Fix potential deadlock when calling ExecutionManager::IsManagedCode

The function can deadlock if the calling thread was holding the
ExecutionManager writer lock.

8 years agoMerge pull request #4308 from joperezr/RemoveWarnings
Jose Perez Rodriguez [Thu, 14 Apr 2016 17:44:29 +0000 (10:44 -0700)]
Merge pull request #4308 from joperezr/RemoveWarnings

Remove native build warnings

8 years agoUpdating BuildTools
Jose Perez Rodriguez [Tue, 12 Apr 2016 22:56:08 +0000 (15:56 -0700)]
Updating BuildTools

8 years agoMerge pull request #4327 from RussKeldorph/structinregs
Russ Keldorph [Thu, 14 Apr 2016 14:10:24 +0000 (07:10 -0700)]
Merge pull request #4327 from RussKeldorph/structinregs

Fix structinregs test on x86

8 years agoFix possibility of deadlock in the SIGSEGV handler
Jan Vorlicek [Wed, 6 Apr 2016 18:41:51 +0000 (20:41 +0200)]
Fix possibility of deadlock in the SIGSEGV handler

The SIGSEGV handler was transitively calling pthread_attr_get_np to
get current stack limit no matter where the exception happened. The
problem was that if the segmentation violation happened in a C
runtime function, this could lead to deadlock since pthread_attr_get_np
is not signal safe.

The fix is to add callback that will figure out if the failing instruction
was in managed code or in one of the jit helpers and if not, it would
not attempt to handle the signal.

I have also removed non signal safe calls from the signal handlers code
path where we don't know yet whether the interrupted code was in a function
that could collide with a function that we call from the signal handler
or not. This includes TRACE and ASSERT calls that were calling string
formatting functions.

8 years agoFix structinregs test on x86
Russ Keldorph [Thu, 14 Apr 2016 04:45:05 +0000 (21:45 -0700)]
Fix structinregs test on x86

Fix a typo in _MSC_VER resulting in a mismatched calling convention on
x86.  While I'm in here, I'm also fixing some benign mismatched function
pointer type definitions.

8 years agoAdd back Path APIs needed by UWP
Jan Kotas [Thu, 14 Apr 2016 03:54:21 +0000 (20:54 -0700)]
Add back Path APIs needed by UWP

[tfs-changeset: 1596013]

8 years agoMerge pull request #4297 from tijoytom/master
tijoytom [Wed, 13 Apr 2016 23:43:51 +0000 (16:43 -0700)]
Merge pull request #4297 from tijoytom/master

Disabling the failing struct by value scenario.

8 years agoCollect the JIT's TLS variables in a single type.
Pat Gavlin [Wed, 13 Apr 2016 23:06:18 +0000 (16:06 -0700)]
Collect the JIT's TLS variables in a single type.

Instead of storing pointers to the thread-local compiler instance
and the current logging environment in separate TLS slots, wrap
these values in a struct and store a pointer to the struct in a
single TLS slot. This simplifies and standardizes the JIT's interface
to its TLS storage, especially when it is being statically linked
into another program or library that cannot use standard TLS.

Note that for release builds, the logging environment is not used
and a pointer to the current compiler instance is stored directly
into the JIT's TLS slot as an implementation detail of the TLS
wrapper type.

8 years agoMerge pull request #4320 from mmitche/add-reporting
Matt Mitchell [Wed, 13 Apr 2016 22:47:40 +0000 (15:47 -0700)]
Merge pull request #4320 from mmitche/add-reporting

Add reporting functionality to the coreclr netci file

8 years agoAdd reporting functionality to the coreclr netci file
Matt Mitchell [Wed, 13 Apr 2016 22:20:21 +0000 (15:20 -0700)]
Add reporting functionality to the coreclr netci file

Also eliminate a few jobs that aren't being referenced.

8 years agoMerge pull request #4319 from mmitche/archive-needed
Matt Mitchell [Wed, 13 Apr 2016 22:24:25 +0000 (15:24 -0700)]
Merge pull request #4319 from mmitche/archive-needed

Only archive dylib and .so files from the native coreclr tests

8 years agoOnly archive dylib and .so files from the native coreclr tests
Matt Mitchell [Wed, 13 Apr 2016 22:22:45 +0000 (15:22 -0700)]
Only archive dylib and .so files from the native coreclr tests

Avoids a few hundred extra files

8 years agoDisabling the failing struct by value scenario.
Tijoy Tom Kalathiparambil [Tue, 12 Apr 2016 18:32:23 +0000 (11:32 -0700)]
Disabling the failing struct by value scenario.

8 years agoMerge pull request #4068 from Lucrecious/master
Brian Robbins [Wed, 13 Apr 2016 21:15:14 +0000 (14:15 -0700)]
Merge pull request #4068 from Lucrecious/master

Generate map files for symbol resolution for Linux native images on PerfView

8 years agoRefactor `MemoryBlockDesc`.
Pat Gavlin [Wed, 13 Apr 2016 19:55:47 +0000 (12:55 -0700)]
Refactor `MemoryBlockDesc`.

- Encapsulate link management into `MemoryBlockDescList`.
- Replace `MemoryBlockDesc` and its separately-allocated buffer
  with a new type, `MemoryBlock`, that stores the link to the
  next memory block with the buffer itself.

8 years agoMerge pull request #4303 from CarolEidt/NoBarrierLclVarAddr
Carol Eidt [Wed, 13 Apr 2016 18:43:40 +0000 (11:43 -0700)]
Merge pull request #4303 from CarolEidt/NoBarrierLclVarAddr

No GC barrier needed for indirection of expressions involving lclVars

8 years agoEnable SOS gcInfo command. All it does basically is just enable the gcdecoder
Zhicheng Zhu [Wed, 13 Apr 2016 18:40:47 +0000 (11:40 -0700)]
Enable SOS gcInfo command. All it does basically is just enable the gcdecoder

Enable SOS gcInfo command. Basically all it does is just enable the code related to sos gcInfo and make it compiled for linux.

8 years agoReplace `SList` in the GC info encoders.
Pat Gavlin [Mon, 11 Apr 2016 17:09:08 +0000 (10:09 -0700)]
Replace `SList` in the GC info encoders.

Instead of using `SList`, manage the links manually. There are only
a few list manipulations in the encoders, so this is not too onerous.

8 years agoMerge pull request #4295 from fadimounir/typesystemtests
Fadi Hanna [Wed, 13 Apr 2016 17:40:38 +0000 (10:40 -0700)]
Merge pull request #4295 from fadimounir/typesystemtests

Bulk port of TypeSystem test cases

8 years agoMerge pull request #4310 from RussKeldorph/arglist
Russ Keldorph [Wed, 13 Apr 2016 17:29:40 +0000 (10:29 -0700)]
Merge pull request #4310 from RussKeldorph/arglist

Port arglist tests for x86 and ARM

8 years agoNo GC barrier needed for LclVar address expressions
Carol Eidt [Tue, 12 Apr 2016 19:53:31 +0000 (12:53 -0700)]
No GC barrier needed for LclVar address expressions

The check for the case where a barrier is not required when writing to a
local variable needs to include the LocalVarAddr and lclVar address
expression cases.

Update per comments

8 years agoMerge pull request #4302 from kyulee1/badtest
Kyungwoo Lee [Wed, 13 Apr 2016 12:27:14 +0000 (05:27 -0700)]
Merge pull request #4302 from kyulee1/badtest

ARM64: Tests update

8 years agoARM64: Tests update
Kyungwoo Lee [Tue, 12 Apr 2016 20:30:31 +0000 (13:30 -0700)]
ARM64: Tests update

- Delete bad test (sql_stress4) which uses Thread.Abort which is not in
  .NET Core.
- Delete non-existing test (MarshalBoolArray)
- Update time-out for StringConcat4/StringConcat8 which usualy failed due to time-out.
- Made _opt_dbgexplicit5/_opt_relexplicit5 UNSTABLE which pass mostly when
  running twice in the lab.
- Delete bad test (b519927) which uses AppDomain.DefineDynamicAssembly
  which is not in .NET Core.
- Delete bad test (b16241) that has overflow conversion (from double to int).

8 years agoFix issue unveiled on NetBSD: Add PAL__vsnprintf shadow in PAL
Kamil Rytarowski [Thu, 18 Feb 2016 22:41:56 +0000 (23:41 +0100)]
Fix issue unveiled on NetBSD: Add PAL__vsnprintf shadow in PAL

NetBSD's libc internally uses a function named _vsnprintf. We need to mask
PAL's version of this function to remove clash with the system. With it
snprintf(3) calls were jumping out of libc and landing back to PAL.

It was unveiled with many PAL tests.

Detailed documentation about _symbols in the NetBSD libc is documented
in the NetBSD sources in a file: src/lib/libc/README

Retire unneeded _vsnprintf().

Thanks Jan Vorli (Microsoft) for help with debugging.
Thanks Jan Kotas (Microsoft) for suggesting the right solution.

Fix #3199

8 years agoMerge pull request #4074 from kouvel/SoftwareWriteWatch
Koundinya Veluri [Wed, 13 Apr 2016 04:19:01 +0000 (21:19 -0700)]
Merge pull request #4074 from kouvel/SoftwareWriteWatch

Implement software write watch and make concurrent GC functional outs…

8 years agoPort arglist tests for x86 and ARM
Russ Keldorph [Tue, 12 Apr 2016 18:49:58 +0000 (11:49 -0700)]
Port arglist tests for x86 and ARM

Arglist tests, which are only valid on Windows, have non-x64 versions that
needed to be ported.

8 years agoMerge pull request #4273 from sivarv/multireg2
Sivarv [Wed, 13 Apr 2016 01:38:51 +0000 (18:38 -0700)]
Merge pull request #4273 from sivarv/multireg2

Force IR to be always var=call in case of multi-reg returning call nodes plus refactoring changes

8 years agoMerge pull request #4255 from pgavlin/GcInfoArrayList
Pat Gavlin [Tue, 12 Apr 2016 23:57:42 +0000 (16:57 -0700)]
Merge pull request #4255 from pgavlin/GcInfoArrayList

Refactor `StructArrayList` for the GC info encoder.

8 years agoImplement software write watch and make concurrent GC functional outside Windows
Koundinya Veluri [Thu, 7 Jan 2016 19:21:27 +0000 (11:21 -0800)]
Implement software write watch and make concurrent GC functional outside Windows

- Implemented software write watch using write barriers
- A new set of write barriers is introduced, each corresponding to an existing one, but which also updates the write watch table. The GC switches to a write watch barrier during concurrent GC, and switches back to a non write watch barrier after the final query for dirty pages.
- The write watch table is alloacted along with the card table
- Since the card table is used differently, different synchonization is used for the write watch table. The runtime is suspended during resize since that is the most infrequently occuring operation, of that, ResetWriteWatch, and GetWriteWatch.
- ResetWriteWatch() doesn't need a suspend, but since the software WW version is much faster than the Windows version, moved it into the suspended region to avoid some synchronization that would otherwise be required
- The background calls to GetWriteWatch() don't need or do a suspend. They only need to synchronize with the resize path, not for the purpose of correct functionality, but to not miss dirty pages such that concurrent GC is effective.

Miscellaneous:
- Fixed runtests.sh to copy mscorlib.dll and delete the Windows version of mscorlib.ni.dll

8 years agoMerge pull request #4278 from RussKeldorph/t1
Russ Keldorph [Tue, 12 Apr 2016 23:14:41 +0000 (16:14 -0700)]
Merge pull request #4278 from RussKeldorph/t1

Fix two "missing DLL" test failures

8 years agoMerge pull request #4296 from mmitche/fix-prefix-casing
Matt Mitchell [Tue, 12 Apr 2016 22:46:57 +0000 (15:46 -0700)]
Merge pull request #4296 from mmitche/fix-prefix-casing

Fix output casing of prefix dir

8 years agoRefactoring changes to use ReturnTypeDesc in codegenxarch.
sivarv [Mon, 11 Apr 2016 18:49:41 +0000 (11:49 -0700)]
Refactoring changes to use ReturnTypeDesc in codegenxarch.

8 years agoMerge pull request #4279 from swaroop-sridhar/GC
Swaroop Sridhar [Tue, 12 Apr 2016 20:32:10 +0000 (13:32 -0700)]
Merge pull request #4279 from swaroop-sridhar/GC

GCInfo: Fix ARM64 GCInfo decoding

8 years agoBulk port of TypeSystem test cases
Fadi Hanna [Tue, 12 Apr 2016 00:27:01 +0000 (17:27 -0700)]
Bulk port of TypeSystem test cases

8 years agoClean up StructArrayList for GC info.
Pat Gavlin [Fri, 8 Apr 2016 22:39:55 +0000 (15:39 -0700)]
Clean up StructArrayList for GC info.

- Move the code into the GC info encoder, as that is its
  only consumer.
- Remove contracts
- Delete dead code
- Reformat and refactor to current coding standards

8 years agoMerge pull request #4292 from janvorli/hw-exceptions-change
Jan Vorlicek [Tue, 12 Apr 2016 19:18:32 +0000 (21:18 +0200)]
Merge pull request #4292 from janvorli/hw-exceptions-change

Fix hardware exception handling in native code on BSD

8 years agoMerge pull request #4294 from kyulee1/fixsp
Kyungwoo Lee [Tue, 12 Apr 2016 18:25:40 +0000 (11:25 -0700)]
Merge pull request #4294 from kyulee1/fixsp

ARM64: Fix for recording SP for handler.

8 years agoFix output casing of prefix dir
Matt Mitchell [Tue, 12 Apr 2016 16:48:00 +0000 (09:48 -0700)]
Fix output casing of prefix dir

The PREFIX dir is upper case, should be refered to as such.  Blocker for building on Linux

8 years agoFix two "missing DLL" test failures
Russ Keldorph [Sun, 10 Apr 2016 10:58:19 +0000 (03:58 -0700)]
Fix two "missing DLL" test failures

Fix #2234 Missing native DLL
Fix #2237 Missing DLL is a MC++ test hiding alongside a C# wrapper--delete
    test which was mistakenly ported.

8 years agoMerge pull request #4085 from LLITCHEV/Issue3618-1
Lubomir Litchev [Tue, 12 Apr 2016 17:39:28 +0000 (10:39 -0700)]
Merge pull request #4085 from LLITCHEV/Issue3618-1

Fix a bug in the code for inserting a tree in the linear order.

8 years agofix GCInfo build problem, tested a few simple "HelloWorld" program works good!
Zhicheng Zhu [Mon, 11 Apr 2016 18:01:21 +0000 (11:01 -0700)]
fix GCInfo build problem, tested a few simple "HelloWorld" program works good!

8 years agoARM64: Fix for recording SP for handler.
Kyungwoo Lee [Tue, 12 Apr 2016 16:11:53 +0000 (09:11 -0700)]
ARM64: Fix for recording SP for handler.

Fixes https://github.com/dotnet/coreclr/issues/3701.

When GC occurs in a catch handler, we compare the current frame with the one
saved before the funclet was invoked.
The recorded SP address was wrong (offset by 16 byte), which caused FindParentStackFrameForStackWalk to null frame.
So, we ended up with assert on `ExceptionTracker::HasFrameBeenUnwoundByAnyActiveException(&m_crawl)`.
The issue was assembly helper, CallEHFunclet records FP instead of SP while SP is adjusted in prolog.

8 years agoMerge pull request #4290 from leemgs/upstream-clang38
Jan Kotas [Tue, 12 Apr 2016 13:42:03 +0000 (03:42 -1000)]
Merge pull request #4290 from leemgs/upstream-clang38

Add clang-3.8 into build.sh

8 years agoMerge pull request #4187 from stephentoub/lcts_dispose_cancel_race
Stephen Toub [Tue, 12 Apr 2016 13:19:29 +0000 (09:19 -0400)]
Merge pull request #4187 from stephentoub/lcts_dispose_cancel_race

Fix race condition between CTS.Cancel and Dispose

8 years agoFix hardware exception handling in native code on BSD
Jan Vorlicek [Mon, 11 Apr 2016 12:21:01 +0000 (14:21 +0200)]
Fix hardware exception handling in native code on BSD

There is a problem with hardware exception handling when the exception
happens in native code and it is under the HardwareExceptionHolder on
FreeBSD and NetBSD. The problem was that the C++ unwinder was unable
to cross the signal trampoline.
This change fixes the problem by throwing the PAL_SEHException from
the context of the hardware exception itself rather than from the
signal handler.
Since it uses the same code as we were using for StartUnwindingNativeFrames
in CoreCLR before, I have moved that stuff to PAL and let both CoreCLR and
the signal handlers use it too.
At the same time, I have reenabled the paltest_pal_sxs_test1 for FreeBSD and
NetBSD, since it now works.

8 years agoARM: fix build warning for unw usage
MyungJoo Ham [Mon, 11 Apr 2016 04:49:27 +0000 (13:49 +0900)]
ARM: fix build warning for unw usage

The warning is coming from libunwind-arm, not coreclr.
Libunwind-arm uses SP/PC registers along with other registers,
which clang complains.

fix #4259

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
8 years agoMerge pull request #4280 from krytarowski/netbsd-support-59
Jan Vorlicek [Tue, 12 Apr 2016 08:15:03 +0000 (10:15 +0200)]
Merge pull request #4280 from krytarowski/netbsd-support-59

Use _lwp_self() in THREADSilentGetCurrentThreadId() for NetBSD

8 years agoAdd clang-3.8 into build.sh
Geunsik Lim [Tue, 12 Apr 2016 06:11:53 +0000 (15:11 +0900)]
Add clang-3.8 into build.sh

According to the official release note, clang 3.8 is also stable version.
http://llvm.org/releases/download.html
Let's add version 3.8 of clang into build.sh script.

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
8 years agoMerge pull request #4274 from davmason/master
David Mason [Tue, 12 Apr 2016 04:13:24 +0000 (21:13 -0700)]
Merge pull request #4274 from davmason/master

Bug Fixes for EventSource

8 years agoFix a bug in the code for inserting a tree in the linear order.
Lubomir Litchev [Tue, 5 Apr 2016 17:31:20 +0000 (10:31 -0700)]
Fix a bug in the code for inserting a tree in the linear order.

A long standing issue in the Compiler::fgInsertTreeInListBefore method was
found where the gtStmtList of a statement was not updated when a tree is
inserted before the first statement in the list (stmt->gtStmtList ==
insertionPoint). In such case the gtStmtList is not updated to include the
new tree(s) inserted.

After talking to few people offline to understand where this fix should be made
and realizing that the comment on Compiler::fgMakeEmbeddedStmt is
incorrect, I made the necessary fix in Compiler::fgInsertTreeInListBefore
so the newly inserted tree(s) in includedin the gtStmtList of the updated
stmt.

Fixes 3618.

8 years agoUse _lwp_self() in THREADSilentGetCurrentThreadId() for NetBSD
Kamil Rytarowski [Tue, 12 Apr 2016 00:26:54 +0000 (02:26 +0200)]
Use _lwp_self() in THREADSilentGetCurrentThreadId() for NetBSD

The _lwp_self() call returns the LWP ID of the calling LWP.
It requires <lwp.h> on NetBSD.

8 years agoMerge pull request #4101 from sejongoh/detect_ldsfld_access_non_static_field
Sejong Oh [Tue, 12 Apr 2016 00:19:29 +0000 (17:19 -0700)]
Merge pull request #4101 from sejongoh/detect_ldsfld_access_non_static_field

Check if LDSFLD accesses non-static field

8 years agoMerge pull request #4277 from mikem8361/rpath
Mike McLaughlin [Tue, 12 Apr 2016 00:06:44 +0000 (17:06 -0700)]
Merge pull request #4277 from mikem8361/rpath

Unable to debug coreclr apps on Debian 8.2 (Issue #4263)

8 years agoUnable to debug coreclr apps on Debian 8.2 (Issue #4263)
Mike McLaughlin [Mon, 11 Apr 2016 22:37:42 +0000 (15:37 -0700)]
Unable to debug coreclr apps on Debian 8.2 (Issue #4263)

Add set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) to dbi and sos cmake files.

8 years agoMerge pull request #4218 from mikem8361/symbols
Mike McLaughlin [Mon, 11 Apr 2016 23:55:44 +0000 (16:55 -0700)]
Merge pull request #4218 from mikem8361/symbols

Add symbol packages for coreclr runtime.

8 years agoMerge pull request #4272 from AndyAyersMS/FixSpectralNorm
Andy Ayers [Mon, 11 Apr 2016 23:52:45 +0000 (16:52 -0700)]
Merge pull request #4272 from AndyAyersMS/FixSpectralNorm

Fix validation of spectralnorm under xunit-performance

8 years agoGCInfo: Fix ARM64 GCInfo decoding
Swaroop Sridhar [Fri, 8 Apr 2016 01:09:13 +0000 (18:09 -0700)]
GCInfo: Fix ARM64 GCInfo decoding

GCStress traps were not inserted in ARM64 code correctly because safepoint
offsets were not correctly computed by EnumerateSafepoints().

This change fixes the issue by adding the (-1) adjustment to the ARM64
Safepoint offsets, similar to ARM and AMD64.

8 years agoMerge pull request #4113 from swgillespie/long_running_gc
Sean Gillespie [Mon, 11 Apr 2016 22:58:49 +0000 (15:58 -0700)]
Merge pull request #4113 from swgillespie/long_running_gc

Create Long-running GC test job for the CI