Age | Commit message (Collapse) | Author | Files | Lines |
|
* 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
|
|
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.
|
|
* 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
|
|
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
|
|
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.
|
|
* 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]
|
|
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
|
|
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.
|
|
|
|
(#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
|
|
|
|
|
|
Move SortHandle out of public API header, it is opaque structure
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
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.
|
|
|
|
|
|
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.
|
|
libraries (#15667)
|
|
* 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
|
|
* 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
|
|
(#13382)
* Support ICU Version
* Add the assert
|
|
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.
|
|
* Enable Globalization Invariant on OSX
* Fix typo
* Fix small typo
* Remove static link to ICU lib
* Addressing the feedback
|
|
* 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
|
|
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.
|
|
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.
|
|
|
|
Added overloads for String.Replace so that they now accept
StringComparison and CultureInfo as input parameters.
|
|
* 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.
|
|
GNU which might not be installed on a minimal GNU/Linux installation.
Refs #6994 and #7025.
|
|
This reverts commit eea7b4691c0a489435814e48a257a9d047475006.
|
|
* "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
|
|
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.
|
|
* 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
|
|
* Enable more netstandard 1.7 Globalization APIs
* Enable Windows support for the new APIs
* Fix spaces and line alignments
|
|
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
|
|
* Enable CultureInfo netstandard 1.7 APIs on Linux
* fix spaces
* Use Array.Empty<CultureInfo> instead of CultureInfo[0]
|