summaryrefslogtreecommitdiff
path: root/src/pal
AgeCommit message (Collapse)AuthorFilesLines
2016-12-23[Linux] Fix cross-architecture component build configuration for ↵Hyeongseok Oh2-16/+33
ARM32-target (#8687) * fix CMakeLists.txt for palrt * Modify CMakeLists.txt for cross-architecture component configuaration Add coreclrpal project to fix a dependency issue when CMake configuration * Allow only x64-host/arm-target for linux allow x64-host/arm-target only, because pal is not stable for x86 now * Update build.sh delete NumProc=1 (inserted for debugging) * Change x64-host to x86-host for arm-target JIT correctness problem, and fix CMake configuration for x86 in pal * Fix type * Update CMakeLists.txt * fix style * Set x86 when arm-target/x64-host * fix typo
2016-12-21Remove FEATURE_BLC_FORMATTING (#8699)Jan Vorlicek1-27/+0
This feature is always defined and the PAL functions that would be used if the feature was not defined are not in PAL anymore.
2016-12-20ARM: do not use unpredictable sub.w sp, rN, #imm (#8636)mskvortsov1-1/+2
2016-12-18Remove Read/WriteProcessMemory from PAL. (#8655)Mike McLaughlin19-1832/+132
Ifdef more unused code that uses ReadProcessMemory. Move the current memory probing in the transport to PAL_ProbeMemory. Add PAL_ProbeMemory to dac PAL exports. PAL_ProbeMemory may be changed to use write/read on a pipe to validate the memory as soon as we make it perform as well as the current code. Remove ReadProcessMemory tests and add PAL_ProbeMemory pal tests.
2016-12-17Use ExecutionPolicy ByPass to execute probe-win.ps1 script during the build ↵Jan Kotas1-1/+1
(#8673) Port of https://github.com/dotnet/corert/issues/2377
2016-12-16Fix buildsystem for linux cross-architecture component build (#8646)Hyeongseok Oh1-9/+13
* Fix buildsystem for linux cross-architecture component build * refactoring build.sh, bug fix and typo fix * Update build.sh
2016-12-13[x86/Linux] Enforce 16-byte stack alignment (#8587)Jonghyun Park1-0/+9
Clang (and GCC) requires 16-byte stack alignment, but the current implementation of CallDescrInternal and ThePreStub does not provide any guarantee on stack alignment. This commit adds 16-byte stack alignment adjust code inside these functions.
2016-12-14[x86/Linux] Fix incorrect __fastcall definition (#8585)Jonghyun Park1-6/+0
In x86/Linux, __fastcall is defined as __stdcall which causes stack corruption issue for the following functions: - HelperMethodFrameRestoreState - LazyMachStateCaptureState This commit removes __fastcall definition as clang recognize __fastcall.
2016-12-14[x86/Linux] Port jithelp.asm (#8491)Jonghyun Park1-0/+11
* [x86/Linux] Port jithelp.asm This commit ports jithelp.asm for x86/Linux The following Tailcall helpers are marked as NYI: - JIT_TailCall - JIT_TailCallReturnFromVSD - JIT_TailCallVSDLeave - JIT_TailCallLeave * Revise macro and indentation
2016-12-09[x86/Linux] Fix PAL unit test paltest_pal_sxs_test1 (#8522)SaeHie Park3-6/+3
Fix unit test error for x86/Linux - fix fail of exception_handling/pal_sxs/test1/paltest_pal_sxs_test1
2016-12-08[x86/Linux] Revise asmhelper.S using macro (#8523)Jonghyun Park1-0/+30
* [x86/Linux] Revise asmhelper.S using macro This commit revises asmhelper.S using macros that inserts CFI directives.
2016-12-09Remove sscanf and sprintf usage (#8508)Jan Vorlicek153-544/+375
* Remove sscanf * Remove sprintf
2016-12-06Merge pull request #8470 from brianrob/fix_lttng_header_detectionBrian Robbins1-0/+8
Fix building against liblttng-ust-dev 2.8+
2016-12-06[x86/Linux] Port PATCH_LABEL macro (#8483)Jonghyun Park1-0/+5
2016-12-06Fix building against liblttng-ust-dev 2.8+Brian Robbins1-0/+8
2016-12-04Fix several misspellings of exception and "a exception". (#8442)Jon Hanna2-2/+2
2016-12-01Fix build error in ARM64 code (#8407)Jonghyun Park1-1/+1
CONTEXT struct for ARM64 does not contain X29 field.
2016-12-01Add EXCEPTION_REGISTRATION_RECORD for x86/Linux (#8408)Jonghyun Park1-0/+5
2016-11-30Emits compile error on portability issue only when PORTABILITY_CHECK is ↵Jonghyun Park1-1/+1
specified (#8340)
2016-11-30[x86/Linux] Add missing files in x86/Linux PAL (#8318)Jonghyun Park13-32/+347
* (Partially) Enable x86/Linux PAL * Fix personality routine address encoding * Fix build warnings
2016-11-29Capture YMM registers on OSX (#8365)John Chen4-17/+100
Also fixed checking of context flags on OSX (issue #8116)
2016-11-29Fix phantom TEXTREL in libcoreclr.so (#8347)Jan Vorlicek2-2/+2
This change fixes the problem where scanelf tool reported that libcoreclr.s contains TEXTRELs, however it was unable to find any. It turns out there actually were TEXTRELs, but not in the program code or program data, but rather in the DWARF tables. The NESTED_ENTRY macro for ARM64 and AMD64 uses .cfi_personality with encoding 0, which means absolute address. This is the source of the TEXTREL. Changing the encoding to 0x1b - DW_EH_PE_pcrel | DW_EH_PE_sdata4 fixes the problem - the scanelf tool no longer reports any TEXTRELs in libcoreclr.so.
2016-11-26Fix building CoreCLR with Clang 3.9 (#8311)Jan Vorlicek1-1/+1
There were few constructs that Clang 3.9 didn't like due to its strict C++ standard conformance rules.
2016-11-25[x86/Linux] Renames i386 as amd64 in arch (PAL) (#8307)Jonghyun Park11-10/+10
The files in src/pal/src/arch/i386 are actually for amd64 (not x86). This commit renames the directory name as the first step towards enabling PAL in x86/Linux.
2016-11-25Enable field EndAddress only for AMD64 in PAL of RUNTIME_FUNCTION (#8305)SaeHie Park1-0/+2
2016-11-24Supports to build PAL tests under x86/Linux (#8292)Jonghyun Park1-3/+7
2016-11-24[x86/Linux] Fix unsupported architecture in seh-unwind.cpp (#8262)SaeHie Park2-0/+34
Fix compile error for x86/Linux - add ASSIGN_UNWIND_REGS in seh-unwind.cpp for x86 - add CONTEXT_EXCEPTION_ACTIVE in pal.h for x86 - add CONTEXT_XSTATE in pal.h for x86
2016-11-23[x86/linux] Fix redefined DISPATCHER_CONTEXT compile error (#8246)SaeHie Park1-1/+19
WIP, fix compile error for x86/Linux - add directive WIN32 to current DISPATCHER_CONTEXT in clrnt.h - add DISPATCHER_CONTEXT for x86 in palrt.h
2016-11-23[x86/Linux] Fix no matching function for call to 'InternalCreateThread' (#8265)SaeHie Park1-1/+1
Fix compile error for x86/Linux - fix calling convention by adding PALAPI to TerminationRequestHandlingRoutine
2016-11-22[x86/Linux] Fix stdcall calling convention ignored on variadic function (#8252)SaeHie Park1-6/+6
WIP, fix compile error for x86/Linux - fix to use STDMETHODVCALLTYPE
2016-11-22Merge pull request #8244 from seanshpark/x86pal01Gaurav Khanna2-0/+18
[x86/Linux] Fix compilation in pal and context header
2016-11-22[x86/Linux] fix and add for x86 cmake configuration (#8219)SaeHie Park1-0/+12
This patch will add x86 part for cross build - add x86 in build-rootfs and related cross files - add x86 parts in CMakeLists.txt to pass configuration - add required source files to pass configuration
2016-11-22[x86/Linux] Fix compilation in palSaeHie Park2-0/+18
WIP, fix compile error for x86/Linux - add KNONVOLATILE_CONTEXT_POINTERS - add _X86_ codes in pal/context.h
2016-11-21Remove unsafe banned functions (#8162)Jan Vorlicek223-2703/+679
This change removes _snwprintf, _snprintf and _vsnwprintf usage from CoreCLR and their implementations from PAL. PAL exposes their secure variants instead and CoreCLR now uses those instead. I have also removed the StringCchPrintfA/W, StringCchVPrintfA/W, StringCbVPrintfA/W, StringCbPrintfA/W, StringCbPrintfExA/W, StringCchVPrintfExA/W, StringCbVPrintfExA/W and StringCchPrintfExA/W replaced their usage by the secure variants of the sprintf functions, since they were used at only few places and implementing all of the variants using the secure sprintf variants would be a hassle. I also needed to fix a missing support for size modifiers for %p formatting character and for wide characters / strings in the secure sprintf functions that was revealed by the PAL tests. I have also removed a bunch of PAL tests that were using %n formatting character which was not implemented since it is considered unsafe and translated PAL tests that were using the removed functions to use the safe variants of those.
2016-11-15Fix XMM register count in CONTEXT_SetThreadContextOnPort in PALJohn Chen (CLR)1-1/+1
2016-11-10Save registers xmm8..15 on Mac OSX (#8078)John Chen1-1/+1
On x64, JIT can generate code that uses all 16 xmm registers. However, on Mac OSX, we currently only save 8 of these registers. Thus after a context save/restore, xmm8 through xmm15 are corrupted. This commit fixes the code to save all 16 xmm registers. It resolves issue #2266.
2016-11-04Remove more PAL functions (#8009)Jan Vorlicek97-4247/+21
This change removes the following PAL functions and their related PAL tests: _i64tow _itow lstrcatW lstrcpyW wsprintfA wsprintfW lstrcpynW The lstrcpynW was actually used in two functions in palrt and I have replaced it with StringCchCopyNW. The _i64tow and _itow were used as an implementation of the _i64tow_s and _itow_s. Since these _s versions were also implemented in PAL for its internal purposes, I have exposed them and got rid of the unsafe versions.
2016-11-02Set pRetVal as NULL on error inside 'VIRTUALCommitMemory' (#7920)Jonghyun Park1-2/+2
2016-10-28Remove some unused PAL functions (#7873)Jan Vorlicek47-1758/+12
This change removes some unused PAL functions and the corresponding PAL tests.
2016-10-25Making MemoryFailPoint functional on xplatRama Krishnan Raghupathy6-1/+79
Expose GlobalMemoryStatusEx on Xplat
2016-10-24Merge pull request #7706 from mjsabby/lcgjitprofcallbacksnoahfalk2-6/+1714
Add LCG JIT Compilation Profiler Callbacks
2016-10-22Fixing the StackOverflowException error message. (#4786)Vijay Ramakrishnan1-1/+1
2016-10-21Address CR feedbackMukul Sabharwal1-11/+19
2016-10-21Add LCG JIT Compilation Profiler CallbacksMukul Sabharwal2-6/+1706
Methods that contain no metadata (e.g. of sources are IL Stubs, DynamicMethod, Expression Trees, etc.) also known as LCG methods are not reported to profilers via the Profiling API. LCG, introduced in .NET 2.0 timeframe is unique in that it doesn't require the method to be hosted in an assembly > module > type heirarchy and is GCable in of itself. This change adds new APIs that notify the profiler of such methods but since there is no metadata to go lookup, it provides some useful pieces of information that the profiler author may want to expose to the profiler user. In the compilation start method we provide a className (always dynamicClass), a methodName that can be a set of few predetermined names like (ILStub_COMToCLR, etc.) or if the user has set the name for the LCG method that can show up here. For example, when using the Expression Trees API, the user can specify a friendly name which would be returned here. In the jit completed callback we provide information for the native code start address and size. This is particularly useful to get more accurate accounting of what the (previously unidentified) code is. At least the user would know it is JITTed if nothing more (but most likely more information like what kind of stub). Furthermore, since this is going to be a profiler callback, the profiler can initiate a stackwalk and give more contextual information to its users beyond the pieces of information we can provide here that could identify what they're encountering. Finally, there is also the case that today the profiling APIs underreport JITTed code in the process. Considerable amount of LCG code can now be present in the program and in security-sensitive environments where tracking JITTed code for security reasons is important the profiling apis fall short. In such environments there is also often restrictions on running with elevated privileges, so procuring this data through other means (like ETW) may pose a challenge.
2016-10-18Adding single-precision math functions. (#5492)Tanner Gooding82-0/+3760
* Adding single-precision math functions to floatsingle * Adding single-precision math functions to the PAL layer. * Adding single-precision math tests to the PAL layer. * Adding single-precision math functions to mscorlib. * Adding single-precision math function support to the vm. * Updating floatsingle.cpp to define a _isnanf macro for Windows ARM.
2016-10-17Fix memcpy undef (#7675)Jan Vorlicek1-2/+0
This change fixes a memcpy #undef in the palinternal.h. It was undefed only for non-debug builds, but it needs to be undefed for debug build as well. The non-debug undef covers the case where memcpy is defined as DUMMY_memcpy, but doesn't cover the debug case where memcpy is defined as PAL_memcpy.
2016-10-14NullReferenceException APIs (#7338)Sven Boemer2-21/+484
* add typeID APIs * add variable home API
2016-10-04Add support for Alpine Linux (#7440)Jan Vorlicek7-32/+80
This change enables build of CoreCLR on Alpine Linux. Here is the list of changes: - Disable asserts checking RSP in arbitrary threads against cached stack limit for the respective thread. The stack on Alpine obviously grows over the limit reported by the pthread functions. - Disable using XSTATE. This should be re-enabled after MUSL gets the _xstate, _fpx_sw_bytes and related data structures added to the signal.h header. - Disable setting rlimit of RLIMIT_NOFILE to the max value, since it breaks debugging for some reason. - Add skipping over the hardware signal trampoline in the PAL_VirtualUnwind. While we were not trying to walk over it in a simple case, in a case where an exception was thrown from a catch handler of a hardware exception, we still attempted to walk over it and it fails on Alpine. - Fix detection of Alpine Linux in the PAL's CMakeLists.txt so that it works in Docker containers too. - Modified PAL_VirtualUnwind to make the check for unwinding past the bottom of the stack unconditional. We had a long list of platforms where we were doing this check and it doesn't hurt to do it on platforms where it is not needed. I have done that rather than adding a check for Alpine Linux as another platform that needs it.
2016-09-30Explicitly specify feature test macro for glibc earlier than 2.19 (#7397)RimashMohomed1-1/+1
2016-09-22Fix Unable to step through Visual Studio remote debugger with coreclr ↵Mike McLaughlin2-0/+92
executables on Nano Server (#7317) Needed to add back a dummy version of ICorDebugLegacyNetCFHostCallbackInvoker_PrivateWindowsPhoneOnly interface so VS doesn't get the QI failure and stop working by not calling the "Continue" method. Issue #7316