summaryrefslogtreecommitdiff
path: root/src/md
AgeCommit message (Collapse)AuthorFilesLines
2020-04-16Fix PIE options (#26323)submit/tizen/20200415.223728accepted/tizen/unified/20200416.080052Jan Vorlicek7-28/+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-07Reduce indirect function calls (#24980)David Wrighton5-94/+83
* Reduce indirect dispatch in hot paths in metadata * Remove allocation indirections in utilcode for coreclr - we no longer have a multi-dll distribution of code that needs to share heaps * Remove unused code in GetCLRFunction * Remove virtual dispatch around impl/decl methodtable access in MethodData
2019-05-22Delete FEATURE_WINDOWSPHONE (#24718)Jan Kotas3-46/+3
2019-05-20Cuckoo metadata (#24498)David Wrighton2-0/+8
* Basic infra for cuckoo filter of attributes - Implement cuckoo filter lookup logic - Implement new ready to run section - Add dumper to R2RDump - Parse section on load into data structure - Implement function to query filter - Add concept of enum of well known attributes - So that attribute name hashes themselves may be cached * Wrap all even vaguely perf critical uses of attribute by name parsing with use of R2R data * Update emmintrin.h in the PAL header to contain the needed SSE2 intrinsics for the feature - Disable the presence table for non Corelib cases. Current performance data does not warrant the size increase in other generated binaries
2019-05-04Minor tweaks for gcc (#24391)Adeel Mujahid2-2/+2
* 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-05-01Adjust some terms (#24351)Dan Moseley1-1/+1
2019-04-18Move R2R-specific code to be outside FEATURE_PREJIT (#24075)Jan Kotas1-1/+1
This refactoring is preparation for disabling fragile NGen support in the runtime. It keeps fragile-NGen specific code under FEATURE_PREJIT and moves the code required to support R2R to be outside FEATURE_PREJIT. The eventual goal is to compile the runtime without FEATURE_PREJIT defined to avoid fragile-NGen specific overhead.
2019-04-15Use NewArrayHolder for array types (#24017)Omair Majid1-1/+1
This touches all the code outside of src/debug/. Using a NewHolder with array types means that when the holder is ready to release the memory, it ends up invoking `delete` (instead of `delete[]`) on that array. This is an undefined behaviour. Use NewArrayHolder instead to fix this.
2019-03-07Cleanup unused hosting interfaces (#23091)Jan Kotas1-2/+0
2019-02-22More GNUC Fixes (#22687)Sinan Kaya1-1/+1
* Replace __sync_swap with __atomic_exchange_n __sync_swap() is a clang specific function. * Remove multiline comment * Add paranthesis around sum src/md/hotdata/../inc/streamutil.h:73:34: warning: suggest parentheses around ‘+’ in operand of ‘&’ [-Wparentheses] UINT32 aligned = *totalBytes + 3 & ~3; * Define __int64 * Define windows types for tests * Remove undefined has_builtin defines and define alloca and inline for GNUC * Remove __clang__ where possible * Add implicit casting to help compiler find WCHAR* variant src/binder/assembly.cpp:294:73: error: no matching function for call to ‘SString::SString(SString)’ return (pAsmName == nullptr ? nullptr : pAsmName->GetSimpleName()); ^ In file included from src/inc/sstring.h:1082:0, from src/inc/ex.h:19, from src/inc/stgpool.h:28, from src/inc/../md/inc/metamodel.h:18, from src/inc/../md/inc/metamodelro.h:19, from src/inc/metadata.h:17, from src/binder/../vm/util.hpp:19, from src/binder/../vm/common.h:110, from src/binder/assembly.cpp:14: src/inc/sstring.inl:73:8: note: candidate: SString::SString(void*, COUNT_T) inline SString::SString(void *buffer, COUNT_T size) ^ src/inc/sstring.inl:73:8: note: candidate expects 2 arguments, 1 provided src/inc/sstring.inl:436:8: note: candidate: SString::SString(SString::tagLiteral, const WCHAR*, COUNT_T) inline SString::SString(tagLiteral dummytag, const WCHAR *literal, COUNT_T count) ^ src/inc/sstring.inl:436:8: note: candidate expects 3 arguments, 1 provided src/inc/sstring.inl:418:8: note: candidate: SString::SString(SString::tagLiteral, const WCHAR*) inline SString::SString(tagLiteral dummytag, const WCHAR *literal) ^ src/inc/sstring.inl:418:8: note: candidate expects 2 arguments, 1 provided src/inc/sstring.inl:401:8: note: candidate: SString::SString(SString::tagUTF8Literal, const UTF8*) inline SString::SString(tagUTF8Literal dummytag, const UTF8 *literal) ^ src/inc/sstring.inl:401:8: note: candidate expects 2 arguments, 1 provided src/inc/sstring.inl:382:8: note: candidate: SString::SString(SString::tagLiteral, const CHAR*) inline SString::SString(tagLiteral dummytag, const ASCII *literal) * Reorder DLLEXPORT and STDAPI GNUC wants extern "C" <attribute> format. * Abstract __FUNCSIG__ * Abstract __debugbreak() * Move common compiler options out of clang and add Wno-unused-value * Add paranthesis around || and && src/gc/gc.cpp:9084:38: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] (!chosen_power2) && (i < free_space_count)); * Set Wno-delete-non-virtual-dtor for CXX files only * Don't warn on unterminated endif labels * Suppress unused functions * Use 0x syntax rather than h syntax on GNU asm files * Correct constructor call directly src/ToolBox/superpmi/superpmi-shared/logging.cpp:301:27: required from here src/inc/clr_std/string:58:9: error: cannot call constructor ‘std::basic_string<char>::basic_string’ directly this->basic_string::basic_string(_Ptr, c_len(_Ptr)); * Suppress NULL used in arithmetic warnings
2019-01-23Remove all traces of FEATURE_STACK_PROBE. (#22149)Filip Navara5-21/+0
2018-11-18Add headers to all md*, v3binder*, and ceefgen vcxproj (#20163)Jacek Blaszczynski28-7/+250
Work toward #14884
2018-10-04Typos (#20271)John Doe2-2/+2
* oportunistically -> opportunistically * oppportunity -> opportunity * Oppporunity -> Opportunity * optinal -> optional * optimisitic -> optimistic * optionaly -> optionally * origianl -> original * orignally -> originally * otheriwse -> otherwise * otherrwise -> otherwise
2018-09-07Fixes towards making the runtime compiled without FEATURE_PREJIT defined ↵Jan Kotas2-0/+4
(#19864)
2018-07-24Fix mscordbi metadata reader alignment bug on Linux. (#19070)Mike McLaughlin2-0/+9
Works fine on Windows minidumps, but on Linux (via OpenVirtualProcess for production breakpoints and future core dumps) the compiler's struct alignment rules are different. On Windows, classes/structs are aligned based on the largest field. On Linux, they are 4 byte aligned regardless of the field sizes. https://github.com/dotnet/coreclr/issues/17692
2018-06-14clean up list of disabled warnings. (#18318)Sergey Andreenko1-14/+14
* delete warnings that do not longer exist For example C4171 was deleted after VS 6.0 (https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-6.0/aa233011(v=vs.60)) * delete C4206 fromm the list because its default value is 4, so this line is useless. * reenable warning as error. * enable warning C4430 and fix places that trigger it. * fix C4334 * format the list * fix ssize_t
2018-06-03Warnings cleanup (#18260)Robin Sue3-4/+2
* Cleanup all disabled warnings that do not trigger * Fix warning about line continuation in single line comment * Eliminiate all unreferenced local variables and reenable warning
2018-05-27Typo (#18141)John Doe1-1/+1
* Ajusted -> Adjusted * alot -> a lot * Ambigous -> Ambiguous * amoun -> amount * amoung -> among * Amperstand -> Ampersand * Anbody -> Anybody * anddoens't -> and doesn't * anme -> name * annoations -> annotations * annother -> another * anothr -> another * ansynchronous -> asynchronous * anticpation -> anticipation * anway -> anyway * aother -> another * Apparant -> Apparent * appartment -> apartment * appdmomain -> appdomain * Appdomian -> Appdomain * appdomin -> appdomain * approproiate -> appropriate * approprate -> appropriate * approp -> appropriate * appened -> appended * appropiately -> appropriately * appropraitely -> appropriately * Apperantly -> Apparently * approp. -> appropriate * Approriate -> Appropriate
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-04-13Fix OpenVirtualProcess on Linux issue. (#17551)Mike McLaughlin1-3/+5
2018-03-24Delete unused files from src/inc (#17186)Jan Kotas1-1/+0
2018-02-17delete unused mirror files (#16423)Sergey Andreenko33-33/+0
2018-01-29Fix metadata format error checking (#16036)Jan Kotas1-0/+5
NextStream_Verify can return NULL for invalid file. Report error for it instead of AVing. Similar check is around the other calls to NextStream_Verify. It was missing here for some reason.
2018-01-23Delete dead code (#15990)Jan Kotas1-7/+0
2017-10-27Delete dead code (#14703)Jan Kotas3-7633/+0
2017-05-22[x86/Linux] Use CDECL (instead of STDCALL) as STDMETHODCALLTYPEJonghyun Park2-3/+3
2017-05-17Finish deleting dead CAS code from CoreLib (#11436)Jan Kotas1-137/+0
Fixes #9321 and deletes CleanupToDoList.cs Delete unmanaged security implementation
2017-05-09Fix static analysis issues (#11466)Koundinya Veluri2-12/+20
Fix static analysis issues
2017-04-03Fix InternalsVisibleTo when it references an assembly with some ↵Koundinya Veluri1-1/+1
DebuggableAttribute flags (#10664) Fixes #3541 - Mask out the DebuggableAttribute bits from when comparing assembly spec flags for matching an InternalsVisibleTo reference to an assembly
2017-03-25Typo correction (#10482)Ofer Zelig1-1/+1
2017-03-23Delete NewMergerJan Kotas11-7101/+1
This was only used as part of C++ link.exe for IJW
2017-03-23Enable FEATURE_METADATA_EMIT_ALL for non-crossgen compilesBruce Forstall6-3/+12
This allows ilasm roundtrip test to work with NetStandard 2.0 changes where C# compiler emits a ".permissionset" attribute into the assembly that ildasm emits. This define enables the APIs that ilasm uses to process this attribute. Re-enable ilasm roundtrip test. Fixes #8418
2017-02-14Remove never defined FEATURE_METADATA_STANDALONE_WINRTdanmosemsft10-51/+19
2017-02-14Remove never defined FEATURE_METADATA_STANDALONE_WINRT_ROdanmosemsft4-59/+0
2017-02-14Remove never defined FEATURE_INCLUDE_ALL_INTERFACESdanmosemsft2-10/+0
2017-02-12Remove never defined FEATURE_FUSIONdanmosemsft5-2466/+0
2017-02-12Remove never defined FEATURE_COMINTEROP_TLB_SUPPORT and files that require ↵danmosemsft3-8837/+0
it to be defined
2017-02-10Remove always defined FEATURE_CORECLRdanmosemsft12-276/+0
2016-12-26Remove files related to legacy build system (#8723)Robert43-1089/+0
2016-12-23Remove all usage of vsnprintf (#8709)Jan Vorlicek1-1/+4
This change removes all usages of vsnprintf and modifies runtime to not to use vsnprintf or _vsnprintf I've also fixed two issues in PAL TRACE function string format parameters that caused crashes when I was trying to run all PAL tests with PAL tracing enabled.
2016-12-01fix permissive C++ code (MSVC /permissive-) (#8337)Phil Christensen3-33/+49
* fix permissive C++ code (MSVC /permissive-) These were found by the C++ compiler group when doing "Real world code" build tests using /permissive-. We are sharing these with you to help you clean up your code before the new version of the compiler comes out. For more information on /permissive- see https://blogs.msdn.microsoft.com/vcblog/2016/11/16/permissive-switch/. ---------------------------- Under /permissive-, skipping the initialization of a variable is not allowed. As an extension the compiler allowed this when there was no destructor for the type. void func(bool b) { if(b) goto END; int value = 0; //error C2362: initialization of 'value' is skipped by 'goto END' int array[10]; //Okay, not initialized. //... value used here END: return; } Fix 1) Limit the scope of value: { int value = 0; //... value used here } END: Fix 2) Initialize/declare value before the 'goto' int value = 0; if(b) goto END; //... value used here END: Fix 3) Don't initialize value in the variable declaration. int value; value = 0 //... value used here END: ------------------- Alternative token representations. The following are reserved as alternative representations for operators: and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq //Can't use reserved names for variables: static int and = 0; // Change name (possibly to 'and_') void func() { _asm { xor edx,edx // xor is reserved, change to uppercase XOR or eax,eax // or is reserved, change to uppercase OR } } * Apply formatting patch. * fixes from code review. I addressed @janvorli requests from the pull request code review.
2016-10-28C++ conformance. (building with /permissive-) (#7855)Phil Christensen1-1/+1
These issues were found when building with the /permissive- flag in the latest version of MSVC. No tests were added/modified because this does not change any behavior. There are a few types of language conformance issues fixed in this: 1) Strict string conversion (this is also covered by the /Zc:strictStrings flag) The 'const' is not implicitly dropped by string literals, which means the following is not allowed: char str = "const string literal"; //error: cannot convert a 'const char' to a 'char*' This fix to to make str 'const char*'. (This can have a domino effect depending on where str is used) 2) Fully qualified inline declarations members inside class struct A { void A::f() { } // Error: illegal qualified name in member declaration, remove redundant 'A::' to fix }; 3) MSVC by default will allows name lookup in a dependent base. This is disabled by /permissive- template <class T> struct B { void f(); }; template <class T> struct D : public B<T> //B is a dependent base because its type depends on the type of T in D<T>. { //One possible fix is to uncomment the following line. If this //were a type we should have 'using typename'... //using B<T>::f; void g() { f(); //Error: identifier not found, one possible fix is change it to 'this->f();' } }; void h() { D<int> d; d.g(); } 4) Warning 4800 has been removed in version 19.1 (1910) of the compiler. For backwards compatability, surround the usage of 4800. This is not related to C++ conformance. #if _MSC_VER <= 1900 // 'BOOL' forcing value to bool 'true' or 'false' #pragma warning(disable: 4800) #endif
2016-07-23The call to printf expects a string argument, but the actual argument was of ↵vinnyrom1-1/+1
class type 'PathString'. (#6422)
2016-05-25WinMD Adapter should only lookup mscorlib in WinMD referencesGaurav Khanna1-1/+3
2016-05-16Initial change to support System.Private.CoreLib.dll as Core Library.Gaurav Khanna1-1/+1
2016-05-07Remove FEATURE_HOSTED_BINDER definition (#4838)Jan Vorlicek1-4/+0
The FEATURE_HOSTED_BINDER is always on so remove it from all the sources.
2016-04-29Add query handling of IUnknown for MergeTokenManager and CMapToken (#4563)shion1-10/+38
2016-03-21Delete legacy netcf compat support (part 1)Jan Kotas1-10/+0
2016-03-09Delete dead codeJan Kotas1-17/+0
- Delete BINDER, STANDALONE_BINDER and MDIL ifdefs
2016-02-29Support long paths in CoreCLR runtime on WindowsJohn Chen (JOCHEN7)2-10/+8
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.