platform/upstream/coreclr.git
9 years agoUpdate main README.md to include FreeBSD
Jan Henke [Fri, 24 Apr 2015 21:03:09 +0000 (23:03 +0200)]
Update main README.md to include FreeBSD

This PR adds FreeBSD to the main README.md.

9 years agoMerge pull request #800 from janhenke/fbsd-doc
Rich Lander [Fri, 24 Apr 2015 19:10:54 +0000 (12:10 -0700)]
Merge pull request #800 from janhenke/fbsd-doc

Initial FreeBSD instructions based on the Linux instructions.

9 years agoInitial FreeBSD instructions based on the Linux instructions.
Jan Henke [Fri, 24 Apr 2015 15:53:51 +0000 (17:53 +0200)]
Initial FreeBSD instructions based on the Linux instructions.

This file is a copy of the Linux instructions, modified for the differences
between Linux and FreeBSD. It is not perfect yet, we are still missing some
parts on FreeBSD (LLDB, CoreFX). Also the package download with NuGet.exe does
not work yet due to a problem with importing CA certs. Nevertheless this is a
start and better than nothing. Closes #799.

9 years agoMerge pull request #798 from justincormack/netbsd
Jan Vorlicek [Fri, 24 Apr 2015 15:02:34 +0000 (08:02 -0700)]
Merge pull request #798 from justincormack/netbsd

basic NetBSD platform support

9 years agobasic NetBSD platform support
Justin Cormack [Fri, 24 Apr 2015 12:28:07 +0000 (12:28 +0000)]
basic NetBSD platform support

9 years agoMerge pull request #790 from richlander/rich-readme
Rich Lander [Fri, 24 Apr 2015 05:51:30 +0000 (22:51 -0700)]
Merge pull request #790 from richlander/rich-readme

Add source instructions more prominently

9 years agoAdd source instructions more prominently
Richard Lander [Thu, 23 Apr 2015 05:03:23 +0000 (22:03 -0700)]
Add source instructions more prominently

9 years agoMerge pull request #795 from richlander/rich-windowsnuget
Rich Lander [Fri, 24 Apr 2015 05:46:45 +0000 (22:46 -0700)]
Merge pull request #795 from richlander/rich-windowsnuget

Add instructions for acquiring binaries for Windows via NuGet

9 years agoAdd instructions for acquiring binaries for Windows via NuGet
Rich Lander [Fri, 24 Apr 2015 00:32:33 +0000 (17:32 -0700)]
Add instructions for acquiring binaries for Windows via NuGet

9 years agoMerge pull request #796 from stephentoub/temp_currency_symbol
Matt Ellis [Fri, 24 Apr 2015 04:23:02 +0000 (21:23 -0700)]
Merge pull request #796 from stephentoub/temp_currency_symbol

Temporarily change invariant currency symbol on Unix for demo purposes

9 years agoTemporarily change invariant currency symbol on Unix for demo purposes
Stephen Toub [Fri, 24 Apr 2015 03:14:56 +0000 (23:14 -0400)]
Temporarily change invariant currency symbol on Unix for demo purposes

mscorlib's globalization stack on Unix is a temporary implementation, good enough to help unblock getting the rest of the system up and running and for some basic demos.  However, such demos are hindered slightly by the use of the international monetary symbol "\x00a4" when rendering currency.  This commit just makes a temporary tweak to instead use "$".

9 years agoMerge pull request #794 from dotnet/fix-gc-issue
Jan Vorlicek [Fri, 24 Apr 2015 01:14:07 +0000 (18:14 -0700)]
Merge pull request #794 from dotnet/fix-gc-issue

Fix GC stack unwinding issue

9 years agoFix GC stack unwinding issue
Jan Vorlicek [Fri, 24 Apr 2015 00:23:07 +0000 (17:23 -0700)]
Fix GC stack unwinding issue

This change fixes a GC stack unwinding issue when a GC is
triggered in a catch handler that caught a rethrown
exception.
The problem was that we need to propagate the m_fFixupCallerSPForGCReporting
to the new exception tracker created when interleaved exception handling
starts processing a block of managed frames after processing another
block of managed frames followed by a block of native frames.
Without this flag, the m_EnclosingClauseInfoForGCReporting's
caller SP is not updated when the target unwind frame is found and
such an update is needed.

9 years agoMerge pull request #788 from ellismg/fix-pal-dylib-loading
Matt Ellis [Thu, 23 Apr 2015 21:33:32 +0000 (14:33 -0700)]
Merge pull request #788 from ellismg/fix-pal-dylib-loading

Fix loading of PAL on OSX

9 years agoMerge pull request #787 from sokket/master
Jonathan Miller [Thu, 23 Apr 2015 21:02:46 +0000 (14:02 -0700)]
Merge pull request #787 from sokket/master

Fixing an issue in FILECanonicalizePath where some paths did not canonicalize properly

9 years agoMerge pull request #783 from Djuffin/dbi-linux
Eugene Zemtsov [Thu, 23 Apr 2015 20:17:01 +0000 (13:17 -0700)]
Merge pull request #783 from Djuffin/dbi-linux

CoreCLR DBI  automatically detects CLR instance to attach to

9 years agoFix loading of PAL on OSX
Matt Ellis [Thu, 23 Apr 2015 00:00:41 +0000 (17:00 -0700)]
Fix loading of PAL on OSX

On OSX our trick to preload the PAL from the host before trying to load
coreclr doesn't actually cause the OSX loader to correctly resolve the
dependency.

This change moves to use rpath and then add an entry to the rpath list
for libcoreclr to @loader_path.

This way, we can load libcoreclr even in cases where the path to the PAL
is not on DYLD_LIBRARY_PATH and your CWD is not the doesn't have a copy.

Related issues are #709 and #719

9 years agoAddressing PR feedback in the test cases and fixing casing for test case runs
Jonathan Miller [Thu, 23 Apr 2015 18:43:46 +0000 (11:43 -0700)]
Addressing PR feedback in the test cases and fixing casing for test case runs

9 years agoCoreCLR DBI automatically detects CLR instance to attach to (when possible)
Eugene Zemtsov [Wed, 22 Apr 2015 21:00:23 +0000 (14:00 -0700)]
CoreCLR DBI  automatically detects CLR instance to attach to (when possible)

9 years agoMerge pull request #791 from janhenke/freebsd-linking
Jan Kotas [Thu, 23 Apr 2015 17:24:09 +0000 (10:24 -0700)]
Merge pull request #791 from janhenke/freebsd-linking

Fix the two remaining linker errors on FreeBSD.

9 years agoMerge pull request #789 from mikem8361/dactablefix
Mike McLaughlin [Thu, 23 Apr 2015 17:02:55 +0000 (10:02 -0700)]
Merge pull request #789 from mikem8361/dactablefix

Fixed the dac table file problem

9 years agoFix the two remaining linker errors on FreeBSD.
Jan Henke [Thu, 23 Apr 2015 16:51:47 +0000 (02:51 +1000)]
Fix the two remaining linker errors on FreeBSD.

Thanks to Jan Vorlicek for finding the source of the first linker error. Those
linker options need to be passed to the linker on FreeBSD too.
The second linker error is caused by the fact that FreeBSD has no libdl, the
functionality is instead implemented in libc. Thus do not add the -ldl option
to the linker on FreeBSD. Fixes #739

This is fixes the build on FreeBSD completely!

9 years agoMerge pull request #786 from libengu/TestStructPromote
Bengu Li [Thu, 23 Apr 2015 16:44:12 +0000 (09:44 -0700)]
Merge pull request #786 from libengu/TestStructPromote

Add Directed/StructPromote test cases for JIT

9 years agoMerge pull request #784 from libengu/TestGenericsFields
Bengu Li [Thu, 23 Apr 2015 16:43:58 +0000 (09:43 -0700)]
Merge pull request #784 from libengu/TestGenericsFields

Add Generics/Fields test cases for JIT

9 years agoFixed the dac table file problem. The file name used isn't unique if there is more...
Mike McLaughlin [Thu, 23 Apr 2015 04:27:10 +0000 (21:27 -0700)]
Fixed the dac table file problem. The file name used isn't unique if there is more than one process running managed code.  As a temporary fix (using a file is very temporary anyway), use the CLR module base address in the file name. Even if there is more than one process with managed code/coreclr running if the base address is the same the dac table address will be the same. Moved the dac table initialization to be sooner in the EE initialization because SOS/DAC can need it even before the EE debugger support is started. Also fixed the dac table file cleanup. We can't actually remove the dac file now that the base address is part of the name because multiple processes could be using it.

9 years agoMerge pull request #773 from janhenke/build-args
Matthew Whilden [Thu, 23 Apr 2015 10:20:47 +0000 (03:20 -0700)]
Merge pull request #773 from janhenke/build-args

Add optional arguments for choosing clang version and verbose build output

9 years agoMerge pull request #771 from mikem8361/hwexcept
Mike McLaughlin [Thu, 23 Apr 2015 04:27:43 +0000 (21:27 -0700)]
Merge pull request #771 from mikem8361/hwexcept

Share hardware exception between coreclr and DAC

9 years agoChanged the VM's hardware exception to return if not in manged code. For DAC's hardwa...
Mike McLaughlin [Wed, 15 Apr 2015 23:59:56 +0000 (16:59 -0700)]
Changed the VM's hardware exception to return if not in manged code. For DAC's hardware exception handling, add
hardware exception holder used to determine if a C++ exception should be thrown for a hardware exception. Cleaned
up PAL initialization interactions between the debugger modules (PAL_InitializeDLL) and coreclr (PAL_InitializeCoreCLR).

9 years agoAddressing PR feedback
Jonathan Miller [Thu, 23 Apr 2015 01:31:16 +0000 (18:31 -0700)]
Addressing PR feedback

9 years agoFixing an issue in FILECanonicalizePath where paths like /Test/..
Jonathan Miller [Wed, 22 Apr 2015 23:18:00 +0000 (16:18 -0700)]
Fixing an issue in FILECanonicalizePath where paths like /Test/..
would not be properly canonicalized due to a missing check to
ensure the function doesn't truncate the root slash

9 years agoMerge pull request #785 from DickvdBrink/SOS-plugin-build
Jan Kotas [Wed, 22 Apr 2015 22:24:22 +0000 (15:24 -0700)]
Merge pull request #785 from DickvdBrink/SOS-plugin-build

Fixed lldb not found error on fedora

9 years agoAdd Directed/StructPromote test cases for JIT
Bengu Li [Wed, 22 Apr 2015 21:31:36 +0000 (14:31 -0700)]
Add Directed/StructPromote test cases for JIT

Add Directed/StructPromote test cases for JIT. Related proj, config files
added. Solution file update is delayed to later PRs for parallel working.
Passed build, buildtest, runtest.

9 years agoFixed lldb not found error on fedora
Dick van den Brink [Wed, 22 Apr 2015 21:23:46 +0000 (23:23 +0200)]
Fixed lldb not found error on fedora

liblldb is installed in /usr/lib64/llvm/liblldb.so

9 years agoAdd Generics/Fields test cases for JIT
Bengu Li [Wed, 22 Apr 2015 21:13:34 +0000 (14:13 -0700)]
Add Generics/Fields test cases for JIT

Add Generics/Fields test cases for JIT. Related proj, config, and sln files
added and updated. Passed build, buildtest, runtest.

9 years agoMerge pull request #759 from brianrob/perfmap
Jan Kotas [Wed, 22 Apr 2015 20:21:58 +0000 (13:21 -0700)]
Merge pull request #759 from brianrob/perfmap

Enable perf_events to resolve JIT compiled code addresses

9 years agoAdd optional arguments for choosing clang version and verbose build output
Jan Henke [Wed, 22 Apr 2015 10:47:11 +0000 (12:47 +0200)]
Add optional arguments for choosing clang version and verbose build output

This commit adds two optional arguments to build.sh. The "verbose" option
enables verbose build output. This can be useful to debug build failures by
seeing the complete command line used to invoke the build.
The other option is "clangx.y", which allows to specify the clang version used
for the build. This makes it easy to test different clang versions and aid
future migration to newer clang releases and other platforms. Closes #740

9 years agoMerge pull request #776 from libengu/TestInlineOpt
Bengu Li [Wed, 22 Apr 2015 18:18:30 +0000 (11:18 -0700)]
Merge pull request #776 from libengu/TestInlineOpt

Add Inline test cases for JIT

9 years agoMerge pull request #774 from dotnet-bot/from-tfs
Jan Kotas [Wed, 22 Apr 2015 18:18:10 +0000 (11:18 -0700)]
Merge pull request #774 from dotnet-bot/from-tfs

Merge changes from TFS

9 years agoAdd Inline test cases for JIT
Bengu Li [Wed, 22 Apr 2015 17:36:50 +0000 (10:36 -0700)]
Add Inline test cases for JIT

Add inlining optimizaiton test cases for JIT. Related proj, config, and sln files
added and updated. Passed build, buildtest, runtest.

9 years agoMerge pull request #750 from fieryorc/pull/add-apis
Prem Ramanathan [Wed, 22 Apr 2015 17:32:01 +0000 (10:32 -0700)]
Merge pull request #750 from fieryorc/pull/add-apis

Add few pal APIs to pal library

9 years agoAdd few pal APIs needed for debugger code.
Prem Ramanathan [Tue, 21 Apr 2015 00:07:19 +0000 (17:07 -0700)]
Add few pal APIs needed for debugger code.
Added APIs:

InterlockedBitTestAndReset
InterlockedBitTestAndSet
InitializeCriticalSectionEx

Added test for the first two APIs.

9 years agoMerge pull request #775 from mmitche/run-cppcheck
Matt Mitchell [Wed, 22 Apr 2015 17:22:36 +0000 (10:22 -0700)]
Merge pull request #775 from mmitche/run-cppcheck

Initial commit of script to run cppcheck.

9 years agoInitial commit of script to run cppcheck.
Matt Mitchell [Wed, 22 Apr 2015 16:23:46 +0000 (09:23 -0700)]
Initial commit of script to run cppcheck.

This script runs the cppcheck and sloccount tools for static analysis.  The lab runs this script with the default arguments

Mark script as executable

9 years agoAdds support for resolving JIT compiled managed call frames in perf_events.
Brian Robbins [Mon, 13 Apr 2015 23:18:16 +0000 (16:18 -0700)]
Adds support for resolving JIT compiled managed call frames in perf_events.

9 years agoMerge pull request #768 from libengu/TestGenericsArrays
Matt Mitchell [Wed, 22 Apr 2015 15:11:45 +0000 (08:11 -0700)]
Merge pull request #768 from libengu/TestGenericsArrays

Add Generics/Arrays test cases for JIT

9 years agoMerge pull request #765 from DickvdBrink/llvm_locate_fix
Jan Kotas [Tue, 21 Apr 2015 23:43:12 +0000 (16:43 -0700)]
Merge pull request #765 from DickvdBrink/llvm_locate_fix

Fixed locating llvm tools on fedora

9 years agoUpdate framework assembly for System.Uri WinRT projection from System.dll to Internal...
Ryan Byington [Tue, 21 Apr 2015 23:15:59 +0000 (16:15 -0700)]
Update framework assembly for System.Uri WinRT projection from System.dll to Internal.Uri.dll

For NetCore for CoreCLR System.Uri was moved from System.dll to Internal.Uri.dll. This change updates the WinRT projection for this change.

This is a temporary workaround while we investigate a complete fix and will break phone and .NET 4.6 scenarios.

[tfs-changeset: 1457678]

9 years agoAdd Generics/Arrays test cases for JIT
Bengu Li [Tue, 21 Apr 2015 23:10:40 +0000 (16:10 -0700)]
Add Generics/Arrays test cases for JIT

Add test cases in directory JIT/Generics/Arrays. Related proj, config, and sln files
added and updated. Passed build, buildtest, runtest.

9 years agoMerge pull request #766 from libengu/cmov
Bengu Li [Tue, 21 Apr 2015 22:40:41 +0000 (15:40 -0700)]
Merge pull request #766 from libengu/cmov

Add test cases in directory Directed/cmov

9 years agoAdd test cases in directory Directed/cmov
Bengu Li [Tue, 21 Apr 2015 18:42:30 +0000 (11:42 -0700)]
Add test cases in directory Directed/cmov

Add test cases in directory Directed/cmov. Logical operator
tests where many of the operations emit cmov instruciton on
x86\x64. Related proj, config, and sln files added and updated.
Passed build, buildtest, runtest.

9 years agoMerge pull request #752 from CarolEidt/PrecedenceFixes
Carol Eidt [Tue, 21 Apr 2015 18:23:21 +0000 (11:23 -0700)]
Merge pull request #752 from CarolEidt/PrecedenceFixes

Issue #609 & #610: Fix precedence issues

9 years agoMerge pull request #754 from jkotas/unnecessaryfile
Jan Kotas [Tue, 21 Apr 2015 05:29:04 +0000 (22:29 -0700)]
Merge pull request #754 from jkotas/unnecessaryfile

Delete unnecessary .gitmirror file

9 years agoDelete unnecessary .gitmirror file
Jan Kotas [Tue, 21 Apr 2015 05:23:07 +0000 (22:23 -0700)]
Delete unnecessary .gitmirror file

9 years agoMerge pull request #753 from dotnet-bot/from-tfs
Jan Kotas [Tue, 21 Apr 2015 05:21:28 +0000 (22:21 -0700)]
Merge pull request #753 from dotnet-bot/from-tfs

Merge changes from TFS

9 years agoUse more appropriate mirror setting for src\corefx
Jan Kotas [Tue, 21 Apr 2015 04:09:22 +0000 (21:09 -0700)]
Use more appropriate mirror setting for src\corefx

[tfs-changeset: 1457001]

9 years agoMerge pull request #745 from bartonjs/crypto-interop-library
Jan Kotas [Tue, 21 Apr 2015 02:19:46 +0000 (19:19 -0700)]
Merge pull request #745 from bartonjs/crypto-interop-library

Create native interop library System.Security.Cryptography.Native

9 years agoFixed locating llvm tools on fedora
Dick van den Brink [Tue, 21 Apr 2015 00:51:59 +0000 (02:51 +0200)]
Fixed locating llvm tools on fedora

The locate_llvm_exec function was missing the $llvm_prefix

9 years agoMerge pull request #746 from libengu/TestCheckedCtor
Bengu Li [Mon, 20 Apr 2015 23:26:51 +0000 (16:26 -0700)]
Merge pull request #746 from libengu/TestCheckedCtor

Add CSharp Base/Peer Constructor test cases

9 years agoCreate native interop library System.Security.Cryptography.Native
Jeremy Barton [Mon, 20 Apr 2015 23:03:44 +0000 (16:03 -0700)]
Create native interop library System.Security.Cryptography.Native

9 years agoAdd CSharp Base/Peer Constructor test cases
Bengu Li [Mon, 20 Apr 2015 21:38:27 +0000 (14:38 -0700)]
Add CSharp Base/Peer Constructor test cases

Add CSharp Base/Peer Constructor test cases. Related proj, config,
and sln files added and updated. Passed build, buildtest, runtest.

9 years agoIssue #609 & #610: Fix precedence issues
Carol Eidt [Mon, 20 Apr 2015 19:19:29 +0000 (12:19 -0700)]
Issue #609 & #610: Fix precedence issues

Near line 6089 in importer.cpp, enforcing the precedence indicated by
the indentation resulted in no diffs, which at first seemed surprising.
However, this is because we never encounter the other mask values
without calli.

Near line 10483, this is where we convert (dup, stloc) to (stloc, ldloc).
This was clearly intended only for non-debug mode, but the original code
in the importer was like this:

     if (!opts.compDbgCode &&
         (nextOpcode == CEE_STLOC)   ||
         (nextOpcode == CEE_STLOC_S) ||
         ((nextOpcode >= CEE_STLOC_0) &&
         (nextOpcode <= CEE_STLOC_3)))
     {
         insertLdloc = true;

Due to the fact that the parens don't support the apparent intended
precedence, the condition is equivalent to:

    if ((!opts.compDbgCode && (nextOpcode == CEE_STLOC)   ||
       (nextOpcode == CEE_STLOC_S)                        ||
       ((nextOpcode >= CEE_STLOC_0) && (nextOpcode <= CEE_STLOC_3)))

Changing it the apparent original meaning caused regressions.  This is
because it is often cheaper to load a local (i.e. the insertLdloc case)
than to do a dup, which may 1) cause a temp to be created to store the
value on the stack, or 2) result in a tree (e.g. a large constant) which
is cloneable but which is more expensive in code bytes than a ldloc.

The original code clearly intended to do this only in the non-debug case,
but with the incorrect parens it was doing it for any short stloc.  I'm
not sure that it is 100% OK to do this transformation on dbg code, but
we've apparently been doing it for some time (it's the same way in
jit32).

Adding the apparently intended parens caused regressions (158392 bytes
over all the MCH files). The change in this shelveset has a net
improvement (3848 bytes over all jitAsmDiffs).  (Doing this
transformation in all cases, i.e. just eliminating the !opts.compDbgCode,
causes zero diffs, indicating that we don't have any instances of dups
followed by non-short stlocs.)

Fix #609
Fix #610

9 years agoMerge pull request #742 from dotnet-bot/from-tfs
John Chen [Mon, 20 Apr 2015 16:21:19 +0000 (09:21 -0700)]
Merge pull request #742 from dotnet-bot/from-tfs

Merge changes from TFS

9 years agoEnable build crossgen.exe from build.cmd.
John Chen [Mon, 20 Apr 2015 15:36:31 +0000 (08:36 -0700)]
Enable build crossgen.exe from build.cmd.

Adds and modifies CMakeLists.txt files to enable building of crossgen.exe from build.cmd for x64 processor on Windows. Also adds a step in build.cmd to generate native image for mscorlib.

[tfs-changeset: 1456454]

9 years agoMerge pull request #736 from ellismg/hardcode-utf8-in-pal
Matt Ellis [Mon, 20 Apr 2015 05:17:54 +0000 (22:17 -0700)]
Merge pull request #736 from ellismg/hardcode-utf8-in-pal

Hardcode CP_ACP to UTF-8 on Linux

9 years agoMerge pull request #727 from richlander/rich-docs
Rich Lander [Sat, 18 Apr 2015 15:27:24 +0000 (08:27 -0700)]
Merge pull request #727 from richlander/rich-docs

Add Book of the Runtime docs

9 years agoMerge pull request #733 from stephentoub/temp_path
Jan Vorlicek [Sat, 18 Apr 2015 13:18:27 +0000 (15:18 +0200)]
Merge pull request #733 from stephentoub/temp_path

Make GetTempPathA/W first check TMPDIR

9 years agoMerge pull request #738 from libengu/AddJITCSETests
Bengu Li [Sat, 18 Apr 2015 06:15:57 +0000 (23:15 -0700)]
Merge pull request #738 from libengu/AddJITCSETests

Add JIT CSE tests

9 years agoAdd JIT CSE tests
Bengu Li [Sat, 18 Apr 2015 04:39:09 +0000 (21:39 -0700)]
Add JIT CSE tests

Add JIT CSE (common sub-expression elimination) optimization tests.
Related proj, config, and sln files added and updated. Passed build,
buildtest, runtest. Code went through Microsoft internal process
to meet open-source requirements.

9 years agoMerge pull request #737 from janvorli/fix-div-overflow-exception
Jan Kotas [Sat, 18 Apr 2015 02:51:43 +0000 (19:51 -0700)]
Merge pull request #737 from janvorli/fix-div-overflow-exception

Ensure we differentiate between division by zero and overflow

9 years agoEnsure we differentiate between division by zero and overflow
Jan Vorlicek [Thu, 16 Apr 2015 12:04:29 +0000 (14:04 +0200)]
Ensure we differentiate between division by zero and overflow

This change implements parsing of the IDIV instruction operand so that
we can find whether an integer division error was a division by zero or
an integer overflow.
It replaces the previous functionality that was implemented for OSX only
and was incomplete (it didn't handle memory operands) and partially incorrect
(not handling R8..R15 properly).

9 years agoAdd DAC Notes Book of the Runtime doc
dotnet-bot [Fri, 17 Apr 2015 22:06:12 +0000 (15:06 -0700)]
Add DAC Notes Book of the Runtime doc

9 years agoAdd Threading Book of the Runtime doc
dotnet-bot [Fri, 17 Apr 2015 20:33:56 +0000 (13:33 -0700)]
Add Threading Book of the Runtime doc

9 years agoSimplify a bit of logic in GetTempPathA
Stephen Toub [Fri, 17 Apr 2015 19:54:28 +0000 (15:54 -0400)]
Simplify a bit of logic in GetTempPathA

9 years agoHardcode CP_ACP to UTF-8 on Linux
Matt Ellis [Wed, 1 Apr 2015 02:22:10 +0000 (19:22 -0700)]
Hardcode CP_ACP to UTF-8 on Linux

Previously, on Linux, the PAL would attempt to detect the current codepage via
setlocale and maintained a mapping from LC_TYPES to Win32 locale names.
On OSX, we didn't do any of this, instead we always used UTF-8 as the
current codepage.

This change moves to this model on Linux as well, something we want to
do because it will enable us to use Ansi marshalling during PInvoke to
marshall UTF-8 data to native code (which is common when interoping with
existing native libraries on Linux) and allows us to remove a bunch of
code we don't want to carry forward from the PAL.

9 years agoMerge pull request #730 from josteink/freebsd-linking
Sergiy Kuryata [Fri, 17 Apr 2015 17:59:25 +0000 (10:59 -0700)]
Merge pull request #730 from josteink/freebsd-linking

CoreClr: Fix FreeBSD linking-issues.

9 years agoAdd Profiling Book of the Runtime doc
dotnet-bot [Fri, 17 Apr 2015 16:25:02 +0000 (09:25 -0700)]
Add Profiling Book of the Runtime doc

9 years agoAdd Exceptions Book of the Runtime doc
dotnet-bot [Fri, 17 Apr 2015 04:49:33 +0000 (21:49 -0700)]
Add Exceptions Book of the Runtime doc

9 years agoAdd Type System Book of the Runtime doc
David Wrighton [Thu, 16 Apr 2015 21:59:15 +0000 (14:59 -0700)]
Add Type System Book of the Runtime doc

9 years agoMerge pull request #734 from josteink/freebsd-fpregs
Jan Kotas [Fri, 17 Apr 2015 16:34:25 +0000 (09:34 -0700)]
Merge pull request #734 from josteink/freebsd-fpregs

Fix up final FPU-registers for FreeBSD x86_64.

9 years agoFix up final FPU-registers for FreeBSD x86_64.
Jostein Kjønigsen [Fri, 10 Apr 2015 06:09:06 +0000 (06:09 +0000)]
Fix up final FPU-registers for FreeBSD x86_64.

FreeBSD now builds without compilation errors. For FreeBSD and glory!

                ,        ,
               /(        )`
               \ \___   / |
               /- _  `-/  '
              (/\/ \ \   /\
              / /   | `    \
              O O   ) /    |
              `-^--'`<     '
             (_.)  _  )   /
              `.___/`    /
                `-----' /
   <----.     __ / __   \
   <----|====O)))==) \) /====
   <----'    `--' `.__,' \
                |        |
                 \       /       /\
            ______( (_  / \______/
          ,'  ,-----'   |
          `--{__________)

This closes https://github.com/dotnet/coreclr/issues/594#issuecomment-93995183

9 years agoMake GetTempPathA/W first check TMPDIR
Stephen Toub [Fri, 17 Apr 2015 13:09:48 +0000 (09:09 -0400)]
Make GetTempPathA/W first check TMPDIR

Today GetTempPathA/W are hardcoded to return /tmp/.  This commit makes them first consult the TMPDIR environment variable, using its value if it exists.

This also overhauls the tests for GetTempPathA/W, which were out-of-date with regards to the existing implementation and which were excluded from PAL test runs.

9 years agoCoreClr: Fix FreeBSD linking-issues.
Jostein Kjønigsen [Fri, 17 Apr 2015 08:13:28 +0000 (08:13 +0000)]
CoreClr: Fix FreeBSD linking-issues.

This fix brings the build almost up to 100% (from 35%), where it fails due to PIC-errors.

9 years agoMerge pull request #729 from mikem8361/clrstackfix
Mike McLaughlin [Fri, 17 Apr 2015 03:00:46 +0000 (20:00 -0700)]
Merge pull request #729 from mikem8361/clrstackfix

The ICorDebug version of sos ClrStack command stopped working

9 years agoMerge pull request #723 from janvorli/fix-dangling-else
Jan Kotas [Fri, 17 Apr 2015 00:08:29 +0000 (17:08 -0700)]
Merge pull request #723 from janvorli/fix-dangling-else

Fix dangling else warnings

9 years agoThe ICorDebug version of sos ClrStack command ("sos ClrStack -i") stopped working...
Mike McLaughlin [Thu, 16 Apr 2015 23:46:49 +0000 (16:46 -0700)]
The ICorDebug version of sos ClrStack command ("sos ClrStack -i") stopped working.  The existing was enumerating

all the modules in the target process to find the coreclr module, but under linux we just picked the first module found
because given just the base address of the module, it isn't easy to determine correct module given the context and
constrains the debugshim code ran.  We were lucky and picked the correct module but now the order has changed
which broke this command.

The fix is to just get the address for coreclr and create the ICorDebug interface from that instead of enumerating all the modules.

9 years agoMerge pull request #701 from janvorli/fix-freebsd-rc-issue
Jan Kotas [Thu, 16 Apr 2015 23:44:16 +0000 (16:44 -0700)]
Merge pull request #701 from janvorli/fix-freebsd-rc-issue

Fix .rc processing issue on FreeBSD

9 years agoMerge pull request #726 from janvorli/fix-copyright-headers
Jan Kotas [Thu, 16 Apr 2015 23:43:20 +0000 (16:43 -0700)]
Merge pull request #726 from janvorli/fix-copyright-headers

Add missing MIT license headers

9 years agoFix the return macro on Windows
Jan Vorlicek [Thu, 16 Apr 2015 23:35:47 +0000 (01:35 +0200)]
Fix the return macro on Windows

There seems to be a bug in the VC++ compiler that causes the
following error to occur:
ex.cpp(492): fatal error C1061: compiler limit : blocks nested too deeply
There seems to be no nesting when I look at preprocessed source of the ex.cpp
and it builds fine on Unix.
To make the Windows build happy, I have left the return macro definition
for MSVC as it was before my change and only changed it for other compilers.

9 years agoMerge pull request #721 from pgavlin/CorWarnings
Jan Kotas [Thu, 16 Apr 2015 23:08:24 +0000 (16:08 -0700)]
Merge pull request #721 from pgavlin/CorWarnings

Fix two sources of warnings in cor{,info}.h

9 years agoMerge pull request #724 from ellismg/use-libcoreclr-for-some-apis
Jan Kotas [Thu, 16 Apr 2015 23:02:12 +0000 (16:02 -0700)]
Merge pull request #724 from ellismg/use-libcoreclr-for-some-apis

PInvoke to libcoreclr for three APIs

9 years agoMerge pull request #722 from dotnet-bot/from-tfs
Matt Ellis [Thu, 16 Apr 2015 22:32:31 +0000 (15:32 -0700)]
Merge pull request #722 from dotnet-bot/from-tfs

Merge changes from TFS

9 years agoAdd missing MIT license headers
Jan Vorlicek [Thu, 16 Apr 2015 22:00:58 +0000 (00:00 +0200)]
Add missing MIT license headers

.rc and .def files were missing the MIT license headers, so this
change adds them.

9 years agoPInvoke to libcoreclr for three APIs
Matt Ellis [Thu, 16 Apr 2015 21:33:00 +0000 (14:33 -0700)]
PInvoke to libcoreclr for three APIs

After pulling the PAL out of the runtime, we redirected all the PInvokes
which were going to libcoreclr to libcoreclrpal. It turns out that
CoTaskMemAlloc, CoTaskMemFree and CoCreateGuid are still exported by the
runtime itself and not the PAL.

Update the three PInvokes for these functions from managed code to point
at the runtime itself.

9 years agoFix dangling else warnings
Jan Vorlicek [Thu, 16 Apr 2015 21:29:48 +0000 (23:29 +0200)]
Fix dangling else warnings

This change fixes all dangling else warnings and removes the
compiler flag that was disabling their reporting.

9 years agoMerge pull request #691 from josteink/freebsd-threading
Jan Vorlicek [Thu, 16 Apr 2015 20:49:19 +0000 (22:49 +0200)]
Merge pull request #691 from josteink/freebsd-threading

PAL: Fix threading on FreeBSD.

9 years agoFix for the build break. I had moved UAP Host under a folder whcih is built only...
Sedar Gokbulut [Thu, 16 Apr 2015 20:44:15 +0000 (13:44 -0700)]
Fix for the build break. I had moved UAP Host under a folder whcih is built only for x86. I'm changing the dirs.proj's to build the UAPHost for all architectures.
I verified that UAPHost gets built on x86coresys and armcoresys, whille VSIntegration and MSBuildTask folders gets built only on x86coresys.

[tfs-changeset: 1454192]

9 years agoFix two sources of warnings in cor{,info}.h
Pat Gavlin [Thu, 16 Apr 2015 20:26:55 +0000 (13:26 -0700)]
Fix two sources of warnings in cor{,info}.h

- cor.h was incorrectly casting a pointer-to-const to a
  pointer-to-non-const.
- corinfo.h contained a 0-sized array, which is not standard C++,
  and therefore generates a warning on compilers without MSVC
  extensions enabled. Using a 1-sized array (which is already done
  elsewhere in the same file) prevents this warning.

9 years agoPAL: Fix threading on FreeBSD.
Jostein Kjønigsen [Mon, 13 Apr 2015 07:35:54 +0000 (07:35 +0000)]
PAL: Fix threading on FreeBSD.

9 years agoMerge pull request #719 from ellismg/preload-pal-from-corerun
Matt Ellis [Thu, 16 Apr 2015 18:23:29 +0000 (11:23 -0700)]
Merge pull request #719 from ellismg/preload-pal-from-corerun

Explicitly load libcoreclrpal in corerun

9 years agoExplicitly load libcoreclrpal in corerun
Matt Ellis [Thu, 16 Apr 2015 17:58:41 +0000 (10:58 -0700)]
Explicitly load libcoreclrpal in corerun

libcoreclr has a dependency on libcoreclrpal, but libcoreclrpal is
usually not on the path the loader probes, since it is SxS with the
runtime itself.

Instead of forcing LD_LIBRARY_PATH to be set just have corerun load the
PAL from the same folder as the runtime before loading libcoreclr.

Fixes #709