Wes Haggard [Sun, 22 May 2016 05:25:52 +0000 (22:25 -0700)]
Expose ResolveEventHandler and ResolveEventArgs in the mscorlib facade so that our test host still function.
[tfs-changeset: 1607062]
Commit migrated from https://github.com/dotnet/coreclr/commit/
df10d7a58894cb052cd72bbb177c2eadd3530c36
Matt Ellis [Sat, 21 May 2016 01:19:30 +0000 (18:19 -0700)]
Update pre-release tags to RC4
The long term plan is to move our packages versions up and the
prerelease tag back down to something like -beta, but for now we just
need to pick something that isn't RC3 as that's what
the release/1.0.0 branches are using.
Doing this gives us time to do the right thing without having version
clashes on myget.
[tfs-changeset: 1606983]
Commit migrated from https://github.com/dotnet/coreclr/commit/
3376767284fa7c86ca04a9498838ae6cbd21d9ae
Aditya Mandaleeka [Sat, 21 May 2016 00:04:33 +0000 (17:04 -0700)]
Merge pull request dotnet/coreclr#5136 from adityamandaleeka/xrtinit_fix
Change how InitAppXRT loads the XRT DLL
Commit migrated from https://github.com/dotnet/coreclr/commit/
60abbe3c88537d5c3c5544f36f432e7b5ba5c628
Pat Gavlin [Sat, 21 May 2016 00:03:14 +0000 (17:03 -0700)]
Merge pull request dotnet/coreclr#4990 from pgavlin/gh4912
Remove some preprocessor usage from the JIT interface.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f581d33fb9d4bb95f1e83f636f07437500962054
John Chen [Fri, 20 May 2016 23:33:45 +0000 (16:33 -0700)]
Merge pull request dotnet/coreclr#5122 from JohnChen0/timeout
Resolve two issues that cause pri1r2r test timeout on Ubuntu
Commit migrated from https://github.com/dotnet/coreclr/commit/
af31341dfbd575fca460a96942fc4da51cef5f29
Russ Keldorph [Fri, 20 May 2016 22:51:18 +0000 (15:51 -0700)]
Merge pull request dotnet/coreclr#5142 from RussKeldorph/delexcl
Remove ryujit_x86_no_fallback_issues.targets
Commit migrated from https://github.com/dotnet/coreclr/commit/
9fa7e7ffad864e33b0ef74ffb9e3b7737372dfc9
Russ Keldorph [Fri, 20 May 2016 22:34:53 +0000 (15:34 -0700)]
Remove ryujit_x86_no_fallback_issues.targets
We have decided this file isn't useful, so its continued presence
is just confusing.
Commit migrated from https://github.com/dotnet/coreclr/commit/
a6933d6f7c0f228df12dd8b2f5f34bdff7d9ba22
Sejong Oh [Fri, 20 May 2016 22:24:26 +0000 (15:24 -0700)]
Merge pull request dotnet/coreclr#5114 from sejongoh/mark_jit_opt_sensitive
Add JitOptimizationSensitive property to GC/API/WeakReference/IsAlive…
Commit migrated from https://github.com/dotnet/coreclr/commit/
afa7fe5486fc90fec7df52bd134b789c568c8b45
Michelle McDaniel [Fri, 20 May 2016 21:54:24 +0000 (14:54 -0700)]
Merge pull request dotnet/coreclr#5133 from adiaaida/disableStringarr_cs_ro
Disable stringarr_cs_ro for x86 RyuJIT
Commit migrated from https://github.com/dotnet/coreclr/commit/
060e7f07458194328e689e8609398c1d26209c19
Lee Culver [Fri, 20 May 2016 21:45:28 +0000 (14:45 -0700)]
Merge pull request dotnet/coreclr#5139 from leculver/shutdown
Prevent core dumps at shutdown due to ETW subsystem
Commit migrated from https://github.com/dotnet/coreclr/commit/
b91341d261cd8c03042b2c06cce949763b4ef4f9
Lee Culver [Fri, 20 May 2016 20:57:11 +0000 (13:57 -0700)]
Disable debugger termination to prevent shutdown race
Fixed another instance where debugger shutdown would race with ETW subsystem, causing segfaults.
Commit migrated from https://github.com/dotnet/coreclr/commit/
01e1fd14531b830bf3632f097cdcce6fe2de2f33
Stephen Toub [Fri, 20 May 2016 20:50:38 +0000 (14:50 -0600)]
Shrink AsyncMethodBuilder.MoveNextRunner by a field in common case (dotnet/coreclr#5131)
When an async method yields for the first time, there are several allocations, including a "MoveNextRunner" object that used to store the state machine and an ExecutionContext. However, for the common case where a default ExecutionContext is being used, we can avoid needing that field. For the simplest async method, this can reduce the total size of the allocations by ~4%.
(It would be nice in this case to be able to get rid of the MoveNextRunner entirely. However, the Action delegate that gets created needs to be stored into the builder before the builder is boxed to the heap, so that the cached delegate gets boxed with it; otherwise, the second yield in the async method will end up needing to reallocate the delegate. Since delegates are immutable, if the delegate was to point directly to a method on the boxed object, we would need to first have the object, a catch-22. So the MoveNextRunner serves as an intermediary that lets us create the delegate, store it into the struct builder, then box the builder, and then store the boxed object into the runner.)
Commit migrated from https://github.com/dotnet/coreclr/commit/
ce3ff76234bf199b4498a5d31f05af6eb43073f6
Gaurav Khanna [Fri, 20 May 2016 20:50:11 +0000 (13:50 -0700)]
Merge pull request dotnet/coreclr#5124 from gkhanna79/Fix4940
Throw InvalidProgramException when VarArgs are encountered
Commit migrated from https://github.com/dotnet/coreclr/commit/
18110e9a2ecf2f036953f398925ceef51375c2d9
Lee Culver [Fri, 20 May 2016 20:26:19 +0000 (13:26 -0700)]
Fix multiple LTTng issues (dotnet/coreclr#5068)
- Only emit LTTng events when LTTng is enabled. We now use the tracepoint_enabled macro to check if an event is enabled...when the version of lttng is installed that supports it.
- Unsplit LTTng events. Previously we split LTTng events when they exceeded the field limit of LTTng. Now we emit those events as a raw byte array so that it matches their windows ETW counterparts byte-for-byte.
- Emit any event with a struct or embedded array as a raw byte array too. The structure of memory that LTTng emits is incompatible with our ETW parsing. Changing events with struct/array fields greatly simplifies the parsing of events.
Commit migrated from https://github.com/dotnet/coreclr/commit/
92c2f926bd5eceea22211609ca63e27ff6a2be96
Jan Kotas [Fri, 20 May 2016 20:18:49 +0000 (13:18 -0700)]
Expose GetUninitializedObject on RuntimeHelpers (dotnet/coreclr#5104)
* In coreclr, expose GetUninitializedObject on RuntimeHelpers
* Include RuntimeHelpers.GetUninitializedObject in model.xml
Commit migrated from https://github.com/dotnet/coreclr/commit/
f38ec53d628bc0ab157678864fbddf255ad6591b
Pat Gavlin [Mon, 16 May 2016 18:16:07 +0000 (11:16 -0700)]
Remove some preprocessor usage from the JIT interface.
This fixes most of dotnet/coreclr#4912.
- The usage of `USE_ASM_GC_WRITE_BARRIERS` has been removed. The type it guarded is
now always defined.
- The JIT helpers that were guarded by `_TARGET_X86_` are now always defined.
- The intrinsic that was guarded by `_WIN64` is now always defined.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0ce37a46023f7242b8d71e5dc62376c7fbae4125
Pat Gavlin [Fri, 20 May 2016 19:57:58 +0000 (12:57 -0700)]
Merge pull request dotnet/coreclr#5123 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
e50420e0ceae9f62a874fdef6683092c8159f586
Koundinya Veluri [Fri, 20 May 2016 19:39:21 +0000 (12:39 -0700)]
Merge pull request dotnet/coreclr#5132 from kouvel/NamedMutexFix
Fix a few bugs in named mutexes
Commit migrated from https://github.com/dotnet/coreclr/commit/
8658b26db54d4b25b6d3c8b666d5239cfa10e575
John Chen [Fri, 20 May 2016 18:12:38 +0000 (11:12 -0700)]
Resolve two issues that cause pri1r2r test timeout on Ubuntu
* Fix Ready-to-Run image for System.Numerics.Vectors.dll.
* Disable tests\src\Loader\classloader\generics\regressions\
DD117522\Test.cs,
which contains an infinite generic type recursion. It causes CrossGen to
crash with stack overflow on Windows, and timeout on Ubuntu. Temporarily
disabling this test until we can properly fix it.
Commit migrated from https://github.com/dotnet/coreclr/commit/
94124570fa0e967e243f4c3b8cec22b3fcfa0e83
Aditya Mandaleeka [Fri, 20 May 2016 18:24:17 +0000 (11:24 -0700)]
Load XRT DLL from System32, and only on Win8+.
Commit migrated from https://github.com/dotnet/coreclr/commit/
9930c7e6093c2c96792721b1e38a2c7fbc09e970
Matt Ellis [Fri, 20 May 2016 17:57:26 +0000 (10:57 -0700)]
Merge pull request dotnet/coreclr#5105 from ellismg/fix-corefx-3467
Ignore empty collation elements in EndsWith
Commit migrated from https://github.com/dotnet/coreclr/commit/
7d1cd169944306ee25c847c77104722a60c2247c
dotnet-bot [Fri, 20 May 2016 17:53:17 +0000 (10:53 -0700)]
Merge remote-tracking branch 'upstream/master' into from-tfs
Commit migrated from https://github.com/dotnet/coreclr/commit/
6a84a4aa0c08f7db816cdd8eed9e2ecbcc877f52
dotnet-bot [Fri, 20 May 2016 17:50:20 +0000 (10:50 -0700)]
Fix line endings in src/vm/jitinterface.h
Commit migrated from https://github.com/dotnet/coreclr/commit/
a2728758512f4b13d50fd44f9be43cdb48bd7567
Michelle McDaniel [Fri, 20 May 2016 17:33:45 +0000 (10:33 -0700)]
Disable stringarr_cs_ro for x86 RyuJIT
This tests fails intermittently in the CI.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4e2c006b8550c79d9e8db91d2a0d80cae9188c67
Koundinya Veluri [Fri, 20 May 2016 06:03:06 +0000 (23:03 -0700)]
Fix a few bugs in named mutexes
- When using pthread mutexes, if the mutex tells us that it was abandoned (due to owning process abruptly shutting down), it was calling ReleaseMutex (which takes a handle) on the pthread mutex object. It shouldn't be releasing the lock anyway.
- When a locked mutex is closed, it wasn't being removed from the owner thread's list of owned named mutexes. This case should be treated as abandoned.
- Since this could potentially happen from a different thread too, added the lock owner thread to the process data, added a critical section around list operations, and I now remove the process data from the owner thread's list on Close.
- Parent/child named mutex pal tests:
- Cleaned up tests by refactoring the setup/cleanup code
- Fixed a race where the parent may start a new child test before the previous child test closes its events
- Added new tests for verifying that a mutex is locked after it reports that it was abandoned, and abandoning by closing a locked mutex
Commit migrated from https://github.com/dotnet/coreclr/commit/
b75ddb170e50887677b94f757df8271b9c0d483e
Jan Vorlicek [Fri, 20 May 2016 16:49:48 +0000 (18:49 +0200)]
Add gchist SOS commands for Unix (dotnet/coreclr#5127)
This change adds HistClear, HistInit, HistObj, HistObjFind and HistRoot
commands to SOS on Unix
Commit migrated from https://github.com/dotnet/coreclr/commit/
3c61cb45c73ec7dd156475f95853abb2a6d74af0
Jose Perez Rodriguez [Fri, 20 May 2016 16:04:50 +0000 (09:04 -0700)]
Updating the version of buildtools we use to add commit hashes to native binaries (dotnet/coreclr#5103)
Commit migrated from https://github.com/dotnet/coreclr/commit/
d447c9afd906ce3cfb2fb2ffaaf2b42192cdc04f
John Chen [Fri, 20 May 2016 15:01:41 +0000 (08:01 -0700)]
Merge pull request dotnet/coreclr#5052 from JohnChen0/r2r
Initial Ready-to-Run tests for generics
Commit migrated from https://github.com/dotnet/coreclr/commit/
409c6cba761306b352e9eee7505ce55cf762b330
Jarret Shook [Fri, 20 May 2016 14:39:47 +0000 (07:39 -0700)]
Merge pull request dotnet/coreclr#5109 from jashook/b103058_exclude
Mark b103058 as stress sensitive
Commit migrated from https://github.com/dotnet/coreclr/commit/
0e8f00c1a8956e22c13b0608df5f7c2ab1f07b9d
Jarret Shook [Fri, 20 May 2016 14:38:04 +0000 (07:38 -0700)]
Merge pull request dotnet/coreclr#5108 from jashook/locals_exclude_min_opts
Mark opt/perf/doublealign/Locals stress sensitive
Commit migrated from https://github.com/dotnet/coreclr/commit/
1c045dfbbfb7b30d64ec2ed6fe0fd1003c279c82
Hanjoung Lee [Fri, 20 May 2016 14:37:48 +0000 (23:37 +0900)]
Fix typo in runtest.sh (dotnet/coreclr#5125)
Signed-off-by: Hanjoung Lee hanjoung.lee@samsung.com
Commit migrated from https://github.com/dotnet/coreclr/commit/
49592861227c6981e1c0e278db8e4d867af037ea
Gaurav Khanna [Wed, 18 May 2016 04:57:21 +0000 (21:57 -0700)]
Throw InvalidProgramException when a method with varargs is encountered.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0a427c6d6d87e69ce0f87dafd2f965ee989e6d29
Lee Culver [Fri, 20 May 2016 06:46:00 +0000 (23:46 -0700)]
Prevent core dumps at shutdown when the ETW subsystem races with debugger cleanup. (dotnet/coreclr#5066)
Commit migrated from https://github.com/dotnet/coreclr/commit/
1d326bbdc1ebbd25b4680d3c801d3a9fb1b7bdbc
Geunsik Lim [Fri, 20 May 2016 06:43:33 +0000 (15:43 +0900)]
Documentation: Add CoreCLR binary folder to test results (dotnet/coreclr#5084)
When we get the test result with ./coreclr/tests/runtest.sh,
it is difficult to classify the build mode that we used after some days.
Let's add information of the CoreCLR binary folder in order to
know easily the build mode between debug-build and release-build mode.
Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
c6ac87f88f533cea120bbbd2c273a2e78cc2ea1f
Fadi Hanna [Fri, 20 May 2016 06:42:02 +0000 (23:42 -0700)]
Implementation of the following generic dictionary entries for R2R: (dotnet/coreclr#5079)
MethodDescSlot
MethodEntrySlot
DispatchStubAddrSlot
Commit migrated from https://github.com/dotnet/coreclr/commit/
7ea2604efd2c58e6279f19e069c844e50f3acbfa
Jan Kotas [Fri, 20 May 2016 06:39:35 +0000 (23:39 -0700)]
Merge pull request dotnet/coreclr#5111 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
8af8300d4a24e674b69b8399fc1a6de3cdcb7bc8
Jan Kotas [Fri, 20 May 2016 06:39:22 +0000 (23:39 -0700)]
Merge pull request dotnet/coreclr#5121 from dotnet/revert-5075-Fix4940
Revert "Change to reject varag methods"
Commit migrated from https://github.com/dotnet/coreclr/commit/
8fe3e8981017df9da8c15ddb0d01ab50c4f46dde
Koundinya Veluri [Fri, 20 May 2016 04:57:09 +0000 (21:57 -0700)]
Merge pull request dotnet/coreclr#5030 from kouvel/NamedMutex
Add named mutex for cross-process synchronization
Commit migrated from https://github.com/dotnet/coreclr/commit/
d3b3410eb8323a0286cd9c85441d962b3e7053cc
Brian Robbins [Fri, 20 May 2016 04:05:43 +0000 (21:05 -0700)]
Merge pull request dotnet/coreclr#5115 from brianrob/corelib_perfmap
Generate perfmap symbol file for System.Private.CoreLib
Commit migrated from https://github.com/dotnet/coreclr/commit/
d4393da0e714e889874115896af400fea2f530c8
Gaurav Khanna [Fri, 20 May 2016 04:03:33 +0000 (21:03 -0700)]
Revert "Change to reject varag methods"
Commit migrated from https://github.com/dotnet/coreclr/commit/
2eeabc0043ec11183eac773e9805c7eb5eed12fd
Gaurav Khanna [Fri, 20 May 2016 03:54:08 +0000 (20:54 -0700)]
Merge pull request dotnet/coreclr#5075 from gkhanna79/Fix4940
Change to reject varag methods
Commit migrated from https://github.com/dotnet/coreclr/commit/
4cc01b4468fb3fc8ce23fab6d7e8a31909538a2f
Rama krishnan Raghupathy [Fri, 20 May 2016 03:06:31 +0000 (20:06 -0700)]
Merge pull request dotnet/coreclr#5118 from ramarag/fixexchangeTStest
Removing ' from bash command line
Commit migrated from https://github.com/dotnet/coreclr/commit/
ae56f73c9dd94c27d6ab9868ba3fafddcacc6c51
Yi Zhang (CLR) [Fri, 20 May 2016 03:01:43 +0000 (20:01 -0700)]
Merge pull request dotnet/coreclr#5092 from yizhang82/icastable-fix2
Fix x86 only ICastable feature bug when we pass RuntimeTypeHandles
Commit migrated from https://github.com/dotnet/coreclr/commit/
c2366d1707067a0561fcc7898638522463043d2e
Sivarv [Fri, 20 May 2016 02:13:49 +0000 (19:13 -0700)]
Merge pull request dotnet/coreclr#5085 from sivarv/tcfix
Tail call test failure fixes.
Commit migrated from https://github.com/dotnet/coreclr/commit/
55f7034679a47fa8f905b7d66e75ac9fbcba96cd
Pat Gavlin [Fri, 20 May 2016 02:05:53 +0000 (19:05 -0700)]
Add some quirk and versioning flags and change some preprocessor symbols into fields of CORINFO_EE_INFO.
The quirk flags--CORJIT_FLG2_JIT32_QUIRKS and CORJIT_FLG2_JIT64_QUIRKS--are passed by the EE to request that the JIT
generate appropriately compatible executable code. These flags are only passed on x86/Windows and x64/Desktop/Windows,
respectively.
Version numbers for GC and EH info have been added to CORINFO_EE_INFO. The EE sets these versions to indicate the
formats of the aforementioned data that it supports.
CORINFO_PAGE_SIZE and MAX_UNCHECKED_OFFSET_FOR_NULL_OBJECT have been converted to fields on CORINFO_EE_INFO.
[tfs-changeset: 1606533]
Commit migrated from https://github.com/dotnet/coreclr/commit/
aa752704910dd2322be7733f0f648e3733522f42
Rama Krishnan Raghupathy [Fri, 20 May 2016 01:45:16 +0000 (18:45 -0700)]
Removing ' from bash command line
Commit migrated from https://github.com/dotnet/coreclr/commit/
ac868788000c683bbd6738b9938cf0e8588b0d67
Brian Robbins [Thu, 19 May 2016 23:08:32 +0000 (16:08 -0700)]
Generate perfmap symbol file for System.Private.CoreLib.
Commit migrated from https://github.com/dotnet/coreclr/commit/
abecf3a0db2c01e1c086af65c062885f5534b3c3
Andy Ayers [Fri, 20 May 2016 00:33:10 +0000 (17:33 -0700)]
Merge pull request dotnet/coreclr#5067 from AndyAyersMS/CalleeHashInXml
Inliner: small changes to inline xml
Commit migrated from https://github.com/dotnet/coreclr/commit/
174d6355db5ab8405097793f5600bbc336e0c562
Gaurav Khanna [Fri, 20 May 2016 00:21:40 +0000 (17:21 -0700)]
Baseline more tests
Commit migrated from https://github.com/dotnet/coreclr/commit/
777f5bd6ac26541c927924e12074b96e1cd1ea45
Jiyoung Giuliana Yun [Fri, 20 May 2016 00:01:53 +0000 (09:01 +0900)]
Fix case-sensitive issue on Linux (dotnet/coreclr#5086)
Fix dotnet/coreclr#5035
The file paths should be case-sensitive on Linux.
Signed-off-by: Jiyoung Yun <jy910.yun@samsung.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
ec5f215aff689ff4db698cfc11d9e48691398f67
Sejong Oh [Thu, 19 May 2016 23:56:14 +0000 (16:56 -0700)]
Add JitOptimizationSensitive property to GC/API/WeakReference/IsAlive.csproj and GC/API/GCHandle/Weak.csproj
The testcases could fail if a reference is assigned to a stack temp.
Commit migrated from https://github.com/dotnet/coreclr/commit/
d42776308dd17a150190dc8ccd5939c2c7179915
Koundinya Veluri [Wed, 20 Apr 2016 13:57:19 +0000 (06:57 -0700)]
Add named mutex for cross-process synchronization
Fixes dotnet/coreclr#3422
- On systems that support pthread process-shared robust recursive mutexes, they will be used
- On other systems, file locks are used. File locks unfortunately don't have a timeout in the blocking wait call, and I didn't find any other sync object with a timed wait with the necessary properties, so polling is done for timed waits.
Shared memory files:
- Session-scoped mutexes (name not prefixed, or prefixed with Local\) go in /tmp/coreclr/shm/session<sessionId>/<mutexName>
- Globally-scoped mutexes (name prefixed with Global\) go in /tmp/coreclr/shm/global/<mutexName>
- Contains shared state, and is mmap'ped into the process, see SharedMemorySharedDataHeader and NamedMutexSharedData for data stored
- Creation and deletion is synchronized using an exclusive file lock on the shm directory
- Any process using the shared memory file holds a shared file lock on the shared memory file
- Upon creation, if the shared memory file already exists, an exclusive file lock is attempted on it, to see if the file data is valid. If no other processes have the mutex open, the file is reinitialized.
- Upon releasing the last reference to a mutex in a process, it will try to get an exclusive lock on the shared memory file to see if any other processes have the mutex opened. If not, the file is deleted, along with the session directory if it's empty. The coreclr and shm directories are not deleted.
- This allows managing the lifetime of mutex state based on active processes that have the mutex open. Depending on how the process terminated, the file may still be left over in the tmp directory, I haven't found anything that can be done about that.
Lock files when using file locks:
- In addition to the shared memory file, we need another file for the actual synchronization file lock, since a file lock on the shared memory file is used for lifetime purposes.
- These files go in /tmp/coreclr/lockfiles/session<sessionId>|global/<mutexName>
- The file is empty, and is only used for file locks
Process data
- See SharedMemoryProcessDataHeader and NamedMutexProcessData for data stored
- Per mutex name, there is only one instance of process data that is ref-counted. They are currently stored in a linked list in SharedMemoryManager. It should use a hash table, but of the many hash table implementations that are already there, none seem to be easily usable in the PAL. I'll look into that and will fix later.
- Refers to the associated shared memory, and knows how to clean up both the process data and shared data
- When using file locks for synchronization, a process-local mutex is also created for synchronizing threads, since file locks are owned at the file descriptor level and there is only one open file descriptor in the process per mutex name. The process-local mutex is locked around the file lock, so that only one thread per process is ever trying to flock on a given file descriptor.
Abandon detection
- When a lock is acquired, the process data is added to a linked list on the owning thread
- When a thread exits, the list is walked, each mutex is flagged as abandoned and released
- For detecting process abruptly terminating, pthread robust mutexes give us that. When using file locks, the file lock is automatically released by the system. Upon acquiring a lock, the lock owner info in the shared memory is checked to see if the mutex was abandoned.
Miscellaneous
- CreateMutex and OpenMutex both create new handles for each mutex opened. Each handle just refers to the process data header for the mutex name.
- Some of the above features are already available in the PAL, but not quite in a way that I can use for this purpose. The existing shared memory, naming, and waiting infrastructure is not suitable for this purpose, and is not used.
Commit migrated from https://github.com/dotnet/coreclr/commit/
249221697fc5cf18c07566bac0e9f0eb6525218a
Sejong Oh [Thu, 19 May 2016 23:21:42 +0000 (16:21 -0700)]
Merge pull request dotnet/coreclr#4963 from sejongoh/vector3_clear_upperbits
Vector3 clear upperbits
Commit migrated from https://github.com/dotnet/coreclr/commit/
9d7254efd6d1ef5d7c9aa8583eb1f6cccff6dfbc
Matt Ellis [Thu, 19 May 2016 18:48:56 +0000 (11:48 -0700)]
Ignore empty collation elements in EndsWith
We should ignore empty collaction elements at the end of the string
when doing our EndsWith checks. This means the match ICU finds might
not span to the end of string, but the only elements after the match
before the end are completely ignorable.
U+00AD (SOFT HYPHEN) is one such case where the codepoint is completely
ignorable.
Fixes dotnet/corefxdotnet/coreclr#3467
Commit migrated from https://github.com/dotnet/coreclr/commit/
4cdc520c627c655d9ebe52cc715baf2a30f2337d
Tarek Mahmoud Sayed [Thu, 19 May 2016 23:09:03 +0000 (16:09 -0700)]
Remove the wrong optimization from the string initialization (dotnet/coreclr#5107)
The string initilaization misteknly setting some flag for characters under 0x80
the fix here is just remove this part (per Jan Kotas recommendation)
Commit migrated from https://github.com/dotnet/coreclr/commit/
9e00c86e744d1db8737b5e52ac7111b1aab82e8c
Jan Kotas [Thu, 19 May 2016 23:08:39 +0000 (16:08 -0700)]
Merge pull request dotnet/coreclr#5106 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
1205aa01a485a49c4856e1637b1f7e87d12cd30a
Yi Zhang [Thu, 19 May 2016 06:05:53 +0000 (23:05 -0700)]
Fix x86 only ICastable feature bug.
When we call ICastable.IsInstanceOfInterface, we treat RuntimeTypeHandle as a OBJECTREF, which is incorrect as-per x86 calling convention since RuntimeTypehandle is a struct that contains a RuntimeType ref field and needs to be passed in stack. Our VM simple call helpers CALL_MANAGED_METHOD doesn't handle this correctly (it does the simple thing that always assume all the arguments are passed in register first). I'm fixing this by using a static method that takes RuntimeType instead of RuntimeTypeHandle, then convert it to RuntimeTypehandle.
Also switch to use PREPARE_NONVIRTUAL_CALLSITE(METHODID) as per Jan's suggestion.
ICastable test is now enabled in x86 for both JITs.
Commit migrated from https://github.com/dotnet/coreclr/commit/
aa08b53d25088dd9c2b7c9a8aa483b413906c7d4
Joel Hendrix [Thu, 19 May 2016 22:18:56 +0000 (15:18 -0700)]
Merge pull request dotnet/coreclr#5074 from jhendrixMSFT/master
Add sign.builds projects to facilitate real signing in official builds.
Commit migrated from https://github.com/dotnet/coreclr/commit/
fffe097e4a0b21b618543078a8fa19aec3d55856
Jeremy Kuhne [Thu, 19 May 2016 22:14:51 +0000 (15:14 -0700)]
Missing a check in the Unix part of the code.
[tfs-changeset: 1606433]
Commit migrated from https://github.com/dotnet/coreclr/commit/
c61b67485a363ee38e9882cc25d3a83f5239db49
sivarv [Thu, 19 May 2016 00:15:53 +0000 (17:15 -0700)]
Tail call test failure fixes.
Commit migrated from https://github.com/dotnet/coreclr/commit/
64256c38c4ca8951370ccda530bb668c52793465
Gaurav Khanna [Wed, 18 May 2016 04:57:21 +0000 (21:57 -0700)]
Throw InvalidProgramException when a method with varargs is encountered.
Commit migrated from https://github.com/dotnet/coreclr/commit/
af3aa9af73c8cb128e1d9f605483abf8a0c8616a
Jarret Shook [Thu, 19 May 2016 21:52:58 +0000 (14:52 -0700)]
Mark b103058 as stress sensitive
This test will not work under min opts, disable it under stress scenarios to address this.
Commit migrated from https://github.com/dotnet/coreclr/commit/
54106aec24fe02725b2290f85942c8c8eaf30539
Kyungwoo Lee [Thu, 19 May 2016 21:48:42 +0000 (14:48 -0700)]
Merge pull request dotnet/coreclr#5099 from kyulee1/fixr2r
ARM64: Fix R2R EntryPoint for Intrinsic
Commit migrated from https://github.com/dotnet/coreclr/commit/
00d3f3e45ee5648d8315c817b2e4bc0a76e4af4c
Jarret Shook [Thu, 19 May 2016 21:44:53 +0000 (14:44 -0700)]
Mark opt/perf/doublealign/Locals stress sensitive
The test is known to not work correctly under JitMinOpts. Disable it from running in that configuration.
Commit migrated from https://github.com/dotnet/coreclr/commit/
3098995d3417654973b194e53ab552d01c65a652
Russ Keldorph [Thu, 19 May 2016 21:39:49 +0000 (14:39 -0700)]
Merge pull request dotnet/coreclr#5098 from RussKeldorph/objects
Mark doublealign test as incompatible with GCStress
Commit migrated from https://github.com/dotnet/coreclr/commit/
257d8e5a26d597ca920250c80527f1f08270dc22
Russ Keldorph [Thu, 19 May 2016 21:39:09 +0000 (14:39 -0700)]
Merge pull request dotnet/coreclr#5100 from RussKeldorph/gcstress
Fix GCStress=0xC when build(tests).cmd called from outside root
Commit migrated from https://github.com/dotnet/coreclr/commit/
c48ac3e5cc8b100e808bc186aa98838bf7f49f61
Gaurav Khanna [Thu, 19 May 2016 19:54:30 +0000 (12:54 -0700)]
Merge pull request dotnet/coreclr#5091 from gkhanna79/Fix4531
Make Microsoft.NetCore.JIT package dependency of CoreCLR package
Commit migrated from https://github.com/dotnet/coreclr/commit/
c446e514885e91171cd77dc6d8a9b2cf9d6ca93b
Sejong OH [Fri, 13 May 2016 00:06:45 +0000 (17:06 -0700)]
Initialize unused upper bits of Vector3 arguments and return registers for
Linux
JIT requires the unused upper bits to be cleared but native compiler
doesn't clear the upper bits. This changes clear those bits for Reverse
PInvoke arguments and PInvoke return.
Commit migrated from https://github.com/dotnet/coreclr/commit/
eb4c7a280a00b344a9bb4d35172d0a0936ec5bdd
John Chen (CLR) [Wed, 18 May 2016 06:58:14 +0000 (23:58 -0700)]
Initial Ready-to-Run tests for generics
* Added some generics tests intended for testing Ready-to-Run feature.
* Added capability to set ZapRequire=1, to ensure methods are
pre-compiled.
* Fix spelling of environment variables for case-sensitive platforms.
Commit migrated from https://github.com/dotnet/coreclr/commit/
3ece28810afd74d33af07225519c71433f4713f1
Alex Ghiondea [Thu, 19 May 2016 19:17:41 +0000 (12:17 -0700)]
Checking in on behalf of JKuhne
Fixing build break in K caused by the long file path work.
[tfs-changeset: 1606374]
Commit migrated from https://github.com/dotnet/coreclr/commit/
9acb5d6f68f7e0590e8be2542efdc8cc241dcec0
Joel Hendrix [Thu, 19 May 2016 18:33:21 +0000 (11:33 -0700)]
Add sign.builds projects to facilitate real signing in official builds.
New build project, sign.builds, is to be built post building of binaries
so that they can be real-signed in the official build.
Updated some project files with the correct strong name certificate.
Commit migrated from https://github.com/dotnet/coreclr/commit/
5b784c2a3b1de97a8ee164d70207a9ba172d1f41
Russ Keldorph [Thu, 19 May 2016 17:44:38 +0000 (10:44 -0700)]
Fix GCStress=0xC when build(tests).cmd called from outside root
Use absolute path intead of relative path when invoking
setup-runtime-dependencies.cmd, which is required for GCStress=0xC to
work.
Commit migrated from https://github.com/dotnet/coreclr/commit/
9e688eb0d58b2fd32a0247a87d8d92abf09e7d04
Sean Gillespie [Thu, 19 May 2016 17:17:17 +0000 (10:17 -0700)]
Merge pull request dotnet/coreclr#4991 from swgillespie/gcsimulator-buildandrun
Switch GCSimulator to BuildAndRun so that a shell wrapper gets generated
Commit migrated from https://github.com/dotnet/coreclr/commit/
2f456bb8ddcb0310a2499bf8d04391e632177481
Mike McLaughlin [Thu, 19 May 2016 17:14:56 +0000 (10:14 -0700)]
Implement source/line number support for Exception.StackTrace. (dotnet/coreclr#5078)
* Implement source/line number support for Exception.StackTrace.
Uses a new helper class (StackTraceSymbols) in System.Diagnostics.StackTrace assembly
to get source/line info for portable PDBs. On Windows both types of pdbs are support;
on xplat only portable PDBs.
The first part of the work is in the GetStackFramesInternal pinvoke to return the neccessary
info needed by the portable pdb reader: MethodToken, assembly path, loaded PE image address
and if in-memory symbol file, the address.
The second part is in the StackFrameHelper in mscorlib. It attempts to load the System.Diagnostics.StackTrace,
gets the new type and creates a delegate to the helper function which is called for each stack
frame.
* Code review feedback.
Commit migrated from https://github.com/dotnet/coreclr/commit/
76837be7f1216bc0a970b20c30db006c9e6dacbe
William Godbe [Thu, 19 May 2016 17:13:10 +0000 (10:13 -0700)]
Merge pull request dotnet/coreclr#5031 from wtgodbe/pipelineFix
Update build scripts to fix small errors
Commit migrated from https://github.com/dotnet/coreclr/commit/
8efc544d19b2cf893c7a8972d8d5cba234430074
Kyungwoo Lee [Thu, 19 May 2016 16:51:56 +0000 (09:51 -0700)]
ARM64: Fix R2R EntryPoint for Intrinsic
This is fix for missing case that we should handle call that needs to pass
indirect cell address. The call appears in rationalizer, which is
originally an intrinsic when we import it.
I also refactor the code so that when we set entryPoint we ensure
tagging such information on the tree.
Commit migrated from https://github.com/dotnet/coreclr/commit/
b71ba43f66481c00a229f81149c6a95f17cb47c0
Russ Keldorph [Thu, 19 May 2016 17:09:22 +0000 (10:09 -0700)]
Mark doublealign test as incompatible with GCStress
The test makes assumptions about allocation alignment that cannot be
expected to hold under GCStress, particularly on 32-bit platforms.
Commit migrated from https://github.com/dotnet/coreclr/commit/
fe2ec86eda24faef8fb5ec499b851b9a2a7c0a48
SaeHie Park [Thu, 19 May 2016 16:25:00 +0000 (01:25 +0900)]
ARM, SOS: correct IP and SP value in ClrStack command (dotnet/coreclr#5077)
This fixes casting 64bit pointer value in 32bit machines
that show wrong IP and SP values in ClrStack command.
Related Issue: dotnet/coreclr#5037
Commit migrated from https://github.com/dotnet/coreclr/commit/
b6aa7748182c468dc4e78b29382617befaea6a6a
Russ Keldorph [Thu, 19 May 2016 14:55:38 +0000 (07:55 -0700)]
Merge pull request dotnet/coreclr#5057 from RussKeldorph/smallframe
Exclude smallFrame for JIT32
Commit migrated from https://github.com/dotnet/coreclr/commit/
819eadd96c7cc3f2bbfe4115c056b6cef7f34495
Senthil [Thu, 19 May 2016 06:48:34 +0000 (23:48 -0700)]
Merge pull request dotnet/coreclr#5001 from AlexGhiondea/ReadAppContextOverrides
Introduce a way to override AppContext switches from the project.json
Commit migrated from https://github.com/dotnet/coreclr/commit/
456e30ed5c734f7cc803105f1fdbdfa9fac10c89
Jan Kotas [Thu, 19 May 2016 04:47:22 +0000 (21:47 -0700)]
Merge pull request dotnet/coreclr#5076 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
a4e871e26d7978c3024442e2c96f43083ce83057
mkborg [Thu, 19 May 2016 04:44:54 +0000 (08:44 +0400)]
Skip configuration with skipnative option. (dotnet/coreclr#5059)
Fixes dotnet/coreclr#4022.
Commit migrated from https://github.com/dotnet/coreclr/commit/
eafbe6ef0952db40e71fbfddba2397c185ef8064
Gaurav Khanna [Thu, 19 May 2016 04:38:48 +0000 (21:38 -0700)]
Make Microsoft.NetCore.JIT package dependency of CoreCLR package
Commit migrated from https://github.com/dotnet/coreclr/commit/
c773914a8cde128510e1750e2aa206807522838c
Kyungwoo Lee [Thu, 19 May 2016 03:36:50 +0000 (20:36 -0700)]
Merge pull request dotnet/coreclr#5073 from kyulee1/newtest
ARM64: New Test Binary Update
Commit migrated from https://github.com/dotnet/coreclr/commit/
cf5bc14d24a48bbb1a4b302aa1ef2217f447dccb
Kyungwoo Lee [Thu, 19 May 2016 01:30:55 +0000 (18:30 -0700)]
Merge pull request dotnet/coreclr#5020 from kyulee1/imp
ARM64: Enable End-To-End ReadyToRun (R2R) Crossgen
Commit migrated from https://github.com/dotnet/coreclr/commit/
6f69c6da157622b08ec48b23da48d75afbf55426
Kyungwoo Lee [Wed, 18 May 2016 21:10:57 +0000 (14:10 -0700)]
ARM64: New Test Binary Update
Currently 135 of 9661 are failing.
Those are marked as EXPECTED_FAIL.
~55: mcc failed due to differnet struct calling convetion
~13: regression from the prior tests: marked as EXPECTED_FAIL;REGRESS
~22: failures from new tests: marked as NEW;EXPECTED_FAIL
~45: HFA
Tests.lst head now contains git hash number which tells us what version
we use to build such binaries. This is also used to dispatch different test folder in the lab.
Commit migrated from https://github.com/dotnet/coreclr/commit/
10cbbf046f6443ad74d3c0ff4a6468acc833be50
sbomer [Wed, 18 May 2016 23:40:12 +0000 (16:40 -0700)]
Port from tfs: onload exception debugger crash fix (dotnet/coreclr#4868)
The ExceptionHijackPersonalityRoutine was retrieving a context from a
particular stack frame, but the calling conventions for the function
executing in that frame allow it to overwrite the context. This was
causing the debugger to crash for exceptions thrown from the onload
method in winforms on x64.
The fix is to instead retrieve the context from the previous stack
frame, whose layout is set up explicitly in ExceptionHijack.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f1d6f7abbc5dd716cea4dc75b3da8043b9759ded
Bruce Forstall [Wed, 18 May 2016 23:18:38 +0000 (16:18 -0700)]
Merge pull request dotnet/coreclr#5070 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
cc70bf864bb915c0541cfba86f8998fc905174b5
Sean Gillespie [Mon, 16 May 2016 18:53:07 +0000 (11:53 -0700)]
Switch GCSimulator to BuildAndRun so that a shell wrapper gets generated
Commit migrated from https://github.com/dotnet/coreclr/commit/
cecf706ee162973df21eab7315b425e7c96ff977
wtgodbe [Tue, 17 May 2016 23:27:35 +0000 (16:27 -0700)]
Update build scripts to fix small errors
Commit migrated from https://github.com/dotnet/coreclr/commit/
a9117c44ad2a370df9b3d337dca9283877387f08
Alex Ghiondea [Wed, 18 May 2016 21:57:00 +0000 (14:57 -0700)]
Explicitly reference the file containing the mscorlib reference assembly.
[tfs-changeset: 1606007]
Commit migrated from https://github.com/dotnet/coreclr/commit/
93926c831889efd914e786c7ca1a8a9db44050b8
Aditya Mandaleeka [Wed, 18 May 2016 21:51:05 +0000 (14:51 -0700)]
Merge pull request dotnet/coreclr#5039 from adityamandaleeka/sigterm_chaining
Put SIGTERM registration behind a PAL initialization flag
Commit migrated from https://github.com/dotnet/coreclr/commit/
c9dff80a222f30d1ff74e9ad1d5b8cdcb953897a
Hugh Bellamy [Wed, 18 May 2016 21:27:37 +0000 (22:27 +0100)]
Cache GetLowerBound in Array.Reverse and Array.Sort (dotnet/coreclr#5019)
- Avoids calling internal native method 4 times per sort: 2 times is
enough
- Avoids calling internal native method 2 times per reverse: 1 time is
enough
Commit migrated from https://github.com/dotnet/coreclr/commit/
a2fb9c1cead47d21723a137e6fc13ba4577c5c66
Kyungwoo Lee [Sat, 14 May 2016 20:06:57 +0000 (13:06 -0700)]
ARM64: Enable End-To-End ReadyToRun (R2R) Crossgen
Fixes https://github.com/dotnet/coreclr/issues/4649
The immediate issues was NYI on genEmitHelperCalls. The initial
implementation for the missing part was enough to just crossgen System.dll.
But running tests revealed various issues in crossgened binaries (R2R).
Most common user/helper calls in R2R are represented as indirect calls
similar to interface call using virtual stub dispatch cell --
thunk/helper needs a indirect cell address to update the final target
address on the data location. `IsDelayLoadHelper` and `IsLazyHelper` belong to
this case.
Instead of passing such parameter, x64/x86 uses an encoding trick -- it
assumes the call is dispatched like `call [addr]`. So from the return
address, runtime could extract indirect cell address. Unfortunately this is not
an option for arm64 (actually arm as well but I haven't fixed it in this
change) where indirect call on memory is not encodable.
So, I made the following changes:
1. For the call requiring that needs to pass indirect cell address, I
tagged the call tree via `setR2RRelativeIndir`. Tried to be comprehensive,
but I may miss something. Currently, it includes a regular call and
various helpers for (virtual) load function pointer/static data access, etc.
Hopely we change JIT/EE interface somehow that gives us such explicit information.
2. Use the X11 to record indirect cell address for such call tree in
lower similar to VSD.
3. Fixed encodings `ZapIndirectHelperThunk`. In particular the immediate
value/offset for `ldr` should be scaled down 4 times since HW will scale
it 4 times.
4. Implement `genEmitHelperCalls` for indirect case. This is not the case requiring indirect
cell address. This is the case we inlined the indirect helper thunk for
the speed. I'm seeing the case for size opt helper call, we invoke a
direct call to such thunk which actually uses x12 to dispatch the final
target. Likewise, I used x12 for this expansion which seems a trash register that is not
overlapped with arugments with jit helpers like writer barriers.
With this change, I've tested various cases/scenraios locally.
Also I've verified all tests are passed against mscorlib.ni.dll and System.ni.dll.
Commit migrated from https://github.com/dotnet/coreclr/commit/
3165d8e5bfddd78028c9eb2b5ea3ec995c71a849
Rama krishnan Raghupathy [Wed, 18 May 2016 21:17:54 +0000 (14:17 -0700)]
Merge pull request dotnet/coreclr#5069 from ramarag/R2RCleanup
Removing hard coded path Fixes dotnet/coreclr#5065
Commit migrated from https://github.com/dotnet/coreclr/commit/
a338ace5295674f967054dd5452a9a7c379e33ad
Yi Zhang (CLR) [Wed, 18 May 2016 20:36:13 +0000 (13:36 -0700)]
Merge pull request dotnet/coreclr#5048 from yizhang82/hostpath-fix
Move NATIVE_DLL_SEARCH_DIRECTORIES probing earlier right before we pr…
Commit migrated from https://github.com/dotnet/coreclr/commit/
0d5171c791f03e9b27e7f3370778e6d3debef40a
Russ Keldorph [Wed, 18 May 2016 20:10:28 +0000 (13:10 -0700)]
Merge pull request dotnet/coreclr#5044 from RussKeldorph/lifetime2
Fix and reenable lifetime2
Commit migrated from https://github.com/dotnet/coreclr/commit/
298ab3215d1c2cd34b96b3b2a0253d5a25fed47f
James Ko [Wed, 18 May 2016 20:09:33 +0000 (16:09 -0400)]
Remove Encoding FEATURE_* defines from mscorlib (dotnet/coreclr#5026)
* Remove Encoding FEATURE_* defines from mscorlib
* Remove strange character from Encoding.cs
Commit migrated from https://github.com/dotnet/coreclr/commit/
6cd92b2da7b3aac86598e7b8d7b6fad063239b6b
Rama Krishnan Raghupathy [Wed, 18 May 2016 19:28:20 +0000 (12:28 -0700)]
Removing hard coded path
Commit migrated from https://github.com/dotnet/coreclr/commit/
384667276402262556cbb805bceab42cc3389ac7
Bruce Forstall [Wed, 18 May 2016 19:33:06 +0000 (12:33 -0700)]
Merge pull request dotnet/coreclr#5062 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
7c441feb2cb34cce5cc8b76a11d8860eb462836e