platform/upstream/coreclr.git
9 years agoMake managed debugging on Linux possible (attach, load, bp, exceptions, stacktrace)
Eugene Zemtsov [Sat, 28 Mar 2015 11:42:11 +0000 (04:42 -0700)]
Make managed debugging on Linux possible (attach, load, bp, exceptions, stacktrace)

Fixes that were required to achieve that
1. Funnel SIGTRAP into EE debugger.
2. Making that memory allocated by EE debugger is executable.
3. Disable metadata reading optimizations which are not working on Linux.
4. Workaround RtlRestoreContext not properly working with EFlags.
5. Avoid calls to ShimRemoteDataTarget.GetContext on Linux, it is not
implemented and not needed for pure managed debugging.
6. Adjust IP value after breakpoint SIGTRAP to meet debuggers expectations.

9 years agoMerge pull request #616 from dotnet-bot/from-tfs
Jan Kotas [Thu, 2 Apr 2015 20:04:51 +0000 (13:04 -0700)]
Merge pull request #616 from dotnet-bot/from-tfs

Merge changes from TFS

9 years agoFix x86 build break
Jan Kotas [Thu, 2 Apr 2015 19:19:47 +0000 (12:19 -0700)]
Fix x86 build break

[tfs-changeset: 1444911]

9 years agoMerge pull request #614 from jkotas/lasterror
Jan Kotas [Thu, 2 Apr 2015 16:44:37 +0000 (09:44 -0700)]
Merge pull request #614 from jkotas/lasterror

Clear last error for SetLastError=true P/Invoke

9 years agoMerge pull request #612 from mmitche/usage-exit-code
Matt Mitchell [Thu, 2 Apr 2015 15:53:33 +0000 (08:53 -0700)]
Merge pull request #612 from mmitche/usage-exit-code

Usage message exit code

9 years agoClear last error for SetLastError=true P/Invoke
Jan Kotas [Thu, 2 Apr 2015 03:12:34 +0000 (20:12 -0700)]
Clear last error for SetLastError=true P/Invoke

There isn't always a way to know the system function has failed without checking last error, in particular on Unix. Moreover, CLR does not guarantee that the last error is preserved while the managed code is running so this issue cannot be worked around calling SetLastError.

This change adds clearing of last error for P/Invokes with SetLastError=true. The cost of doing so is negligible, it makes error handling for P/Invokes of the above system functions possible, and all the other P/Invokes more robust.

9 years agoMerge pull request #613 from janvorli/fix-sstring-formatmessage
Jan Vorlicek [Thu, 2 Apr 2015 00:41:02 +0000 (02:41 +0200)]
Merge pull request #613 from janvorli/fix-sstring-formatmessage

Fix FormatMessageW in PAL

9 years agoFix FormatMessageW in PAL
Jan Vorlicek [Wed, 1 Apr 2015 23:31:53 +0000 (01:31 +0200)]
Fix FormatMessageW in PAL

The function was not properly accessing the Arguments list when the
FORMAT_MESSAGE_ARGUMENT_ARRAY flag was set. The va_list on Linux is
a struct with four members, so indexing Arguments array without
casting it first to a WCHAR** gets completely wrong results.

9 years agoMerge branch 'master' into usage-exit-code
Matt Mitchell [Wed, 1 Apr 2015 23:07:45 +0000 (16:07 -0700)]
Merge branch 'master' into usage-exit-code

Conflicts:
build.cmd

9 years agoDisplaying usage message should cause build/test scripts to exit with non-zero code
Matt Mitchell [Wed, 1 Apr 2015 23:03:37 +0000 (16:03 -0700)]
Displaying usage message should cause build/test scripts to exit with non-zero code

9 years agoMerge pull request #599 from janvorli/warnings-cleanup-2a
Jan Vorlicek [Wed, 1 Apr 2015 20:14:24 +0000 (22:14 +0200)]
Merge pull request #599 from janvorli/warnings-cleanup-2a

Fix next round of warning types

9 years agoFix next round of warning types
Jan Vorlicek [Fri, 27 Mar 2015 22:30:10 +0000 (23:30 +0100)]
Fix next round of warning types

This change fixes the following warnings:
1) Assignment in a condition should be wrapped in ()
2) Priority of && / || should be indicated by parentheses.
3) Unknown #pragma optimize ifdefed out for non MSVC
4) Unused functions deleted or put under #ifdef
5) Extra tokens warning disabling moved to the CMakeLists.txt in the src/inc
6) Self assignment of a member or local variable
7) Assigning ~0 to a bitfield member that was just 8 bit wide

It also fixes a bug in the STRESS_LOGxx macro invocation in exceptionhandling.cpp and
stackwalk.cpp related to recent adding the DBG_ADDR macro usage. This macro expanded
a single parameter into two expressions to extract high / low 32 bits separately.
But the STRESS_LOGxx parameters are passed to the StressLog::LogMsg method as follows:
(void*)(size_t)(data1)
That means that the expanded pair x, y would be inserted as data 1 and that leads
to ignoring the x due to the comma operator.

9 years agoMerge pull request #608 from stephentoub/globalization_def
Stephen Toub [Wed, 1 Apr 2015 17:59:01 +0000 (13:59 -0400)]
Merge pull request #608 from stephentoub/globalization_def

Ensure FEATURE_COREFX_GLOBALIZATION is defined for the runtime

9 years agoEnsure FEATURE_COREFX_GLOBALIZATION is defined for runtime
Stephen Toub [Tue, 31 Mar 2015 23:11:05 +0000 (19:11 -0400)]
Ensure FEATURE_COREFX_GLOBALIZATION is defined for runtime

A bunch of our System.Runtime.Tests.dll, System.Xml.XDocument.Properties.dll,
and other tests were failing with formatting errors.  The runtime tests were
also triggering a runtime assert at shutdown.  It appears that all of these
stem from a mismatch between some data structure layouts in mscorlib and
the runtime, in particular with NumberFormatInfo.

Several fields throughout NumberFormatInfo are included conditionally based
on the  FEATURE_COREFX_GLOBALIZATION flag not being defined.  This flag is
being set for the compilation of mscorlib, but it appears not to be set when
compiling all relevant parts of the runtime, such that the native structure has
extra fields not present in the managed structure.  This is resulting in fields
being misinterpreted by the runtime when using the structure for formatting
(and presumably it's also leading to some potential corruption).

This fix simply adds a define for FEATURE_COREFX_GLOBALIZATION to
the makefile.  The tests that were failing now pass, and the runtime assertion
is no longer firing.

9 years agoMerge pull request #604 from stephentoub/fix_lastindexofordinal_zerovalue
Jan Vorlicek [Wed, 1 Apr 2015 08:33:00 +0000 (10:33 +0200)]
Merge pull request #604 from stephentoub/fix_lastindexofordinal_zerovalue

Special-case value.Length == 0 in LastIndexOfOrdinal

9 years agoMerge pull request #607 from dotnet-bot/from-tfs
Jan Kotas [Wed, 1 Apr 2015 06:29:07 +0000 (23:29 -0700)]
Merge pull request #607 from dotnet-bot/from-tfs

Merge changes from TFS

9 years agoMerge pull request #606 from dotnet-bot/from-tfs
Jan Kotas [Wed, 1 Apr 2015 05:57:24 +0000 (22:57 -0700)]
Merge pull request #606 from dotnet-bot/from-tfs

Merge changes from TFS

9 years ago[tfs-changeset: 1443700]
Jan Kotas [Wed, 1 Apr 2015 05:41:38 +0000 (22:41 -0700)]
[tfs-changeset: 1443700]

9 years agoMerge pull request #600 from dotnet-bot/from-tfs
Jan Kotas [Wed, 1 Apr 2015 05:20:59 +0000 (22:20 -0700)]
Merge pull request #600 from dotnet-bot/from-tfs

Merge changes from TFS

9 years agoSpecial-case value.Length == 0 in LastIndexOfOrdinal
Stephen Toub [Wed, 1 Apr 2015 03:20:44 +0000 (23:20 -0400)]
Special-case value.Length == 0 in LastIndexOfOrdinal

With https://github.com/dotnet/coreclr/pull/579, I added to IndexOfOrdinal a check for value.Length == 0, to avoid returning bad data in that case.  But in doing so, and in neglecting to add a similar check to LastIndexOfOrdinal (which is currently implemented in terms of IndexOfOrdinal), I introduced an infinite loop into LastIndexOfOrdinal when value.Length == 0.  Fixing by adding a similar special-case.

9 years agoMerge pull request #597 from mmitche/coreclr-paths
Matt Mitchell [Tue, 31 Mar 2015 21:31:39 +0000 (14:31 -0700)]
Merge pull request #597 from mmitche/coreclr-paths

Change paths and os names to match corefx

9 years agoMerge pull request #493 from AndreyAkinshin/master
Jan Kotas [Tue, 31 Mar 2015 17:57:10 +0000 (10:57 -0700)]
Merge pull request #493 from AndreyAkinshin/master

Make _gtCostEx and _gtCostSz in gentree.h public

9 years agoChange paths and os names to match corefx
Matt Mitchell [Thu, 26 Mar 2015 16:07:26 +0000 (09:07 -0700)]
Change paths and os names to match corefx

* binaries is now bin, intermediates is now obj
* modifying unixmscorlib build to instead be linuxmscorlib + osxmscorlib.
* Change OS=Unix to OS=Linux/OS=OSX and modified properties to mimic corefx's TargetsUnix.

9 years agoDisable gtCostEx and gtCostSz reporting in compiler.cpp
Andrey Akinshin [Wed, 18 Mar 2015 09:57:19 +0000 (11:57 +0200)]
Disable gtCostEx and gtCostSz reporting in compiler.cpp

If you change line

in jit.h and set MEASURE_NODE_SIZE=1, you will get a build error like this:

coreclr\src\jit\compiler.cpp(888): error C2248: 'GenTree::_gtCostEx' : cannot access private member declared in class 'GenTree' [coreclr\binaries\intermediates\Windows_NT.x64.debug\src\jit\ClrJit.vcxproj]
coreclr\src\jit\compiler.cpp(889): error C2248: 'GenTree::_gtCostSz' : cannot access private member declared in class 'GenTree' [coreclr\binaries\intermediates\Windows_NT.x64.debug\src\jit\ClrJit.vcxproj]

Solution: disabling gtCostEx and gtCostSz reporting in compiler.cpp

See also: https://github.com/dotnet/coreclr/pull/493#issuecomment-83070694

9 years agoPort GC fixes from NetfxDev1:
Sedar Gokbulut [Tue, 31 Mar 2015 00:48:13 +0000 (17:48 -0700)]
Port GC fixes from NetfxDev1:

1121801 X64: Assert mark_stack_array[entry].len == 0 || mark_stack_array[entry].len >= Align(min_obj_size), vm\gc.cpp, Line: 13747 (OriginCS: 1420599)

[tfs-changeset: 1442449]

9 years agoPort the following fixes to GC from netfxDev1:
Sedar Gokbulut [Tue, 31 Mar 2015 00:44:46 +0000 (17:44 -0700)]
Port the following fixes to GC from netfxDev1:

1118110 [GC] Assert "chosen_power2 == 0", ndp\clr\src\vm\gc.cpp, Line: 8566 (Origin CS 1410546 - required for the next change)
1119047 ARM heap corruptions found in assert in gc_heap::plan_phase (Origin CS 1414858)

[tfs-changeset: 1442444]

9 years agoMerge pull request #586 from stephentoub/corerun_cwd
Jan Vorlicek [Mon, 30 Mar 2015 19:10:07 +0000 (21:10 +0200)]
Merge pull request #586 from stephentoub/corerun_cwd

Fix corerun to support argv[0] that's not a full path

9 years agoMerge pull request #596 from stephentoub/init_culture_with_invariant
Stephen Toub [Mon, 30 Mar 2015 17:56:52 +0000 (13:56 -0400)]
Merge pull request #596 from stephentoub/init_culture_with_invariant

Copy all of invariant culture's data in stubbed out globalization

9 years agoMerge pull request #595 from janvorli/fix-issue-566
Jan Vorlicek [Mon, 30 Mar 2015 16:53:09 +0000 (18:53 +0200)]
Merge pull request #595 from janvorli/fix-issue-566

Fix GC exception related issue

9 years agoMerge pull request #591 from cmckinsey/coreclr474
Chris McKinsey [Mon, 30 Mar 2015 16:06:22 +0000 (09:06 -0700)]
Merge pull request #591 from cmckinsey/coreclr474

Fix some of the issues found by Viva64 static analyser

9 years agoCopy all of invariant culture's data in stubbed out globalization
Stephen Toub [Mon, 30 Mar 2015 13:28:55 +0000 (06:28 -0700)]
Copy all of invariant culture's data in stubbed out globalization

We've been piecemeal copying parts of the invariant culture over to our temporary culture implementation.  But as I've hit additional pieces needed, I decided to just copy over everything so that hopefully we don't bump up against this again.

9 years agoFix GC exception related issue
Jan Vorlicek [Mon, 30 Mar 2015 10:06:12 +0000 (12:06 +0200)]
Fix GC exception related issue

This change fixes a problem that has occured when GC was called from
an exception handler during split exception handling. The problem
manifestated itself as a crash in the HasFrameBeenUnwoundByAnyActiveException
function due to the pInitialExplicitFrame being NULL.
The cause of this issue was caused by a combination of two issues.
First, the m_ScannedStackRange was not reset in the partial 2nd pass to
the state at the beginning of the corresponding partial 1st pass.
And second, the 'unwind has started' flag was not reset after
restoring exception flags in the new exception tracker after switching
from the 2nd back to the 1st pass during the split exception handling.

There was one additional issue, several additional members of the exception
tracker needed to be propagated to the new tracker. These members are
needed by the HasFrameBeenUnwoundByAnyActiveException function.

Since the number of state members that are propagated from the old to the
new exception tracker has grown, I've refactored the code to keep those
in a separate class.

9 years agoMerge pull request #593 from cmckinsey/replay450
Chris McKinsey [Sat, 28 Mar 2015 18:38:33 +0000 (11:38 -0700)]
Merge pull request #593 from cmckinsey/replay450

Replay the fix for #450

9 years agoChange null constant type to be TYP_REF for isinst nullcheck expansion
Chris McKinsey [Sat, 28 Mar 2015 18:21:51 +0000 (11:21 -0700)]
Change null constant type to be TYP_REF for isinst nullcheck expansion

In the importer when inlining the fast expansion sequence for
isinst/castclass, the code was typing the constant 0 source of the
compare with TYP_I_IMPL instead of TYP_REF. Not only does this create
an inconsistently typed compare but it causes value-numbering of
the same constants with different types to not be equal. This blocks
later assertion propagation that propagates null-checks and prevents
many cases from being eliminated.

This change changes the type of the constant gtNode to be TYP_REF.
With this change there are many good diffs in the frameworks and
other assemblies.

Ran testing in desktop branch including SuperPMI asm diffs. Asm
diffs show hundreds of methods with improvements in framework
, Roslyn, and other internal assemblies. 1% code size reduction in
the methods that have changes. All diffs are elimination of redundant
null-checks.

9 years agoFix some of the issues found by Viva64 static analyser
Chris McKinsey [Thu, 26 Mar 2015 08:04:05 +0000 (01:04 -0700)]
Fix some of the issues found by Viva64 static analyser

Eliminate some unnecessary null check.
Remove null-checks on this and guard instance calls with null-checks.
Collapse a redundant then/else case.

9 years agoFix corerun to support argv[0] that's not a full path
Stephen Toub [Sat, 28 Mar 2015 04:52:24 +0000 (00:52 -0400)]
Fix corerun to support argv[0] that's not a full path

Unix's corerun tries to parse a path out of argv[0], and blows up
in std::string if no '/' is found.  This commit adds a check to make
sure that there was a '/' found, after first expanding argv[0] to an
absolute path.

9 years agoMerge pull request #589 from josteink/bsd_configure
Jan Kotas [Fri, 27 Mar 2015 21:27:05 +0000 (14:27 -0700)]
Merge pull request #589 from josteink/bsd_configure

Correctly set HAVE_BSD_REGS_T flag during configure.

9 years agoMerge pull request #590 from josteink/bsd_regs
Jan Kotas [Fri, 27 Mar 2015 21:26:41 +0000 (14:26 -0700)]
Merge pull request #590 from josteink/bsd_regs

PAL: Add register-mapping for FreeBSD x86_64.

9 years agoMerge pull request #587 from mikem8361/dbi1
Jan Kotas [Fri, 27 Mar 2015 20:51:52 +0000 (13:51 -0700)]
Merge pull request #587 from mikem8361/dbi1

Enabling the ClrStack command ICorDebug option (-i) to use to test DBI.

9 years agoPAL: Add register-mapping fore FreeBSD x86_64.
Jostein Kjønigsen [Fri, 27 Mar 2015 20:45:19 +0000 (20:45 +0000)]
PAL: Add register-mapping fore FreeBSD x86_64.

9 years agoCorrectly set HAVE_BSD_REGS_T flag during configure.
Jostein Kjønigsen [Fri, 27 Mar 2015 16:19:36 +0000 (16:19 +0000)]
Correctly set HAVE_BSD_REGS_T flag during configure.

Fix BSD-regs detection. Struct name is 'reg' not 'regs'.

This fixes a bunch of issues when trying to build on FreeBSD.

9 years agoMerge pull request #569 from brianrob/perfdoc
Brian Robbins [Fri, 27 Mar 2015 18:52:04 +0000 (11:52 -0700)]
Merge pull request #569 from brianrob/perfdoc

Add Cross-Platform Performance and Eventing Design Document

9 years agoEnabling the ClrStack command ICorDebug option (-i) to use to test DBI.
Mike McLaughlin [Tue, 24 Mar 2015 00:56:09 +0000 (17:56 -0700)]
Enabling the ClrStack command ICorDebug option (-i) to use to test DBI.

Fix sos on windows. Changed the name of the debug info resource to just "CLRDEBUGINFO".  This is what debugshim is looking for when searching for the coreclr module.

9 years agoMerge pull request #585 from dotnet/revert-584-bsd_configure
Jan Kotas [Fri, 27 Mar 2015 17:56:45 +0000 (10:56 -0700)]
Merge pull request #585 from dotnet/revert-584-bsd_configure

Revert "Correctly set HAVE_BSD_REGS_T flag during configure."

9 years agoRevert "Correctly set HAVE_BSD_REGS_T flag during configure."
Jan Kotas [Fri, 27 Mar 2015 17:56:38 +0000 (10:56 -0700)]
Revert "Correctly set HAVE_BSD_REGS_T flag during configure."

9 years agoUpdates from PR comments.
Brian Robbins [Fri, 27 Mar 2015 17:50:23 +0000 (10:50 -0700)]
Updates from PR comments.

9 years agoMerge pull request #584 from josteink/bsd_configure
Jan Kotas [Fri, 27 Mar 2015 17:15:21 +0000 (10:15 -0700)]
Merge pull request #584 from josteink/bsd_configure

Correctly set HAVE_BSD_REGS_T flag during configure.

9 years agoCorrectly set HAVE_BSD_REGS_T flag during configure.
Jostein Kjønigsen [Fri, 27 Mar 2015 16:19:36 +0000 (16:19 +0000)]
Correctly set HAVE_BSD_REGS_T flag during configure.

Currently the test sets a flag which is found nowhere else in the code.

    $ grep -R " BSD_REGS" * | wc -l
    0

This fixes a bunch of issues when trying to build on FreeBSD.

9 years agoMerge pull request #582 from dotnet-bot/from-tfs
Jan Kotas [Fri, 27 Mar 2015 00:15:30 +0000 (17:15 -0700)]
Merge pull request #582 from dotnet-bot/from-tfs

Merge changes from TFS

9 years agoMerge pull request #578 from briansull/use-lea-for-mul359
Jan Kotas [Thu, 26 Mar 2015 23:18:25 +0000 (16:18 -0700)]
Merge pull request #578 from briansull/use-lea-for-mul359

Use lea for multiply by 3, 5 or 9

9 years agoExecutionContext.IsDefaultFTContext incorrectly checks the "current" context
David Kean [Thu, 26 Mar 2015 23:16:11 +0000 (16:16 -0700)]
ExecutionContext.IsDefaultFTContext incorrectly checks the "current" context

Fixed: ExecutionContext.IsDefaultFTContext incorrectly checks the thread's current context instead of the context that is it called on. This prevents Overlapped from running it's callback on the captured execution context, and hence, async locals don't flow for overlapped callbacks. There are no tests with this change, because the only thing that is broken currently is Overlapped. I've written new tests for the new overlapped APIs that were broken *before* this change, and pass after this change, these will be checked in with the overlapped feature.
Changed: Marked ExecutionContext.Default private, as it was accidently made public.

[tfs-changeset: 1440483]

9 years agoMerge pull request #581 from sergiy-k/gccrash-ipinmodule
Jan Kotas [Thu, 26 Mar 2015 22:36:34 +0000 (15:36 -0700)]
Merge pull request #581 from sergiy-k/gccrash-ipinmodule

Fix an issue in ExceptionTracker::FindParentStackFrameHelper that resulted in an AV during GC stack root scanning.

9 years agoWhen choosing an instruction for a GT_MUL we will now use an LEA instruction for...
Brian Sullivan [Thu, 26 Mar 2015 00:26:56 +0000 (17:26 -0700)]
When choosing an instruction for a GT_MUL we will now use an LEA instruction for a MUL by an immediate 3, 5 or 9

The multiply has to be a non overflow checking multiply as an LEA does not set condition codes.
In Lowering we also must make sure that we don't 'contain' an indirection as the source operand.

9 years agoFix an issue in ExceptionTracker::FindParentStackFrameHelper that resulted in an...
Sergiy Kuryata [Thu, 26 Mar 2015 21:00:26 +0000 (14:00 -0700)]
Fix an issue in ExceptionTracker::FindParentStackFrameHelper that resulted in an access violation during GC stack root scanning.

This change fixes the second issue reported in https://github.com/dotnet/coreclr/issues/566. The problem is that ExceptionTracker::FindParentStackFrameHelper uses IsIPInModule to determine whether an IP address belongs to VM or managed code but this function is not implemented when FEATURE_PAL is defined.
We should not really need the actual implementation of IsIPInModule on Unix. It is sufficient to just differentiate between managed and other code using ExecutionManager::IsManagedCode on Unix.

9 years agoMerge pull request #580 from Djuffin/dbi-linux
Sergiy Kuryata [Thu, 26 Mar 2015 20:43:10 +0000 (13:43 -0700)]
Merge pull request #580 from Djuffin/dbi-linux

Removing static PAL from SOS and DBI

9 years agoMerge pull request #579 from stephentoub/indexof_empty
Stephen Toub [Thu, 26 Mar 2015 20:22:18 +0000 (13:22 -0700)]
Merge pull request #579 from stephentoub/indexof_empty

Fix IndexOfOrdinal on Unix for empty strings

9 years agoMake DBI and SOS use PAL from DAC
Eugene Zemtsov [Thu, 26 Mar 2015 19:12:12 +0000 (12:12 -0700)]
Make DBI and SOS use PAL from DAC

9 years agoMake it possible to write stress log from a module that doesn't have statically liked PAL
Eugene Zemtsov [Thu, 26 Mar 2015 19:02:55 +0000 (12:02 -0700)]
Make it possible to write stress log from a module that doesn't have statically liked PAL

9 years agoFix IndexOfOrdinal on Unix for empty strings
Stephen Toub [Thu, 26 Mar 2015 18:49:46 +0000 (11:49 -0700)]
Fix IndexOfOrdinal on Unix for empty strings

IndexOfOrdinal searching for an empty string should return 0.  It's currently returning -1.

9 years agoMerge pull request #575 from josteink/ptrace
Jan Kotas [Thu, 26 Mar 2015 15:51:44 +0000 (08:51 -0700)]
Merge pull request #575 from josteink/ptrace

PAL: Fix ptrace-invocation on FreeBSD.

9 years agoFix ptrace-invocation on FreeBSD.
Jostein Kjonigsen [Thu, 26 Mar 2015 07:51:43 +0000 (07:51 +0000)]
Fix ptrace-invocation on FreeBSD.

Unlike in Linux[1] FreeBSD's ptrace does not use an enum[2].

[1] http://linux.die.net/include/sys/ptrace.h
[2] http://www.freebsd.org/cgi/man.cgi?query=ptrace

This fixes compiler errors like this one:

    /home/josteink/build/coreclr/src/pal/src/arch/i386/context.cpp:305:21: error: use of undeclared identifier '__ptrace_request'
            if (ptrace((__ptrace_request)PT_GETREGS, processId, (caddr_t) &ptrace_registers, 0) == -1)

9 years agoMerge pull request #577 from josteink/runelocale
Jan Kotas [Thu, 26 Mar 2015 14:23:24 +0000 (07:23 -0700)]
Merge pull request #577 from josteink/runelocale

Fix missing RuneLocale on FreeBSD.

9 years agoMerge pull request #576 from janvorli/warnings-cleanup
Jan Kotas [Thu, 26 Mar 2015 14:04:16 +0000 (07:04 -0700)]
Merge pull request #576 from janvorli/warnings-cleanup

Fix about 12 kinds of warnings over the codebase

9 years agoMerge pull request #573 from josteink/master
Jan Kotas [Thu, 26 Mar 2015 13:46:37 +0000 (06:46 -0700)]
Merge pull request #573 from josteink/master

Define PAL_CS_NATIVE_DATA_SIZE for FreeBSD x86_64

9 years agoPAL: Improve portability of FreeBSD RuneType-fix.
Jostein Kjønigsen [Thu, 26 Mar 2015 12:21:42 +0000 (12:21 +0000)]
PAL: Improve portability of FreeBSD RuneType-fix.

9 years agoFix missing RuneLocale on FreeBSD.
Jostein Kjønigsen [Thu, 26 Mar 2015 09:38:04 +0000 (09:38 +0000)]
Fix missing RuneLocale on FreeBSD.

Without this patch the build breaks with errors like this:

    /usr/include/xlocale/_ctype.h:52:1: error: unknown type name '_RuneLocale'
    _RuneLocale     *__runes_for_locale(locale_t, int*);
    ^

9 years agoFix about 12 kinds of warnings over the codebase
Jan Vorlicek [Thu, 26 Mar 2015 07:19:22 +0000 (08:19 +0100)]
Fix about 12 kinds of warnings over the codebase

This change fixes:
1) Member initiazalization order in class constructor didn't correspond to the member order in some classes
2) Objects with vtables were copied via memcpy. While this is intentional, cast of the pointers to void*
is required to silence clang warning
3) Switch case statements containing values of different enums
4) Casting int to pointer
5) Missing return value in methods with _ASSERTE
6) Class name classifier on methods in the .h
7) Invalid position of the DECLSPEC_ALIGN at few places - it had no effect
8) Invalid position of the 'used' attribute
9) Issue with comparing holders to NULL
10) Operator 'new' returning NULL without being marked with throw() or noexcept
11) Variables marked as 'extern' at the declaration / initialization place
12) Data structure declared as struct at one place and forward declared as class at another

Some disabled warnings were no longer happening, so options to disable them were removed too

9 years agoMerge pull request #574 from janvorli/jit-warnings-cleanup
Jan Vorlicek [Thu, 26 Mar 2015 07:20:32 +0000 (08:20 +0100)]
Merge pull request #574 from janvorli/jit-warnings-cleanup

Fix accidentally removed initialization of m_VNFunc4Map

9 years agoFix accidentally removed initialization of m_VNFunc4Map
Jan Vorlicek [Thu, 26 Mar 2015 06:52:10 +0000 (07:52 +0100)]
Fix accidentally removed initialization of m_VNFunc4Map

During my last change, I've accidentally left out the m_VNFunc4Map
while reordering the initialization list.

9 years agoMerge pull request #572 from stephentoub/add_encodings
Stephen Toub [Thu, 26 Mar 2015 06:45:12 +0000 (23:45 -0700)]
Merge pull request #572 from stephentoub/add_encodings

Update EncodingTable.Unix to support additional encodings

9 years agoDefine PAL_CS_NATIVE_DATA_SIZE for FreeBSD x86_64
Jostein Kjonigsen [Thu, 26 Mar 2015 06:43:17 +0000 (06:43 +0000)]
Define PAL_CS_NATIVE_DATA_SIZE for FreeBSD x86_64

Based on patch from @Aesthetikx which uses the program
[defined here](https://github.com/dotnet/coreclr/issues/60#issuecomment-73670124)
to determine the correct native size.

9 years agoUpdate EncodingTable.Unix to support additional encodings
Stephen Toub [Thu, 26 Mar 2015 05:56:12 +0000 (22:56 -0700)]
Update EncodingTable.Unix to support additional encodings

A variety of tests, in particular XML tests, are using some of the built-in encodings beyond UTF8, e.g. UnicodeEncoding, and are validating information about them, e.g. that an XML document encoded using UnicodeEncoding includes "utf-16" rather than "utf-8" in the output.  This commit augments the temporary globalization implementation with basic knowledge of UTF7, UTF16, UTF16BE, and UTF32.

9 years agoMerge pull request #570 from Djuffin/cordb_platform_fix
Sergiy Kuryata [Thu, 26 Mar 2015 00:24:41 +0000 (17:24 -0700)]
Merge pull request #570 from Djuffin/cordb_platform_fix

Fix CORDB_PLATFORM mismatch between DAC and SOS

9 years agoFix CORDB_PLATFORM mismatch between DAC and SOS
Eugene Zemtsov [Wed, 25 Mar 2015 22:07:01 +0000 (15:07 -0700)]
Fix CORDB_PLATFORM mismatch between DAC and SOS

9 years agoMerge pull request #558 from josteink/master
Jan Kotas [Wed, 25 Mar 2015 23:54:02 +0000 (16:54 -0700)]
Merge pull request #558 from josteink/master

Fix compilation errors on FreeBSD.

9 years agoMerge pull request #561 from janvorli/jit-warnings-cleanup
Jan Vorlicek [Wed, 25 Mar 2015 23:49:57 +0000 (00:49 +0100)]
Merge pull request #561 from janvorli/jit-warnings-cleanup

Fix warnings in the jitter code

9 years agoFix warnings in the jitter code
Jan Vorlicek [Wed, 25 Mar 2015 17:14:11 +0000 (18:14 +0100)]
Fix warnings in the jitter code

This change fixes some of the warnings in the jitter code on Linux. With this change
combined with an upcoming change in the rest of the codebase, 16 warning disabling
options can be removed.

The issues in the jitter were:
1) Incorrect typedefs for const_reference and const_pointer (the const was ignored)
2) Member initiazalization order in class constructor didn't correspond to the member order in some classes
3) Objects with vtables were copied via memcpy. While this is intentional, cast of the pointers to void*
   is required to silence clang warning
4) Comparing values of different enums - there are cases of two enums containing the same values.
5) Casting int to pointer - the cast was legal (forming a handle), adding cast to size_t in between used to fix the warning
6) "static struct" - removed the static keyword
7) Missing return value in methods with _ASSERTE
8) Class name classifier on methods in the .h
9) Specialized template member functions need to be defined out of the class

9 years agoMerge branch 'perfdoc' of https://github.com/brianrob/coreclr into perfdoc
Brian Robbins [Wed, 25 Mar 2015 23:22:54 +0000 (16:22 -0700)]
Merge branch 'perfdoc' of https://github.com/brianrob/coreclr into perfdoc

9 years agoAdded blank lines before and after headers.
Brian Robbins [Wed, 25 Mar 2015 23:22:05 +0000 (16:22 -0700)]
Added blank lines before and after headers.

9 years agoMerge pull request #554 from russellhadley/AdditionalInterfaceHeaders
Russell C Hadley [Wed, 25 Mar 2015 21:41:16 +0000 (14:41 -0700)]
Merge pull request #554 from russellhadley/AdditionalInterfaceHeaders

Add additional headers to the CoreCLR package to describe its interface.

9 years agoMerge pull request #564 from stephentoub/fix_lastindexof_unix
Matt Ellis [Wed, 25 Mar 2015 21:26:38 +0000 (14:26 -0700)]
Merge pull request #564 from stephentoub/fix_lastindexof_unix

Fix LastIndexOfOrdinal on Unix

9 years agoUpdated scenario priorities.
Brian Robbins [Wed, 25 Mar 2015 21:04:46 +0000 (14:04 -0700)]
Updated scenario priorities.

9 years agoFix LastIndexOfOrdinal on Unix
Stephen Toub [Wed, 25 Mar 2015 20:59:03 +0000 (13:59 -0700)]
Fix LastIndexOfOrdinal on Unix

The temporary implementation of LastIndexOfOrdinal has some bugs causing ArgumentOutOfRangeExceptions and other fun things. This should fix them.

9 years agoMerge pull request #567 from stephentoub/fix_etw_ifdefs
Brian Robbins [Wed, 25 Mar 2015 20:41:39 +0000 (13:41 -0700)]
Merge pull request #567 from stephentoub/fix_etw_ifdefs

Fix EventSource listeners on Unix

9 years agoFix debug-pal on FreeBSD.
Jostein Kjonigsen [Wed, 25 Mar 2015 17:02:21 +0000 (17:02 +0000)]
Fix debug-pal on FreeBSD.

This define is required to enable getline() on FreeBSD.

9 years agoAdd additional headers to the CoreCLR package to describe its interface.
rhadley [Tue, 24 Mar 2015 22:05:20 +0000 (15:05 -0700)]
Add additional headers to the CoreCLR package to describe its interface.

Adds headers:
- opcode.def and openum.h to describe the MSIL opcodes.

9 years agoMerge pull request #563 from CarolEidt/cleanupClsVar
Carol Eidt [Wed, 25 Mar 2015 20:25:32 +0000 (13:25 -0700)]
Merge pull request #563 from CarolEidt/cleanupClsVar

Fix #497: Identical expressions to the left and right of the ||...

9 years agoFix #497: Identical expressions to the left and right of the || operator
Carol Eidt [Wed, 25 Mar 2015 01:10:22 +0000 (18:10 -0700)]
Fix #497: Identical expressions to the left and right of the || operator

This was very old code that was needed before the rationalization
of assignments (should have been GT_CLS_VAR and GT_IND).
GT_CLS_VAR should now never be seen post-rationalizer.

9 years agoAdding Cross Platform Performance and Eventing Design Doc.
Brian Robbins [Wed, 25 Mar 2015 19:47:21 +0000 (12:47 -0700)]
Adding Cross Platform Performance and Eventing Design Doc.

9 years agoFix EventSource listeners on Unix
Stephen Toub [Wed, 25 Mar 2015 19:40:31 +0000 (12:40 -0700)]
Fix EventSource listeners on Unix

Some recent changes to EventSource misplaced an #endif, causing EventListeners to not receive any messages when FEATURE_MANAGED_ETW is not set (it's not set on Unix).

9 years agoMerge pull request #562 from jkotas/cppmunge
Jan Kotas [Wed, 25 Mar 2015 18:43:08 +0000 (11:43 -0700)]
Merge pull request #562 from jkotas/cppmunge

Delete cppmunge

9 years agoDelete cppmunge
Jan Kotas [Wed, 25 Mar 2015 18:08:15 +0000 (11:08 -0700)]
Delete cppmunge

We have used this tool to boostrap the Unix build, but it is not used anymore.

9 years agoMerge pull request #543 from janvorli/native-resources
Jan Vorlicek [Wed, 25 Mar 2015 15:33:51 +0000 (16:33 +0100)]
Merge pull request #543 from janvorli/native-resources

Add native resources compilation on Linux

9 years agoPropagate bindtextdomain status to the caller
Jan Vorlicek [Wed, 25 Mar 2015 15:07:45 +0000 (16:07 +0100)]
Propagate bindtextdomain status to the caller

The bindtextdomain can fail due to OOM. Propagate the status out of the
PAL_BindResources.

9 years agoMerge pull request #557 from josteink/master
Jan Kotas [Wed, 25 Mar 2015 15:07:10 +0000 (08:07 -0700)]
Merge pull request #557 from josteink/master

build.sh: Fix CPU-count detection on FreeBSD.

9 years agoMerge pull request #556 from janhenke/freebsd-0325
Jan Vorlicek [Wed, 25 Mar 2015 14:50:00 +0000 (15:50 +0100)]
Merge pull request #556 from janhenke/freebsd-0325

Detect AMD64 Architecture on FreeBSD

9 years agoDetect AMD64 Architecture on FreeBSD
Jan Henke [Wed, 25 Mar 2015 09:39:26 +0000 (09:39 +0000)]
Detect AMD64 Architecture on FreeBSD

In contrast to Linux and Darwin, FreeBSD identifies the AMD64 architecture with
the "amd64" string. Extend the checks in CMakeLists to accept either "x86_64"
or "amd64" as AMD/Intel 64bit architecture.

9 years agobuild.sh: Fix CPU-count detection on FreeBSD.
Jostein Kjonigsen [Wed, 25 Mar 2015 10:40:02 +0000 (10:40 +0000)]
build.sh: Fix CPU-count detection on FreeBSD.

9 years agoMerge pull request #553 from Djuffin/dbi-linux
Eugene Zemtsov [Tue, 24 Mar 2015 23:48:01 +0000 (16:48 -0700)]
Merge pull request #553 from Djuffin/dbi-linux

Various DBI related fixes that make it possible to load DBI on Linux

9 years agoMake code comments more accurate
Eugene Zemtsov [Tue, 24 Mar 2015 22:34:20 +0000 (15:34 -0700)]
Make code comments more accurate