platform/upstream/coreclr.git
8 years agoRevert "Remove useless security checks"
Jan Kotas [Sat, 6 Feb 2016 16:45:25 +0000 (08:45 -0800)]
Revert "Remove useless security checks"

8 years agoMerge pull request #3060 from dotnet-bot/from-tfs
Jan Kotas [Sat, 6 Feb 2016 15:45:09 +0000 (07:45 -0800)]
Merge pull request #3060 from dotnet-bot/from-tfs

Merge changes from TFS

8 years agoMerge pull request #3048 from sejongoh/add_unit_test_for_issue_2580
Sejong Oh [Sat, 6 Feb 2016 10:59:01 +0000 (02:59 -0800)]
Merge pull request #3048 from sejongoh/add_unit_test_for_issue_2580

Add unit test for issue 2580

8 years agoAdd unit test for issue 2580
Sejong Oh [Fri, 5 Feb 2016 21:07:57 +0000 (13:07 -0800)]
Add unit test for issue 2580

- The test checks if code generation for ushort is correct.

8 years agoDelete mdil support from coreclr
Jan Kotas [Sat, 6 Feb 2016 08:10:40 +0000 (00:10 -0800)]
Delete mdil support from coreclr

[tfs-changeset: 1573006]

8 years agoMerge pull request #3056 from krytarowski/netbsd-support-34
Jan Kotas [Sat, 6 Feb 2016 04:06:47 +0000 (20:06 -0800)]
Merge pull request #3056 from krytarowski/netbsd-support-34

Fix NetBSD build: Define virtual destructors when needed

8 years agoFix NetBSD build: Define virtual destructors when needed
Kamil Rytarowski [Sat, 6 Feb 2016 02:16:55 +0000 (03:16 +0100)]
Fix NetBSD build: Define virtual destructors when needed

This fixes the following error with recent Clang (3.9.0nb20160205):

In file included from /tmp/pkgsrc-tmp/wip/coreclr-git/work/coreclr/src/pal/src/synchmgr/synchcontrollers.cpp:20:
In file included from /tmp/pkgsrc-tmp/wip/coreclr-git/work/coreclr/src/pal/src/synchmgr/synchmanager.hpp:24:
/tmp/pkgsrc-tmp/wip/coreclr-git/work/coreclr/src/pal/src/include/pal/synchcache.hpp:146:13: error: destructor called on non-final 'CorUnix::CSynchWaitController' that has virtual functions but non-virtual destructor [-Werror,-Wdelete-non-virtual-dtor]
            pobj->~T();
            ^
/tmp/pkgsrc-tmp/wip/coreclr-git/work/coreclr/src/pal/src/synchmgr/synchmanager.hpp:724:31: note: in instantiation of member function 'CorUnix::CSynchCache<CorUnix::CSynchWaitController>::Add' requested here
            m_cacheWaitCtrlrs.Add(pthrCurrent, pCtrlr);
                              ^
/tmp/pkgsrc-tmp/wip/coreclr-git/work/coreclr/src/pal/src/include/pal/synchcache.hpp:146:20: note: qualify call to silence this warning
            pobj->~T();
                   ^
                   CorUnix::CSynchWaitController::
/tmp/pkgsrc-tmp/wip/coreclr-git/work/coreclr/src/pal/src/include/pal/synchcache.hpp:146:13: error: destructor called on non-final 'CorUnix::CSynchStateController' that has virtual functions but non-virtual destructor [-Werror,-Wdelete-non-virtual-dtor]
            pobj->~T();
            ^
/tmp/pkgsrc-tmp/wip/coreclr-git/work/coreclr/src/pal/src/synchmgr/synchmanager.hpp:741:32: note: in instantiation of member function 'CorUnix::CSynchCache<CorUnix::CSynchStateController>::Add' requested here
            m_cacheStateCtrlrs.Add(pthrCurrent, pCtrlr);
                               ^
/tmp/pkgsrc-tmp/wip/coreclr-git/work/coreclr/src/pal/src/include/pal/synchcache.hpp:146:20: note: qualify call to silence this warning
            pobj->~T();
                   ^
                   CorUnix::CSynchStateController::
2 errors generated.

8 years agoMerge pull request #3044 from pgavlin/CoreRTPInvoke
Pat Gavlin [Sat, 6 Feb 2016 02:25:52 +0000 (18:25 -0800)]
Merge pull request #3044 from pgavlin/CoreRTPInvoke

Generate P/Invoke transitions for CoreRT.

8 years agoMerge pull request #3051 from AndyAyersMS/InlineRefactor2
Andy Ayers [Sat, 6 Feb 2016 02:08:23 +0000 (18:08 -0800)]
Merge pull request #3051 from AndyAyersMS/InlineRefactor2

Inliner refactoring: consolidate logging, reporting and dumping

8 years agoMerge pull request #3026 from Dmitry-Me/clarifyKeepAliveUsage1
Jan Kotas [Sat, 6 Feb 2016 01:33:52 +0000 (17:33 -0800)]
Merge pull request #3026 from Dmitry-Me/clarifyKeepAliveUsage1

No need to stick to end of method

8 years agoMerge pull request #3052 from sivarv/master
Sivarv [Sat, 6 Feb 2016 00:38:49 +0000 (16:38 -0800)]
Merge pull request #3052 from sivarv/master

Fix to assert failure 'ret->OperGet() == GT_RETURN' morph.cpp

8 years agoMerge pull request #3053 from wtgodbe/serverGC
Jan Kotas [Sat, 6 Feb 2016 00:07:26 +0000 (16:07 -0800)]
Merge pull request #3053 from wtgodbe/serverGC

Disable usage of Server GC for ubuntu PR test builds in CI

8 years agoMerge pull request #3046 from adityamandaleeka/env_pal
Jan Kotas [Fri, 5 Feb 2016 23:59:25 +0000 (15:59 -0800)]
Merge pull request #3046 from adityamandaleeka/env_pal

Remove InternalStrdup from PAL

8 years agoInliner refactoring: consolidate logging, reporting and dumping
Andy Ayers [Thu, 4 Feb 2016 07:01:42 +0000 (23:01 -0800)]
Inliner refactoring: consolidate logging, reporting and dumping

With this change the responsibility for dumping, logging, and reporting
inline decisions is moved into the JitInlineResult class instead of being
distributed throughout the code base. This insures all the relevant inline
information is handled in a consistent manner.

The JitInlineResult is updated to hold a compiler instance and now
requires a context string describing the what the jit is doing as it evaluates
an inline candidate. There are 4 distinct contexts in use currently.

8 years agoFix a few more binary exprs for the CC.
Pat Gavlin [Fri, 5 Feb 2016 22:42:31 +0000 (14:42 -0800)]
Fix a few more binary exprs for the CC.

8 years agoCorrected typo in second comment line.
sivarv [Fri, 5 Feb 2016 22:01:43 +0000 (14:01 -0800)]
Corrected typo in second comment line.

8 years agoAddress CR feedback.
Pat Gavlin [Fri, 5 Feb 2016 22:38:34 +0000 (14:38 -0800)]
Address CR feedback.

8 years agoDisable usage of Server GC for ubuntu PR test builds in CI
William Godbe [Fri, 5 Feb 2016 22:09:47 +0000 (14:09 -0800)]
Disable usage of Server GC for ubuntu PR test builds in CI

8 years agoMerge pull request #3030 from krytarowski/netbsd-support-32
Jan Kotas [Fri, 5 Feb 2016 21:12:48 +0000 (13:12 -0800)]
Merge pull request #3030 from krytarowski/netbsd-support-32

Fix build on NetBSD: Walkaround compiler strictness regarding const c…

8 years agoMerge pull request #3045 from benpye/allow-llvm-unwind
Jan Kotas [Fri, 5 Feb 2016 21:10:07 +0000 (13:10 -0800)]
Merge pull request #3045 from benpye/allow-llvm-unwind

Detect libunwind features allowing LLVMs libunwind to be used

8 years agoMerge pull request #2995 from krytarowski/netbsd-support-29
Jan Kotas [Fri, 5 Feb 2016 21:09:39 +0000 (13:09 -0800)]
Merge pull request #2995 from krytarowski/netbsd-support-29

Fix build on NetBSD: Mark destructors of few classes as virtual

8 years agoRemove InternalStrdup
Aditya Mandaleeka [Fri, 5 Feb 2016 20:05:21 +0000 (12:05 -0800)]
Remove InternalStrdup

8 years agoMerge pull request #3033 from janvorli/test-checked-optimization
Jan Vorlicek [Fri, 5 Feb 2016 19:46:48 +0000 (20:46 +0100)]
Merge pull request #3033 from janvorli/test-checked-optimization

Fix checked build compiler options

8 years agoMerge pull request #3042 from ellismg/add-pal-tests-to-skiptests-directive
Matt Ellis [Fri, 5 Feb 2016 19:29:04 +0000 (11:29 -0800)]
Merge pull request #3042 from ellismg/add-pal-tests-to-skiptests-directive

Have `skiptests` control PAL tests as well

8 years agoMerge pull request #3000 from sejongoh/add_windows_corefx_test_with_jit_stress_modes
Sejong Oh [Fri, 5 Feb 2016 19:07:25 +0000 (11:07 -0800)]
Merge pull request #3000 from sejongoh/add_windows_corefx_test_with_jit_stress_modes

Add corefx testing with JitStress=1 on Windows

8 years agoDetect libunwind features allowing LLVMs libunwind to be used
Ben Pye [Fri, 5 Feb 2016 16:34:36 +0000 (16:34 +0000)]
Detect libunwind features allowing LLVMs libunwind to be used

8 years agoGenerate P/Invoke transitions for CoreRT.
Pat Gavlin [Wed, 20 Jan 2016 21:44:43 +0000 (13:44 -0800)]
Generate P/Invoke transitions for CoreRT.

This change adds support for CoreRT-style P/Invoke transitions
to RyuJIT. Instead of the usual inlined transition code, these
transitions are made up of calls to two new JIT helpers:

    PInvokeTransitionFrame frame; // opaque local
    CORINFO_HELP_INIT_PINVOKE_FRAME(&frame);
    ...
    CORINFO_HELP_JIT_PINVOKE_BEGIN(&frame);
    target(...);
    CORINFO_HELP_JIT_PINVOKE_END(&frame);
    ...

The preemptive mode constraints apply between calls to
JIT_PINVOKE_BEGIN and JIT_PINVOKE_END: no managed references
may be live only in registers and managed references may not
be manipulated.

8 years agoMerge pull request #3010 from AndyAyersMS/FixVersionIssue
Jan Kotas [Fri, 5 Feb 2016 07:23:30 +0000 (23:23 -0800)]
Merge pull request #3010 from AndyAyersMS/FixVersionIssue

Fix version issue with System.IO for serialization tests

8 years agoMerge pull request #3027 from stephentoub/remove_security_checks
Jan Kotas [Fri, 5 Feb 2016 07:21:37 +0000 (23:21 -0800)]
Merge pull request #3027 from stephentoub/remove_security_checks

Remove useless security checks

8 years agoMerge pull request #3039 from dotnet-bot/from-tfs
Jan Kotas [Fri, 5 Feb 2016 07:20:00 +0000 (23:20 -0800)]
Merge pull request #3039 from dotnet-bot/from-tfs

Merge changes from TFS

8 years agoMerge pull request #3041 from krytarowski/netbsd-support-33
Jan Kotas [Fri, 5 Feb 2016 07:19:00 +0000 (23:19 -0800)]
Merge pull request #3041 from krytarowski/netbsd-support-33

Fix NetBSD build: Retire unneeded PAL_fpos_t and fgetpos() fsetpos()

8 years agoHave `skiptests` control PAL tests as well
Matt Ellis [Fri, 5 Feb 2016 06:33:14 +0000 (22:33 -0800)]
Have `skiptests` control PAL tests as well

Don't build the PAL test projects when `skiptests` is passed to
build.sh.

8 years agoMerge pull request #3031 from gkhanna79/FixBatch
Gaurav Khanna [Fri, 5 Feb 2016 04:41:45 +0000 (20:41 -0800)]
Merge pull request #3031 from gkhanna79/FixBatch

Cleanup VS2013 reference

8 years agoMerge pull request #3038 from AndyAyersMS/FixInlineAssert
Andy Ayers [Fri, 5 Feb 2016 04:28:25 +0000 (20:28 -0800)]
Merge pull request #3038 from AndyAyersMS/FixInlineAssert

Remove assert from the JitInlineResult dtor

8 years agoFix NetBSD build: Retire unneeded PAL_fpos_t and fgetpos() fsetpos()
Kamil Rytarowski [Fri, 5 Feb 2016 03:34:06 +0000 (04:34 +0100)]
Fix NetBSD build: Retire unneeded PAL_fpos_t and fgetpos() fsetpos()

These functions are unused. Linux version was unimplemented.

Removal suggested by Jan Kotas (Microsoft) to get rid of these functions.

The current code resulted with the following errors with the recent Clang/LLVM
(3.9.0nb20160131 snapshot) on NetBSD-7.99.25:

/tmp/pkgsrc-tmp/wip/coreclr-git/work/coreclr/src/pal/src/cruntime/file.cpp:858:20: error: no viable overloaded '='
        native_pos = *pos;
        ~~~~~~~~~~ ^ ~~~~

/usr/include/stdio.h:67:16: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'PAL_fpos_t' (aka 'unsigned long') to 'const __sfpos' for 1st argument
typedef struct __sfpos {
               ^
/usr/include/stdio.h:67:16: note: candidate function (the implicit move assignment operator) not viable: no known conversion from 'PAL_fpos_t' (aka 'unsigned long') to '__sfpos' for 1st argument
/tmp/pkgsrc-tmp/wip/coreclr-git/work/coreclr/src/pal/src/cruntime/file.cpp:860:14: error: assigning to 'PAL_fpos_t' (aka 'unsigned long') from incompatible type 'fpos_t' (aka '__sfpos')
        *pos = native_pos;
             ^ ~~~~~~~~~~
/tmp/pkgsrc-tmp/wip/coreclr-git/work/coreclr/src/pal/src/cruntime/file.cpp:904:20: error: no viable overloaded '='
        native_pos = *pos;
        ~~~~~~~~~~ ^ ~~~~
/usr/include/stdio.h:67:16: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'const PAL_fpos_t' (aka 'const unsigned long') to 'const __sfpos' for 1st argument
typedef struct __sfpos {
               ^
/usr/include/stdio.h:67:16: note: candidate function (the implicit move assignment operator) not viable: no known conversion from 'const PAL_fpos_t' (aka 'const unsigned long') to '__sfpos' for 1st argument
3 errors generated.

Possible implementation for NetBSD (attached here for historical references):
+--- src/pal/src/cruntime/file.cpp.orig 2016-01-28 19:04:13.000000000 +0000
++++ src/pal/src/cruntime/file.cpp
+@@ -844,6 +844,15 @@ PAL_fgetpos (
+     // TODO: implement for Linux if required
+     ASSERT(FALSE);
+     return -1;
++#elif defined(__NetBSD__)
++    off_t native_pos;
++
++    if ((native_pos = ftello(f->bsdFilePtr)) == -1)
++        return -1;
++
++    *pos = native_pos;
++
++    return 0;
+ #else
+     int    nRetVal = -1;
+     fpos_t native_pos;
+@@ -890,6 +899,14 @@ PAL_fsetpos (
+     // TODO: implement for Linux if required
+     ASSERT(FALSE);
+     return  -1;
++#elif defined(__NetBSD__)
++    off_t native_pos;
++
++    native_pos = *pos;
++    if (fseeko(f->bsdFilePtr, native_pos, SEEK_SET) == -1)
++        return -1;
++
++    return 0;
+ #else
+     int    nRetVal = -1;
+     fpos_t native_pos;

We cannot go better on NetBSD. This implementation might still have issues
with e.g. Unicode.

This closes #3029 "PAL fpos_t clash with NetBSD libraries"

Thanks Peter Jas (@jasonwilliams200OK) for hacking session on it.

8 years agoMake a few JIT interface changes to accommodate CoreRT:
Pat Gavlin [Fri, 5 Feb 2016 01:57:33 +0000 (17:57 -0800)]
Make a few JIT interface changes to accommodate CoreRT:
- Add support for providing extended flags for a compile invocation. In order to preserve binary compatibility with older definitions of ICorJitCompiler, this involved adding a new method to ICJI to fetch the flags. This method is only called if no flags are provided to the compiler via compileMethod.
- Add helper definitions for CORINFO_HELP_PINVOKE_{BEGIN,END} for CoreRT
- Add a flag to CorJitFlag2 to indicate that the aforementioned heleprs should be used instead of generating inline transitions
- Add a new method, getAddressOfPInvokeTarget, to the JIT/EE interface. This method can return a direct target for a PInvoke call in addition to an indirect or double-indirect target.

[tfs-changeset: 1572442]

8 years agoFix checked build optimization
Jan Vorlicek [Thu, 4 Feb 2016 21:20:24 +0000 (22:20 +0100)]
Fix checked build optimization

The initialization of the checked build compiler flags in the compiler
override files had no effect, since cmake handles the _INIT variables
only for the four standard configurations.

8 years agoMerge pull request #3036 from weshaggard/RemoveTestDependencyFeed
Wes Haggard [Fri, 5 Feb 2016 00:56:27 +0000 (16:56 -0800)]
Merge pull request #3036 from weshaggard/RemoveTestDependencyFeed

Remove dotnet-coreclr-testDependencies feed

8 years agoAdd corefx testing with JIT stress modes on Windows
Sejong Oh [Wed, 3 Feb 2016 06:17:26 +0000 (22:17 -0800)]
Add corefx testing with JIT stress modes on Windows

8 years agoRemove assert from the JitInlineResult dtor
Andy Ayers [Thu, 4 Feb 2016 22:22:53 +0000 (14:22 -0800)]
Remove assert from the JitInlineResult dtor

Don't assert here, instead rely on existing checks in the
frames that create JitInlineResults to verify an appropriate
decision was made.

Closes #3037.

8 years agoRemove dotnet-coreclr-testDependencies feed
Wes Haggard [Thu, 4 Feb 2016 22:10:44 +0000 (14:10 -0800)]
Remove dotnet-coreclr-testDependencies feed

As part of our feed migration this feed was deleted and so restore
started failing. It only contained one package so I that package on
our dotnet-core feed and eliminated the need for this one extra feed.

8 years agoCleanup VS2013 reference
Gaurav Khanna [Thu, 4 Feb 2016 19:18:12 +0000 (11:18 -0800)]
Cleanup VS2013 reference

8 years agoFix build on NetBSD: Walkaround compiler strictness regarding const conversion
Kamil Rytarowski [Thu, 4 Feb 2016 19:07:04 +0000 (20:07 +0100)]
Fix build on NetBSD: Walkaround compiler strictness regarding const conversion

This commit walks-around over-cautious Clang/LLVM alerts like:

/tmp/pkgsrc-tmp/wip/coreclr-git/work/coreclr/src/pal/tests/palsuite/c_runtime/sscanf/test4/test4.c:32:33: error: implicit conversion from
                'int' to 'short' changes value from 65535 to -1 [-Werror,-Wconstant-conversion]
 DoShortNumTest("-1", "%hd", 65535);
                ^~~~~~~~~~~~~~~~~~~

This closes #2968 "implicit conversion from 'int' to 'short' changes value from 65535 to -1"

Thanks Jan Kotas (Microsoft) for pointers.

8 years agoRemove security checks.
Vance Morrison [Sat, 23 Jan 2016 00:34:37 +0000 (16:34 -0800)]
Remove security checks.

These are holdovers from Silverlight days.   We don't support code access security in coreclr.

8 years agoNo need to stick to end of method
Dmitry-Me [Thu, 4 Feb 2016 14:33:59 +0000 (17:33 +0300)]
No need to stick to end of method

8 years agoMerge pull request #3016 from gkhanna79/CFG
Gaurav Khanna [Thu, 4 Feb 2016 05:51:05 +0000 (21:51 -0800)]
Merge pull request #3016 from gkhanna79/CFG

Support for Control Flow Guard

8 years agoMerge pull request #3021 from krytarowski/netbsd-support-31
Jan Kotas [Thu, 4 Feb 2016 05:34:55 +0000 (21:34 -0800)]
Merge pull request #3021 from krytarowski/netbsd-support-31

Fix build on NetBSD: Stop mixing PAL and system headers in tests

8 years agoMerge pull request #3018 from rahku/master
Rahul Kumar [Thu, 4 Feb 2016 04:13:18 +0000 (20:13 -0800)]
Merge pull request #3018 from rahku/master

Fix for test build errors

8 years agoOSGroup value does not get passed along to reference projects. This causes msbuild...
Rahul Kumar [Thu, 4 Feb 2016 00:47:52 +0000 (16:47 -0800)]
OSGroup value does not get passed along to reference projects. This causes msbuild to build the same project twice because the target bin dir would differ. But the intermediate dir would remain the same. If they happen to build at the same ...this is will cause build errors due to write to same file.

8 years agoFix build on NetBSD: Stop mixing PAL and system headers in tests
Kamil Rytarowski [Thu, 4 Feb 2016 02:34:09 +0000 (03:34 +0100)]
Fix build on NetBSD: Stop mixing PAL and system headers in tests

Including both system and PAL headers results in clasesh like:

In file included from /tmp/pkgsrc-tmp/wip/coreclr-git/work/coreclr/src/pal/tests/palsuite/threading/GetThreadTimes/test1/test1.c:18:
In file included from /usr/include/sched.h:37:
In file included from /usr/include/sys/sched.h:73:
/usr/include/sys/types.h:54:18: error: typedef redefinition with different types ('__int8_t' (aka 'signed char') vs 'char')
typedef __int8_t        int8_t;
                        ^
/tmp/pkgsrc-tmp/wip/coreclr-git/work/coreclr/src/pal/inc/pal_mstypes.h:224:16: note: previous definition is here
typedef __int8 int8_t;
               ^

This fixes #2993 "Conflicts with system headers on NetBSD"

Thanks to Jan Kotas (Microsoft) for showing the right direction.

8 years agoMerge pull request #3004 from sivarv/master
Sivarv [Thu, 4 Feb 2016 00:52:44 +0000 (16:52 -0800)]
Merge pull request #3004 from sivarv/master

Fix to assert 'ret->gtGetOp1() == nullptr' failure in morph.cpp

8 years agoFix to assert 'ret->gtGetOp1() == nullptr' failure in morph.cpp
sivarv [Wed, 3 Feb 2016 14:47:52 +0000 (06:47 -0800)]
Fix to assert 'ret->gtGetOp1() == nullptr' failure in morph.cpp

Investigation reveals that the assumption of GT_RETURN stmnt for methods returning struct through hidden RetBuf argument will be of the form GT_RETURN(TYP_VOID, op1=nullptr, op2=nullptr) is incorrect when running under profiler.

Profiler Leave callback requires that methods with struct return, return RetBuf in RAX. For this reason when required to generate Profiler callbacks, importer generates GT_RETURN(BY_REF, addr of retBuf) - see impReturnInstruction()

There is also another issue that fgAddInternal() which adds oneReturn block doesn't take into account of running under profiler and hence doesn't create genReturnLocal var and as a result oneReturn block doesn't return address of retBufArg. When running under profiler what should happen for a method returning struct via hidden RetBuf is as follows:

Say BB01 is any block ending in GT_RETURN(TYP_BYREF, addr of RetBuf). fgAddInternal() will decide to use oneReturn block since running under profiler. Since the method returns addr of RetBuf it should create a genReturnLocal of type TYP_BYREF. fgMorphBlocks() on finding genReturnLocal is valid, will replace GT_RETURN with as assignment of "genReturnLocal = add of RetBuf" and make BB01 to branch to oneReturn block.

Since fgAddInternal() doesn't take into account of running under profiler, it doesn't create genReturnLocal for methods having hidden RetBuf arg. Hence fgMorphBlocks() will find genReturnLocal is not valid and asserts that GT_RETURN must be of TYP_VOID with its op1=op2=nullptr, which is not the case and hence the assert.

Note that this assert will repro only when running under profiler because importer generates GT_RETURN(TYP_BYREF, addr of RetBuf) for methods with hidden RetBuf arg only when required to generate profiler callbacks.

Fix: Take into account of whether asked to generate Profiler callbacks create genReturnLocal.
Also took this opportunity cleaned up unnecessary code that was executing for unix and added new abstractions to check whether the method being compiled has ret val.

Note in case of unix there is no need to call struct classification logic to normalize struct return type returned in a single register because it is already done in lvaInitTypeRef() and assigned to compRetNativeType.

8 years agoUpdate linux-instructions.md
Stephen Toub [Thu, 4 Feb 2016 00:47:59 +0000 (19:47 -0500)]
Update linux-instructions.md

8 years agoMerge pull request #3008 from briansull/fix_arm64
Brian Sullivan [Wed, 3 Feb 2016 23:50:11 +0000 (15:50 -0800)]
Merge pull request #3008 from briansull/fix_arm64

Fix Arm64 test regressions from PR #2954

8 years agoInitial support for CFG. This makes VS 2015 as the minimum required build toolset...
Gaurav Khanna (CLR) [Wed, 3 Feb 2016 23:26:04 +0000 (15:26 -0800)]
Initial support for CFG. This makes VS 2015 as the minimum required build toolset, on Windows, for the repo.

8 years agoMerge pull request #3011 from wtgodbe/serverGC
William Godbe [Wed, 3 Feb 2016 22:23:59 +0000 (14:23 -0800)]
Merge pull request #3011 from wtgodbe/serverGC

Enable server GC on Ubuntu PR test builds in the CI

8 years agoEnable server GC on Ubuntu PR test builds in the CI
William Godbe [Wed, 3 Feb 2016 22:23:27 +0000 (14:23 -0800)]
Enable server GC on Ubuntu PR test builds in the CI

8 years agoFix version issue with System.IO for serialization tests
Andy Ayers [Wed, 3 Feb 2016 21:46:03 +0000 (13:46 -0800)]
Fix version issue with System.IO for serialization tests

8 years agoFix Arm64 test regressions from PR #2954
Brian Sullivan [Wed, 3 Feb 2016 20:45:55 +0000 (12:45 -0800)]
Fix Arm64 test regressions from PR #2954

Some additional ifdef renaming for the Arm64 target
Updated Test.lst with ISSUE tags for recently opened issues

8 years agoMerge pull request #3006 from kyulee1/splitheader
Kyungwoo Lee [Wed, 3 Feb 2016 20:33:31 +0000 (12:33 -0800)]
Merge pull request #3006 from kyulee1/splitheader

cordebuginfo.h out of corinfo.h

8 years agoMerge pull request #3003 from dotnet-bot/from-tfs
Jan Kotas [Wed, 3 Feb 2016 18:34:53 +0000 (10:34 -0800)]
Merge pull request #3003 from dotnet-bot/from-tfs

Merge changes from TFS

8 years agocordebuginfo.h out of corinfo.h
Kyungwoo Lee [Wed, 3 Feb 2016 16:36:54 +0000 (08:36 -0800)]
cordebuginfo.h out of corinfo.h

ICorDebugInfo is almost standalone data structure.
This puts ICorDebugInfo into a new cordebuginfo.h.
This new header file is just included in corinfo.h
This way we could share this debug data structure
with ObjectWriter/LLILC by simply including this header.

8 years agoMerge pull request #2994 from janvorli/enable-unix-readytorun-tests
Jan Vorlicek [Wed, 3 Feb 2016 16:56:12 +0000 (17:56 +0100)]
Merge pull request #2994 from janvorli/enable-unix-readytorun-tests

Fix warning in Windows build of readytorun tests

8 years agoIntegrate changes from full .NET Framework
Jan Kotas [Wed, 3 Feb 2016 14:18:44 +0000 (06:18 -0800)]
Integrate changes from full .NET Framework
- Custom attribute to suppress NGen with method granularity
- Static contract fixes
- GC fix

[tfs-changeset: 1571860]

8 years agoMerge pull request #2997 from kouvel/Finalize
Jan Kotas [Wed, 3 Feb 2016 05:17:23 +0000 (21:17 -0800)]
Merge pull request #2997 from kouvel/Finalize

Expose COMPlus_FinalizeOnShutdown in release builds

8 years agoMerge pull request #2891 from eerhardt/Fix2748
Eric Erhardt [Wed, 3 Feb 2016 03:51:53 +0000 (21:51 -0600)]
Merge pull request #2891 from eerhardt/Fix2748

TimeZoneInfo.DisplayName values are not localized on Linux

8 years agoExpose COMPlus_FinalizeOnShutdown in retail builds
Koundinya Veluri [Wed, 3 Feb 2016 01:18:38 +0000 (17:18 -0800)]
Expose COMPlus_FinalizeOnShutdown in retail builds

To enable a workaround to restore the previous behavior before finalizers stopped running on shutdown by default

8 years agoFix build on NetBSD: Mark destructors of few classes as virtual
Kamil Rytarowski [Wed, 3 Feb 2016 01:51:08 +0000 (02:51 +0100)]
Fix build on NetBSD: Mark destructors of few classes as virtual

In the DeleteInteropSafe function there is accepted a class type (template):

    template<class T> void DeleteInteropSafe(T *p)

Inside this function there is a call of a destructor:

    p->~T();

Recent Clang/LLVM is upset when the passed T class doesn't contain a virtual
destructor.

Example error message:

In file included from /tmp/pkgsrc-tmp/wip/coreclr-git/work/coreclr/src/debug/ee/debugger.cpp:13:
In file included from /tmp/pkgsrc-tmp/wip/coreclr-git/work/coreclr/src/debug/ee/stdafx.h:33:
/tmp/pkgsrc-tmp/wip/coreclr-git/work/coreclr/src/debug/ee/debugger.h:3652:9: error: destructor called on non-final 'DebuggerPendingFuncEvalTable' that has virtual functions but non-virtual destructor [-Werror,-Wdelete-non-virtual-dtor]
        p->~T();
        ^
/tmp/pkgsrc-tmp/wip/coreclr-git/work/coreclr/src/debug/ee/debugger.cpp:1310:13: note: in instantiation of function template specialization 'DeleteInteropSafe<DebuggerPendingFuncEvalTable>' requested here
            DeleteInteropSafe(pPendingEvals);
            ^
/tmp/pkgsrc-tmp/wip/coreclr-git/work/coreclr/src/debug/ee/debugger.h:3652:13: note: qualify call to silence this warning
        p->~T();
            ^
            DebuggerPendingFuncEvalTable::

Reported and fixed on:
$ uname -a
NetBSD chieftec 7.99.25 NetBSD 7.99.25 (GENERIC) #0: Fri Dec 25 20:51:06 UTC 2015  root@chieftec:/tmp/netbsd-tmp/sys/arch/amd64/compile/GENERIC amd64

$ clang --version
clang version 3.9.0
Target: x86_64-unknown-netbsd7.99.25
Thread model: posix
InstalledDir: /usr/pkg/bin
$ llvm-config --version
3.9.0svn

8 years agoFix warning in Windows build of readytorun tests
Jan Vorlicek [Wed, 3 Feb 2016 01:50:39 +0000 (02:50 +0100)]
Fix warning in Windows build of readytorun tests

There was an extra reference to the test.dll besides the reference to the test
csproj. This was causing warnings during the test build.

8 years agoMerge pull request #2974 from krytarowski/netbsd-support-26
Jan Kotas [Wed, 3 Feb 2016 01:13:27 +0000 (17:13 -0800)]
Merge pull request #2974 from krytarowski/netbsd-support-26

Fix build on NetBSD: cast ptr to function to ptr to data

8 years agoMerge pull request #2954 from CarolEidt/CallArgCleanup
Carol Eidt [Wed, 3 Feb 2016 00:10:47 +0000 (16:10 -0800)]
Merge pull request #2954 from CarolEidt/CallArgCleanup

Outgoing call arg preliminary refactoring

8 years agoFix build on NetBSD: cast ptr to function to ptr to data
Kamil Rytarowski [Tue, 2 Feb 2016 01:52:32 +0000 (02:52 +0100)]
Fix build on NetBSD: cast ptr to function to ptr to data

8 years agoMerge pull request #2956 from cmckinsey/BenchF2
Chris McKinsey [Tue, 2 Feb 2016 22:55:00 +0000 (14:55 -0800)]
Merge pull request #2956 from cmckinsey/BenchF2

Add 15 more Benchstone floating-point (BenchF) benchmarks in Xunit fo…

8 years agoMerge branch 'master' into CallArgCleanup
Carol Eidt [Tue, 2 Feb 2016 21:43:06 +0000 (13:43 -0800)]
Merge branch 'master' into CallArgCleanup

8 years agoMerge pull request #2986 from jkotas/arm-fixes
Jan Kotas [Tue, 2 Feb 2016 21:30:58 +0000 (13:30 -0800)]
Merge pull request #2986 from jkotas/arm-fixes

Fix build break in Linux arm release build

8 years agoMerge pull request #2860 from LLITCHEV/gc-stress
Lubomir Litchev [Tue, 2 Feb 2016 20:39:11 +0000 (12:39 -0800)]
Merge pull request #2860 from LLITCHEV/gc-stress

Fix for bugs related to clasifying System.TypedReference - issue #2854.

8 years agoFix build break in Linux arm release build
Jan Kotas [Tue, 2 Feb 2016 19:51:10 +0000 (11:51 -0800)]
Fix build break in Linux arm release build

8 years agoMerge pull request #2941 from krytarowski/netbsd-support-19
Jan Kotas [Tue, 2 Feb 2016 19:46:41 +0000 (11:46 -0800)]
Merge pull request #2941 from krytarowski/netbsd-support-19

Add support for NetBSD-style gregs on x86

8 years agoMerge pull request #2983 from kyulee1/ilasmpdb
Kyungwoo Lee [Tue, 2 Feb 2016 18:04:34 +0000 (10:04 -0800)]
Merge pull request #2983 from kyulee1/ilasmpdb

Delete spurious ilasm warning message under DEBUG flag

8 years agoMerge pull request #2984 from mmitche/up-timeouts
Matt Mitchell [Tue, 2 Feb 2016 17:58:26 +0000 (09:58 -0800)]
Merge pull request #2984 from mmitche/up-timeouts

Increase timeouts for non-windows configs

8 years agoIncrease timeouts for non-windows configs
Matt Mitchell [Tue, 2 Feb 2016 17:54:13 +0000 (09:54 -0800)]
Increase timeouts for non-windows configs

8 years agoMerge pull request #2961 from rahku/updatebuildtools
Rahul Kumar [Tue, 2 Feb 2016 17:36:34 +0000 (09:36 -0800)]
Merge pull request #2961 from rahku/updatebuildtools

Update buildtools version for test builds

8 years agoMerge pull request #2979 from Dmitry-Me/writeNullPointerOnNoInterface
Jan Kotas [Tue, 2 Feb 2016 16:39:54 +0000 (08:39 -0800)]
Merge pull request #2979 from Dmitry-Me/writeNullPointerOnNoInterface

Write null pointer for unsupported interfaces

8 years agoMerge pull request #2719 from janvorli/enable-unix-readytorun-tests
Jan Vorlicek [Tue, 2 Feb 2016 15:56:10 +0000 (16:56 +0100)]
Merge pull request #2719 from janvorli/enable-unix-readytorun-tests

Enable unix readytorun tests

8 years agoOutgoing call arg preliminary refactoring
Carol Eidt [Mon, 1 Feb 2016 17:41:08 +0000 (09:41 -0800)]
Outgoing call arg preliminary refactoring

Preliminary renaming and cleanup in preparation for further refactoring of outgoing call arguments, particularly multi-reg arguments.

8 years agoTimeZoneInfo.DisplayName values are not localized on Linux
Eric Erhardt [Wed, 27 Jan 2016 23:41:14 +0000 (17:41 -0600)]
TimeZoneInfo.DisplayName values are not localized on Linux

Fixed by calling ICU's ucal_getTimeZoneDisplayName to read the display names for the current locale.

Fix https://github.com/dotnet/corefx/issues/2748

8 years agoDelete spurious ilasm warning message under DEBUG flag
Kyungwoo Lee [Tue, 2 Feb 2016 14:40:42 +0000 (06:40 -0800)]
Delete spurious ilasm warning message under DEBUG flag

When test population, most il tests turn on DEBUG flag, which
caused spurious warnings on ilasm/CoreCLR since PDB is not yet supported.
This changes the warning display to a comment that is linked to a GH issue.

8 years agoEnable ready to run tests on Unix
Jan Vorlicek [Mon, 18 Jan 2016 12:34:07 +0000 (13:34 +0100)]
Enable ready to run tests on Unix

This change enables running ready to run tests on Unix.

8 years agoMerge pull request #2978 from jkotas/prof-breaks
Jan Kotas [Tue, 2 Feb 2016 08:35:22 +0000 (00:35 -0800)]
Merge pull request #2978 from jkotas/prof-breaks

Fix fallout from enabling profiling

8 years agoWrite null pointer for unsupported interfaces
Dmitry-Me [Tue, 2 Feb 2016 07:04:43 +0000 (10:04 +0300)]
Write null pointer for unsupported interfaces

8 years agoMerge pull request #2976 from krytarowski/netbsd-support-27
Jan Kotas [Tue, 2 Feb 2016 05:40:35 +0000 (21:40 -0800)]
Merge pull request #2976 from krytarowski/netbsd-support-27

Fix build on NetBSD: Introduce check for pthread_getcpuclockid(3)

8 years agoMerge pull request #2977 from krytarowski/netbsd-support-28
Jan Kotas [Tue, 2 Feb 2016 05:38:20 +0000 (21:38 -0800)]
Merge pull request #2977 from krytarowski/netbsd-support-28

Prefer PAL_PTRACE() over hardcoded FreeBSD-style ptrace(2) calls

8 years agoMerge pull request #2972 from krytarowski/netbsd-support-24
Jan Kotas [Tue, 2 Feb 2016 05:37:48 +0000 (21:37 -0800)]
Merge pull request #2972 from krytarowski/netbsd-support-24

Fix build on NetBSD: Don't increment iterator twice in for(;;)

8 years agoMerge pull request #2971 from krytarowski/netbsd-support-23
Jan Kotas [Tue, 2 Feb 2016 05:34:40 +0000 (21:34 -0800)]
Merge pull request #2971 from krytarowski/netbsd-support-23

Add NetBSD target in src/pal/src/CMakeLists.txt

8 years agoFix build on NetBSD: Introduce check for pthread_getcpuclockid(3)
Kamil Rytarowski [Tue, 2 Feb 2016 01:58:56 +0000 (02:58 +0100)]
Fix build on NetBSD: Introduce check for pthread_getcpuclockid(3)

This function is part of the optional part of POSIX.

It's available in:
- FreeBSD,
- AIX,
- QNX,
- Linux.

It's missing in NetBSD.

According to Jan Kotas (Microsoft) this function is used for undocumented
resource monitoring feature (FEATURE_APPDOMAIN_RESOURCE_MONITORING) and
unlikely anybody is using this today.

Solution suggested in #2947 "NetBSD doesn't implement pthread_getcpuclockid(3)"

8 years agoFix fallout from enabling profiling
Jan Kotas [Tue, 2 Feb 2016 02:13:41 +0000 (18:13 -0800)]
Fix fallout from enabling profiling

- Compiler optimization assumption invalid: EE expects method to exist: System.StubHelpers.StubHelpers:ProfilerBeginTransitionCallback
- Add stubs for ARM

8 years agoAdd support for NetBSD-style gregs on x86
Kamil Rytarowski [Sun, 31 Jan 2016 10:24:44 +0000 (11:24 +0100)]
Add support for NetBSD-style gregs on x86

Floating point regs will be added later.

typedef struct {
        __gregset_t     __gregs;
        __greg_t        _mc_tlsbase;
        __fpregset_t    __fpregs;
} mcontext_t;

 --- /usr/include/amd64/mcontext.h
     (linked to machine/mcontext.h on NetBSD/amd64)

typedef struct {
        __gregset_t     __gregs;
        __fpregset_t    __fpregs;
        __greg_t        _mc_tlsbase;
} mcontext_t;

 --- /usr/include/i386/mcontext.h
     (linked to machine/mcontext.h on NetBSD/i386)

8 years agoPrefer PAL_PTRACE() over hardcoded FreeBSD-style ptrace(2) calls
Kamil Rytarowski [Tue, 2 Feb 2016 02:13:02 +0000 (03:13 +0100)]
Prefer PAL_PTRACE() over hardcoded FreeBSD-style ptrace(2) calls

8 years agoMerge pull request #2953 from janvorli/fix-unix-readytorun
Jan Kotas [Tue, 2 Feb 2016 01:20:28 +0000 (17:20 -0800)]
Merge pull request #2953 from janvorli/fix-unix-readytorun

Fix ReadyToRun on Unix

8 years agoFix build on NetBSD: Don't increment iterator twice in for(;;)
Kamil Rytarowski [Tue, 2 Feb 2016 01:18:39 +0000 (02:18 +0100)]
Fix build on NetBSD: Don't increment iterator twice in for(;;)

If I'm reading it correctly, we will never catch the ".cormeta" value.