summaryrefslogtreecommitdiff
path: root/src/pal/tests
AgeCommit message (Collapse)AuthorFilesLines
2020-04-16Fix PIE options (#26323)submit/tizen/20200415.223728accepted/tizen/unified/20200416.080052Jan Vorlicek1-1/+0
* Fix PIE options We were missing passing the -pie linker option. That means that while we were compiling our code as position independent, the executables (not shared libraries) were not marked as position independent and ASLR was not applied to them. They were always loaded to fixed addresses. This change adds the missing -pie option and also replaces all the individual settings of -fPIE / -fPIC on the targets we build by a centralized setting of CMAKE_POSITION_INDEPENDENT_CODE variable that causes cmake to add the appropriate compiler options everywhere. * Fix native parts of coreclr tests build The native parts of the tests are not built using the root CMakeLists.txt so I am moving enabling the position independent code to configurecompiler.cmake Change-Id: Ieafff8984ec23e5fdb00fb0c2fb017e53afbce88
2019-06-06Use CMake's C# support to build DacTableGen instead of manually invoking ↵Jeremy Koritzinsky2-12/+12
csc.exe ourselves. (#24342) * Use CMake's C# support to build DacTableGen instead of manually invoking csc.exe ourselves. * Fix x86 failures. * Disable DAC generation when building with NMake Makefiles and issue an error since the CMake C# support is VS-only. We don't actually support building with NMake (only configure) so this is ok. * Clean up rest of the macro=1's PR Feedback. * Fix Visual Studio generator matching. * Explicitly specify anycpu32bitpreferred for DacTableGen so the ARM64 build doesn't accidentally make it 64-bit * Fix bad merge
2019-06-05Use Modern CMake features instead of CMAKE_CXX_FLAGS (#24861)Jeremy Koritzinsky2-3/+3
* Convert C++ standard settings and warning options from CMAKE_<LANG>_FLAGS to Modern CMake isms. * More $<COMPILE_LANGUAGE> generator expressions instead of CMAKE_CXX_FLAGS. * Use $<COMPILE_LANGUAGE:CXX> for all -fpermissive usage * Fix generator expression that generates multiple flags * Fix invalid use of CMAKE_CXX_FLAGS instead of CMAKE_C_FLAGS. * Treat AppleClang as though it is Clang (match pre-3.0 behavior). * Update our build system to understand that AppleClang is distinct from Clang and remove CMP0025 policy setting. * PR Feedback.
2019-05-23Re-enable queryperformancecounter PAL test (#11291)Jan Vorlicek2-1/+1
The test seems to work in the lab again, so the failures seem to be related to the version of OSX we were using in the past when the test started to fail.
2019-05-16Delete iswxdigit test (#24608)Michal Strehovský5-97/+0
2019-05-10Move EventProvider native layout to be driven by CMake configure (#24478)Jeremy Koritzinsky2-1/+42
* Generate eventpipe implementation as part of CMake configure. * Generate Etw provider as part of CMake configure. * First pass porting over lttng provider to cmake. * Fix up CMake Lttng provider generation. * Move Lttng provider into CMake tree. * Move dummy event provider to CMake * Move genEventing into the CMake tree. * Remove extraneous logging and unused python locator. * Clean up build.sh * Clean up genEventingTests.py * Add dependencies to enable more incremental builds (providers not fully incremental). * Convert to custom command and targets instead of at configure time. * Get each eventing target to incrementally build. * Fix incremental builds * Add missing dependencies on eventing headers. * PR Feedback. Mark all generated files as generated * Clean up eventprovider test CMakeLists
2019-05-01Adjust some terms (#24351)Dan Moseley4-4/+4
2019-02-17Delete RtlMoveMemory and tests (#22668)Adeel Mujahid15-416/+0
2019-02-16Fix visibility and signed comparison issues for GCC (#22586)Adeel Mujahid2-5/+4
* Fix visibility and signed comparison issues for GCC * Fix hidden _CLRDataCreateInstance warned by macOS * Fix indentation in vswprintf/test1 * Change void* to PVOID in implementation files
2019-02-09Set visibility option to hidden (#21924)Adeel Mujahid3-5/+13
2019-02-07More PAL layer cleanup for GNU and add build script support for GCC (#22369)Sinan Kaya18-35/+46
* Declare throw only when compiling for c++ Prevent the definition from getting defined multiple times and map it to throw() only when compiling c++ code. * Suppress warnings for tests Suppress: -Wno-write-strings -Wno-sign-compare -Wno-narrowing -fpermissive -Wno-int-to-pointer-cast to allow tests to compile * Add gcc option to build.sh script Following clangx.y model add -gccx.y command line arguments with gcc5 and gcc7 being the currnetly supported options. * Allow environment variable to be used for TOOLCHAIN Remove CLANG specific compiler options as well. * Hide non-GNU compiler options * Do not include local directory if cross compiling [ 0%] Building CXX object src/pal/src/eventprovider/tracepointprovider/CMakeFiles/coreclrtraceptprovider.dir/__/lttng/traceptprovdotnetruntime.cpp.o cc1plus: error: include location "/usr/local/include" is unsafe for cross-compilation [-Werror=poison-system-directories] * Suppress unknown pragma warnings src/pal/src/exception/seh-unwind.cpp:37:0: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas] #pragma clang diagnostic pop Removing these cause compilation error on clang7 and arm as follows: In file included from /bin/obj/Linux.arm.Debug/src/pal/src/libunwind/include/libunwind.h:9: /src/pal/src/libunwind/include/libunwind-arm.h:247:9: error: empty struct has size 0 in C, size 1 in C++ [-Werror,-Wextern-c-compat] typedef struct unw_tdep_save_loc ^ /src/pal/src/libunwind/include/libunwind-arm.h:288:9: error: empty struct has size 0 in C, size 1 in C++ [-Werror,-Wextern-c-compat] typedef struct * plt not useful for GNU and ARM64/ARM src/pal/src/arch/arm64/callsignalhandlerwrapper.S: Assembler messages: src/pal/src/arch/arm64/callsignalhandlerwrapper.S:31: Error: unexpected characters following instruction at operand 1 -- `bl signal_handler_worker@plt' src/pal/src/arch/arm64/callsignalhandlerwrapper.S:32: Error: unexpected characters following instruction at operand 1 -- `bl signal_handler_worker@plt' * Remove double const from argv in PAL_Initialize Seeing compilation error with GNU for C source files as follows: if (PAL_Initialize(argc, argv) != 0) ^ src/pal/tests/palsuite/common/palsuite.h:21:0, from src/pal/tests/palsuite/c_runtime/asinhf/test1/test1.c:18: src/pal/inc/pal.h:374:1: note: expected ‘const char * const*’ but argument is of type ‘char **’ * Suppress format warnings using GNU for libunwind warning: format ‘%li’ expects argument of type ‘long int’, but argument 3 has type ‘int’ [-Wformat=] Debug (4, " aligned frame, offset %li\n", f->cfa_reg_offset); * Fix -fpermissive warnings for GNU * Suppress unused variable warning in libunwind src/pal/src/libunwind/include/libunwind-aarch64.h:201:5: warning: right-hand operand of comma expression has no effect [-Wunused-value] #define unw_tdep_getcontext(uc) (({ \ ~~~~~~~~~ unw_tdep_context_t *unw_ctx = (uc); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ register uint64_t *unw_base asm ("x0") = (uint64_t*) unw_ctx->uc_mcontext.regs; \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __asm__ __volatile__ ( \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "stp x0, x1, [%[base], #0]\n" \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "stp x2, x3, [%[base], #16]\n" \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "stp x4, x5, [%[base], #32]\n" \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "stp x6, x7, [%[base], #48]\n" \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "stp x8, x9, [%[base], #64]\n" \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "stp x10, x11, [%[base], #80]\n" \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "stp x12, x13, [%[base], #96]\n" \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "stp x14, x13, [%[base], #112]\n" \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "stp x16, x17, [%[base], #128]\n" \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "stp x18, x19, [%[base], #144]\n" \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "stp x20, x21, [%[base], #160]\n" \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "stp x22, x23, [%[base], #176]\n" \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "stp x24, x25, [%[base], #192]\n" \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "stp x26, x27, [%[base], #208]\n" \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "stp x28, x29, [%[base], #224]\n" \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "str x30, [%[base], #240]\n" \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "mov x1, sp\n" \ ~~~~~~~~~~~~~~~~ "stp x1, x30, [%[base], #248]\n" \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ : [base] "+r" (unw_base) : : "x1", "memory"); \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ }), 0) * Fix warning: ‘memset’ used with length equal to number of elements warning Fix similar warnings to these by including the element size into total size calculation. src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test1/test.cpp: In function ‘int main(int, char**)’: src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test1/test.cpp:89:31: warning: ‘memset’ used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size] memset(NewValue,0,BUF_SIZE); * Define CLR specific compiler option CLR_CMAKE_COMPILER By the time toolchain.cmake is called, the compiler detection from cmake is not active. We need an intermediate definition to pass to compiler detection.
2019-02-01Coreclr gnuport (#22129)Sinan Kaya2-2/+2
* Abstract away NOINLINE statement MSVC and GNU compilers use different attributes for noinline. Abstract away compiler differences. * Replace __sync_swap with __atomic_exchange_n __sync_swap doesn't exist on GNU. Replacing with __atomic_exchange_n which is universally available. * Define CDECL for GNUC __cdecl is not defined by default on GNU compilers. * Define gcc version of __declspec(thread) * Correct pointer casting A pointer value is usually unsigned long on most platforms. Casting it to integer causes signedness issues. Use size_t to be efficient on all 32 and 64 bit architectures. * Put quotes around the error string Correct error statement. GNU G++ is picky about the string following the error statement with ' character in it. It needs to be enclosed with double quotes. * Fix casting problem Seeing these warnings with GNU G++ compiler src/pal/src/sync/cs.cpp: In function ‘void CorUnix::InternalInitializeCriticalSectionAndSpinCount(PCRITICAL_SECTION, DWORD, bool)’: src/pal/src/sync/cs.cpp:630:48: warning: converting to non-pointer type ‘SIZE_T {aka long unsigned int}’ from NULL [-Wconversion-null] pPalCriticalSection->OwningThread = NULL; ^ src/pal/src/sync/cs.cpp: In function ‘void CorUnix::InternalLeaveCriticalSection(CorUnix::CPalThread*, _CRITICAL_SECTION*)’: src/pal/src/sync/cs.cpp:880:43: warning: converting to non-pointer type ‘SIZE_T {aka long unsigned int}’ from NULL [-Wconversion-null] pPalCriticalSection->OwningThread = NULL; ^ * Abstract optnone compiler attribute GNU compiler doesn't support optnone attribute. pal/src/exception/seh-unwind.cpp:449:77: warning: ‘optnone’ attribute directive ignored [-Wattributes] * Set the aligned attribute for GNU compiler * Make __rotl and __rotr functions portable GNU compiler doesn't have an intrinsic for these. Open code them using the provided implementation. * Define deprecated attribute for gcc * Add throw specifier for GCC /usr/include/string.h:43:28: error: declaration of ‘void* memcpy(void*, const void*, size_t) throw ()’ has a different exception specifier size_t __n) __THROW __nonnull ((1, 2));
2019-01-02Delete lstrlen from Unix PAL (#21745)Jan Kotas12-1072/+1
strlen/wcslen works just fine.
2018-12-18Update named mutex PAL tests to include case of file locks being inherited ↵Koundinya Veluri1-0/+72
by child process (#21496) Included case fixed by https://github.com/dotnet/coreclr/pull/21458. Fixes https://github.com/dotnet/coreclr/issues/21494.
2018-11-22Typos (#21171)John Doe1-1/+1
* accesible -> accessible * acheive -> achieve * actutl -> actual * appied -> applied * apropriate -> appropriate * aprox -> approx * aquired -> acquired * argumemts -> arguments * Argumens -> Arguments * argumetn -> argument
2018-11-12Some cleanup of the Math functions from #20788 (#20912)Tanner Gooding10-52/+66
* Fixing Max, MaxMagnitude, Min, and MinMagnitude for Math/MathF to be IEEE compliant * Disabling the System.Math.Max/Min tests * Adding the new c_runtime PAL tests to the CMakeLists to ensure they actually get run. * Fixing the casing of IlogB to ILogB * Fixing the new PAL tests to match the correct/expected outputs * Fixing up PAL_ilogb to correctly handle 0 and NaN
2018-11-05Adding some new functions to System.Math and System.MathF (#20788)Tanner Gooding32-0/+1355
* Adding BitIncrement, BitDecrement, CopySign, MaxMagnitude, and MinMagnitude to Math and MathF * Adding FusedMultiplyAdd, IlogB, Log2, and ScaleB to Math and MathF * Adding some basic PAL tests for fma, ilogb, log2, and scalbn * Fixing a couple typos and adding clarifying comments * Fixing the MSVC _VVV FCALL declarations
2018-10-08Remove mentions of Rotor from codebase (#20298)Austin Wise2-36/+4
* Moving parsing from TypeNameParser ctor to a separate method. It seems a bit odd to have the constructor parsing and then use a dummy method (MakeRotorHappy) to make it look more normal. * Remove CorMarkThreadInThreadPool. It is neither referenced nor exported. * Remove reference to rotor from securitywrapper.h * Remove reference to rotor from Strike/vm.cpp. This file is only built for Windows. * Remove reference to rotor from debugreturn.h This is the only file the defines these macros, so there is no need to undef them first. * Remove unused code refering to rotor from PAL. * Remove references to Rotor from PAL. * Remove references to deleted tests from DisabledTests.txt I can't find any evidence that this file is actually used. * Remove unneeded casts. * Remove dead and misleading code from profilinghelper.cpp. FEATURE_PROFAPI_EVENT_LOGGING is always defined when PROFILING_SUPPORTED is defined. And the entire contents of profilinghelper.cpp is surrounded with "ifdef PROFILING_SUPPORTED". So all sections in "ifndef FEATURE_PROFAPI_EVENT_LOGGING" are dead. Furthermore, in coreclr this does not use the eventlog, so the macro name is misleading. * Remove dead code in excep.cpp. This entire function is surrounded with "ifndef FEATURE_PAL". * Remove refererences to rotor from safemath.h This does not appear to cause any compile problems, so nobody was using safemath.h without _ASSERTE defined. Also S_SIZE_T_WP64BUG is not used anywhere. * Remove dead code from palclr.h. I don't know why these check to see if the macro is undefined immediately after defining them. Also the comment appears to reference some unions that are no longer in this file. * Expose ISymUnmanagedWriter2 from SymWriter as required by COM. The comment talks about the C# compiler using this, however I cannot see a way for the C# compiler to get an instance of this. It is only used internally by AssemblyBuilder and not exposed otherwise. * Restore check for _ASSERTE in safemath.h. On Windows sometimes that this file is included without _ASSERTE being defined. As the existing comment suggests, it appears that SOS explicitly does not want _ASSERTE to do anything.
2018-10-04Typos (#20271)John Doe1-1/+1
* oportunistically -> opportunistically * oppportunity -> opportunity * Oppporunity -> Opportunity * optinal -> optional * optimisitic -> optimistic * optionaly -> optionally * origianl -> original * orignally -> originally * otheriwse -> otherwise * otherrwise -> otherwise
2018-08-14Code review feedback for the alternate stack changes (PR #19309). (#19476)Mike McLaughlin2-2/+2
Fixed SOS plugin for core dumps.
2018-08-06Only register signals and create alt exception stack in coreclr. (#19309)Mike McLaughlin2-0/+2
There was a couple of places where the DAC (IsValidObject, GetAppDomainForObject) assumed that a NULL target/debuggee address would throw an exception that would be caught by try/catch. Any other invalid address is handled with a software exception throwed by the read memory functions. In general it is a better overall design not to have any of the DBI/DAC, etc. code depend on hardware exceptions being caught. On Linux the C++ runtime sometimes can't handle it. There is a slight risk that there are other places in the DAC that make the NULL address assumption but testing so far has found any. Added PAL_SetInitializeDLLFlags as a fallback to allow the PAL_InitializeDLL flags to be set for a PAL instance for the DAC where we could still register h/w signals but not the altstack switching to reduce this risk. The flags can't be build time conditional because we only build one coreclrpal.a library that all the modules used. Having a PAL_InitializeFlags function doesn't really help either because of the PAL_RegisterModule call to PAL_IntializeDLL and the LoadLibrary dance/protocol that uses it to call the loading module's DLLMain. Add PAL_SetInitializeFlags; remove flags from PAL_INITIALIZE and PAL_INITIALIZE_DLL default. Add PAL_InitializeFlags() to allowing the default to be overriden.
2018-06-03Typo (#18266)John Doe1-2/+2
* addres -> address * depedant -> dependent * gaurantee -> guarantee * gaurantees -> guarantees * lable -> label * lazieness -> laziness * lcoation -> location * enquing -> enqueuing * enregsitered -> enregistered * ensurin -> ensuring
2018-05-24Typo (#18122)John Doe1-1/+1
* acquringing -> acquiring * Activ -> Active * activley -> actively * acutal -> actual * bIncomingIPAdddefed -> bIncomingIPAddRefed * adddr -> addr * readding -> reading * Addfunction -> AddFunction * additionnal -> additional * Additonal -> Additional * Additonally -> Additionally * Addresss -> Address * addtion -> addition * aded -> added * aditional -> additional * adjustements -> adjustments * Adress -> Address * afer -> after * aformentioned -> aforementioned * afte -> after * agains -> against * agaisnt -> against * aggresively -> aggressively * aggreates -> aggregates * aggregious -> egregious * aginst -> against * agregates -> aggregates * Agressive -> Aggressive * ahve -> have * ajdust -> adjust * ajust -> adjust * alement -> element * algoritm -> algorithm * alighnment -> alignment * alignmant -> alignment * constraits -> constraints * Allcator -> Allocator * alllocate -> allocate * alloacted -> allocated * allocatate -> allocate * allocatoror -> allocator * alloctaed -> allocated * alloction -> allocation * alloted -> allotted * allt he -> all the * alltogether -> altogether * alocate -> allocate * alocated -> allocated * Alocates -> Allocates * alogrithm -> algorithm * aloocate -> allocate * alot -> a lot * alwasy -> always * alwyas -> always * alwys -> always
2018-03-29Fix for incorrectly handle invalid UTF8 characters issue (#17302)Luqun Lou1-26/+26
There are some behavior difference between C/C++ UTF8 encoder/decoder and Encoding.UTF8 as mentioned by #16786.
2018-03-19Delete unused downlevel globalization support (#17022)Jan Kotas8-197/+0
Delete ENABLE_DOWNLEVEL_FOR_NLS and everything under it
2018-03-15Fix error type check in InternalSetThreadPriority (#16959)Jan Vorlicek1-2/+31
The pthread_setschedparam returns error code as a return value and not in the errno as the existing code supposes. I have found it when a test in the lab has failed to set the priority and asserted in this code, but reported errno as 0. Also fix the flaky DuplicateHandle test7 that was failing rarely due to the fact that the secondary thread it has created didn't wait until the main thread finished fiddling with the priority of that thread.
2018-02-14Implement WaitHandle.SignalAndWait on Unix (#16383)Koundinya Veluri3-0/+432
Part of fix for https://github.com/dotnet/coreclr/issues/10441
2018-01-02Retry: Enable EventPipe across Unix and Windows (#15611)Victor "Nate" Graf1-1/+4
* Revert "Revert "Enable EventPipe across Unix and Windows (#14772)" (#15609)" This reverts commit 302005ca8ae14eade37ddf4ac6e900617c1c166a. * Fix ARM build break * Use more explicit references to resolve build failures * Fix compat with python3 * Disable FeaturePerfTracing on Windows as it is not ready * Disable test for incomplete functionality * Fix test diabled patterns * Add license header * Use keyword types for managed code * Add message prefix * More precisly condition generation of eventing sources * Remove erroneously added changes
2017-12-21Revert "Enable EventPipe across Unix and Windows (#14772)" (#15609)Victor "Nate" Graf1-4/+1
This reverts commit 7524d72d4f0f634fe5407280b83c25181dc8c556.
2017-12-20Enable EventPipe across Unix and Windows (#14772)Victor "Nate" Graf1-1/+4
* [squashed] most work complete to enable EventPipe on Windows * Eventpipe now builds on Windows * Ensure evevntpipe is intialized on Windows * Resolve the location of python from build.cmd * Ensure eventing files are generated when needed * moving linkage declaration to cmake * create new event from constructor * enable FEATURE_EVENT_TRACE and FEATURE_PERF_TRACE everywhere * [WIP] checkpoint in fixing contarct errors * add another possible python location * Fix double delete bug in EventPipeConfiguration destructor * Fix typo in function name * Revert changes to .gitgnore * bump to netstandard1.6 in preperation for new version of TraceEvent * Revert changes to groovy files * revert changes to perf-prep scripts * add common.h and use nothrow * Fix issue which was causing double delete of configprovider * Add new test utilizing TraceEvent * Remove accidentally added local directory reference * Add comment to explain the addition of misc/tracepointprovider.cpp * Add back sys.exit(0) and refactor * Change conditional to be more direct * Better handle NULL config * Initialize m_deleteDefered * Eliminate obsolete field * Fix spelling error * Fix nits * Make smaple progiler timing functions easier to read * Move projects back to netstandard1.4 * Incomplete improvements to EventPipeTrace test * Add event integrity checks to test * Clean up some left over code * Add EventSource based test * Remove unused PAL tests on Windows * Fix Linux build breaks * Minor changes to CMake files * Remove //HACK for hack that was previously removed * Fix formatting and negate a #ifdef * Add conditional to ensure PERFTRACING is not enabled without EVENT_TRACE * Take lock on EventPipeProvider and EventPipeConfiguration destruction * Load winmm.dll at runtime * Change function name and compile conditions * Move typedef into #ifndef * Use the correct config in setup * Change lifecycle managment of EventPipeConfiguration's configuration provider * Enable EventPipe tests pri0 and disable broken tests * Replace python3 only error with python2 compatable one * Make common.csproj build pri0 * Change TraceEvent version to 2.0.2 to match published verison * Address cross build failure * Remove use of undefined variable * Add crossgen fix to .cmd * Use more specific types to avoid marshalling errors * Use Assert-style statements and remove one check * Fix cross arch build * Fix flipped branch * Bring build.cmd changes to build.sh * Fix cmake writing * Revert "Bring build.cmd changes to build.sh" This reverts commit 893c6492548d8bc9859ebba5b1b810aa630fac63. * remove stdlib.h * Fix out of order null check
2017-12-13Adding some PAL tests for acosh, asinh, atanh, and cbrtTanner Gooding35-0/+1354
2017-09-12Re-implemented the ecvt function. (#12894)Jim Ma7-173/+0
* Re-implemented the ecvt function. Instead of leveraging snprintf, re-implement the ecvt function according to the paper: https://www.cs.indiana.edu/~dyb/pubs/FP-Printing-PLDI96.pdf Note: 1. This commit won't fix any existing bug. 2. This is a raw implementation of the paper. The performance on Linux only gain 10%. We could tune the performance further. Fix #10651 * Resolve a cross platform header file issue. Fix #10651 * Fixed a minor bug. Improved the performance. Fix #10651 * Modified code according to code review feedback. This commit fixed most of the issue found in code review. However, some of the feedback may not be involved due to either little performance improvement or need a POC. Fix #10651 * Try to fix constexpr compile error on Windows. Fix #10651 * Fixed a potential overflow bug in BigNum::Compare. Fix #10651 * Improved multiply 10 operation. Use shift and add operation to replace actual multiply operation. Fix #10651 * Remove old _ecvt function. Fix #10651 * Documented the reason why we do not need m+ and m-. Fix #10651 * Changed exp > 0 to exp != 0 to remove any confusion. exp should fall in 1 ~ 2046 for normalized value. Denormalized value has exp = 0. Fix #10651 * Disable the _ecvt tests. Fix #10651 * Removed _ecvt tests. Fix #10651 * Re-implemented LogBase2. Fix #10651 * Use DWORD and DWORD64 for _BitScanReverse and _BitScanReverse64 Fix #10651 * Fixed x86 compile issue for _BitScanReverse64 x86 does not support _BitScanReverse64 so we have to add additional shift operations to handle it. Fix #10651 * Implemented BitScanReverse64 and BitScanReverse in pal.h Fix #10651 * Remove the confusion comment which is unrelated to BitScanReverse. Fix #10651 * Introduced wmemset to enhance the perf for 0.0 Fix #10651 * Improved the performance of converting 0.0. Fix #10651 * Renamed ecvt to DoubleToNumberWorker. Fix #10651 * Updated code according to the code review feedback. Fix #10651
2017-08-28Delete dead PAL functions (#13613)Justin Van Patten131-7568/+3
* Remove duplicate define * Remove unused wincon.h defines * Delete unused LockFile/UnlockFile * Remove unused WszCryptGetDefaultProvider define * Remove unused defines * Remove unused defines * Delete unused GetDiskFreeSpace * Delete unused RegisterEventSource\DeregisterEventSource\ReportEvent * Remove unused defines * Delete unused AreFileApisANSI * Delete unused MoveFileW * Delete unused SetFileTime * Delete unused GetFileTime * Delete unused FileTimeToDosDateTime * Delete unused GetFileType * Delete unused GetConsoleCP * Delete unused GetExitCodeThread * Delete unused FlushViewOfFile * Delete unused RtlZeroMemory * Delete unused MoveFileA
2017-08-22Delete some dead PAL code (#13469)Justin Van Patten11-177/+0
* Delete some dead PAL code GetComputerName and GetUserName are not used. * HAVE_GETPWUID_R can now be deleted
2017-08-21Fixing wcsstr function to account for cases where search string is longer ↵Mike Kaufman1-0/+10
than remaining target string. (#13504)
2017-06-12[Arm64/Unix] Add 64K page support (#10981)Steve MacLean2-14/+11
* [Arm64/Unix] Support 64K pages * GC move GCToOSInterface::Initialize() into InitializeGarbageCollector()
2017-05-04Reenable MapViewOfFile PAL test1 (#11393)Jan Vorlicek2-4/+23
This change reenables the test that was having problems on systems when the /tmp is created on tmpfs file system which doesn't support direct access (unbuffered). The fix is to explicitly use /var/tmp instead (and /data/local/tmp/ on Android).
2017-04-07Add reporting swap file size to GlobalMemoryStatusEx on Unix (#10700)Jan Vorlicek7-0/+93
The swap file size reporting is added using the Linux, OSX and FreeBSD means. Also a new PAL test was added to exercise the function.
2017-03-311. Remove disable of C4996Rahul Kumar9-247/+0
2. delete some dead code 3. Remove implementation of GetOSVersion and hardcode OS version to be 0.0.0 4. Add implementation of IsWindows8OrAbove & IsWinrtSupported (donno why this was deleted earlier) 5. remove GetVersionEx from PAL
2017-03-23Merge pull request #10064 from rahku/cgroupRahul Kumar5-0/+87
memory limit in containers on linux
2017-03-22memory limit in containers on linuxrahul5-0/+87
2017-03-22Removing the special handling in classlibnative for atan2(±∞, ±∞) and ↵Tanner Gooding2-13/+13
pow(-1.0, ±∞). (#10295) * Removing the special handling in classlibnative for atan2(±∞, ±∞) and pow(-1.0, ±∞). * Fixing up the logic for HAVE_COMPATIBLE_POW in the PAL layer.
2017-03-21Temporarily disable frequently failing Sleep PAL tests (#10313)Koundinya Veluri2-2/+2
See #8321
2017-03-15Temporarily disable flaky sleep test (#10221)Matt Mitchell2-1/+1
2017-03-15Change CoreCLR to use Sierra (#10173)Matt Mitchell2-1/+1
* Switch to full 10.12 * Disable query performance counter test
2017-03-07[x86/Linux] CDECL as default P/Invoke Calling Convetion (#9977)Jonghyun Park13-24/+27
* [x86/Linux] CDECL as default P/Invoke Calling Convetion
2017-03-02[x86/Linux] Fix clang 3.9 build error (#9900)Jonghyun Park2-6/+4
2017-02-06Android - Fix duplicate definitions of INT_MIN and PAGE_SIZE in unit tests ↵Frederik Carlier1-0/+1
(#9172) * Don't refdefine PAGE_SIZE on Android * Don't re-declare INT_MIN on Android * Fixup
2017-01-31Support cross-building CoreCLR for arm64 Android (#9173)Frederik Carlier1-4/+8
* Support cross-building CoreCLR for arm64 Android * Link gcc_s before libunwind
2017-01-27PAL Tests: Centralize common code (#9151)Frederik Carlier988-3035/+1018
Create a single COMMON_TEST_LIBRARIES variable which contains all libraries with which the tests link.