summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
20 hoursFix buffer overrun in JIT for Vector256<T> types on ARM64. (#35864) (#308)submit/tizen/20200811.004222accepted/tizen/unified/20200811.050456tizenaccepted/tizen_unifiedTimur Mustafin/Platform Lab /SRR/Engineer/Samsung Electronics2-4/+4
Stop recognizing Vector256<T> types as intrinsic for ARM64 in Crossgen2. Signed-off-by: Timur <t-mustafin@partner.samsung.com>
2020-07-27Implement genProfilingEnterCallback genProfilingLeaveCallback on Arm64 ↵submit/tizen/20200731.014213accepted/tizen/unified/20200731.145700Mikhail Kurinnoi16-673/+1171
(dotnet/coreclr#26460) * Split genProfilingEnterCallback and genProfilingLeaveCallback into architecture specific versions * Remove redundant genStackLevel save/restore logic on Arm, Arm64, Amd64 * Implement JIT_ProfilerEnterLeaveTailcallStub in assembly * Define RBM_PROFILER_{ENTER,LEAVE,TAILCALL}_TRASH for TARGET_ARM64 * Define REG_PROFILER_{ENTER,LEAVE}_ARG_FUNC_ID and RBM_PROFILER_{ENTER,LEAVE}_ARG_CALLER_SP * Simplify r0Trashed logic in src/jit/codegenarm.cpp * Remove wrong comment in src/jit/codegenarm.cpp * On Arm genPrologPadForReJit does nothing so remove it in src/jit/codegenarm.cpp * Implement LinearScan::BuildNode for GT_PROF_HOOK and GT_RETURN in src/jit/lsraarm64.cpp * Shouldn't a call to CORINFO_HELP_PROF_FCN_TAILCALL be marked as a No-GC? * Implement genProfilingEnterCallback genProfilingLeaveCallback in src/jit/codegenarm64.cpp * Implement NYI profiler methods in src/vm/arm64/profiler.cpp * Implement ProfileEnterNaked ProfileLeaveNaked ProfileTailcallNaked in src/vm/arm64/asmhelpers.S * Implement profiler helpers on win-arm64 * Remove logic for !FINAL_FRAME_LAYOUT in codegenarm64.cpp * Remove unused macro in src\jit\target.h * genProfilingLeaveCallback ignores helper on arm in src\jit\codegenarm.cpp * Refactor genProfilingLeaveCallback in src\jit\codegenarm.cpp Commit migrated from https://github.com/dotnet/coreclr/commit/d88bc184d054fe8e4915964330ca65378d59ef27
2020-07-13[Tizen] Update CreateDictionaryLookupHelper on arm64 to support relative ↵Gleb Balykov1-22/+75
indirection
2020-07-13[Tizen] Support relative indirection for 1st and 2nd levels of vtable on arm64Gleb Balykov3-53/+90
2020-07-03[Tizen] Unify dnetmemoryenumlib terms to match the codebase (#291)submit/tizen_5.5/20200729.021615submit/tizen_5.5/20200629.221218submit/tizen/20200703.012556accepted/tizen/unified/20200703.155115accepted/tizen/5.5/unified/20200729.230651tizen_5.5accepted/tizen_5.5_unifiedMateusz Moscicki/System (PLT) /SRPOL/Engineer/Samsung Electronics2-20/+40
2020-06-29[Tizen] Fix crash on accessing 0x0 while unwinding (#287)이형주/Common Platform Lab(SR)/Staff Engineer/삼성전자1-1/+3
Change-Id: I663d0fcdcd6fd8fb4c521d9bdbb4d234c96022ae
2020-06-26Fix a FNV error on arm64 (#286)정동헌/Common Platform Lab(SR)/Principal Engineer/삼성전자1-0/+2
Simple HelloWorld app can run with NI of System.Private.CoreLib.dll, HelloWorld.dll and System.Console.dll
2020-06-25Fix TPA map hash calculation. (#288)Mikhail Kurinnoi/AI Compiler Lab /SRR/Staff Engineer/Samsung Electronics3-2/+57
* Fix TPA map hash calculation. The point of issue is "the Turkish-I Problem". After locale changed, towupper() provide another result for "i" and different hash are calculated in case if file name have "i" letter. * Regression test for #37910
2020-06-22[Tizen] Force Inline for Generic Methods (#224)submit/tizen/20200622.225420accepted/tizen/unified/20200623.124116정동헌/Common Platform Lab(SR)/Principal Engineer/삼성전자1-0/+11
This patch enables more generic method inlining for methods which are not compiled by NI.
2020-06-18Fix missing TransitionBlock methods (#33134)submit/tizen_5.5/20200623.003918accepted/tizen/5.5/unified/20200623.152349JUNG DONG-HEON1-3/+0
2020-06-17Implement instantiating and unboxing through portable stublinker code… (#106)JUNG DONG-HEON41-2407/+746
* Implement instantiating and unboxing through portable stublinker code - Handle only the cases with register to register moves - Shares abi processing logic with delegate shuffle thunk creation - Architecture specific logic is relatively simple - Do not permit use of HELPERREG in computed instantiating stubs - Fix GetArgLoc such that it works on all architectures and OS combinations Add a JIT stress test case for testing all of the various combinations - Use the same calling convention test architecture that was used as part of tail call work Rename secure delegates to wrapper delegates - Secure delegates are no longer a feature of the runtime - But the wrapper delegate lives on as a workaround for a weird detail of the ARM32 abi
2020-06-17Fix GenerateShuffleArray to support cyclic shuffles (dotnet/coreclr#26169)JUNG DONG-HEON4-20/+182
* Fix GenerateShuffleArray to support cyclic shuffles The GenerateShuffleArray was not handling case when there was a cycle in the register / stack slots shuffle and it resulted in an infinite loop in this function. This issue is Unix Amd64 ABI specific. To fix that, this change reworks the algorithm completely. Besides fixing the issue, it has also better performance in some cases. To fix the cyclic shuffling, I needed an extra helper register. However, there was no available general purpose register available, so I had to use xmm8 for this purpose. * Remove special handling of the hang from ABI stress
2020-06-04[x86/Linux] Fix SIGSEGV during evaluation abort routine.submit/tizen_5.5/20200607.233848submit/tizen/20200607.233857accepted/tizen/unified/20200608.144754accepted/tizen/5.5/unified/20200608.142150Mikhail Kurinnoi1-1/+16
In case of evaluation with implicit function call aborted by ```ICorDebugEval::Abort()```, CoreCLR crash with SIGSEGV at line https://github.com/dotnet/runtime/blob/e25517ea27311297c1e3946acb3b4382d5fa7fef/src/coreclr/src/vm/jitinterface.cpp#L14293 since ```m_pJM``` is ```NULL```. This happens because during ```EECodeInfo::Init()``` call, ```codeAddress``` parameter provide address inside native code region (this address belong to CallDescrWorkerInternal(), libcoreclr.so), but not address inside managed code, so, ```ExecutionManager::FindCodeRange()``` can't find appropriate ```RangeSection```. During investigation I found, that at line https://github.com/dotnet/runtime/blob/e25517ea27311297c1e3946acb3b4382d5fa7fef/src/coreclr/src/vm/stackwalk.cpp#L2584 current context was not changed properly (we have wrong ```Eip``` register value). I found, that ```FuncEvalFrame::UpdateRegDisplay()``` code https://github.com/dotnet/runtime/blob/e25517ea27311297c1e3946acb3b4382d5fa7fef/src/coreclr/src/debug/ee/debugger.inl#L238-L247 don't have x86/Linux support implemented. I propose changes, that were already made for other ```UpdateRegDisplay()``` implementations in order to provide proper context for x86/Linux.
2020-06-04[Tizen] Enable ASan annotation of passing to native code buffersAndrey Kazmin2-3/+47
Turn on ASan inteceptors while marshaling managed buffers to native code. We could not properly annotate already allocated on heap buffers, so we have to disable pinning of such objects. Current patch affects only pinning of native arrays.
2020-05-13Set vtable offset as containedJUNG DONG-HEON1-0/+1
- Can remove a machine instruction which adds vtable offset
2020-05-12[Tizen] Change the visibility of symbols for dnetmemoryenumlibsubmit/tizen_5.5/20200512.212247submit/tizen/20200528.065414accepted/tizen/unified/20200529.124257accepted/tizen/5.5/unified/20200522.160111Mateusz Moscicki2-6/+6
2020-04-22[Tizen] Add a config knob for importing ibc filesSwift Kim2-2/+15
2020-04-15Fix PIE options (#26323)submit/tizen/20200415.223728accepted/tizen/unified/20200416.080052Jan Vorlicek43-121/+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
2020-03-25[Tizen] Add FEATURE_LARGEADDRESS_SUPPORTSangwook Kim3-0/+13
Many diagnostic tools are unaware of 32-bit applications which have large address spaces (> 2GB). Such tools include the TraceEvent library (required by PerfView and dotnet-trace), and Visual Studio. They assume the address range 0x80000000 through 0xFFFFFFFF as the system space and thus often fail to read symbols from event traces generated by CoreCLR. This workaround is to support such scenarios by simply discarding MSBs of 32-bit instruction pointer values in the trace output. Only a minimal set of values required for symbol resolution are affected by this change. Beware that you will have to manually restore the original values when you inspect them in lldb or etc.
2020-03-25modify integral tryparse to use memcpy (#2295)John Salem1-1/+1
2020-03-25Fix OverflowException from IntPtr casting (#14381)Swift Kim1-1/+1
2020-03-25[Tizen] Reduce arm_phdr_cb call overheadJUNG DONG-HEON3-1/+48
- Too many calls to arm_phdr_cb even though it get the same data. - It caches an ARM_CB_DATA for libcoreclr.so, then reuse.
2020-03-25Change bIsFree check in DacValidateMethodTable (#1086)Dong-Heon Jung1-8/+1
Some commands of SOS validate a method table in DacValidateMethodTable. In the function, it checks whether a method table is FreeObjectMethodTable or not with GetClass() value. However, GetClass() should not be NULL. (There is an assert in GetClass()) In this patch, it compares pMT address with g_pFreeObjectMethodTable address only.
2020-03-25[Tizen] add pie linker option to createdumpWoongsuk Cho1-0/+1
2020-03-25Handle glibc sys/sysctl.h deprecation (#27048)Omair Majid1-2/+5
glibc has deprecated sys/sysctl.h: In file included from /coreclr/src/pal/src/misc/sysinfo.cpp:32: /usr/include/sys/sysctl.h:21:2: error: "The <sys/sysctl.h> header is deprecated and will be removed." [-Werror,-W#warnings] #warning "The <sys/sysctl.h> header is deprecated and will be removed." ^ 1 error generated. Fix that by preferring sysconf and only including sys/sysctl.h if HAVE_SYSCONF is not true. This mirrors the order of the implementation code in this file (sysinfo.cpp) which checks for HAVE_SYSCONF before HAVE_SYSCTL. Fixes #27008
2020-03-25Enable NGEN for methods marked with AggressiveOptimization (#27259)Dong-Heon Jung1-1/+4
- Methods marked with AggressiveOptimization are not NGENed at all. - The methods are compiled during the runtime with high JITC overhead. - It makes launching time slower over 6% in our embedded systems.
2020-03-25Mark Relocation Section as NotNeeded (#25715)Dong-Heon Jung5-0/+110
- After relocation, relocation section in zap image is not necessary. - Mark the section as NotNeeded by giving advice(madvise with MADV_DONTNEED) - It reduces 120~150KB PSS in tizen sample apps.
2020-03-25[Tizen] Use PTRACE_GETREGSET for any arch when creating dumpSwift Kim1-13/+5
Also ignore ptrace NT_FPREGSET failures for arm processes on aarch64 kernels. Fixes #25707.
2020-03-25[Tizen] Add coreclr_preload_assembly to CoreCLR host APIKonstantin Baladurin14-162/+1064
2020-03-25[Tizen] Implement ASan wrapper for Linux AMD64Vyacheslav Cherkashin3-0/+157
Change-Id: I48446ce7c8771a4c75149512bb7d8a8cb3fae8e5 Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
2020-03-25[Tizen] Implement ASan wrapper for Linux ARM32Vyacheslav Cherkashin6-0/+278
This commit implements wrappers that allow interception transitions from managed to external unmanaged code (CIL -> native) and back (native -> CIL). This allows enable/disable ASan during transitions. Due to this, we sanitize only external code, which allows us to achieve acceptable performance. Change-Id: I53ecdc14d28f7210cd9e7f5bd4db0c8ef5ed81fc Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
2020-03-25[Tizen] Implement detecting of sanitized librariesAndrey Drobyshev5-0/+182
Parse ".dynamic" section (ELF dynamic array tags) of the module being added, find ".rel(a).plt" section and search it for presence of '__asan_init' symbol. Change-Id: Ie7cc4c818b791b5f00713b42ba15131325b8152c Signed-off-by: Andrey Drobyshev <a.drobyshev@samsung.com>
2020-03-25Prevent freeing of the profiler on process shutdown.David Mason1-11/+6
2020-03-25[Tizen] skip dotnet specific arguments in corerunKonstantin Baladurin1-0/+13
Now we use corerun to run corefx tests instead of dotnet, because last one isn't available for Tizen/armel. So we need to skip dotnet specific arguments, we patch corerun for it because Microsoft.DotNet.RemoteExecutor tries to execute binary that it gets from /proc/self/maps, so we need a binary that will behave like dotnet.
2020-03-25Build error fix on FEATURE_PREJIT=trueSwift Kim2-2/+2
This fix is to update usages of SetupGcCoverage() under FEATURE_PREJIT aligned to the signature change in #25261.
2020-03-25[Linux/x86] Use ebp from current context during unwinding (#26789)Konstantin Baladurin4-15/+21
pCurrentContextPointers in REGDISPLAY can contain NULLs so we need to use ebp value from pCurrentContext. This patch contains following changes: - GetRegdisplayFP returns ebp from pCurrentContext - GetRegdisplayFP is used instead of *GetEbpLocation() - Set##reg##Location also updates register value in pCurrentContext
2020-03-25[JIT/x86] Fix LinearScan::allocateRegisters (#26649)Konstantin Baladurin1-1/+1
Check for `lvLRACandidate` instead of `!lvDoNotEnregister` when checking whether `this` may be enregistered and has an Interval.
2020-03-25Linux/x86: fix build (#26594)Konstantin Baladurin2-0/+3
2020-03-25[Tizen] Partially revert a6292a6.Mikhail Kurinnoi1-0/+39
NetcoreDBG depends from PAL functions. Instead of SOS plugin, that use PAL static libs, debugger should be able to operate with any runtime version and can't be statically linked to PAL.
2020-03-25add access(2) call before dlopening filesYaroslav Yamshchikov1-0/+9
2020-03-25corbbtprof: set byte alignment for CORBBTPROF structures (#25816)Konstantin Baladurin1-0/+5
Fix patch fixes SIGBUG that occurs due to unaligned read/write
2020-03-25Fail to explicitly tail call on x86 unix. (#25032)Jarret Shook1-2/+6
* Fail to explicitly tail call on x86 unix. * Correctly return 100 * Correct return value * Add noway assert in morphTailCall to avoid morphing slow tail calls on unix. * Address feedback
2020-03-25[Tizen] Disable jithost arena cacheGleb Balykov1-1/+1
2020-03-25[Tizen] Disable IBC Logger as a defaultDongHeon Jung1-1/+1
- Profile information is collected by ibc logger. Hower it is not used and saved into profile file. - The patch disables IBC logger which is enabled by default. - It disables IBC logger only with ibclogger.h file. IBCLOGGER_ENABLED definition is only used in ibclogger files.
2020-03-25Fix a build error when IBCLOGGER_ENABLED is not defined (#25691)Dong-Heon Jung1-13/+31
- Even if DACCESS_COMPILE or CROSSGEN_COMPILE is defined, coreclr can be built without IBCLOGGER_ENABLED definition.
2020-03-25[Tizen] seperate PIC and PIE to fix x86_64 build errorWoongsuk Cho1-3/+5
2020-03-25[Tizen] Add a library to retrieve memory regions for a coredumpMateusz Moscicki8-15/+339
This is needed to save a minicoredump of .NET applications to allows reconstruct managed stack by lldb and SOS plugin.
2020-03-25Fix OOPStackUnwinderX86::Unwind crash when Eip is invalidIgor Kulaychuk1-1/+1
2020-03-25Fix EECodeManager::GetAmbientSP on x86/LinuxIgor Kulaychuk1-1/+2
2020-03-25[Tizen] Add -pie to linker optionHyungju Lee1-0/+1
There have been no -pie linker option. This patch adds -pie linker option into crossgen(for tizen) This originates from 0024-Add-pie-to-linker-option.patch