Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-12-08Find unwind info ourselves rather than initializing unwind cursors each time.Aditya Mandaleeka
2017-12-05Build runtime and libraries for WebAssembly (#4876)Morgan Brown
* Fix issues building the runtime, corelib and type loader for WebAssembly * Fix test infrastructure to allow running with the wasm flavor
2017-11-14Compile "Module" code manager for ProjectN only (#4924)Jan Kotas
2017-10-31Build native code for WebAssembly target (#4624)Phill
Add support to cmake files for wasm build
2017-10-04Enable x86 support for UnixAdeel
Also enabled cross compilation of x86 binaries on x64 host. Ubuntu Dockerfiles: <details> <summary><b><ins>Baseline: x64 build on x64 host</ins></b></summary> ```dockerfile FROM ubuntu RUN cat /etc/*-release RUN apt-get update RUN apt-get install -y \ autoconf bash clang cmake gcc libtool curl \ libunwind-dev llvm make openssl lldb git uuid-dev RUN git clone https://github.com/dotnet/corert -b master --single-branch WORKDIR /corert RUN ./build.sh # or ./build.sh x64 ``` </details> <details> <summary><b><ins>PR: x86 build on x86 host</ins></b></summary> ```dockerfile FROM i386/ubuntu RUN cat /etc/*-release RUN apt-get update RUN apt-get install -y \ bash clang cmake gcc libtool curl \ libunwind-dev llvm make openssl lldb git uuid-dev RUN git clone https://github.com/am11/corert -b linux-x86 --single-branch WORKDIR /corert RUN ./build.sh x86 ``` </details> <details> <summary><b><ins>PR: x86 build on x64 host</ins></b></summary> ```dockerfile FROM ubuntu RUN cat /etc/*-release RUN apt-get update RUN apt-get install -y \ bash clang cmake gcc libtool curl \ libunwind-dev llvm make openssl lldb git uuid-dev \ g++-multilib RUN git clone https://github.com/am11/corert -b linux-x86 --single-branch WORKDIR /corert RUN ./build.sh x86 ``` </details>
2017-09-24Enable x86 build (#4598)Adeel Mujahid
2017-09-22Enable Server GC (#4591)Sergiy Kuryata
This change adds support for Server GC. To enable the Server GC for an application, the RH_UseServerGC environment variable (which is already supported by the runtime) should be set to 1.
2017-07-10Enable return address hijacking for thread suspension on Windows x64 (#4106)Sergiy Kuryata
Enable return address hijacking for thread suspension on Windows x64 * Code review feedback
2017-07-06Fix stresslog (#4062)Jan Kotas
- Fix initialization of stress log, cleaned up the overall initialization sequence - Remove spurious NO_STRESSLOG definion that disabled some of the stresslogging
2017-03-16Debugger SupportAndrew Au
[tfs-changeset: 1650991]
2017-02-23Delegate MarshallingFaizur Rahman
Initital support for delegate marshalling. - Enabled only in full runtime - Doesn't work in non-windows platforms - Only supports open static delegates
2017-02-08ProjectX: Post RI Fixupdotnet-bot
Fixed issues and concerns from mirroring to Github [tfs-changeset: 1647030]
2017-02-07RI from ProjNdev3dotnet-bot
[tfs-changeset: 1646943]
2017-01-28FuncEval #1 - Introduce a DAC accessible global variable in the runtime to ↵Andrew Au
store the address of the method to be called in a FuncEval. [tfs-changeset: 1645909]
2017-01-24Enabling the calling convention conversion functionality in the non-portable ↵fadimounir
CoreRT, and adding all the conversion helper stubs
2016-12-19Unconditionally disable incremental linking on Windows (#2376)Jan Kotas
The runtime is not compatible with jump stubs inserted by incremental linking, and it does not seem to be helping us much anyway. Fixes #2348
2016-12-01Use LLVM libunwind for stack unwinding on UnixJan Vorlicek
This change replaces external libunwind usage on Unix by a copy of the LLVM libunwind. It also modifies libunwind to support reporting register location and implements the unw_get_save_loc API to get this location. For now, only memory locations are supported (register locations are not).
2016-11-15Thunk pool implementation for CoreRT. In CoreRT, the thunk mappings are ↵Fadi Hanna
allocated dynamically in memory using VirtualAlloc. The thunk stubs pages are marked with RX permissions and the thunks data pages are marked with RW permissions. Refactored some code in ThunkPool.cs to remove from it any knowledge about the thunk sections layout. Thunks layout and allocation become a black box to ThunkPool.cs. All the section layout information is moved to the native component, and section navigation is done by calls to some APIs. The dynamically allocated thunks pages are enabled by a FEATURE_RX_THUNKS, and only in CoreRT's Full build for now. The portable build doesn't yet support thunks. [tfs-changeset: 1638131]
2016-11-01Rename ModuleManager to TypeManagerJan Kotas
[tfs-changeset: 1636196]
2016-09-29Convert SHA1 to RuntimeImport (Step 1)Atsushi Kanamori
After feedback from Jan, we've already opened-sourced a vetted C++ SHA1 algorithm in CoreClr, so rather than impose a dependency on crypto at the lowest level, we'll port that code into mrt100_app.dll. Unfortunately, the actual act of *adding* a simple .cpp file to MRT, let alone a new export, is harder than actually implementing it, and requires touching TFS-only files. So we'll add the import as a NYI stub as the first step, then finish the work once it propagates to the CoreRt master branch (that seems to be the most efficient work environment for this kind of job.) The new import converts a PK to a PKT by computing the SHA1 and reverse-copying the last 8 bytes. Doing the reverse-copy-8 in C++ prevents the non-FIPS-compliant SHA1 algorithm from turning into an attractive nuisance by being exported directly from MRT. SHA1.cpp and SHA1.h are verbatim copies of CoreClr's versions, which we're committing now to establish a diff history. Since adding a .cpp file is such a chore, we'll include it in the build with the #if 0's" in the magic places to keep the build system and file tracker off the scent. The "pbPublicKeyToken" can only be 8 bytes, so strictly speaking, passing a length argument isn't necessary but passing an unguarded buffer to C++ gets everyone looking at you like you have fleas so we'll add the extra defense-in-depth parameter. [tfs-changeset: 1630122]
2016-09-14Ports dotnet/coreclr PR#6764 (https://github.com/dotnet/coreclr/pull/6764) ↵dotnet-bot
to ProjectN. The nature of the changes in this changelist is very similar to the changes done in CoreCLR described in the linked PR: 1) This change synchronizes the ndp/FxCore/CoreRT/Native/gc and src/vm/gc directories of ProjectN and coreclr, respectively. There is one additional change present in this changelist that was not done to CoreCLR (and will need to be ported to CoreCLR), and that is the addition of IGCHeap::RegisterFrozenSegment and IGCHeap::UnregisterFrozenSegment to the interface. These functions are invoked from RedhawkGCInterface::RegisterFrozenSection and as such must be present on the interface. This is a very minor change that involved ensuring that Register/UnregisterFrozenSegment are defined for all builds (not just defined when FEATURE_BASICFREEZE is defined) and propagating the definition of those two functions to IGCHeap, instead of IGCHeapInternal where they resided on CoreCLR. Calling either of those two methods with FEATURE_BASICFREEZE not defined results in an assert. 2) Like the changes to the VM in CoreCLR, uses of GCHeap in CoreRT/Native/Runtime are redirected to the GCHeapUtilities class, which maintains the singular IGCHeap instance and provides a number of static methods used by the runtime to access and query the state of the heap. For most cases in Native/Runtime, this meant renaming uses of GCHeap to GCHeapUtilities. There is a notable exception to this in that GetMaxGeneration is turned into a virtual method call on IGCHeap on non-DAC code paths (see https://github.com/dotnet/coreclr/pull/6764#issuecomment-245462736 for details on why I chose to expose a virtual and non-virtual version of GetMaxGeneration) 3) This set of changes broke SOS GC heap dumping on CoreCLR when FEATURE_SVR_GC is defined, so this change contains a fix for that particular issue. As far as I know, FEATURE_SVR_GC is not defined on the ProjectN build, so this has no effect for now, but it will fix an issue that would be present if/when we enable Server GC. This particular fix is located in request.cpp. There should be no surprises in this changelist except for portable.cpp, which declares a complete alloc_context struct out-of-line from the GC interface - this change updates the declared alloc_context struct to match the one exposed by the interface. [tfs-changeset: 1627236]
2016-09-01Add missing file to CMakeLists.txtJan Kotas
2016-08-18 Here are the changes to remove generic instance descs from the binder ↵Peter Sollich
and the runtime. Overview - here's what generic instance descs were used for and how this functionality is provided now: - They were needed to support generic unification. For the release scenario, this is no longer necessary because global analysis places generics. For the F5 scenario, we will again have generic unification, but it will be done differently and is not in this code review yet. - They were used for GC reporting of statics on generic types. Statics on statically built generic types are now merged into the static GC desc of their containing module. Statics on dynamic types are reported via two new lists on the RuntimeInstance class, one for regular GC statics, the other one for thread statics. - They were also used to hold statics information for dynamically loaded types. This information is now attached to the EEType instead. - Similarly, generic instance descs held information about the open generic type, the instantiation parameter, and the parameter variance information. This information is now also attached to the EEType. Detail notes: - EEType.Constants.cs, EEType.cs, eetype.h, eetype.inl: Provide for attaching generic and static information to eetypes. The latter is only used for dynamic types. - MiscHelpers.cpp, module.cpp, module.h, RuntimeInstance.cpp/.h: Remove GenericInstanceDesc logic, provide equivalent functionality. - rhbinder.h, ZapHeaders.cpp: Bump version number, remove GenericInstanceDesc related fields from module header. - EETypeCreator.cs: logic to set rareFlags appropriately for attached statics. - TypeLoaderEnvironment.StaticsLookup.cs: the logic turned out to be wrong for the TLS index - the binder encoded always zero for the index, which cannot work at runtime. So I changed the binder (see comment below), and I also changed the runtime logic to apply an indirection. For consistency, I did the same for the thread static offset - this isn't necessary now but may become necessary for the F5 scenario. - common.h: Add separateCompilation flag to g_BindOptions as prep work for F5 scenario. - CompactLayoutReader.cpp: for release scenario, merge generic statics and their GC descs early rather than relying on generic instance descs. - MethodTable.h, MakePdb.cpp, MdilModule.cpp/.h: attach "InstantiatedTypeZapNodes" data structure to method table rather than finding it via a hash table lookup. This is just a cleanup change. - MdilModule.cpp/.h: Remove generic instance desc logic, add logic to generate the "GenericComposition" data structure instead, attach that and the generic definition to eetypes, add a rare flag for eetypes with sealed virtuals, add indirection cells where we used to indirect through generic instance descs, remove unused "GetReadonlyBlobNode" method, change encoding of native layout info for thread statics (see comments above for TypeLoaderEnvironment.StaticsLookup.cs). - ZapImage.cpp/.h: remove generic instance desc sections. - various copies of rhbind.exe and rhbindui.dll: these are used to build mrt100_app.dll. The change updates rhbind.exe to put the new version number into the module header of mrt100_app.dll. [tfs-changeset: 1622930]
2016-08-16Implement transition thunk for Unix amd64 (#1653)Jan Kotas
2016-08-12This fixes debugger step-in in the interface dispatch changesJan Vorlicek
[tfs-changeset: 1622102]
2016-07-16Rollback change 1618006 : Replace use of ManagedCalloutThunk with Universal ↵David Wrighton
Thunk This broke debugger stepping through interface dispatch in some circumstances [tfs-changeset: 1618045]
2016-07-15Replace use of ManagedCalloutThunk with Universal ThunkDavid Wrighton
Move to using the Universal Thunk for cases where we need to perform complex lookup to perform interface dispatch. This allows us to permit exceptions to occur in interface processing without ripping the process down. As a side benefit, we are able to reduce the amount of platform specific assembly code needed to build the product. NOTE: CoreRT still uses the old managed callout logic, as I don't have time on my schedule to write a SYS V ABI version of the universal transition thunk. [tfs-changeset: 1618006]
2016-06-22Implement Linux hardware and software exception handling (#1417)Jan Vorlicek
This change implements code manager for Linux, context manipulation and compiler changes necessary to enable exception handling. All calls to libunwind are disabled for now on non-OSX though, since our build system doesn't support specifying additional dynamic libraries, which prevents us from using the libunwind. Those pieces of code are under CAN_LINK_SHARED_LIBUNWIND ifdef so that the ifdef can easily be located and removed after we add the necessary support to the build system. On OSX, the unwind functionality is part of the compiler support libraries, so it works. I have verified that everything works with the libunwind though by manually invoking clang to link everything together and adding the necessary libraries to its command line. The exception handling test was passing with that.
2016-06-05Implement alloc helpers for Unix (#1360)Jan Kotas
These helpers have to be implemented in assembly for non-portable runtime flavor to make stackcrawling work.
2016-05-26Implement PInvoke Unix asm helpersJan Kotas
2016-05-16Add support for PInvoke helpers to the IL compiler. (#1274)Jan Kotas
2016-05-05Implement Unix AMD64 EH assembler helpersJan Vorlicek
This change ports AMD64 ExceptionHandling.asm and ManagedCalloutThunk.asm to Unix.
2016-05-02Work on enabling GC on Windows (#1221)Jan Kotas
2016-03-23Rename runtime\assert.h to runtime\rhassert.hJan Kotas
Fixing TODOs about collisions with the system assert.h header [tfs-changeset: 1589045]
2016-03-03Exception handling on WindowsJan Kotas
- Add CoffNativeCodeManager that is able to decode the Windows OS native unwind info - Append EH info to the Windows OS unwind info blob in the compiler
2016-02-27Multi-module compilation preparationSimon Nattress
Add a new command-line switch to ILC: /multifile. When specified, only the assemblies passed as input will have methods compiled. Referenced types / methods from other assemblies are not compiled into the output object file. This switch is most likely temporary as we hone our compilation story and implementation. Each managed module adds pointers to the start and end of a module global data header to a custom section of the object file, .modules$I. These entries are merged (on Windows, OSX / Linux needs a tweak to CLI first) at link time producing a list of module headers. In StartupCodeHelpers.cs, initialize global tables from each module using the list of pointers that was written to .modules$I. This data is discovered through two exports (__modules_a and __modules_z) which through linker section merging, are placed either side of the module header pointers in the final binary. Alter interface dispatch to store its dispatch map table as an ArrayOfEmbeddedDataNode and place it in the module header list. This allows each module's EETypes to continue using index-based lookup of dispatch maps. Add a new field to EETypes which points at a ModuleManager* through an indirection cell. This indirection cell is filled in at runtime initialization and allows a type to find its dispatch map table. ModuleHeaderSection.cs|h files define the section headers currently supported. ModuleHeaderSection's enumerands are in line with the plan for ReadyToRun. Moved the module info lookup out of the bootstrapping code and into the runtime Place compilation module group logic to a dedicated set of classes, CompilationModuleGroup, MultiFileCompilationModuleGroup, and SingleFileCompilationModuleGroup which together abstract the logic for decisions about which types / methods should be included in compilation in single vs multi file. Extract an interface from Compilation for the methods that root methods / types / Main so CompilationModuleGroup can root things without having to know about the Compilation class.
2016-02-18Add exception handling helpers to Windows buildJan Kotas
2016-01-21Interface dispatch for Linux and OSXSimon Nattress
Added StubDispatch.S containing the unix assembly interface dispatch helper and cache generation. Defined a Unix flavor of AsmOffsets.cpp since assembler symbols are defined differently in GAS vs MASM Add compiler flag that allows lock-free exchange of 16 byte data (used for InterlockedExchange of interface dispatch cache entries) and filled in PalInterlockedCompareExchange128 for Unix Worked around missing ManagedCallout2's assembly code on Unix by directly invoking the function pointer passed into it. Fix bug in PalVirtualAlloc to allocate memory when MEM_COMMIT is specified without MEM_RESERVE on Unix
2016-01-15Fix build break and build warningJan Kotas
2016-01-15Merge branch 'nmirror' into nmirror-mergeJan Kotas
Conflicts: src/Native/Runtime/unix/PalRedhawkUnix.cpp src/Native/gc/gc.cpp
2016-01-14Remove APP_LOCAL_RUNTIME and FEATURE_PROFILING to fix build breakJan Kotas
2016-01-14Interface dispatch supportSimon Nattress
Emit the supporting data structures for interface dispatch: - Interface dispatch cell for each call site providing the resolution function entry point as well as the interface type and interface method slot number - Interface map on EETypes specifying the list of interfaces they implement - Dispatch map that provides, for each type, the lookup rows for interface type, interface method slot, and implementing method's VTable slot - Dispatch map table that provides dispatch map pointers (the index into this table is stored on an EEType instead of a pointer to the map for space savings) Added a work-around in the runtime to provide access to the dispatch map table until full module headers are implemented
2016-01-09RhpUniversalTransition improvementsScott Mosier
[tfs-changeset: 1562851]
2015-12-30Implement most RyuJIT intrinsicsJan Kotas
- Add lookup of all RyuJIT intrinsics - Update manage implementations of the intrinsics to fit with what RyuJIT is capable of - Make intrinsic expansions by the codegen to be optional by providing fallback paths - Fix USE_PORTABLE_HELPERS to be defined for portable runtime only These changes are under CORERT ifdefs as necessary to be reconciled with .NET Native for UWP later.
2015-12-08Merge pull request #497 from jkotas/gc-scanScott Mosier
Remove redundant code in gcrhscan.cpp
2015-12-08Remove redundant code in gcrhscan.cppJan Kotas
- Add gc\gcscan.cpp to the build and remove code that was redundant with it from runtime\gcrhscan.cpp - Move the entire stack root scanning to the EE side of GCToEEInterface
2015-12-08Refactored AsmOffsets.hManu
Per issue #455, split the definitions in AsmOffsets from the 32/64 bit specific parts and the platform specific parts.
2015-12-04Added build support for ARM64Manu
Update cmake configuration files to support ARM64. Added skeleton of AsmMacros.h and WriteBarriers.S for ARM64.
2015-12-03Move some header files into 'inc' directoryScott Mosier
This move facilitates header file sharing between projects that is necessary in the UWP apps branch of this code (in TFS).
2015-12-02Enable compilation of AsmOffsetsVerify.cppManu
Fix issue /dotnet/corert/#444 to ensure that pre-computed offsets match the C/C++ structures layout.