summaryrefslogtreecommitdiff
path: root/src/coreclr/hosts
AgeCommit message (Collapse)AuthorFilesLines
2016-03-05Replace all uses of __LINUX__ with the lower caseGeunsik Lim1-2/+2
According to https://sourceforge.net/p/predef/wiki/OperatingSystems/ (Pre-defined Compiler Macros) and http://www.faqs.org/docs/Linux-HOWTO/GCC-HOWTO.html (Porting and compiling:Automatically defined symbols), the __linux__ marcro is the right way to detect systems based on the Linux kernel and is the POSIX compliant. Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2016-03-04Restore linking debug corerun.exe with retail CRTJohn Chen (CLR)1-1/+1
The long path support feature modified debug corerun.exe with debug CRT (msvcrtd.dll). This made it more difficult to use corerun.exe, since the debug CRT is not always available. It turns out this change is no longer necessary, so reverting part of the change to link debug corerun.exe with retail CRT (msvcrt.dll) again.
2016-03-04Fix C++11 issue when converting string to char *Ben Pye1-1/+1
2016-03-04Fix Stack Unwind Behavior of Libunwind-ARMMyungJoo Ham1-0/+14
Disable UNW_ARM_METHOD_DWARF, which gets problematic with assembly-created stacks in ARM systems. Although previous commits have fixed the compatibility issues between cpp stacks and libunwind-arm, the assembly part (asmhelpers.S) had similar problems. Fix #3462 Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2016-03-01Fix build break on arm caused by long path support changeJohn Chen1-1/+4
[tfs-changeset: 1580615]
2016-02-29Support long paths in CoreCLR runtime on WindowsJohn Chen (JOCHEN7)3-130/+96
The CoreCLR runtime is updated to support long file paths on Windows. Pending updates to mscorlib.dll, the following scenarios are supported: * Run managed apps from a long path. * Load CoreCLR runtime and framework from a long path. * Load user assemblies from a long path. * Run CrossGen from a long path, with its input/output from a long path. * Generate debug log file at a long path. The following scenarios are not yet supported, and will be fixed in future commits: * Mscorlib.dll and framework assemblies are not yet long path compatible. Note that until mscorlib.dll is fixed, most of the runtime changes can't actually be used. * Support on non-Windows platforms. * Support for debugging and error reporting. * Tools such as ilasm or ildasm.
2016-02-18Fix GetEntrypointExecutableAbsolutePath on LinuxManu1-9/+25
Although PR#1818 was supposed to implement this for Linux, only the MacOS X implementation was correct. We are now using `readlink' on Linux to get the path of the current running executable.
2016-02-01Fix OACR errors for ProjectKdotnet-bot2-7/+7
[tfs-changeset: 1570939]
2016-01-27Update license headersdotnet-bot13-52/+39
2016-01-22NetBSD: Don't link with -ldl for dlopen(3) on NetBSDKamil Rytarowski2-6/+6
NAME dlopen, dlclose, dlsym, dlvsym, dladdr, dlctl, dlerror - dynamic link interface LIBRARY (These functions are not in a library. They are included in every dynamically linked program automatically.) SYNOPSIS #include <dlfcn.h> void * dlopen(const char *path, int mode);
2016-01-14Merge pull request #2661 from sergiy-k/pieSergiy Kuryata4-0/+8
Enable the fPIE compiler option for executables in the coreclr repo on Unix platforms
2016-01-14Enable the fPIE compiler option for executables in the coreclr repo on Unix ↵Sergiy Kuryata4-0/+8
platforms
2016-01-13Enable corerun to select server GC or concurrent GC on startup based on ↵Sean Gillespie2-7/+80
environment variables
2015-12-15Add if to check if Linux for -ldl, because it only works on Linux.Marqin1-1/+3
2015-12-15Link unixcoreruncommon with dl, which is needed on Unix-like systemsMarqin1-0/+1
to use dynamic linking.
2015-12-07Enable ildasm for *nixKyungwoo Lee1-1/+0
This enables ildasm for cross-platforms. Unlike Window (where initialization is done when DLL attach), CoreCLR is explciltly hosted/initialized to get the Metadata related APIs. This also eliminates the need of setting dynamic library path. Currently, ildasm binary is assumed to be located same as CoreCLR binary. I added a simple CoreCLRLoader (not meant to run an assembly file) for just direct uses of APIs. Since I expect this library to be used for ilasm work. Resource string is also handled using a static string table based on my prior check-in. Other changes are mostly mechanic with regard to wide constant string.
2015-12-03Lib unixcoreruncommonKyungwoo Lee5-9/+19
2015-11-13Allow setting some startup flags outside WindowsKoundinya Veluri2-2/+4
Allowing the GC-related flags to be set using properties passed into coreclr_initialize.
2015-10-23Fix issue 1774Gaurav Khanna3-2/+54
2015-10-16Fix build break with WindowsOS CRTJan Kotas1-7/+8
_get_wpgmptr is not available in WindowsOS CRT. Replace it with GetModuleFileName. [tfs-changeset: 1538931]
2015-10-14Change CoreConsole to use _get_wpgmptrAndrew Stanton-Nurse1-19/+14
The first value in argv only contains the string that was used to launch the process. This means that when the CoreConsole-based application is on the PATH, some invocations of it (most notably those done from 'cmd') cause that value to be incomplete. Changing to use _get_wpgmptr ensures that we always get the full path to the executable, no matter how it is executed. Fix #1771
2015-10-09Fix Windows CoreConsole property listJan Vorlicek1-2/+4
The property list was broken - the keys list was missing a comma between two entries, so they got merged into one string. And the values list was missing one value too.
2015-09-08Replace MAX_PATH with new defines, rest of coreclr.Lakshmi Priya Sekar2-77/+77
2015-09-01Fix pthread locks initialization issueJan Vorlicek2-12/+10
This change fixes a problem on Linux when pinvoke loads a shared library and that library transitively uses pthread locks. In that case, the locks may not be initialized yet and behave as nops, causing the thread synchronization to not to work. Linking corerun / coreconsole with pthreads ensures that the locks are always properly initialized.
2015-07-29Fix prefast warnings in CLR codeEugene Zemtsov1-2/+2
[tfs-changeset: 1507366]
2015-07-20Merge pull request #1255 from benpye/coreconsole-crash-fixJan Kotas1-9/+21
Allow coreconsole to be called without extension
2015-07-19Allow coreconsole to be called without extension.Ben Pye1-9/+21
2015-07-16Extend the Unix hosting APIJan Vorlicek1-44/+77
This change modifies the Unix hosting API so that the hosting app can create as many managed delegates as it needs and execute them as many times it wants. The new API contains separate functions to initialize and shutdown CoreCLR and a function to create a delegate. The current ExecuteAssembly function behavior stays unmodified for now to ensure that dnx that uses that API and that pulls the binary libcoreclr is not broken. After the dnx is updated to use the new coreclr_create_delegate API, I'll remove the ExecuteAssembly. Also done: 1) Added support for comments and skipping empty lines in the mscorwks_unixexports.src. 2) Restructured the mscorwks_unixexports.src 3) Added coreclr_execute_assembly to the unixinterface.cpp / exports 4) Modified coreruncommon.cpp to use the new hosting API
2015-05-29Fix exitCode from ExecuteAssemblystephentoub1-0/+1
ExecuteAssembly is initializing exitCode to 0 on entrance to the function. If it then fails prior to exitCode being set when invoking the entry point, the exitCode remains 0 even though there was a failure, and corerun ends up returning a successful exit code.
2015-05-09osxbundlerun - corerun for use in OS-X app packagesBrad Robinson3-0/+114
2015-05-01Fix unixcoreruncommon build error on FreeBSDAnders Jensen-Waud1-0/+1
Needed cstdlib to build properly
2015-04-28Add Unix version of coreconsole.Aditya Mandaleeka8-314/+555
Created a Unix version of coreconsole which, like the Windows version, is similar to corerun but runs the managed binary with the same name as the executable (but with the DLL extension). Moved code that is common between corerun and coreconsole to coreruncommon. Remove the workaround for the XCode 6.3 SDK issue wherein some of the system headers that we reference try to include a __debug header which does not exist. The 6.3.1 update fixed that issue so the workaround is no longer required. Fix #747
2015-04-28Merge pull request #861 from adityamandaleeka/remove-mac-build-hackAditya Mandaleeka2-23/+0
Remove Mac build workaround for __debug
2015-04-28Remove Mac build workaroundAditya Mandaleeka2-23/+0
Remove the workaround for the issue in XCode 6.3 where __debug was being included by some system headers but was not present. We were adding our own include directory with a dummy '__debug' file. The issue has been fixed by Apple in 6.3.1 so we no longer need this workaround.
2015-04-27Go back to a statically linked PAL (issue #728).Mike McLaughlin1-20/+0
Cleanup signal handling. Make sure the default signal action will happen if no previous handler by restore the signal and returning from the handler restarting the h/w exception.
2015-04-26Complete FreeBSD bringupGeoff Norton1-0/+7
Fixes issue #801 which was caused by the CoreCLR and PAL being dlopened, but pthread not being initialized by the runtime linker yet. FreeBSD requires that the main executable load pthread, rather than a downstream dependency. Also fixed a few missing calls to pthread_attr_init which was causing asserts() on FBSD.
2015-04-24Implemented hardware exception chaining.Mike McLaughlin1-2/+7
Test CLR hosting under a debugger (lldb). In order to test the debugger modules and coreclr running together in the same process, add the test command "corerun" to the lldb plugin that uses the CLR hosting apis to run managed code in the lldb process. Fixed a problem where the dac module was picking up an constructor in the coreclr module instead of using the dac version. This is because the corerun code was dlopen'ing coreclr with RTLD_GLOBAL which exposed all the symbols to the reset of the dynamic modules loaded. Changing it to RTLD_LOCAL (the default) fixes this problem. Changed from an ASSERT to an ERROR in the hardware exception handler because ASSERT does an SIGTRAP (DebugBreak) that keeps recursively being hit. Removed all signals that installed a fatal_signal_handler especially SIGINT which was interfering with lldb's. The rest of the signals, the default action should be good enough. Checked if the EE was started in the VM's hardware exception handler just to make sure everything is ready before the managed exception chain is called. Cleanup signal thread masking. Only wait for SIGINT/SIGQUIT explicitly instead of trying to mask all the signals we don't want to wait on.
2015-04-24Fix the two remaining linker errors on FreeBSD.Jan Henke1-3/+6
Thanks to Jan Vorlicek for finding the source of the first linker error. Those linker options need to be passed to the linker on FreeBSD too. The second linker error is caused by the fact that FreeBSD has no libdl, the functionality is instead implemented in libc. Thus do not add the -ldl option to the linker on FreeBSD. Fixes #739 This is fixes the build on FreeBSD completely!
2015-04-16Merge pull request #726 from janvorli/fix-copyright-headersJan Kotas2-0/+10
Add missing MIT license headers
2015-04-17Add missing MIT license headersJan Vorlicek2-0/+10
.rc and .def files were missing the MIT license headers, so this change adds them.
2015-04-16Explicitly load libcoreclrpal in corerunMatt Ellis1-0/+20
libcoreclr has a dependency on libcoreclrpal, but libcoreclrpal is usually not on the path the loader probes, since it is SxS with the runtime itself. Instead of forcing LD_LIBRARY_PATH to be set just have corerun load the PAL from the same folder as the runtime before loading libcoreclr. Fixes #709
2015-04-14Moving UAP Host sources out from coreclr\hosts to where it'll be residing ↵Sedar Gokbulut1-1/+0
together with other UAP components [tfs-changeset: 1452859]
2015-04-14Mirror subfolders for unixcorerun.Matt Ellis2-1/+1
My previous change introduced a new subfolder to unixcorerun, but I forgot to update the .gitmirror file to a .gitmirrrorall file. [tfs-changeset: 1452317]
2015-04-12Fix MacOS Build BreakMatt Ellis2-0/+23
The newest version of XCode and the Command Line tools in OSX has an issue where including some header files will issue an error because the __debug header can not be included. See https://devforums.apple.com/message/1124445 for more context. While a fix is being developed by apple, simple include a dummy version of this header file so the build works with the new toolset.
2015-04-02Enable UseLatestBehaviorWhenTFMNotSpecified for Unix corerunStephen Toub1-2/+5
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.
2015-03-28Fix corerun to support argv[0] that's not a full pathStephen Toub1-6/+23
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.
2015-03-21Add host flag to disable transparency checks in CoreCLRJan Kotas2-3/+5
A lot of security transparency annotations in corefx is missing or inconsistent. People keep running into MethodAccessExceptions because of that. It is not easy (nor cheap) to fix the annotations to make them consistent, and they are not actually required for any of the .NET Core scenarios. This change is introducing a hosting flag to disable security transparency checks on CoreCLR, and adds this flag to all .NET Core hosts. The .NET Core hosts outside of the CoreCLR tree (e.g. ASP.NET 5) will need this flag added as well. [tfs-changeset: 1437325]
2015-03-15Fix handling of links and non-Linux file systems in Unix corerunJan Kotas1-1/+28
2015-03-10Add custom entry point support.Matt Ellis1-0/+6
Hosts like ASP.net don't want to call ExecuteAssembly, because their entry point is library, not a managed exe. However, forcing cross platform hosts to actually call CreateAppDomainWithManager and CreateDelegate themselves requires a bunch of tedious code, since these hosts don't have access to mscoree.h and the PAL. This change adds the ability to specificy an assembly, type and method which can be used as a custom entrypoint. The signiture of the managed entry point needs to be `static int E(int, char**)`.
2015-03-03Merge pull request #382 from jkotas/authenticateMatt Ellis2-22/+0
Delete host authentication enforcement