summaryrefslogtreecommitdiff
path: root/src/corefx
AgeCommit message (Collapse)AuthorFilesLines
2020-04-16Fix PIE options (#26323)submit/tizen/20200415.223728accepted/tizen/unified/20200416.080052Jan Vorlicek1-2/+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-25Map C Locale to Invariant (#25373)Tarek Mahmoud Sayed1-28/+7
ICU map the C locale to en-US_POSIX which has a non desired collation behavior as it doesn't support case insensitive comparison. This change is to force mapping C locale to Invariant instead.
2019-06-09don't acquire lock if the collator has been already created (#24973)Adam Sitnik2-25/+16
* don't acquire lock if the collator has been already created * use atomic_compare_exchange_strong instead of __sync_bool_compare_and_swap * don't try to workaround clang 5.0 bug, just use __atomic_compare_exchange_n
2019-06-06Use CMake's C# support to build DacTableGen instead of manually invoking ↵Jeremy Koritzinsky1-3/+3
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-05-07Make Idn.GetAscii compatible with Windows (#24443)Tarek Mahmoud Sayed1-0/+3
GetAscii on Windows ignore if the uri has hyphens in the third and fourth places. We relaxing this on Linux too for the sake of the consistent behavior. This issue was causing some problems with the http stack.
2019-05-04Minor tweaks for gcc (#24391)Adeel Mujahid1-7/+7
* Fix a consistency check condition Following error is reported by gcc 8 with debug configuration: > error: enum constant in boolean context [-Werror=int-in-bool-context] * Apply -Wno-register only to CXX flags gcc 8 errors out like this: ``` [ 96%] Building C object src/ilasm/CMakeFiles/ilasm.dir/__/__/version.c.o cc1: error: command line option -Wno-register is valid for C++/ObjC++ but not for C [-Werror] cc1: all warnings being treated as errors src/ilasm/CMakeFiles/ilasm.dir/build.make:254: recipe for target 'src/ilasm/CMakeFiles/ilasm.dir/__/__/version.c.o' failed make[2]: *** [src/ilasm/CMakeFiles/ilasm.dir/__/__/version.c.o] Error 1 CMakeFiles/Makefile2:5710: recipe for target 'src/ilasm/CMakeFiles/ilasm.dir/all' failed make[1]: *** [src/ilasm/CMakeFiles/ilasm.dir/all] Error 2 ``` * Remove extra parantheses from variable declaration gcc 8 reports: > error: unnecessary parentheses in declaration of m_HashedModules [-Werror=parentheses] * Use macro instead of const in C gcc throws: > error: variably modified collatorsPerOption at file scope UCollator* collatorsPerOption[CompareOptionsMask + 1]; * Cast to uintptr_t before (32-bit) DWORD gcc error was: > error: cast from LPCWSTR {aka const char16_t*} to DWORD {aka unsigned int} loses precision [-fpermissive]
2019-04-25[System.Globalization.Native] Fix small issues in CloneCollatorWithOptions ↵Filip Navara1-83/+41
and GetCollatorFromSortHandle (#24100) * Fix allocation size calculation when resizing array Allocate initial array using malloc to avoid needlessly zeroing it Reinstate optimization for empty array returned from GetCustomRules lost in #22378 * Avoid resizing arrays in GetCustomRules by preallocating the maximum size we can consume (5648 bytes) * Avoid creating a binary search tree for something that could be easily stored as 32-entry lookup table * Remove obsolete comment
2019-04-25Null-terminate buffers that strncpy writes to (#24095)Omair Majid1-0/+3
It is possible that the string being copied is so large that strncpy fills up the destination array and does not write any null characters to it. That will lead to buffer overflows. Work around that by always writing a null character at the end of the destination array.
2019-04-19Fix performance regression on glibc on Linux (#24099)Filip Navara1-2/+6
2019-02-20Abstract deprecated and selectany for GCC and remove LLVM'ism where possible ↵Sinan Kaya3-13/+12
(#22662) * Abstract selectany * Fix initializer element is not constant src/corefx/System.Globalization.Native/pal_icushim.c:58:34: error: initializer element is not constant static const int MaxICUVersion = MinICUVersion + 20; * Enable ms extensions * Apply LLVM patterns to GCC * Remove deprecated function * Fix const conversion error src/corefx/System.Globalization.Native/pal_calendarData.c:390:16: warning: passing argument 1 of ‘ures_close_ptr’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] ures_close(erasResBundle); src/corefx/System.Globalization.Native/pal_calendarData.c:419:22: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] char* name = GetCalendarName(calendarId); * Remove old compiler option
2019-02-09Set visibility option to hidden (#21924)Adeel Mujahid1-3/+0
2019-02-05Avoid duplicate tree lookup in GetCollatorFromSortHandle (#22390)Filip Navara1-9/+7
2019-02-03Prefix enums, remove DLLEXPORT from GetResultCodeFilip Navara11-145/+152
Move SortHandle out of public API header, it is opaque structure
2019-02-03Fix inconsistent usage of various bool typesFilip Navara8-258/+249
Convert u_charsToUChars_safe to ICU style error handling Unify error handling code across functions to use the same patterns Add static modifier to functions that are used only from single C file
2019-02-03Update static_assert usage to c_static_assert_msgFilip Navara3-15/+12
2019-02-03Avoid memory allocation in EnumSymbols for small buffersFilip Navara1-15/+20
2019-02-03Fix error handling in GetLocaleIso639LanguageTwoLetterNameFilip Navara1-0/+2
2019-02-03Simplify and fix error handlingFilip Navara2-84/+4
2019-02-03Change NormalizationForm to address feedback.Filip Navara2-8/+8
2019-02-03Fix enum alignmentkasper31-2/+3
2019-02-03Address feedbackkasper31-20/+22
2019-02-03Convert version.cpp to Ckasper31-6/+0
2019-02-03Address feedbackkasper33-70/+54
2019-02-03Convert System.Globalization.Native to Ckasper325-564/+902
2019-02-03Rename fileskasper313-0/+0
2018-11-19Fix Getting Max Japanese Era (#21087)Tarek Mahmoud Sayed1-1/+2
We were using the ICU API ucal_getLimit and askin gto get the maximum value of the Japanese eras. it looks this API is just return the era matching the current system clock which prevent returning any future defined era in the system (which ICU 63.1 can support with some environment variable). We raised the issue to the ICU owners but would be better just to get the era of Gregorian year 9999 which always should return the max era anyway.
2018-09-07Fix ICU load on OpenSUSE Tumbleweed (#19812)Jan Vorlicek1-25/+36
For some reason, OpenSUSE Tumbleweed has decided to prefix the version number in the SO name of the ICU libraries by "suse". That prevents our ICU version detection code from working. This change adds scanning for SO names that contain that prefix too.
2018-04-09Adding dlerr() diagnostics for libicu dlsym errors (#17454)Debayan Ghosh1-1/+1
2018-02-17delete unused mirror files (#16423)Sergey Andreenko1-1/+0
2018-01-15Fix Android build (#15868)Jan Vorlicek1-2/+2
There were the following issues: * The current versions of packages available at the termux site were obsolete. * The libintl.h was removed from the Android SDK, so the dgettext and bindtextdomain are not available. But they were dummy implementations before anyways, so we can remove their usage on Android. * The detection of the ucol_setMaxVariable needs to be done using the check_cxx_symbol_exists instead of check_symbol_exists, since on Android, the ICU libraries now depend on C++ runtime. * The SIZE_T_MAX is already defined in Android headers, so the definition in cgroup.cpp was colliding with it. * The pthread_condattr_setclock detection was using pthread library, but on Android, it is located in the "c" library instead. So it was not being detected.
2017-12-29Remove lib prefix for System.Globalization.Native.a to match all other ↵Jan Kotas1-3/+4
libraries (#15667)
2017-12-22icushim: try using the build-time libicu version (#15562)Tom Deseyn1-62/+61
* icushim: try using the build-time libicu version * Based on ICU packaging doc, use major instead of (major, minor) * Verify we can look-up symbols on the build version * First find Major; add FEATURE_FIXED_ICU_VERSION * Move FindSymbolVersion check in OpenICULibraries * Remove FEATURE_FIXED_ICU_VERSION
2017-12-01Unix: Remove MaxPath, MaxName (#15229)Tom Deseyn1-14/+0
* Unix: Remove MaxPath, MaxName PATH_MAX is not an upper bound on path lengths on Unix. system function return values should be used to determine behavior, instead of limiting the path length. NAME_MAX depends on the file system used. Its value depends on the path, it is not constant for the entire system. * PR feedback * Sync with corefx Interop.ReadLink * Deal with /etc/localtime link containing relative path
2017-08-15Get sort version dynamically and expose ICU version from native component ↵Tarek Mahmoud Sayed3-6/+33
(#13382) * Support ICU Version * Add the assert
2017-05-02Added missing icu headers for Android (#11325)Cyd Haselton1-0/+2
urename.h and ustring.h contain the u_stncpy and its definition. If they are not in the list of icushim.h headers, Android build fails.
2017-03-25Enable global invariant on OSX (#10470)Tarek Mahmoud Sayed3-45/+59
* Enable Globalization Invariant on OSX * Fix typo * Fix small typo * Remove static link to ICU lib * Addressing the feedback
2017-03-19Invariant globalization (#10264)Tarek Mahmoud Sayed1-7/+9
* Invariant Globalization Work * Convert the testing Exceptions to asserts * Remove un-needed comment * Fix typos * Fix unrelated typo * Address the PR feedback * More feedback addressing * More feedback addressing * Fix Linux break * More feedback addressing * cleanup
2017-03-07Enhance ICU version scan (#9993)Jan Vorlicek1-3/+21
The scanning that tries to find locally installed ICU version was not considering the case when only ICU library files with major version component were present (like libicuuc.so.52). This is a rare case that I've seen so far only when people built and installed ICU manually. But it is worth to add checks for such case as a fallback, which is what this change does. I have also added checks for minorVersion and subVersion being -1 when trying to detect the symbol versioning used. While the pre-existing code would still work fine, it would unnecessarily try nonsensical version.
2017-03-07Fix ICU detection in System.Globalization.Native build (#9990)Jan Vorlicek1-4/+2
The config.cmake was not getting the ICU library paths it requires to build a code that detects presence of the ucol_setMaxVariable. I have excluded the libraries detection from the CMakeLists.txt some time ago since they are not used in the build itself anymore, but I have not realized that they are needed for this detection script that's included from the CMakeLists.txt.
2017-02-24typo in CMakeLists.txt (#9763)John Gorter1-1/+1
2017-02-14Add case-insensitive String.Replace overloads (#9316)Erti-Chris Eelmaa1-1/+9
Added overloads for String.Replace so that they now accept StringComparison and CultureInfo as input parameters.
2017-01-10Add Microsoft.NETCore.Native package (2nd attempt) (#8882)Sedar Gokbulut1-0/+16
* Adding Microsoft.NETCore.Native package (#8791) * "Adding Microsoft.NETCore.Native package" * Adding generic linux configuration to Microsoft.NETCore.Native package * Fixing the OSX pkgproj of Microsoft.NETCore.Native to include S.Globalization.Native.dylib and not .so * Fixing the osx release build.
2017-01-06Use POSIX "command" instead of non-standard "which" (#8823)Jürgen Hötzel1-4/+4
GNU which might not be installed on a minimal GNU/Linux installation. Refs #6994 and #7025.
2017-01-05Revert "Adding Microsoft.NETCore.Native package (#8791)"Sedar Gokbulut1-16/+0
This reverts commit eea7b4691c0a489435814e48a257a9d047475006.
2017-01-04Adding Microsoft.NETCore.Native package (#8791)Sedar Gokbulut1-0/+16
* "Adding Microsoft.NETCore.Native package" * Adding generic linux configuration to Microsoft.NETCore.Native package * Fixing the OSX pkgproj of Microsoft.NETCore.Native to include S.Globalization.Native.dylib and not .so
2016-11-29Fix shared library dependencies verification on some platforms (#8349)Jan Vorlicek1-0/+6
The existing way of verifying shared library dependencies, used for System.Globalization.Native.so, doesn't work on platforms that don't have ldd or where ldd doesn't support the `-r` option. This change makes the check happen on non-Alpine Linux only for now. It also refactors the way the check is performed. Instead of doing it post build in the build.sh, it is now performed as a postbuild phase of the System.Globalization.Native target and it is also generalized so that we can easily add such verification to other build targets. The new verify-so.sh script is also used in corefx.
2016-11-08Avoid failures when allocate memory in native (#8028)Tarek Mahmoud Sayed2-8/+22
* Avoid failures when allocate memory in native using new in the native side can throw and the app will shutdown. instead we detect the failure and throw a managed exception * Use same mechanism we return the error code from GetSortHandle * Add assert * Dispose the safeHandle
2016-11-01Enable the rest of netstandard1.7 globalization APIs (#7935)Tarek Mahmoud Sayed1-0/+6
* Enable more netstandard 1.7 Globalization APIs * Enable Windows support for the new APIs * Fix spaces and line alignments
2016-10-27Add the missing ICU APIs to the ICU shim (#7840)Tarek Mahmoud Sayed1-0/+6
there was a change done by the PR #7773 which removed the dependency on ICU version. and there is another PR #7811 which used more ICU APIs not listed in the shim. the change here is to add these APIs to the shim
2016-10-26Enable CultureInfo netstandard 1.7 APIs on Linux (#7811)Tarek Mahmoud Sayed2-5/+76
* Enable CultureInfo netstandard 1.7 APIs on Linux * fix spaces * Use Array.Empty<CultureInfo> instead of CultureInfo[0]