platform/upstream/coreclr.git
9 years agoFixing the public key token that gets used to find System.Uri in System.Runtime durin...
Ryan Byington [Mon, 13 Apr 2015 15:36:34 +0000 (08:36 -0700)]
Fixing the public key token that gets used to find System.Uri in System.Runtime during marshaling.

[tfs-changeset: 1451527]

9 years agoMerge pull request #683 from janvorli/refactor-rctopo-awk
Jan Vorlicek [Mon, 13 Apr 2015 14:04:02 +0000 (16:04 +0200)]
Merge pull request #683 from janvorli/refactor-rctopo-awk

Refactor the windows text resources processing

9 years agoMerge pull request #687 from zhangkaizhao/master
Jan Kotas [Sun, 12 Apr 2015 08:52:54 +0000 (01:52 -0700)]
Merge pull request #687 from zhangkaizhao/master

C++11 requires a space between literal and identifier

9 years agoMerge pull request #649 from richlander/rich-dnx
Rich Lander [Sun, 12 Apr 2015 05:26:30 +0000 (22:26 -0700)]
Merge pull request #649 from richlander/rich-dnx

Add instructions to create custom DNX with CoreCLR

9 years agoAdd instructions to create custom DNX with CoreCLR
Richard Lander [Thu, 2 Apr 2015 18:01:03 +0000 (11:01 -0700)]
Add instructions to create custom DNX with CoreCLR

9 years agoMerge pull request #688 from dotnet-bot/from-tfs
Matt Ellis [Sat, 11 Apr 2015 21:41:14 +0000 (14:41 -0700)]
Merge pull request #688 from dotnet-bot/from-tfs

Merge changes from TFS

9 years agoWhen marshaling System.URI we to and from WinRT we use need to access System.URI...
Yi Zhang [Sat, 11 Apr 2015 18:39:55 +0000 (11:39 -0700)]
When marshaling System.URI we to and from WinRT we use need to access System.URI members(get_OriginalString, ctor). We currently use TypeName::GetTypeFromAsmQualifiedName to load the type and specify System.dll. The change is to simply use System.Runtime instead.

[tfs-changeset: 1451164]

9 years agoC++11 requires a space between literal and identifier
zhangkaizhao [Sat, 11 Apr 2015 15:50:59 +0000 (23:50 +0800)]
C++11 requires a space between literal and identifier

9 years agoMerge pull request #676 from dotnet-bot/from-tfs
Jan Kotas [Sat, 11 Apr 2015 11:45:01 +0000 (04:45 -0700)]
Merge pull request #676 from dotnet-bot/from-tfs

Merge changes from TFS

9 years agoMerge pull request #686 from jkotas/persian
Jan Kotas [Sat, 11 Apr 2015 11:13:39 +0000 (04:13 -0700)]
Merge pull request #686 from jkotas/persian

Add CAL_PERSIAN to portable System.Globalization

9 years agoAdd CAL_PERSIAN to portable System.Globalization
Jan Kotas [Sat, 11 Apr 2015 03:54:34 +0000 (20:54 -0700)]
Add CAL_PERSIAN to portable System.Globalization

9 years agoMerge pull request #685 from jkotas/prebuilt
Jan Kotas [Sat, 11 Apr 2015 03:13:45 +0000 (20:13 -0700)]
Merge pull request #685 from jkotas/prebuilt

Update prebuilt ETW headers

9 years agoUpdate prebuilt ETW headers
Jan Kotas [Sat, 11 Apr 2015 02:08:04 +0000 (19:08 -0700)]
Update prebuilt ETW headers

9 years agoRefactor the windows text resources processing
Jan Vorlicek [Fri, 10 Apr 2015 15:52:13 +0000 (17:52 +0200)]
Refactor the windows text resources processing

This change refactors the windows text resource processing into
a parsing script and a script with platform specific function
responsible for writing to the output file.

9 years agoMerge pull request #684 from libengu/GCTest
Matt Mitchell [Fri, 10 Apr 2015 18:49:25 +0000 (11:49 -0700)]
Merge pull request #684 from libengu/GCTest

Add JIT GC tests

9 years agoAdd JIT GC tests
Bengu Li [Fri, 10 Apr 2015 17:56:47 +0000 (10:56 -0700)]
Add JIT GC tests

Selected working JIT GC test cases from old test bed before ToF
for porting into CoreCLR.

Related proj, config, and sln files added and updated. Passed
build, buildtest, runtest.

Cleaned up the source code. Updated comments to remove internal
information such as reference to internal bug numbers etc, removed
some not useful comment. Code is re-formatted for consistent style.
Copyright added. Scrub tool SSS ran. Pragma warning about parenthesis
ignored.

9 years agoMerge pull request #674 from janvorli/fix-finally-issue
Jan Vorlicek [Fri, 10 Apr 2015 14:21:17 +0000 (16:21 +0200)]
Merge pull request #674 from janvorli/fix-finally-issue

Fix one more exception handling issue

9 years agoFix one more exception handling issue
Jan Vorlicek [Thu, 9 Apr 2015 18:56:37 +0000 (20:56 +0200)]
Fix one more exception handling issue

This change fixes exception handling issue that resulted in a finally block being invoked multiple
times in case of a rethrown exception in some specific cases.
The problem was caused by the ExceptionTracker::StackRange::CombineWith that was not handling
correctly the case when the current stack range was empty. It was copying only the upper limit
from the previous range and leaving the lower limit at the default (max) value.
This case happens in the interleaved exception handling when processing the first managed
frame after a block of native frames was unwound.
There is one additional fix in the UnwindManagedExceptionPass1 where we were popping one
frame from the thread's frame list before performing the native frames unwind. This was
not correct since in some cases, there can be more frames that need to be removed.

9 years agoMerge pull request #647 from josteink/bsd_fpregs
Sergiy Kuryata [Fri, 10 Apr 2015 05:20:24 +0000 (22:20 -0700)]
Merge pull request #647 from josteink/bsd_fpregs

PAL: Preliminary work on FPU/SSE-registers for FreeBSD x86_64.

9 years agoMerge pull request #675 from janvorli/remove-timezone-from-pal
Sergiy Kuryata [Fri, 10 Apr 2015 05:07:37 +0000 (22:07 -0700)]
Merge pull request #675 from janvorli/remove-timezone-from-pal

Remove timezone usage from PAL

9 years agoMerge pull request #671 from pgavlin/lldbfix
Matthew Whilden [Fri, 10 Apr 2015 03:26:56 +0000 (20:26 -0700)]
Merge pull request #671 from pgavlin/lldbfix

Fix a casing problem in lldbplugin/CMakeLists.txt

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

Fix various FreeBSD build-breakers.

9 years agoRemove timezone usage from PAL
Jan Vorlicek [Thu, 9 Apr 2015 19:53:03 +0000 (21:53 +0200)]
Remove timezone usage from PAL

This change removes all references to the timezone variable, all the functions that
transitively depended on it from PAL and all the related tests.
None of these was used outside of PAL and the tests.

9 years agoVarious FreeBSD fixes.
Jostein Kjønigsen [Wed, 8 Apr 2015 18:40:20 +0000 (18:40 +0000)]
Various FreeBSD fixes.

9 years agoMerge pull request #666 from richlander/rich-profile
Rich Lander [Thu, 9 Apr 2015 11:50:14 +0000 (04:50 -0700)]
Merge pull request #666 from richlander/rich-profile

Add Implementing Profilability BOTR doc

9 years agoMerge pull request #672 from Djuffin/dbi-linux
Eugene Zemtsov [Thu, 9 Apr 2015 09:19:17 +0000 (02:19 -0700)]
Merge pull request #672 from Djuffin/dbi-linux

Use new asm implementation of RtlRestoreContext for EE/debugger

9 years agoFix typo in the comment
Eugene Zemtsov [Thu, 9 Apr 2015 09:00:38 +0000 (02:00 -0700)]
Fix typo in the comment

9 years agoPreliminary work on FPU/SSE-registers for FreeBSD x86_64.
Jostein Kjønigsen [Thu, 9 Apr 2015 08:09:35 +0000 (08:09 +0000)]
Preliminary work on FPU/SSE-registers for FreeBSD x86_64.

This partially addresses https://github.com/dotnet/coreclr/issues/594

9 years agoUse new asm implementation of RtlRestoreContext for EE/debugger on POSIX system
Eugene Zemtsov [Thu, 9 Apr 2015 03:01:08 +0000 (20:01 -0700)]
Use new asm implementation of RtlRestoreContext for EE/debugger on POSIX system

9 years agoMerge pull request #668 from janvorli/rtl-restore-context-asm
Jan Vorlicek [Thu, 9 Apr 2015 00:41:39 +0000 (02:41 +0200)]
Merge pull request #668 from janvorli/rtl-restore-context-asm

Implement RtlRestoreContext in asm

9 years agoFix a casing problem in lldbplugin/CMakeLists.txt
Pat Gavlin [Thu, 9 Apr 2015 00:29:26 +0000 (17:29 -0700)]
Fix a casing problem in lldbplugin/CMakeLists.txt

On Linux, liblldb is installed by default as 'liblldb'. lldbplugin's CMake
file is currently looking for libLLDB, which is necessary for OS X. This
change allows either casing.

9 years agoMerge pull request #663 from janvorli/fix-issue-631
Jan Vorlicek [Thu, 9 Apr 2015 00:23:33 +0000 (02:23 +0200)]
Merge pull request #663 from janvorli/fix-issue-631

Fix hardware exception handling in interleaved handling case

9 years agoMerge pull request #664 from janvorli/refactor-pal-seh-registers-access
Jan Vorlicek [Thu, 9 Apr 2015 00:22:59 +0000 (02:22 +0200)]
Merge pull request #664 from janvorli/refactor-pal-seh-registers-access

Refactor context register access in seh-unwind.cpp

9 years agoUpdate code files to point to profiler doc
Richard Lander [Wed, 8 Apr 2015 14:45:00 +0000 (07:45 -0700)]
Update code files to point to profiler doc

9 years agoImplement RtlRestoreContext in asm
Jan Vorlicek [Wed, 8 Apr 2015 14:32:41 +0000 (16:32 +0200)]
Implement RtlRestoreContext in asm

This change implements the RtlRestoreContext in asm to get consistent and
reliable behavior on all platforms.

9 years agoAdd Implementing Profilability BOTR doc
dotnet-bot [Wed, 8 Apr 2015 14:09:01 +0000 (07:09 -0700)]
Add Implementing Profilability BOTR doc

9 years agoRefactor context register access in seh-unwind.cpp
Jan Vorlicek [Wed, 8 Apr 2015 11:15:32 +0000 (13:15 +0200)]
Refactor context register access in seh-unwind.cpp

This change refactors the native context register access to use the
MCREG_xxx macros so that it can compile on FreeBSD too.

9 years agoMerge pull request #660 from janvorli/fix-issue-633
Jan Vorlicek [Wed, 8 Apr 2015 10:33:59 +0000 (12:33 +0200)]
Merge pull request #660 from janvorli/fix-issue-633

Fix exception handling issue (#633)

9 years agoFix hardware exception handling in interleaved handling case
Jan Vorlicek [Wed, 8 Apr 2015 10:28:17 +0000 (12:28 +0200)]
Fix hardware exception handling in interleaved handling case

The issue is that HandleHardwareException doesn't actually throw an exception, but it calls
directly the DispatchManagedException. In case the exception propagation crosses managed to
native boundary, the exception dispatching code uses throw; to unwind the native frames.
But in this particular case, there was no exception thrown and so the rethrow aborts.
The fix is to add try / catch to the HandleHardwareException that throws the PAL_SEHException
that it got as a parameter, catches it right away and then calls the DispatchManagedException
from the catch handler.

9 years agoMerge changes from parent branch
dotnet-bot [Wed, 8 Apr 2015 00:23:32 +0000 (17:23 -0700)]
Merge changes from parent branch

[tfs-changeset: 1448103]

9 years agoMerge pull request #634 from josteink/exceptions
Jan Vorlicek [Tue, 7 Apr 2015 23:53:16 +0000 (01:53 +0200)]
Merge pull request #634 from josteink/exceptions

Make FreeBSD handle exceptions like Linux.

9 years agoMerge pull request #655 from josteink/freebsd-include
Jan Vorlicek [Tue, 7 Apr 2015 23:50:27 +0000 (01:50 +0200)]
Merge pull request #655 from josteink/freebsd-include

PAL: Use /usr/local/include for includes on FreeBSD.

9 years agoMerge pull request #129 from Knagis/master
Eric StJohn [Tue, 7 Apr 2015 22:55:36 +0000 (15:55 -0700)]
Merge pull request #129 from Knagis/master

StreamReader: Cache a single instance of StringBuilder for each reader to improve performance

9 years agoFix exception handling issue (#633)
Jan Vorlicek [Tue, 7 Apr 2015 22:27:21 +0000 (00:27 +0200)]
Fix exception handling issue (#633)

This change fixes exception handling issue #633. The problem was caused by the
fact that in interleaved exception handling (when exception propagates over
one or more native / managed stack frame boundaries), we were preserving the
m_ScannedStackRange and m_sfResumeStackFrame members of the exception tracker
after unwinding a sequence of native frames and moving on into next block of
managed ones. The m_ScannedStackRange in that case contained addresses of
frames that were already unwound and in case of a rethrown exception, there
could have been new frames in that range. That lead to improper detection
of already processed frames in some cases.
The proper solution is to start with an empty scanned stack range after the
partial unwind that unwinds managed and the adjacent native frames.

9 years agoMerge pull request #651 from mmitche/update-coreclr-nuspec-version
Matt Mitchell [Tue, 7 Apr 2015 14:56:02 +0000 (07:56 -0700)]
Merge pull request #651 from mmitche/update-coreclr-nuspec-version

Update version of coreclr packages

9 years agoMerge pull request #656 from Djuffin/dbi-linux
Jan Vorlicek [Tue, 7 Apr 2015 12:02:35 +0000 (14:02 +0200)]
Merge pull request #656 from Djuffin/dbi-linux

Improve comments and fix Realloc in executable debugger heap

9 years agoImprove comments and fix Realloc in executable debugger heap
Eugene Zemtsov [Tue, 7 Apr 2015 11:15:19 +0000 (04:15 -0700)]
Improve comments and fix Realloc in executable debugger heap

9 years agoPAL: Use /usr/local/include for includes on FreeBSD.
Jostein Kjønigsen [Tue, 7 Apr 2015 08:40:05 +0000 (08:40 +0000)]
PAL: Use /usr/local/include  for includes on FreeBSD.

9 years agoMerge pull request #643 from DickvdBrink/profiler-path
noahfalk [Mon, 6 Apr 2015 23:38:37 +0000 (16:38 -0700)]
Merge pull request #643 from DickvdBrink/profiler-path

Added CoreClr profiler path for 32 and 64bit

9 years agoUpdate version of coreclr packages
Matt Mitchell [Mon, 6 Apr 2015 23:14:14 +0000 (16:14 -0700)]
Update version of coreclr packages

Update to match the version that is consumed in corefx.  This allow's for easier corefx validation using the localpublic.props file.

9 years agoMake FreeBSD handle exceptions like Linux.
Jostein Kjønigsen [Fri, 3 Apr 2015 14:31:41 +0000 (14:31 +0000)]
Make FreeBSD handle exceptions like Linux.

Addresses https://github.com/dotnet/coreclr/issues/626
.

9 years agoAdded CoreClr profiler path for 32 and 64bit
Dick van den Brink [Sun, 5 Apr 2015 10:53:06 +0000 (12:53 +0200)]
Added CoreClr profiler path for 32 and 64bit
fixes #601

9 years agoMerge pull request #621 from Djuffin/dbi-linux
Eugene Zemtsov [Sat, 4 Apr 2015 06:20:15 +0000 (23:20 -0700)]
Merge pull request #621 from Djuffin/dbi-linux

Make managed debugging on Linux possible

9 years agoMerge pull request #627 from josteink/ptrace-freebsd
Sergiy Kuryata [Sat, 4 Apr 2015 05:45:44 +0000 (22:45 -0700)]
Merge pull request #627 from josteink/ptrace-freebsd

Fix configuration of ptrace on FreeBSD.

9 years agoMerge pull request #624 from josteink/clang35-freebsd
Sergiy Kuryata [Sat, 4 Apr 2015 05:39:57 +0000 (22:39 -0700)]
Merge pull request #624 from josteink/clang35-freebsd

Detect clang35 on FreeBSD.

9 years agoMerge pull request #628 from stephentoub/indexofordinal_empty
Stephen Toub [Fri, 3 Apr 2015 16:48:41 +0000 (12:48 -0400)]
Merge pull request #628 from stephentoub/indexofordinal_empty

Tweak IndexOfOrdinal on Unix for empty value

9 years agoFix configuration of ptrace on FreeBSD.
Jostein Kjønigsen [Fri, 3 Apr 2015 11:03:26 +0000 (11:03 +0000)]
Fix configuration of ptrace on FreeBSD.

This closes https://github.com/dotnet/coreclr/issues/625

9 years agoTweak IndexOfOrdinal for empty value
Stephen Toub [Fri, 3 Apr 2015 12:44:39 +0000 (08:44 -0400)]
Tweak IndexOfOrdinal for empty value

A System.Runtime test was failing because IndexOf should return the startIndex rather than 0 when passed an empty search value.

9 years agoMerge pull request #622 from stephentoub/fix_quirks
Stephen Toub [Fri, 3 Apr 2015 10:52:58 +0000 (06:52 -0400)]
Merge pull request #622 from stephentoub/fix_quirks

Enable UseLatestBehaviorWhenTFMNotSpecified for Unix corerun

9 years agoDetect clang35 on FreeBSD.
Jostein Kjønigsen [Fri, 3 Apr 2015 10:22:48 +0000 (10:22 +0000)]
Detect clang35 on FreeBSD.

clang-3.5 is required to build correctly, but is not detected on FreeBSD
where it is aliased as clang35 and clang++35, not clang-3.5 and clang++-3.5.

This closes https://github.com/dotnet/coreclr/issues/615

9 years agoEnable UseLatestBehaviorWhenTFMNotSpecified for Unix corerun
Stephen Toub [Fri, 3 Apr 2015 01:46:26 +0000 (21:46 -0400)]
Enable UseLatestBehaviorWhenTFMNotSpecified for Unix corerun

While root causing some of our test failures on Linux, I found that
quirks were enabled, causing tests expecting new behavior to fail when
they encountered the old behavior.  This commit modifies the Unix
corerun to include the "UseLatestBehaviorWhenTFMNotSpecified" AppDomain
compat switch (as the Windows version does) so that execution on Unix
picks up the latest behavior rather than falling back to the old quirked
behavior.

9 years agoMerge pull request #618 from cmckinsey/coreclr55
Jan Kotas [Thu, 2 Apr 2015 23:46:23 +0000 (16:46 -0700)]
Merge pull request #618 from cmckinsey/coreclr55

CQ fix for generic handle lookup in GenericHandleWorker

9 years agoMerge pull request #620 from mikem8361/dbgshim
Mike McLaughlin [Thu, 2 Apr 2015 23:36:28 +0000 (16:36 -0700)]
Merge pull request #620 from mikem8361/dbgshim

Get the dbgshim module to build and enabled all the public APIs.

9 years agoFix Windows build.
Mike McLaughlin [Thu, 2 Apr 2015 22:58:43 +0000 (15:58 -0700)]
Fix Windows build.

9 years agoGet the dbgshim module to build and enabled all the public APIs with simple/dummy...
Mike McLaughlin [Fri, 27 Mar 2015 23:34:05 +0000 (16:34 -0700)]
Get the dbgshim module to build and enabled all the public APIs with simple/dummy implementation for Linux.

Rename CMakeLists.txt file.

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 #617 from jkotas/capturecontext
Jan Kotas [Thu, 2 Apr 2015 21:15:29 +0000 (14:15 -0700)]
Merge pull request #617 from jkotas/capturecontext

Avoid implicit forward labels in context2.S

9 years agoCQ fix for generic handle lookup in GenericHandleWorker
Chris McKinsey [Thu, 2 Apr 2015 20:09:44 +0000 (13:09 -0700)]
CQ fix for generic handle lookup in GenericHandleWorker

When looking up the runtime handle in the generic handle cache for a methodtable
we get the declaring methodtable in the hierarchy and then lookup the handle in
the cache from that methodtable. When found we should insert the handle back into
the table using the original methodtable as the key and not the declaring MT
so that later lookups are faster. Inserting the handle back into the table under
the original key was a noop.

Desktop DDR and JITSH testing clean. The test case in Github issue #55 is now
3x faster. Benchmarked roslyn performance which shows no change in performance.

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 agoAvoid implicit forward labels in context2.S
Jan Kotas [Thu, 2 Apr 2015 19:25:01 +0000 (12:25 -0700)]
Avoid implicit forward labels in context2.S

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.