platform/upstream/coreclr.git
9 years agoDo not use _POSIX_C_SOURCE on Darwin
Mort Yao [Fri, 20 Mar 2015 01:56:18 +0000 (09:56 +0800)]
Do not use _POSIX_C_SOURCE on Darwin

9 years agoExplicitly specify POSIX.1-2008 conformance
Mort Yao [Thu, 19 Mar 2015 10:57:48 +0000 (18:57 +0800)]
Explicitly specify POSIX.1-2008 conformance
- Fix build on glibc versions prior to 2.19

9 years agoMerge pull request #516 from jkotas/assemblyloadcontextfix
Jan Kotas [Thu, 19 Mar 2015 22:32:58 +0000 (15:32 -0700)]
Merge pull request #516 from jkotas/assemblyloadcontextfix

Throw FileNotFoundException in AssemblyLoadContext for unresolved Assemb...

9 years agoMerge pull request #500 from mikem8361/dumpcmds
Mike McLaughlin [Thu, 19 Mar 2015 22:27:26 +0000 (15:27 -0700)]
Merge pull request #500 from mikem8361/dumpcmds

Enable the rest of the sos dump commands and supporting functions.

9 years agoMerge remote-tracking branch 'upstream/master' into dumpcmds
Mike McLaughlin [Thu, 19 Mar 2015 21:55:18 +0000 (14:55 -0700)]
Merge remote-tracking branch 'upstream/master' into dumpcmds

9 years agoEnable the rest of the Dump commands and supporting functions.
Mike McLaughlin [Mon, 16 Mar 2015 22:02:02 +0000 (15:02 -0700)]
Enable the rest of the Dump commands and supporting functions.

Undo some mistakes made in my previous commits.

Don't create the sync manager,  seh threads and seh itself.

Addressed @jkotas, @sergiy-k and @janvorli review feedback.  Added a set of PAL_Initialize flags that control what gets initialized and a new PAL_InitializeDLL entry point that the SOS and DAC module use.  This new entry point only does the subset of PAL init that is needed for a module outside of the coreclr runtime.

Fixed GetCurrentFrame() to get the current selected stack frame.

Used @janvorli suggestion of installing a PAL hardware exception and having it throw a C++ exception so the DAC can cause invalid pointers.

9 years agoThrow FileNotFoundException in AssemblyLoadContext for unresolved AssemblyName
Jan Kotas [Thu, 19 Mar 2015 21:36:11 +0000 (14:36 -0700)]
Throw FileNotFoundException in AssemblyLoadContext for unresolved AssemblyName

FileLoadException thrown internally by AssemblyLoadContext for unresolved AssemblyName was escaping from Type.GetType(..., throwOnError:false).

The fix is to throw FileNotFoundException instead that is one of the specific types specifically filtered out for throwOnError:false.

9 years agoMerge pull request #468 from LLITCHEV/work
Lubomir Litchev [Thu, 19 Mar 2015 21:27:14 +0000 (14:27 -0700)]
Merge pull request #468 from LLITCHEV/work

Enable ETW_EBP_FRAMED flag on System V systems.

9 years agoMerge pull request #508 from dotnet-bot/from-tfs
Eugene [Thu, 19 Mar 2015 02:03:29 +0000 (19:03 -0700)]
Merge pull request #508 from dotnet-bot/from-tfs

Merge changes from TFS

9 years agoAdding one more missing changes for ICastable
Eugene Zemtsov [Thu, 19 Mar 2015 01:38:09 +0000 (18:38 -0700)]
Adding one more missing changes for ICastable

[tfs-changeset: 1435505]

9 years agoMerge pull request #507 from dotnet-bot/from-tfs
Jan Kotas [Thu, 19 Mar 2015 01:28:18 +0000 (18:28 -0700)]
Merge pull request #507 from dotnet-bot/from-tfs

Merge changes from TFS

9 years agoMerge pull request #496 from dotnet-bot/from-tfs
Jan Kotas [Thu, 19 Mar 2015 01:19:38 +0000 (18:19 -0700)]
Merge pull request #496 from dotnet-bot/from-tfs

Merge changes from TFS

9 years agoActivating ICastable for CoreClr
Eugene Zemtsov [Thu, 19 Mar 2015 00:59:02 +0000 (17:59 -0700)]
Activating ICastable for CoreClr

[tfs-changeset: 1435446]

9 years agoMerge pull request #495 from kangaroo/issue-452
Jan Kotas [Thu, 19 Mar 2015 00:34:21 +0000 (17:34 -0700)]
Merge pull request #495 from kangaroo/issue-452

Fix unwinding through assembly helpers

9 years agoMerge pull request #498 from kangaroo/issue-192
Jan Kotas [Thu, 19 Mar 2015 00:33:59 +0000 (17:33 -0700)]
Merge pull request #498 from kangaroo/issue-192

Implement hardware exception handling for OSX

9 years agoImplement hardware exception handling for OSX
Geoff Norton [Wed, 18 Mar 2015 23:14:56 +0000 (16:14 -0700)]
Implement hardware exception handling for OSX

As a first pass this keeps the existing old PAL_DispatchException
machinery, but directs it to the new hardware exception handler
registered by the runtime.  A future optimization can probably
eliminate the PAL_DispatchExceptionWrapper as we do not need to
work around the unwinding problems cited anymore.

9 years agoImplement runtime support for ICastable interface
Eugene Zemtsov [Wed, 18 Mar 2015 21:40:26 +0000 (14:40 -0700)]
Implement runtime support for ICastable interface

The goal of this change is to facilitate an alternative (MCG based) way of doing COM interop, we're going to use it on Unix platforms.
New ICastable interface allows objects to pretend at runtime that they support an interface and to provide an alternative type that is used to resolve actual calls to interface methods.
BE VERY CAREFUL: This is a very dangerous feature, and at this stage it can easily lead to memory corruption without any native code involved.
Reviewers: Yi Zhang, Noah Falk, Jan Kotas. DDR clean.

[tfs-changeset: 1435198]

9 years agoEnable ETW_EBP_FRAMED flag on System V systems.
Lubomir Litchev [Fri, 13 Mar 2015 15:34:17 +0000 (08:34 -0700)]
Enable ETW_EBP_FRAMED flag on System V systems.
Enable the ETW_EBP_FRAMED flag on System V systems to allow for using
frame pointer (RBP) for mostly all functions.
The change includes:
1. Removing RBP from all the lists of registers that the RA uses to assign
to tmps/vars/etc.
2. Enable generation of unwind info for pushing of REG_FPBASE even if not included in callee-save list
of registers.
3 Fixed a conservative assert - for System V systems stack offset for reg
passed argument can be 0 or even positive.

9 years agoFix unwinding through assembly helpers
Geoff Norton [Wed, 18 Mar 2015 21:06:02 +0000 (14:06 -0700)]
Fix unwinding through assembly helpers

NESTED_ENTRY/NESTED_END assembly helpers are currently using cfi ops
that are not supported by Apple's compact unwind format.  Additionally
the apple linker appears to be doing the wrong thing, and mapping functions
like CallDescrWorkerInternal to an invalid compatc unwind encoding.  This
patch manually emits the __compact_unwind section manually for the affected
functions, and points the unwinder to parse the DWARF instead of using the
compact table.

9 years agoMerge pull request #494 from richlander/rich-introclr
Rich Lander [Wed, 18 Mar 2015 20:53:57 +0000 (13:53 -0700)]
Merge pull request #494 from richlander/rich-introclr

Add heading to intro

9 years agoMerge pull request #492 from jkotas/vsprompt
Jan Kotas [Wed, 18 Mar 2015 19:20:55 +0000 (12:20 -0700)]
Merge pull request #492 from jkotas/vsprompt

Remove check for VS Developer Command Prompt

9 years agoMerge pull request #490 from janvorli/hardware-exceptions
Jan Kotas [Wed, 18 Mar 2015 16:09:22 +0000 (09:09 -0700)]
Merge pull request #490 from janvorli/hardware-exceptions

Implement hardware exception handling

9 years agoAdd heading to intro - fix links
Richard Lander [Wed, 18 Mar 2015 15:55:14 +0000 (08:55 -0700)]
Add heading to intro - fix links

9 years agoImplement hardware exception handling
Jan Vorlicek [Tue, 17 Mar 2015 16:31:48 +0000 (17:31 +0100)]
Implement hardware exception handling

This change implements handling of hardware exceptions that happened in the
managed code or in one of the JIT helpers. The coreclr registers a callback
with PAL. This callback is invoked by PAL whenever a hardware exception happens.
coreclr code then dispatches that exception using the DispatchManagedException.

9 years agoRemove check for VS Developer Command Prompt
Jan Kotas [Wed, 18 Mar 2015 03:33:30 +0000 (20:33 -0700)]
Remove check for VS Developer Command Prompt

9 years agoMerge pull request #486 from janvorli/handle-null-context-pointers
Jan Vorlicek [Wed, 18 Mar 2015 08:49:34 +0000 (09:49 +0100)]
Merge pull request #486 from janvorli/handle-null-context-pointers

Fix handling NULL context pointers in one more place

9 years agoMerge pull request #483 from richlander/rich-docsreadme
Rich Lander [Wed, 18 Mar 2015 03:37:47 +0000 (20:37 -0700)]
Merge pull request #483 from richlander/rich-docsreadme

Convert document index into more GH-centric format

9 years agoMerge pull request #484 from LLITCHEV/work2
Lubomir Litchev [Wed, 18 Mar 2015 03:35:12 +0000 (20:35 -0700)]
Merge pull request #484 from LLITCHEV/work2

Fix a long standing bug for AMD64 with very large frames and using a scratch register.

9 years agoMerge pull request #491 from dotnet-bot/from-tfs
Jan Kotas [Wed, 18 Mar 2015 00:46:02 +0000 (17:46 -0700)]
Merge pull request #491 from dotnet-bot/from-tfs

Merge changes from TFS

9 years agoFix MacOS build break
Jan Kotas [Tue, 17 Mar 2015 23:52:40 +0000 (16:52 -0700)]
Fix MacOS build break

[tfs-changeset: 1434447]

9 years agoMerge pull request #485 from dotnet-bot/from-tfs
Jan Kotas [Tue, 17 Mar 2015 22:45:18 +0000 (15:45 -0700)]
Merge pull request #485 from dotnet-bot/from-tfs

Merge changes from TFS

9 years agoFix a long standing bug for AMD64 with bad assert.
Lubomir Litchev [Tue, 17 Mar 2015 17:49:06 +0000 (10:49 -0700)]
Fix a long standing bug for AMD64 with bad assert.
When having a really large frame the code for generating funclet prolog
expects to have RAX being used as initReg. For AMD64 the RBP is being
pushed and then used as scratch (and passed as initReg.) This was causing
the assert to trigger.
Added code to handle properly use of RBP on AMD64 and also modified the
assert to properly allow RAX and RBP as initReg.

9 years agoFix handling NULL context pointers in ExceptionTracker::UpdateNonvolatileRegisters
Jan Vorlicek [Tue, 17 Mar 2015 21:42:02 +0000 (22:42 +0100)]
Fix handling NULL context pointers in ExceptionTracker::UpdateNonvolatileRegisters

This change fixes handling of NULL context pointers in ExceptionTracker::UpdateNonvolatileRegisters
on OSX where the NULL value of a context pointer indicates that the unwinder doesn't know the
context pointer.

9 years agoMerge changes from parent branch
dotnet-bot [Tue, 17 Mar 2015 18:54:26 +0000 (11:54 -0700)]
Merge changes from parent branch

[tfs-changeset: 1434167]

9 years agoMerge pull request #440 from brianrob/AllocationSamplingShutdown
Jan Kotas [Tue, 17 Mar 2015 18:01:27 +0000 (11:01 -0700)]
Merge pull request #440 from brianrob/AllocationSamplingShutdown

Flush sampled allocations to event stream at runtime shutdown

9 years agoConvert document index into more GH-centric format
Richard Lander [Tue, 17 Mar 2015 18:00:44 +0000 (11:00 -0700)]
Convert document index into more GH-centric format

9 years agoFlush sampled object allocation on runtime shutdown.
Brian Robbins [Thu, 12 Mar 2015 21:26:35 +0000 (14:26 -0700)]
Flush sampled object allocation on runtime shutdown.

9 years agoMerge pull request #482 from richlander/jack-pappas-dotnet-standards
Jan Kotas [Tue, 17 Mar 2015 17:36:02 +0000 (10:36 -0700)]
Merge pull request #482 from richlander/jack-pappas-dotnet-standards

Respond to feedback for .NET Standards PR #413

9 years agoUpdate doc based on @CarolEidt feedback.
Richard Lander [Tue, 17 Mar 2015 16:56:37 +0000 (09:56 -0700)]
Update doc based on @CarolEidt feedback.

9 years agoMerge branch 'dotnet-standards' of https://github.com/jack-pappas/coreclr into jack...
Richard Lander [Tue, 17 Mar 2015 16:53:21 +0000 (09:53 -0700)]
Merge branch 'dotnet-standards' of https://github.com/jack-pappas/coreclr into jack-pappas-dotnet-standards

9 years agoMerge pull request #476 from jkotas/viva
Jan Kotas [Tue, 17 Mar 2015 15:59:40 +0000 (08:59 -0700)]
Merge pull request #476 from jkotas/viva

Fix some of the issues found by Viva64 static analyser

9 years agoMerge pull request #469 from mmitche/mac-ci
Matt Mitchell [Tue, 17 Mar 2015 15:26:57 +0000 (08:26 -0700)]
Merge pull request #469 from mmitche/mac-ci

Remove travis CI and add Mac badges

9 years agoFix some of the issues found by Viva64 static analyser
Jan Kotas [Tue, 17 Mar 2015 14:32:03 +0000 (07:32 -0700)]
Fix some of the issues found by Viva64 static analyser

9 years agoMerge pull request #473 from kangaroo/osx-debuggerpresent
Jan Kotas [Tue, 17 Mar 2015 12:22:54 +0000 (05:22 -0700)]
Merge pull request #473 from kangaroo/osx-debuggerpresent

Implement IsDebuggerPresent for OSX

9 years agoImplement IsDebuggerPresent for OSX
Geoff Norton [Tue, 17 Mar 2015 02:48:39 +0000 (19:48 -0700)]
Implement IsDebuggerPresent for OSX

9 years agoMerge pull request #466 from mikem8361/printexception
Mike McLaughlin [Tue, 17 Mar 2015 00:34:14 +0000 (17:34 -0700)]
Merge pull request #466 from mikem8361/printexception

Enable sos's PrintException command

9 years agoMerge remote-tracking branch 'origin/printexception' into printexception
Mike McLaughlin [Tue, 17 Mar 2015 00:07:44 +0000 (17:07 -0700)]
Merge remote-tracking branch 'origin/printexception' into printexception

9 years agoBuild the PrintException command and related support functions.
Mike McLaughlin [Fri, 13 Mar 2015 22:36:02 +0000 (15:36 -0700)]
Build the PrintException command and related support functions.

Undef some temporary code that uses the global pointer table and fixed a pre-existing off by one error getting a managed string.

Fixed unnecessary string length addition.

Implement PAL_IsDebuggerPresent for Linux so the managed DebugBreak stops in native debugger.

Finish the off by one string length change.

@janvorli review feedback addressed: fixed buffer off by one error and use '\0' instead of 0.

@jkotas review feedback addressed: increate the file buffer PAL_IsDebuggerPresent uses to 2K.

9 years agoMerge pull request #472 from jkotas/IsPrecodeByAsm
Jan Kotas [Mon, 16 Mar 2015 23:18:15 +0000 (16:18 -0700)]
Merge pull request #472 from jkotas/IsPrecodeByAsm

Delete PrecodeStubManager::PrecodeIsPrecodeByAsm method

9 years agoMerge pull request #465 from janvorli/nonexistent-context-pointers
Jan Kotas [Mon, 16 Mar 2015 22:54:49 +0000 (15:54 -0700)]
Merge pull request #465 from janvorli/nonexistent-context-pointers

Make GC work without context pointers on OSX

9 years agoDelete PrecodeStubManager::PrecodeIsPrecodeByAsm method
Jan Kotas [Mon, 16 Mar 2015 22:51:52 +0000 (15:51 -0700)]
Delete PrecodeStubManager::PrecodeIsPrecodeByAsm method

This method was expensive to port. There was just one place remaining that used. I have replaced it with different implementation.

9 years agoMerge pull request #470 from qbit/master
Jan Kotas [Mon, 16 Mar 2015 22:40:12 +0000 (15:40 -0700)]
Merge pull request #470 from qbit/master

Initial support for OpenBSD

9 years agoIncreate the file buffer PAL_IsDebuggerPresent uses to 2K.
Mike McLaughlin [Mon, 16 Mar 2015 22:11:36 +0000 (15:11 -0700)]
Increate the file buffer PAL_IsDebuggerPresent uses to 2K.

9 years agoMake GC work without context pointers on OSX
Jan Vorlicek [Sat, 14 Mar 2015 00:06:14 +0000 (01:06 +0100)]
Make GC work without context pointers on OSX

On OSX, the libunwind doesn't have support for getting context pointers.
This change modifies the way GC handles object pointers in registers
so that when the context pointer cannot be obtained, the object is
pinned so that GC doesn't move it and thus doesn't need to update
the object reference in the register value stored on the stack.

9 years agofix build on OpenBSD
Aaron Bieber [Mon, 16 Mar 2015 20:50:38 +0000 (14:50 -0600)]
fix build on OpenBSD

fix indent

more indent

fix indenting

9 years agoMerge pull request #433 from mmitche/fix-indepdent-test-build
Matt Mitchell [Mon, 16 Mar 2015 21:54:06 +0000 (14:54 -0700)]
Merge pull request #433 from mmitche/fix-indepdent-test-build

Fixes for building tests alone

9 years agoRemove travis CI and add Mac badges
Matt Mitchell [Mon, 16 Mar 2015 20:43:43 +0000 (13:43 -0700)]
Remove travis CI and add Mac badges

9 years agoFixes for building tests alone
Matt Mitchell [Wed, 11 Mar 2015 18:45:35 +0000 (11:45 -0700)]
Fixes for building tests alone

This change fixes an issue where tests cannot be built alone as well as cleans up the paths.  The general path cleanup was done so that the path format and variable names generally follow the main build of the coreclr repo.  Some highlights are:

 * Don't use Cmake as a directory name for intermediates, use intermediates instead.
 * Disable 4820 warning (this is about padding) when building tests.  Reduces noise in output significantly
 * Some fixes in typos and casing in the project files and build scripts

9 years ago@janvorli review feedback addressed.
Mike McLaughlin [Mon, 16 Mar 2015 18:50:25 +0000 (11:50 -0700)]
@janvorli review feedback addressed.

9 years agoMerge remote-tracking branch 'upstream/master' into printexception
Mike McLaughlin [Mon, 16 Mar 2015 17:27:59 +0000 (10:27 -0700)]
Merge remote-tracking branch 'upstream/master' into printexception

9 years agoMerge pull request #464 from mmitche/remove-ci-script
Matt Mitchell [Mon, 16 Mar 2015 15:13:30 +0000 (08:13 -0700)]
Merge pull request #464 from mmitche/remove-ci-script

Remove the CI cmd script, it's unused

9 years agoRemove the CI cmd script. Unused.
Matt Mitchell [Mon, 16 Mar 2015 15:12:28 +0000 (08:12 -0700)]
Remove the CI cmd script.  Unused.

9 years agoMerge pull request #453 from janhenke/freebsd
Jan Kotas [Mon, 16 Mar 2015 13:36:58 +0000 (06:36 -0700)]
Merge pull request #453 from janhenke/freebsd

Inital build support for FreeBSD.

9 years agoInital build support for FreeBSD.
Jan Henke [Tue, 10 Mar 2015 17:32:52 +0000 (18:32 +0100)]
Inital build support for FreeBSD.

Add FreeBSD to various build scripts, so this platform is detected and properly
configured.

9 years agoMerge pull request #459 from japj/japj-457
Jan Vorlicek [Mon, 16 Mar 2015 09:54:26 +0000 (10:54 +0100)]
Merge pull request #459 from japj/japj-457

Remove duplicate object code from cordbdi

9 years agoMerge pull request #449 from jkotas/mounted-binaries
Jan Vorlicek [Mon, 16 Mar 2015 09:46:31 +0000 (10:46 +0100)]
Merge pull request #449 from jkotas/mounted-binaries

Fix handling of links and non-Linux file systems in Unix corerun

9 years agoMerge pull request #460 from japj/japj-458
Jan Kotas [Mon, 16 Mar 2015 02:50:48 +0000 (19:50 -0700)]
Merge pull request #460 from japj/japj-458

Fix missing bool type for IsAppXNGen

9 years agoFix missing bool type for IsAppXNGen
Jeroen Janssen [Sun, 15 Mar 2015 23:10:33 +0000 (00:10 +0100)]
Fix missing bool type for IsAppXNGen

9 years agoRemove duplicate object code from cordbdi
Jeroen Janssen [Sun, 15 Mar 2015 23:05:53 +0000 (00:05 +0100)]
Remove duplicate object code from cordbdi

eventredirectionpipeline.cpp is #included by platformspecific.cpp,
so remove it from the CMakeLists.txt since that causes linker warnings

9 years agoMerge pull request #443 from japj/japj-113
Jan Kotas [Sun, 15 Mar 2015 20:32:03 +0000 (13:32 -0700)]
Merge pull request #443 from japj/japj-113

Add check and instruction to build.cmd to run from normal prompt

9 years agoMerge pull request #451 from japj/japj-106
Jan Kotas [Sun, 15 Mar 2015 20:30:18 +0000 (13:30 -0700)]
Merge pull request #451 from japj/japj-106

Put Marshal.Read/Write with Object under FEATURE_LEGACYSURFACE

9 years agoFinish the off by one string length change.
Mike McLaughlin [Sun, 15 Mar 2015 19:39:36 +0000 (12:39 -0700)]
Finish the off by one string length change.

9 years agoGrouped related Read/Write methods + consistent xml tag ending
Jeroen Janssen [Sun, 15 Mar 2015 19:16:09 +0000 (20:16 +0100)]
Grouped related Read/Write methods + consistent xml tag ending

9 years agorephrase into VS Developer Command Prompt
Jeroen Janssen [Sun, 15 Mar 2015 19:04:46 +0000 (20:04 +0100)]
rephrase into VS Developer Command Prompt

9 years agoImplement PAL_IsDebuggerPresent for Linux so the managed DebugBreak stops in native...
Mike McLaughlin [Sun, 15 Mar 2015 19:03:17 +0000 (12:03 -0700)]
Implement PAL_IsDebuggerPresent for Linux so the managed DebugBreak stops in native debugger.

9 years agoPut Marshal.Read/Write with Object under FEATURE_LEGACYSURFACE
Jeroen Janssen [Sun, 15 Mar 2015 16:59:54 +0000 (17:59 +0100)]
Put Marshal.Read/Write with Object under FEATURE_LEGACYSURFACE

The Marshal.Read/Write methods with Object arguments are not part of the
refactored .NET Core System.Runtime.InteropServices contract. Mark them
with FEATURE_LEGACYSURFACE so these get physically excluded from
mscorlib.dll on Linux/Mac.

9 years agoFix handling of links and non-Linux file systems in Unix corerun
Jan Kotas [Sun, 15 Mar 2015 15:26:59 +0000 (08:26 -0700)]
Fix handling of links and non-Linux file systems in Unix corerun

9 years agoMerge pull request #441 from stephentoub/openssl_init
Jan Kotas [Sun, 15 Mar 2015 03:45:20 +0000 (20:45 -0700)]
Merge pull request #441 from stephentoub/openssl_init

Add OpenSSL initialization routine to PAL

9 years agoFixed unnecessary string length addition.
Mike McLaughlin [Sat, 14 Mar 2015 23:21:34 +0000 (16:21 -0700)]
Fixed unnecessary string length addition.

9 years agoUndef some temporary code that uses the global pointer table and fixed a pre-existing...
Mike McLaughlin [Sat, 14 Mar 2015 22:56:15 +0000 (15:56 -0700)]
Undef some temporary code that uses the global pointer table and fixed a pre-existing off by one error getting a managed string.

9 years agoAdd check and instruction to build.cmd to run from normal prompt
Jeroen Janssen [Sat, 14 Mar 2015 09:36:02 +0000 (10:36 +0100)]
Add check and instruction to build.cmd to run from normal prompt

9 years agoMerge remote-tracking branch 'upstream/master' into printexception
Mike McLaughlin [Sat, 14 Mar 2015 00:04:50 +0000 (17:04 -0700)]
Merge remote-tracking branch 'upstream/master' into printexception

9 years agoMerge pull request #437 from mikem8361/clrstack
Mike McLaughlin [Sat, 14 Mar 2015 00:03:40 +0000 (17:03 -0700)]
Merge pull request #437 from mikem8361/clrstack

The sos "ClrStack" command now works

9 years agoMerge remote-tracking branch 'origin/clrstack' into printexception
Mike McLaughlin [Fri, 13 Mar 2015 23:04:36 +0000 (16:04 -0700)]
Merge remote-tracking branch 'origin/clrstack' into printexception

9 years agoCode review feedback.
Mike McLaughlin [Fri, 13 Mar 2015 22:52:59 +0000 (15:52 -0700)]
Code review feedback.

9 years agoBuild the PrintException command and related support functions.
Mike McLaughlin [Fri, 13 Mar 2015 22:36:02 +0000 (15:36 -0700)]
Build the PrintException command and related support functions.

9 years agoMerge pull request #4 from kangaroo/clrstack
Mike McLaughlin [Fri, 13 Mar 2015 22:11:51 +0000 (15:11 -0700)]
Merge pull request #4 from kangaroo/clrstack

Fixes OSx problems.

9 years agoChange THREADSilentGetCurrentThreadId to return the pthread_threadid, which matches...
Geoff Norton [Fri, 13 Mar 2015 21:46:11 +0000 (14:46 -0700)]
Change THREADSilentGetCurrentThreadId to return the pthread_threadid, which matches the tid from lldb

9 years agoEnsure we find_library on LLDB as well to find LLDB.framework on OSX
Geoff Norton [Fri, 13 Mar 2015 21:45:37 +0000 (14:45 -0700)]
Ensure we find_library on LLDB as well to find LLDB.framework on OSX

9 years agoMerge pull request #439 from janvorli/add-unhandled-exception-trace-print
Jan Kotas [Fri, 13 Mar 2015 20:57:15 +0000 (13:57 -0700)]
Merge pull request #439 from janvorli/add-unhandled-exception-trace-print

Add unhandled exception stack trace print

9 years agoAdd unhandled exception stack trace print
Jan Vorlicek [Fri, 13 Mar 2015 19:29:35 +0000 (20:29 +0100)]
Add unhandled exception stack trace print

This change adds printing of unhandled managed exception stack trace to
console before exiting.

9 years agoFix CI build failures. Undefined functions.
Mike McLaughlin [Fri, 13 Mar 2015 18:21:05 +0000 (11:21 -0700)]
Fix CI build failures. Undefined functions.

9 years agoMerge pull request #438 from janvorli/fix-frames-popping
Jan Vorlicek [Fri, 13 Mar 2015 17:13:05 +0000 (18:13 +0100)]
Merge pull request #438 from janvorli/fix-frames-popping

Fix managed exception unwinding through CallDescrWorkerInternal

9 years agoExclude the Frame destructor from DAC build
Jan Vorlicek [Fri, 13 Mar 2015 16:30:14 +0000 (17:30 +0100)]
Exclude the Frame destructor from DAC build

The destructor is not needed on DAC builds and the definition was not being
built for DAC already. Conditionally disabling the declaration too.

9 years agoFix managed exception unwinding through CallDescrWorkerInternal
Jan Vorlicek [Fri, 13 Mar 2015 15:06:46 +0000 (16:06 +0100)]
Fix managed exception unwinding through CallDescrWorkerInternal

This change fixes issue with exception unwinding in the case when the unwinding
passed through a frame of the CallDescrWorkerInternal function. This function
had personality routine on it, but a windows style personality routine was specified.
The windows one has a completely different signature, so the code was crashing.
When looking into that, I've found that even if I have implemented a proper
Unix style personality routine, it cannot work the same way on Linux as it
used to work on Windows.
This personality routine's goal is to pop Frames from the Frame list in the current
thread so that all frames upto the frame handling the exception are popped.
There are two problems on Linux. First, unlike on Windows, the personality
routine is not passed the RSP of the frame handling the exception in an official
way. Although it can be extracted from the private_2 member of the exception
object during the 2nd pass, it is an implementation detail that we cannot rely on.
Moreover, even if we used that, it would still not be the right frame in all cases
due to the fact that we implement exception filters by catching and rethrowing and
so the frame we would get would be the frame of a filtering catch in case
there was one.
My solution to this problem is to add destructor to the Frame type and let it
pop the frame being destroyed if it is still in the list in the current thread.
That way the native code unwinding automatically takes care of popping the frames.
As an additional changes, I've added handling of the case when the
Thread::VirtualUnwindToFirstManagedCallFrame walks out of stack, fixed a stack
alignment issue in the recently added StartUnwindingNativeFrames function and
a cosmetic change in the UnwindManagedExceptionPass1.

9 years agoAdd PAL test for EnsureOpenSslInitialized
Stephen Toub [Fri, 13 Mar 2015 09:32:55 +0000 (05:32 -0400)]
Add PAL test for EnsureOpenSslInitialized

This includes removing an unnecessary assert from the function
that was causing the tests to fail, as well as addressing one
piece of PR feedback.

9 years agoAdd OpenSSL initialization routine to PAL
Stephen Toub [Sat, 14 Mar 2015 01:41:36 +0000 (21:41 -0400)]
Add OpenSSL initialization routine to PAL

Several of the CoreFX libraries will be using OpenSSL on Unix for cryptographic needs.  In order for this usage to be safe in a multi-threaded context, OpenSSL needs to be initialized with a locking callback that provides the actual locking.  For now at least, the plan is to do this initialization in a function in libcoreclr.  This commit provides that functionality, which can subsequently be consumed by CoreFX libraries.

9 years agoMerge remote-tracking branch 'upstream/master' into clrstack
Mike McLaughlin [Thu, 12 Mar 2015 23:14:05 +0000 (16:14 -0700)]
Merge remote-tracking branch 'upstream/master' into clrstack

9 years agoFix PAL printf functions. Didn't handle "%*.*p" correctly which is supported under...
Mike McLaughlin [Thu, 12 Mar 2015 22:11:01 +0000 (15:11 -0700)]
Fix PAL printf functions.  Didn't handle "%*.*p" correctly which is supported under windbg/windows runtime.  Didn't actually support "*" for the width parameter at all for any format char.

9 years agoMerge pull request #435 from janvorli/nested-exception-handling
Jan Vorlicek [Thu, 12 Mar 2015 20:49:05 +0000 (21:49 +0100)]
Merge pull request #435 from janvorli/nested-exception-handling

Add support for exceptions crossing native frames