platform/upstream/coreclr.git
8 years agoMerge pull request #2540 from AndyAyersMS/RoslynBenchmark
Andy Ayers [Tue, 12 Jan 2016 07:43:47 +0000 (23:43 -0800)]
Merge pull request #2540 from AndyAyersMS/RoslynBenchmark

Add a simple Roslyn benchmarks

8 years agoMerge pull request #2613 from stephentoub/ifdef_stringbuilder
Jan Kotas [Tue, 12 Jan 2016 03:34:01 +0000 (19:34 -0800)]
Merge pull request #2613 from stephentoub/ifdef_stringbuilder

Add ifdef to suppress non-coreclr warning

8 years agoMerge pull request #2572 from ramarag/event_source_payload
Rama krishnan Raghupathy [Tue, 12 Jan 2016 01:37:25 +0000 (17:37 -0800)]
Merge pull request #2572 from ramarag/event_source_payload

Fixing use case of incomplete Event Source payload

8 years agoAdd ifdef to suppress non-coreclr warning
stephentoub [Mon, 11 Jan 2016 23:25:17 +0000 (18:25 -0500)]
Add ifdef to suppress non-coreclr warning

My change to optimize AppDomain.Setup included moving a variable out of a loop, which also ended up moving it out of an ifdef.  That then causes an unused variable warning on some builds.

8 years agoMerge pull request #2592 from hoyMS/Bug2311
Hongtao Yu [Mon, 11 Jan 2016 23:16:59 +0000 (15:16 -0800)]
Merge pull request #2592 from hoyMS/Bug2311

Fix for issue 2311.

8 years agoMerge pull request #2609 from hoyMS/Bug2294
Hongtao Yu [Mon, 11 Jan 2016 23:15:02 +0000 (15:15 -0800)]
Merge pull request #2609 from hoyMS/Bug2294

Fix for bug 2294 [JitStress=2] Assertion failed 'curArgTabEntry->regN…

8 years agoMerge pull request #2587 from BruceForstall/BuildAllCmd
Bruce Forstall [Mon, 11 Jan 2016 21:48:05 +0000 (13:48 -0800)]
Merge pull request #2587 from BruceForstall/BuildAllCmd

Add "all" command to build.cmd

8 years agoMerge pull request #2568 from sejongoh/bugfix_unsigned_16bit_cmp_codegen
Sejong Oh [Mon, 11 Jan 2016 20:58:40 +0000 (12:58 -0800)]
Merge pull request #2568 from sejongoh/bugfix_unsigned_16bit_cmp_codegen

Fix bad codegen for comparing 16-bit unsigned values

8 years agoMerge pull request #2601 from stephentoub/appdomain_setup_cleanup
Matt Ellis [Mon, 11 Jan 2016 19:56:25 +0000 (11:56 -0800)]
Merge pull request #2601 from stephentoub/appdomain_setup_cleanup

Perf tweaks/cleanup to AppDomain.Setup

8 years agoFix for bug 2294 [JitStress=2] Assertion failed 'curArgTabEntry->regNum == regNum...
Hongtao Yu [Mon, 11 Jan 2016 19:03:32 +0000 (11:03 -0800)]
Fix for bug 2294 [JitStress=2] Assertion failed 'curArgTabEntry->regNum == regNum' in 'BringUpTest Main() in morph.cpp

The bug is due to a misproper definition of LAST_FP_ARGREG for Unix. On Windows, we set LAST_FP_ARGREG to XMM3. On UNix, the value should be XMM7.

8 years agoMerge pull request #2400 from pgavlin/FixDebugTypes
Pat Gavlin [Mon, 11 Jan 2016 18:14:15 +0000 (10:14 -0800)]
Merge pull request #2400 from pgavlin/FixDebugTypes

Fix DebugType and Optimize values for JIT tests.

8 years agoAvoid int[] and string[] allocations from String.Split in AppDomain.Setup
stephentoub [Mon, 11 Jan 2016 02:09:58 +0000 (21:09 -0500)]
Avoid int[] and string[] allocations from String.Split in AppDomain.Setup

String.Split not only allocates the string[] to hold the results, it also allocates an int[inputString.Length] to hold the indices of the separators.  With not much more code, we can do the splitting manually and avoid both arrays.

8 years agoMerge pull request #2603 from adityamandaleeka/fixSosDumpLog
Aditya Mandaleeka [Mon, 11 Jan 2016 01:51:24 +0000 (17:51 -0800)]
Merge pull request #2603 from adityamandaleeka/fixSosDumpLog

Fix SOS DumpLog

8 years agoFix SOS DumpLog
Aditya Mandaleeka [Mon, 11 Jan 2016 00:22:23 +0000 (16:22 -0800)]
Fix SOS DumpLog

8 years agoAdd some optimizations to AppDomain.Setup string handling
stephentoub [Sun, 10 Jan 2016 20:39:37 +0000 (15:39 -0500)]
Add some optimizations to AppDomain.Setup string handling

- Paths are normalized from a delimited string into a delimited StringBuilder.  It's very likely that the resulting data in the StringBuilder will be the same length or approximately the same length as that in the input string,  So pre-size the StringBuilder to be the same as the input length.
- Reuse StringBuilder instance for handling each property that needs it.
- Reuse the char[] array created for the path sepator

8 years agoMerge pull request #2544 from dotnet-bot/from-tfs
Jan Kotas [Sun, 10 Jan 2016 20:15:58 +0000 (12:15 -0800)]
Merge pull request #2544 from dotnet-bot/from-tfs

Merge changes from TFS

8 years agoMerge pull request #2598 from mikedn/archdir
Jan Kotas [Sun, 10 Jan 2016 20:11:14 +0000 (12:11 -0800)]
Merge pull request #2598 from mikedn/archdir

Use ARCH_SOURCES_DIR consistently

8 years agoRemove duplicate else blocks
stephentoub [Sun, 10 Jan 2016 18:25:21 +0000 (13:25 -0500)]
Remove duplicate else blocks

The same code is repeated for four different property names... condense them all into a single else if.

8 years agoUse ARCH_SOURCES_DIR consistently
Mike Danes [Sun, 10 Jan 2016 14:04:05 +0000 (16:04 +0200)]
Use ARCH_SOURCES_DIR consistently

Some places already use ARCH_SOURCES_DIR for things like include_directories but others test the platform/arch variables to figure out the dir. Use ARCH_SOURCES_DIR everywhere for consistency.

8 years agoMerge pull request #2593 from RussKeldorph/remove_stk_bndchk
Jan Kotas [Sun, 10 Jan 2016 08:15:25 +0000 (00:15 -0800)]
Merge pull request #2593 from RussKeldorph/remove_stk_bndchk

Remove bad test: stk_bndchk.il

8 years agoMerge pull request #2595 from stephentoub/startup_allocs
Jan Kotas [Sun, 10 Jan 2016 08:07:17 +0000 (00:07 -0800)]
Merge pull request #2595 from stephentoub/startup_allocs

Eliminate a bunch of AppDomain.Setup string path allocations

8 years agoEliminate a bunch of AppDomain.Setup string path allocations
stephentoub [Sun, 10 Jan 2016 03:05:50 +0000 (22:05 -0500)]
Eliminate a bunch of AppDomain.Setup string path allocations

A simple "Hello, World" CoreCLR app involves several hundred K of allocations.  A large percentage of this is in AppDomain.Setup.  At least for my configuration, 30% of all allocations are strings coming from AppDomain.Setup calling Path.NormalizePath (using CoreRun to run a "Hello, World" app in a folder containing the runtime and a bunch of framework libraries).  NormalizePath already checks to see whether the generated string is the same one that was supplied, but it does so after generating the string rather than before; changing to do it before-hand eliminates those allocations (given the right circumstances).

8 years agoMerge pull request #2582 from jkotas/fix-gcsample-x86
Jan Kotas [Sat, 9 Jan 2016 04:31:09 +0000 (20:31 -0800)]
Merge pull request #2582 from jkotas/fix-gcsample-x86

Fix building of GCSample on x86 via the standalone VS project

8 years agoFix for issue 2311.
Hongtao Yu [Sat, 9 Jan 2016 01:07:14 +0000 (17:07 -0800)]
Fix for issue 2311.

Remove the use of unsupported System.Threading.Thread.Abort in a test. Use
semaphore instead.i

The test is testing current GC which is composed of two threads. One thread serves as the garbage collector and run terminates by
itself. The other thread is the main thread and it explicitly aborts the GC thread when all work is done.

F

8 years agoAdd "all" command to build.cmd
Bruce Forstall [Sat, 9 Jan 2016 00:08:17 +0000 (16:08 -0800)]
Add "all" command to build.cmd

With "all", all build architectures and type are built. If a set of architectures or types
is also given, then the set of builds is restricted to those architecturs or flavors.

For example:
    build all
       -- builds all architectures, and all build types per architecture
    build all x86
       -- builds all build types for x86
    build all x64 x86 Checked Release
       -- builds x64 and x86 architectures, Checked and Release build types for each

8 years agoMerge pull request #2588 from BruceForstall/Fixx86TestBuild
Bruce Forstall [Sat, 9 Jan 2016 01:42:27 +0000 (17:42 -0800)]
Merge pull request #2588 from BruceForstall/Fixx86TestBuild

Allow all architectures for buildtest.cmd

8 years agoFixing use case of incomplete Event Source payload
Rama krishnan Raghupathy [Fri, 8 Jan 2016 06:44:25 +0000 (22:44 -0800)]
Fixing use case of incomplete Event Source payload

8 years agostk_bndchk.il is failing consistently for some individuals and
Russ Keldorph [Sat, 9 Jan 2016 00:52:51 +0000 (16:52 -0800)]
stk_bndchk.il is failing consistently for some individuals and
occasionally in the cloud. It assumes that it can create at most 1000
threads and be guaranteed that at least one of the threads' stacks will be
at an address below the heap. Presumably it did that because such
addresses were required to provoke a bug repro at one point in time.
Assuming the original bug is long fixed, there doesn't appear to be much
value to this test case, and it should simply be removed rather than made
deterministic.

Fixes #2585

8 years agoAllow all architectures for buildtest.cmd
Bruce Forstall [Sat, 9 Jan 2016 00:42:39 +0000 (16:42 -0800)]
Allow all architectures for buildtest.cmd

8 years agoMerge pull request #2574 from jkotas/tail-calls
Jan Kotas [Sat, 9 Jan 2016 00:04:21 +0000 (16:04 -0800)]
Merge pull request #2574 from jkotas/tail-calls

Enable tailcallopt for CoreRT

8 years agoMerge pull request #2569 from briansull/fix-2286
Brian Sullivan [Fri, 8 Jan 2016 22:14:25 +0000 (14:14 -0800)]
Merge pull request #2569 from briansull/fix-2286

Fix Issure 2286 - RyuJIT needs to honor volatile reads/writes and avoid making CSE's

8 years agoFix building of GCSample on x86 via the standalone VS project
Jan Kotas [Fri, 8 Jan 2016 22:04:23 +0000 (14:04 -0800)]
Fix building of GCSample on x86 via the standalone VS project

8 years agoEnable tailcallopt for CoreRT
Jan Kotas [Fri, 8 Jan 2016 16:54:57 +0000 (08:54 -0800)]
Enable tailcallopt for CoreRT

tailcallopt was disabled for ReadyToRun compilation mode because of zapper limitation. Moved the block to the zapper so that CoreRT can take advantage of it.

8 years agoMerge pull request #2570 from BruceForstall/BuildCmdCleanup
Bruce Forstall [Fri, 8 Jan 2016 20:52:24 +0000 (12:52 -0800)]
Merge pull request #2570 from BruceForstall/BuildCmdCleanup

Improve buildtest.cmd, runtest.cmd

8 years agoFix Issure 2286 - RyuJIT needs to honor volitile reads/writes and avoid making CSE...
Brian Sullivan [Fri, 8 Jan 2016 00:14:01 +0000 (16:14 -0800)]
Fix Issure 2286 - RyuJIT needs to honor volitile reads/writes and avoid making CSE's across them

In Liveness.cpp we will now treat a volatile accesses as definitions of the global heap
Assertions are also added in ValueNumber.cpp such that a block that defines or mutates the global heap
must have been marked as cotailing a definition of the global heap using the bbHeapDef flag.

8 years agoMerge pull request #2550 from AndyAyersMS/InlineTree
Andy Ayers [Fri, 8 Jan 2016 18:09:40 +0000 (10:09 -0800)]
Merge pull request #2550 from AndyAyersMS/InlineTree

Initial version of the inline tree

8 years agoMerge pull request #2563 from hoyMS/Bug2452
Pat Gavlin [Fri, 8 Jan 2016 17:08:59 +0000 (09:08 -0800)]
Merge pull request #2563 from hoyMS/Bug2452

Fix for bug 2452.

8 years agoMerge pull request #2573 from janvorli/fix-unlimited-stack-issue
Jan Kotas [Fri, 8 Jan 2016 15:15:37 +0000 (07:15 -0800)]
Merge pull request #2573 from janvorli/fix-unlimited-stack-issue

Fix issue with unlimited stack setting

8 years agoFix issue with unlimited stack setting
Jan Vorlicek [Fri, 8 Jan 2016 00:41:07 +0000 (01:41 +0100)]
Fix issue with unlimited stack setting

This change fixes a problem when a process stack size is set to unlimited.
In such case, the main thread stack memory range can shrink during the
process run time. But CoreCLR caches the initial stack limit value and
uses it to detect whether an object is on stack. Since the stack range is
not correct and there can be allocations in the original range of the stack,
this check sometimes fails and can cause issues.

The fix is to remember the stack top at the beginning of the scan in the
ScanContext and use it to check the object address too.

8 years agoMerge pull request #2567 from LLITCHEV/GetTypeIntrinsic
Jan Kotas [Fri, 8 Jan 2016 05:11:12 +0000 (21:11 -0800)]
Merge pull request #2567 from LLITCHEV/GetTypeIntrinsic

Fix ARM build break (Issue 2362).

8 years agoMerge pull request #2560 from AndyAyersMS/TestAttributionNote
Jan Kotas [Fri, 8 Jan 2016 05:10:14 +0000 (21:10 -0800)]
Merge pull request #2560 from AndyAyersMS/TestAttributionNote

Add note about attributions and licenses for 3rd-party originated tests

8 years agoMerge pull request #2562 from sergiy-k/gccodefix
Jan Kotas [Fri, 8 Jan 2016 05:09:31 +0000 (21:09 -0800)]
Merge pull request #2562 from sergiy-k/gccodefix

Fix incorrect merge in gc.cpp

8 years agoMerge pull request #2559 from bartonjs/osx_openssl_requirements
Stephen Toub [Fri, 8 Jan 2016 02:28:34 +0000 (21:28 -0500)]
Merge pull request #2559 from bartonjs/osx_openssl_requirements

Update OS X instructions to include upgrading OpenSSL

8 years agoMerge pull request #2561 from mikem8361/fixtransport
Stephen Toub [Fri, 8 Jan 2016 02:28:05 +0000 (21:28 -0500)]
Merge pull request #2561 from mikem8361/fixtransport

Fixed issue #5109.  Console stops echoing typed keys after running coreclr.

8 years agoImprove buildtest.cmd, runtest.cmd
Bruce Forstall [Fri, 8 Jan 2016 00:42:04 +0000 (16:42 -0800)]
Improve buildtest.cmd, runtest.cmd

Apply the same kind of changes that were applied to build.cmd:
1. Improved readability and structure of the code.
2. Make all three look similar.
3. Add "sequential" and "msbuildargs" options
4. Add better logging and less verbose console output

8 years agoMerge pull request #2557 from kyulee1/fixmessage
Kyungwoo Lee [Thu, 7 Jan 2016 23:52:41 +0000 (15:52 -0800)]
Merge pull request #2557 from kyulee1/fixmessage

Fix help message in ildasm for Unix

8 years agoFix wrong codegen for comparing 16-bit unsigned values
Sejong Oh [Thu, 7 Jan 2016 23:41:10 +0000 (15:41 -0800)]
Fix wrong codegen for comparing 16-bit unsigned values

The changes fix a bug generating 16-bit signed comparison code to
compare unsigned 16-bit values.

8 years agoMerge pull request #2518 from davmason/master
David Mason [Thu, 7 Jan 2016 23:40:43 +0000 (15:40 -0800)]
Merge pull request #2518 from davmason/master

Merge the .Net Native and CoreCLR implementations of EventSource.

8 years agoFix ARM build break (Issue 2362).
Lubomir Litchev [Thu, 7 Jan 2016 23:30:15 +0000 (15:30 -0800)]
Fix ARM build break (Issue 2362).

Remove unnecessary __cdecl modifier.

8 years agoMerge the .Net Native and CoreCLR implementations of EventSource. This replaces a...
David Mason [Mon, 21 Dec 2015 23:43:42 +0000 (15:43 -0800)]
Merge the .Net Native and CoreCLR implementations of EventSource. This replaces a lot of the previous ifdefs in the ProjectN impelmentation with a partial class that is cleaner and easier to understand.

Remove some ifdefs that can be done in a better way and merge additional bug fixes that happened in the nuget package branch.

Refactor some code to eliminate ifdefs for projectN.

Refactor code so that the ProjectN support uses partial classes instead of ifdefs.

Round 2 of making sure everything compiles in CoreCLR and in ProjectN.

Add formatting to the debugger message that EventSource prints when an internal error happens.

Change null strings to be represented as empty strings in TraceLogging.

Remove some ifdefs that can be done in a better way and merge additional bug fixes that happened in the nuget package branch.

Change WriteEventString to use an anonymous struct instead of EventMessage.

8 years agoMerge pull request #2552 from hoyMS/Bug2298
Hongtao Yu [Thu, 7 Jan 2016 22:15:44 +0000 (14:15 -0800)]
Merge pull request #2552 from hoyMS/Bug2298

Fix for Bug 2298

8 years agoFix a test bug where dllexport qualifier was missing.
Hongtao Yu [Thu, 7 Jan 2016 21:18:42 +0000 (13:18 -0800)]
Fix a test bug where dllexport qualifier was missing.

8 years agoFix incorrect merge in gc.cpp
Sergiy Kuryata [Thu, 7 Jan 2016 20:57:53 +0000 (12:57 -0800)]
Fix incorrect merge in gc.cpp

@Maoni0 noticed that there was one place in gc.cpp that was incorrectly
merged with code from other branches. This change fixes the problem.

8 years agoFixed issue #5109. Console stops echoing typed keys after running a coreclr program.
Mike McLaughlin [Thu, 7 Jan 2016 20:30:17 +0000 (12:30 -0800)]
Fixed issue #5109.  Console stops echoing typed keys after running a coreclr program.

The DbgTransportSession/TwoWayPipe code was closing handle 0 (stdout) because the DbgTransportSession class wasn't being zero init'ed via a memset. The TwoWayPipe code initialized the pipe handles to -1.  The fix is to reinitialized the TwoWayPipe by calling the constructor. Even though it is overkill also checked for 0 in the Disconnect code that closes the pipes.

8 years agoFix help message in ildasm for Unix
Kyungwoo Lee [Thu, 7 Jan 2016 15:57:55 +0000 (07:57 -0800)]
Fix help message in ildasm for Unix

ildasm -h contains a few broken message like "[Undefined resource string ID:0xCC]"
This is because we converted .rc file to a string table and SyntaxCon() enumerate all message ids while some of ids are ifdefedd out under FEATURE_PAL.
The fix is to define all the missing ids with empty string.

And also the indention (prefixed space) are all ignored except one.
Our trick (in awk script) to extract expression ID is to iterate argument string ($i) while setting it
to empty string to effectively delete the argument.
Unfortunately this has side-effect that normalizes all spaces between arguments to one space string.
The fix is to explicitly extract string content from the original string $0.

8 years agoInitial version of the inline tree
Andy Ayers [Wed, 6 Jan 2016 17:49:23 +0000 (09:49 -0800)]
Initial version of the inline tree

Extend `inlExpLst` to to describe the full inlining tree in a method, with a
corresponding dump method.

Add a top-level tree node to serve as the root of the tree. Set this as the
inline context for all top-level expressions. Update the code that links in new
nodes when there is a successful inline to build the tree links. Since the
child list is extended by a prepend and candidates are currently visited in
lexical (increasing "local" IL offset) order, the child list ends up reversed.
The dumper prints the list entries from back to front to compensate so the tree
display reflects lexical order.

Capture IL offset to help in identifying call sites. Note this is incomplete and
offets are often missing copies of the parent's offset. Will work on improving
this subsequently.

Update the depth check to return the depth. This is currently only used in
diagnostic messages.

Remove some unused inlining-related data members from the compiler class. Cache
the `JitPrintInlinedMethods` config value and use it to dump the tree when
inlining is done, if there were any inlines.

The jit traditionally (and probably inadvertently) allowed one level of
recursive inlining. Added a test case showing how this can happen.

Because there is now a top-level inlining context, the recursion check can now
potentially detect and block these recursive inlines. Support legacy behavior
for now by setting `ixlCode` to `nullptr` in the top-level record.

This change should be no diff.

Sample output:
```
Inlines into Enumerable:Where(ref,ref):ref
  [IL=3] Error:ArgumentNull(ref):ref
  [IL=17] Error:ArgumentNull(ref):ref
  [IL=?] WhereArrayIterator`1:.ctor(ref,ref):this
    [IL=?] Iterator`1:.ctor():this
      [IL=?] Object:.ctor():this
      [IL=?] Environment:get_CurrentManagedThreadId():int
        [IL=?] Thread:get_CurrentThread():ref
  [IL=?] WhereListIterator`1:.ctor(ref,ref):this
    [IL=?] Iterator`1:.ctor():this
      [IL=?] Object:.ctor():this
      [IL=?] Environment:get_CurrentManagedThreadId():int
        [IL=?] Thread:get_CurrentThread():ref
  [IL=?] WhereEnumerableIterator`1:.ctor(ref,ref):this
    [IL=?] Iterator`1:.ctor():this
      [IL=?] Object:.ctor():this
      [IL=?] Environment:get_CurrentManagedThreadId():int
        [IL=?] Thread:get_CurrentThread():ref
```
Sample showing the recursive inline:
```
Inlines into Fact:factRx(int,int,int,int):int
  [IL=6] Fact:factRx(int,int,int,int):int
```

8 years agoAdd note about attributions and licenses for 3rd-party originated tests
Andy Ayers [Thu, 7 Jan 2016 19:38:59 +0000 (11:38 -0800)]
Add note about attributions and licenses for 3rd-party originated tests

8 years agoUpdate OS X instructions to include upgrading OpenSSL
bartonjs [Thu, 7 Jan 2016 19:25:08 +0000 (11:25 -0800)]
Update OS X instructions to include upgrading OpenSSL

8 years agoMerge pull request #2517 from swgillespie/etw-python3
Rama krishnan Raghupathy [Thu, 7 Jan 2016 18:37:17 +0000 (10:37 -0800)]
Merge pull request #2517 from swgillespie/etw-python3

python3-ize the ETW setup scripts

8 years agoMerge pull request #2541 from BruceForstall/BuildCmdCleanup
Bruce Forstall [Thu, 7 Jan 2016 06:53:20 +0000 (22:53 -0800)]
Merge pull request #2541 from BruceForstall/BuildCmdCleanup

Improve and clean-up build.cmd

8 years agoFix for Bug 2298.
Hongtao Yu [Thu, 7 Jan 2016 01:59:05 +0000 (17:59 -0800)]
Fix for Bug 2298.

There is a noway assert in the lower assuming an GT_ARR_ELEM node cannot be a top expression node. This is not true.  We can have a top-level GT_ARR_ELEM. For example, a function call with a parameter of GT_ARR_ELEM can end up being simplified by the inliner to single GT_ARR_ELEM node if the function has an empty body.

The fix here is to remove the assert and use the GT_ARR_ELEM as the inserting point and remove the GT_ARR_ELEM later.

8 years agoMerge pull request #2548 from ellismg/fix-en-us-posix-casing
Jan Kotas [Thu, 7 Jan 2016 03:07:27 +0000 (19:07 -0800)]
Merge pull request #2548 from ellismg/fix-en-us-posix-casing

Don't use Turkish casing for en-US-POSIX.

8 years agoMerge pull request #2546 from AndyAyersMS/InlineTestCleanup
Jan Kotas [Thu, 7 Jan 2016 01:54:53 +0000 (17:54 -0800)]
Merge pull request #2546 from AndyAyersMS/InlineTestCleanup

Remove some redundant inlining tests

8 years agoMerge pull request #2529 from janvorli/fix-osx-build-with-new-cmake
Jan Vorlicek [Thu, 7 Jan 2016 01:40:46 +0000 (02:40 +0100)]
Merge pull request #2529 from janvorli/fix-osx-build-with-new-cmake

Fix build on OSX with CMake version >= 3.4

8 years agoMerge pull request #2543 from janvorli/fix-div-0-ovf-detection
Jan Kotas [Thu, 7 Jan 2016 01:35:22 +0000 (17:35 -0800)]
Merge pull request #2543 from janvorli/fix-div-0-ovf-detection

Fix div by zero or overflow detection on Unix

8 years agoDon't use Turkish casing for en-US-POSIX.
Matt Ellis [Wed, 6 Jan 2016 22:51:44 +0000 (14:51 -0800)]
Don't use Turkish casing for en-US-POSIX.

Previously, we were using a comparision between "i" and "I" (while
ignoring case) to figure out if we needed to do Turkish casing (on the
assumption that locales which compared i and I as non equal when
ignoring case were doing Turkish casing).

ICU Does tailoring of the en-US-POSIX locale and assigns different
primary wights to 'i' and 'I'. You can see this in the ICU Collation
Demo by looking at the raw collation elements. Different primary weights
mean they different letters, not the same letter with a difference in
casing (which is a trinary weight).

This changes the check to compare using an actual Turkish i when doing
our detection to not get confused by these cases.

Fixes #2531

8 years agoRemove some redundant inlining tests
Andy Ayers [Wed, 6 Jan 2016 22:46:33 +0000 (14:46 -0800)]
Remove some redundant inlining tests

8 years agoImprove and clean-up build.cmd
Bruce Forstall [Wed, 6 Jan 2016 00:51:22 +0000 (16:51 -0800)]
Improve and clean-up build.cmd

1. Change logging verbosity so there is much, much less noise on the screen. All the build output is still logged to a .log file.
2. Add separate .wrn and .err log files to capture warning and error output.
3. Add "skipmscorlib" option to skip the mscorlib build steps.
4. Add "skipnative" option to skip the native components build steps.
5. Change the "skiptestbuild" option to "skiptests" to match build.sh. Continue accepting "skiptestbuild" for backwards compatibility.
6. Change the "skipcoreclr" option in build.sh to "skipnative" to match build.cmd. Continue accepting "skipcoreclr" for backwards compatibility.
7. Add "msbuildargs" option to pass all remaining arguments directly to msbuild.
8. Add "sequential" option to build sequentially (disable parallel builds). One use: this simplifies reading the build logs.
9. Update the Usage output to be correct, and easier to understand.
10. Regularize script output; most lines now have a "BUILD:" prefix, so you know where they are coming from.
11. Restructure and simplified the script to be more readable and easier to modify in the future.
12. Added support for setting __echo=1 to see what the script is doing, line-by-line.
13. Added additional ways to view the usage screen (-? /h -h /help -help)

8 years agoFix div by zero or overflow detection on Unix
Jan Vorlicek [Wed, 6 Jan 2016 20:47:29 +0000 (21:47 +0100)]
Fix div by zero or overflow detection on Unix

This change fixes a bug in the code that detects whether a division error
is a division by zero or arithmetic overflow. The code was incorrectly
handling instructions with the SIB byte, since the rm was or-ed with the
rex_r bit even for the case when there was a SIB byte, which in case
where the rex_r was set made it miss the SIB byte.

8 years agoMerge pull request #2542 from wtgodbe/nightly2
William Godbe [Wed, 6 Jan 2016 18:32:42 +0000 (10:32 -0800)]
Merge pull request #2542 from wtgodbe/nightly2

Fixed build step, Priority 1 tests should now run nightly for OSX/Linux

8 years agoOne more fix for nightly run
William Godbe [Wed, 6 Jan 2016 18:23:37 +0000 (10:23 -0800)]
One more fix for nightly run

8 years agoUse the correct key to strongname sign mscorlib.
Alex Ghiondea [Wed, 6 Jan 2016 17:48:29 +0000 (09:48 -0800)]
Use the correct key to strongname sign mscorlib.

Use the sign.targets from BuildTools to match what we do in CoreFx.

[tfs-changeset: 1561739]

8 years agoMerge pull request #2533 from kyulee1/ildasmfix
Kyungwoo Lee [Wed, 6 Jan 2016 01:28:25 +0000 (17:28 -0800)]
Merge pull request #2533 from kyulee1/ildasmfix

Fix buffer overrun and _atoi64 in ildasm

8 years agoAdd a simple Roslyn benchmarks
Andy Ayers [Tue, 22 Dec 2015 17:25:40 +0000 (09:25 -0800)]
Add a simple Roslyn benchmarks

Add Benchmarks for Roslyn C# compilation and dataflow analysis.

The `managed/Compilation` test is similar and potentially now somewhat redundant. I left it alone but updated its dependencies since they need to agree with the new test.

I had to manually edit the `project.lock.json` files to remove the analyzers entries under libraries, to avoid a null pointer error in the PrereleaseResolveNuGetPackageAssets task (there's no language set for these projects so the attempt to deduce the appropriate set of analyzers fails).

8 years agoFix buffer overrun and _atoi64 in ildasm
Kyungwoo Lee [Tue, 5 Jan 2016 19:20:35 +0000 (11:20 -0800)]
Fix buffer overrun and _atoi64 in ildasm

PrettyPrintSigature allocates only 16 byte char array for prefix name, but the input string was synthesized from an 64 bit address -- szVarPrefix or szArgPrefix.
The maximum number of decimal digits for 64 bit value is 21, which overflows the allocated buffer.
Note actually ildasm even prepends '@' and appends '0' for the prefix name.
The fix is to declare MAX_PREFIX_SIZE as 32 and use it everywhere for the purpose.

This also fixes '_atoi64' which actually returns 32 bit value using '{PAL_}atol' in Unix.
Instead, I imports 'atoll' for the use of '_atoi64', which correctly converts string to 64 bit integer.

8 years agoMerge pull request #2530 from pgavlin/ImportJITTests
Pat Gavlin [Tue, 5 Jan 2016 20:40:13 +0000 (12:40 -0800)]
Merge pull request #2530 from pgavlin/ImportJITTests

Port more JIT tests.

8 years agoFix build on OSX with CMake version >= 3.4
Jan Vorlicek [Tue, 5 Jan 2016 15:03:57 +0000 (16:03 +0100)]
Fix build on OSX with CMake version >= 3.4

The new CMake version 3.4 has split <FLAGS> into <FLAGS> <INCLUDES>, so the
assembler invocation was not passing include paths anymore.
This fix adds the <INCLUDES> to the CMAKE_ASM_COMPILE_OBJECT variable
in the root CMakeLists.txt.

8 years agoMerge pull request #2516 from wtgodbe/nightly2
William Godbe [Tue, 5 Jan 2016 18:55:38 +0000 (10:55 -0800)]
Merge pull request #2516 from wtgodbe/nightly2

Fixed build step, Priority 1 tests should now run nightly for OSX/Linux

8 years agoMerge pull request #2491 from AndyAyersMS/LinqBenchmark
Andy Ayers [Tue, 5 Jan 2016 18:52:37 +0000 (10:52 -0800)]
Merge pull request #2491 from AndyAyersMS/LinqBenchmark

Add a simple set of Linq benchmarks

8 years agopython3-ize the ETW setup scripts
Sean Gillespie [Mon, 4 Jan 2016 19:15:01 +0000 (11:15 -0800)]
python3-ize the ETW setup scripts

python3-ize LTTNG generating code

8 years agoPort more JIT tests.
Pat Gavlin [Tue, 5 Jan 2016 00:58:07 +0000 (16:58 -0800)]
Port more JIT tests.

Most of these tests were blocked on unnecessary usage
of SerializableAttribute and Environment.ExitCode.

8 years agoMerge pull request #1944 from JohnChen0/crossgen
John Chen [Tue, 5 Jan 2016 16:17:41 +0000 (08:17 -0800)]
Merge pull request #1944 from JohnChen0/crossgen

Improve crossgen error when mscorlib is missing (issue 1889)

8 years agoMerge pull request #2528 from janvorli/fix-docker-hang
Jan Kotas [Tue, 5 Jan 2016 16:02:36 +0000 (08:02 -0800)]
Merge pull request #2528 from janvorli/fix-docker-hang

Fix exception tracker popping in a corner case

8 years agoMerge pull request #2521 from kyulee1/fixlong
Kyungwoo Lee [Tue, 5 Jan 2016 14:42:47 +0000 (06:42 -0800)]
Merge pull request #2521 from kyulee1/fixlong

Fix bad-codegen from ilasm

8 years agoFix exception tracker popping in a corner case
Jan Vorlicek [Tue, 5 Jan 2016 10:09:53 +0000 (11:09 +0100)]
Fix exception tracker popping in a corner case

This change fixes exception tracker popping in case a managed exception is handled in
the CoreCLR native code. The current exception tracker has an empty scanned stack
range in that case and the existing code in the ExceptionTracker::PopTrackers was
skipping the popping in such case, considering it a case when an exception happened
while the exception tracker was being setup.
Adding check that the tracker is in the first pass to that condition fixes the problem,
since when the tracker is in the second pass, it cannot be the case in which the PopTrackers
wanted to skip the popping.
The tracker is then popped correctly in the code below.

I have also reverted a fix for the exception from filter which was conflicting with this
fix and this fix fixes the problem of the exception from filter too.

8 years agoImprove crossgen error when mscorlib is missing (issue 1889)
John Chen (JOCHEN7) [Thu, 29 Oct 2015 21:15:37 +0000 (14:15 -0700)]
Improve crossgen error when mscorlib is missing (issue 1889)

When mscorlib is missing, crossgen reports a "file not found" error,
without indicating which file is missing. This makes it hard to discover
the actual error. This commit improves error reporting in such cases.

8 years agoMerge pull request #2523 from jkotas/r2r_gettype
Jan Kotas [Tue, 5 Jan 2016 04:57:14 +0000 (20:57 -0800)]
Merge pull request #2523 from jkotas/r2r_gettype

Fix compilation of Object.GetType intrinsic in ReadyToRun mode

8 years agoMerge pull request #2446 from jashook/legacy_backend_excludes
Jan Kotas [Tue, 5 Jan 2016 03:30:29 +0000 (19:30 -0800)]
Merge pull request #2446 from jashook/legacy_backend_excludes

Add x86 legacy backend exclusions.

8 years agoMerge pull request #2506 from mikedn/staticwalk
Jan Kotas [Tue, 5 Jan 2016 03:27:31 +0000 (19:27 -0800)]
Merge pull request #2506 from mikedn/staticwalk

Make JIT's fgWalk*Rec functions static

8 years agoFix compilation of Object.GetType intrinsic in ReadyToRun mode
Jan Kotas [Mon, 4 Jan 2016 23:15:40 +0000 (15:15 -0800)]
Fix compilation of Object.GetType intrinsic in ReadyToRun mode

In ReadyToRun mode, the method entrypoint to call is always given to the JIT via getCallInfo. GenTreeIntrinsic was dropping this entrypoint that caused methods that use Object.GetType intrinsics to fail to compile in ReadyToRun mode. It is a fatal error in CoreRT because of there is no fallback to JIT at runtime.

The fix is to pass this entrypoint around in GenTreeIntrinsic.

Added a test case in the ReadyToRun unit test.

8 years agoAdd a simple set of Linq benchmarks
Andy Ayers [Wed, 30 Dec 2015 21:50:23 +0000 (13:50 -0800)]
Add a simple set of Linq benchmarks

8 years agoFix bad-codegen from ilasm
Kyungwoo Lee [Mon, 4 Jan 2016 21:37:08 +0000 (13:37 -0800)]
Fix bad-codegen from ilasm

Switch target should be 4 byte instead of 8 byte.
In Windows, size of long is same as size of int which is 4 byte, but this is 8 byte in Unix.

8 years agoFixed build for Pri1
William Godbe [Mon, 4 Jan 2016 17:57:26 +0000 (09:57 -0800)]
Fixed build for Pri1

8 years agoMerge pull request #2474 from gkhanna79/FixArm64
Gaurav Khanna [Mon, 4 Jan 2016 17:32:26 +0000 (09:32 -0800)]
Merge pull request #2474 from gkhanna79/FixArm64

Arm64 build fixes

8 years agoMerge pull request #2513 from taylorjonl/call-to-sqrt-is-ambiguous
Jan Kotas [Mon, 4 Jan 2016 12:25:43 +0000 (04:25 -0800)]
Merge pull request #2513 from taylorjonl/call-to-sqrt-is-ambiguous

Fix "call to 'sqrt' is ambiguous" error when building on SunOS

8 years agoFix "call to 'sqrt' is ambiguous" error when building on SunOS
Jonathan Taylor [Mon, 4 Jan 2016 07:12:24 +0000 (07:12 +0000)]
Fix "call to 'sqrt' is ambiguous" error when building on SunOS

Building on SunOS will fail with the message of "call to 'sqrt' is
ambiguous" because it can't determine the type of the constant value
passed to it. This change adds a cast to a double because every usage
uses this data type

8 years agoMerge pull request #2461 from LLITCHEV/GetTypeIntrinsic
Lubomir Litchev [Mon, 4 Jan 2016 04:26:40 +0000 (20:26 -0800)]
Merge pull request #2461 from LLITCHEV/GetTypeIntrinsic

Fix a bug in morphing GT_COMMA with op1 being the new GetType() intri…

8 years agoMerge pull request #2505 from mikedn/deadcode
Jan Kotas [Mon, 4 Jan 2016 00:54:32 +0000 (16:54 -0800)]
Merge pull request #2505 from mikedn/deadcode

Remove dead code from JIT's earlyprop.cpp

8 years agoMerge pull request #2504 from mikedn/4044again
Jan Kotas [Mon, 4 Jan 2016 00:14:23 +0000 (16:14 -0800)]
Merge pull request #2504 from mikedn/4044again

Fix LNK4044 again

8 years agoMerge pull request #2503 from mikedn/4221again
Jan Kotas [Mon, 4 Jan 2016 00:13:11 +0000 (16:13 -0800)]
Merge pull request #2503 from mikedn/4221again

Disable LNK4221 again