Richard L Ford [Thu, 8 Oct 2015 20:21:14 +0000 (13:21 -0700)]
Fix incorrect runtime contract for FailedAssembly::Initialize
FailedAssembly::Initialize may call CLRException::GetHR.
CLRException::GetHR is marked GC_TRIGGERS.
FailedAssembly::Initialize has to be marked GC_TRIGGERS
as well.
Commit migrated from https://github.com/dotnet/coreclr/commit/
36a36a7b4fcf050525351b0f758512fa2887b3ca
Jan Kotas [Thu, 8 Oct 2015 19:48:41 +0000 (12:48 -0700)]
Merge pull request dotnet/coreclr#1718 from stephentoub/stringcasing_allocations
Reduce allocations in string.ToLower/ToUpper on Unix
Commit migrated from https://github.com/dotnet/coreclr/commit/
0eb192ec5d67810bae92e265910d4a177d650a93
Aditya Mandaleeka [Thu, 8 Oct 2015 19:20:23 +0000 (12:20 -0700)]
Merge pull request dotnet/coreclr#1683 from krixalis/master
Typos in qcall.h
Commit migrated from https://github.com/dotnet/coreclr/commit/
7582d1120bdab2bafcb5d5f05cdb9bea9deba40a
Mike McLaughlin [Thu, 8 Oct 2015 18:35:30 +0000 (11:35 -0700)]
Merge pull request dotnet/coreclr#1711 from mikem8361/unhand
Fix unhandled exception debugger notification
Commit migrated from https://github.com/dotnet/coreclr/commit/
0c06df1d4c2b4759c63be7da83f79c1270ce0fa0
stephentoub [Thu, 8 Oct 2015 15:51:14 +0000 (11:51 -0400)]
Reduce allocations in string.ToLower/ToUpper on Unix
On Windows, ToLower/ToUpper calls into InternalChangeCaseString in the runtime which does two optiizations:
- a 0-length check to just return an empty string if the source is empty
- allocates the string and writes the results into it directly
In our current Unix implementation, the ChangeCase implementation doesn't do either of these, no special-casing empty strings and first allocating a char[] into which the results are written and then constructing a string from that.
This commit brings the Unix implementation more in line with the Windows one, adding the 0-length check, and writing the results directly into the result string so as to avoid the unnecessary char[] allocation and copy.
Commit migrated from https://github.com/dotnet/coreclr/commit/
fbdbfa1241139848a38c66d2d3313529b30fc8b8
Jan Vorlicek [Thu, 8 Oct 2015 13:35:56 +0000 (15:35 +0200)]
Merge pull request dotnet/coreclr#1715 from janvorli/add-unhandled-exception-trap
Add high level unhandled exception trap
Commit migrated from https://github.com/dotnet/coreclr/commit/
3e82c94cafb35cef213665153ae59058b31dc368
Jan Vorlicek [Thu, 8 Oct 2015 12:41:56 +0000 (14:41 +0200)]
Add high level unhandled exception trap
After the recent exception handling changes, we were missing a high level
exception trap in the ExecuteAssembly. While it was fine for exceptions
comming from or through managed code, it was a problem for exceptions
happening in the ExecuteAssembly call chain before the managed code was
called.
So for example when ExecuteAssembly was called for assembly that didn't
have proper file access rights for the current user, the PAL_SEHException
leaked out of the host app (corerun) and the C++ runtime displayed
message like this:
libc++abi.dylib: terminating with uncaught exception of type PAL_SEHException
Abort trap: 6
The fix is to put back the unhandled managed exception trap that I've removed
with the recent exception handling changes, but to implement it in a slightly
different way - to contain exception holder.
This way, the call to InternalUnhandledExceptionFilter_Worker can be removed
from the UnwindManagedExceptionPass1, since this new trap would ensure it
is called for both the case when the one in UnwindManagedExceptionPass1 would
kick in and the case that this issue is fixing.
Commit migrated from https://github.com/dotnet/coreclr/commit/
253309471774373c3404818c7be2c5268597ff59
Stephen Toub [Thu, 8 Oct 2015 12:31:36 +0000 (08:31 -0400)]
Merge pull request dotnet/coreclr#1688 from kouvel/LoadFromNativeSearchPathsTest
Add unit test for loading native library from host-provided native se…
Commit migrated from https://github.com/dotnet/coreclr/commit/
c89c375cce7ee1e92c7b9e87f47de8e396b4cad9
Stephen Toub [Thu, 8 Oct 2015 02:37:47 +0000 (22:37 -0400)]
Merge pull request dotnet/coreclr#1702 from stephentoub/marshaling_allocs
Reduce garbage generated in StringBuilder marshaling
Commit migrated from https://github.com/dotnet/coreclr/commit/
8ee9ca8eacd9f9ba705707f23dfb3b381c9f2475
Brian Robbins [Wed, 7 Oct 2015 22:47:02 +0000 (15:47 -0700)]
Merge pull request dotnet/coreclr#1696 from brianrob/framepointers
Enable Frame Pointers for UNIX Builds
Commit migrated from https://github.com/dotnet/coreclr/commit/
b55cc2dfbd1486101d23d829f6e4e1313089ca35
Jan Kotas [Wed, 7 Oct 2015 22:42:37 +0000 (15:42 -0700)]
Merge pull request dotnet/coreclr#1693 from Kagamine/correct-word-spelling
Correct word spelling
Commit migrated from https://github.com/dotnet/coreclr/commit/
ee41080d445be450352370a8cf12a12c5b3aeaec
Jan Kotas [Wed, 7 Oct 2015 22:39:51 +0000 (15:39 -0700)]
Merge pull request dotnet/coreclr#1705 from kyulee1/protojit
Producing standalone Jit for testing
Commit migrated from https://github.com/dotnet/coreclr/commit/
9f2f56a174ad9bfbcdd4d5d02e35738d81fd723e
Mike McLaughlin [Wed, 7 Oct 2015 04:10:39 +0000 (21:10 -0700)]
Fix UnhandledException notifications. The IsDebuggerPresent check was left over from windows coreclr and prevented notifications from being sent.
Commit migrated from https://github.com/dotnet/coreclr/commit/
63f03435150a5deb5dcb94d3eec747e57851dd95
Mike McLaughlin [Wed, 7 Oct 2015 21:43:48 +0000 (14:43 -0700)]
Merge pull request dotnet/coreclr#1697 from mikem8361/osxbp
Fix managed breakpoints on OSX
Commit migrated from https://github.com/dotnet/coreclr/commit/
1a319210d5a3529e53713b60db023c9e123fc03a
stephentoub [Wed, 7 Oct 2015 21:43:00 +0000 (17:43 -0400)]
Address PR feedback
Remove addition of null terminator, which should already be added by ConvertToAnsi.
Commit migrated from https://github.com/dotnet/coreclr/commit/
d828af5feab1842cf8bcb533524f735f2f947767
Matt Mitchell [Wed, 7 Oct 2015 20:13:26 +0000 (13:13 -0700)]
Merge pull request dotnet/coreclr#1710 from mmitche/disable-centos-suse
Disable PRs on SuSE and CentOS until we get more nodes spun up
Commit migrated from https://github.com/dotnet/coreclr/commit/
12b348d224263a21d1c29d6075c3232d17d8d681
Matt Mitchell [Wed, 7 Oct 2015 20:11:20 +0000 (13:11 -0700)]
Disable PRs on SuSE and CentOS until we get more nodes spun up
Commit migrated from https://github.com/dotnet/coreclr/commit/
fe1da99deb2e2add5dfbc14729da3deb8ea9e102
Kyungwoo Lee [Mon, 5 Oct 2015 21:16:32 +0000 (14:16 -0700)]
Producing standalone Jit for testing
protojit.dll (Windows) / libprotojit.so (*nix) is produced in addition, which is a standalone Jit that are not attached to CoreCLR.
Note CoreCLR still embeds such Jit by default same as before to not disrupt the existing clients.
This (same) standalone Jit can be used for other testing purpose and also this can be specified as an altjit as well in CoreCLR.
Added to nuget dev package.
Commit migrated from https://github.com/dotnet/coreclr/commit/
465f56ef0c9c4b125d890e7ac0757e77d54e193c
Eric Erhardt [Wed, 7 Oct 2015 19:15:43 +0000 (14:15 -0500)]
Merge pull request dotnet/coreclr#1645 from eerhardt/Encoding
Implement Encodings on Linux
Commit migrated from https://github.com/dotnet/coreclr/commit/
565c81297f504128cccb7bc69b0a206edfb8e255
Mike McLaughlin [Wed, 7 Oct 2015 18:44:49 +0000 (11:44 -0700)]
Merge remote-tracking branch 'upstream/master' into osxbp
Commit migrated from https://github.com/dotnet/coreclr/commit/
7ab6730f5dc1c5724c9766c52fb743eee7979cfd
Josh Free [Wed, 7 Oct 2015 17:39:54 +0000 (10:39 -0700)]
Merge pull request dotnet/coreclr#1701 from janvorli/fix-osx-hardware-exceptions-2
Add missing file to the previous hardware exceptions fix
Commit migrated from https://github.com/dotnet/coreclr/commit/
b2d00c3774941c59352867b69489f6aadf93b6ac
stephentoub [Wed, 7 Oct 2015 16:48:53 +0000 (12:48 -0400)]
Reduce garbage generated in StringBuilder marshaling
When marshaling a StringBuilder In as Ansi (both done by default on Unix), we currently allocate enough native memory to hold the result. But then we use AnsiCharMarshaler.DoAnsiConversion to allocate a managed byte array and fill it with the converted results, and then we copy those results into the native memory. We can instead just call String's ConvertToAnsi directly, avoiding the extra managed array allocation and the extra memory copy.
Commit migrated from https://github.com/dotnet/coreclr/commit/
bf7a89cb0545b1c1f8d003770b7e8c71786f1ecb
Jan Vorlicek [Wed, 7 Oct 2015 16:45:43 +0000 (18:45 +0200)]
Add missing file to the previous hardware exceptions fix
Commit migrated from https://github.com/dotnet/coreclr/commit/
f4ba38110981f1ee72dad22ce6ffcb490ed70cc5
Matt Mitchell [Wed, 7 Oct 2015 15:41:51 +0000 (08:41 -0700)]
Merge pull request dotnet/coreclr#1692 from mmitche/add-netci
Initial commit of CI definition for inner loop
Commit migrated from https://github.com/dotnet/coreclr/commit/
1f21a82ee179d10882c22952c46617b6c9bc88b4
Matt Mitchell [Tue, 6 Oct 2015 22:56:08 +0000 (15:56 -0700)]
Initial commit of CI definition for inner loop
Commit migrated from https://github.com/dotnet/coreclr/commit/
706ff14711bebbd2fea3d3cccc567626fb0811ae
Eric Erhardt [Mon, 28 Sep 2015 22:41:01 +0000 (17:41 -0500)]
Implement Encodings on Linux
Our current Encodings implementation on Linux is stubbed out and
needs to be fully implemented for CoreClr.
Fix https://github.com/dotnet/corefx/issues/2774.
Commit migrated from https://github.com/dotnet/coreclr/commit/
64ae6f777b94330b8b61511c4a9912ab498971df
Jan Kotas [Wed, 7 Oct 2015 13:26:14 +0000 (06:26 -0700)]
Merge pull request dotnet/coreclr#1699 from janvorli/fix-osx-hardware-exceptions
Fix OSX hardware exception handling
Commit migrated from https://github.com/dotnet/coreclr/commit/
e6c4a4062a722373da88a3d4c61ad4e04f4ffc6c
Jan Vorlicek [Wed, 7 Oct 2015 12:21:36 +0000 (14:21 +0200)]
Fix OSX hardware exception handling
In my recent change that has added the runtime suspension for OSX,
I have also added a fix for the unwind info of the PAL_DispatchExceptionWrapper
function. It turns out that I've made a mistake in the offset in the set_cfa_register
and it has broken hardware exception handling on OSX since the unwinder was not
able to unwind correctly through the wrapper.
It also turns out that the same wrong offset in set_cfa_register is in the
ActivationHelperWrapper.S, but in that function, the unwinding still works correctly.
I've actually verified that with both the wrong and the correct offset, the unwinder
gets the same correct RSP / RBP at the time of the exception. So I believe linked ignored
the DWARF unwind info and used compact unwind info instead that it was able to
derive correctly on its own.
Also, the allocate_stack was incorrectly placed before the set_cfa_register, which again
didn't cause a problem due to the DWARF info being ignored. The issue with this one was
that it updates the CFA, but the CFA offset is relative to RBP at that point and
RBP didn't change.
As an additional fix, there was a problem in PAL_VirtualUnwind that @sergiy-k has
spotted. The return value of the recently added unw_is_signal_frame call was
overwriting the status code returned by the unw_step that we use on OSX to
detect walking out of stack.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f1a03d87c7d43820bca94c0a5a7945e132f3b0e7
Koundinya Veluri [Tue, 6 Oct 2015 08:38:00 +0000 (01:38 -0700)]
Add unit test for loading native library from host-provided native search paths
Also used and added to existing macros for separator chars and removed the new members I had added to the Path class.
Related to dotnet/coreclr#1680
Commit migrated from https://github.com/dotnet/coreclr/commit/
dba31572605bc370b3b9eee403b3d2bb56cc4b56
Matt Ellis [Wed, 7 Oct 2015 06:47:20 +0000 (23:47 -0700)]
Merge pull request dotnet/coreclr#1694 from janvorli/fix-exception-handling-issue
Fix issue in the new exception handling
Commit migrated from https://github.com/dotnet/coreclr/commit/
b6ef71da841d460e2c77e1e75cfc8c1732dafd77
Mike McLaughlin [Tue, 6 Oct 2015 23:44:07 +0000 (16:44 -0700)]
Suppress debug exceptions when running under native (lldb/gdb) debugger.
Commit migrated from https://github.com/dotnet/coreclr/commit/
187ca0f9bce9e113f06beb34d5c5a45aa9c7c0fe
Mike McLaughlin [Tue, 8 Sep 2015 23:26:28 +0000 (16:26 -0700)]
Fix managed breakpoints on OSx.
Changed the OSx exception initialization to enable breakpoints/stepping.
Fix problem with faults and breakpoints in coreclr code not being forwarded to
native debugger (if being debugged).
Fix debugger shutdown where we release the transport too many times and assert in debug.
When building the register context for an exception don't save/restore the debug
registers because they cause an priviledged instruction fault.
Fixed the PAL's TRACE formatting by merging the printfcpp.cpp formatting into
silent_printf.cpp. "%p" wasn't being formatted correctly in a PAL TRACE statement.
The executable heap zone wasn't being set because the process heap
is used instead of creating a new heap.
Commit migrated from https://github.com/dotnet/coreclr/commit/
08f67f0acdb3935acc30b0a0f0ebee21513f2668
Brian Robbins [Tue, 6 Oct 2015 23:36:54 +0000 (16:36 -0700)]
Compile with frame pointers on UNIX builds.
Commit migrated from https://github.com/dotnet/coreclr/commit/
ebc35416c4b57a3415f4f1bbde385e159eb520ca
あまみや ゆうこ [Tue, 6 Oct 2015 23:00:15 +0000 (07:00 +0800)]
correct word spelling
Commit migrated from https://github.com/dotnet/coreclr/commit/
1f940efbe82d6ba5a9c7f8269f087d0709d77011
Jan Kotas [Tue, 6 Oct 2015 22:40:08 +0000 (15:40 -0700)]
Merge pull request dotnet/coreclr#1666 from jasonwilliams200OK/master
cmake: cleanup FreeBSD system include path
Commit migrated from https://github.com/dotnet/coreclr/commit/
287741559a8242acc398ab46b890dd5fbcefb3dd
Jan Kotas [Tue, 6 Oct 2015 22:39:44 +0000 (15:39 -0700)]
Merge pull request dotnet/coreclr#1687 from jasonwilliams200OK/__fastcall-Wmacro-redefined
code: Fix redefined macro warning
Commit migrated from https://github.com/dotnet/coreclr/commit/
6a1093d858037903625bc3581c56658bf83803e3
Jan Vorlicek [Tue, 6 Oct 2015 21:46:49 +0000 (23:46 +0200)]
Fix issue in the new exception handling
There was a problem with scanned stack range stored in an exception tracker.
After unwinding a sequence of native frames during the 2nd pass of unwinding,
the scanned stack range was not cleared and referenced stack frames that
were unwound. In some rare cases related to throwing an exception from
a catch handler, this was causing the exception handling to consider stack
frames that accidentally had the same range of addresses as already visited,
which resulted in a wrong exception handler being executed.
Commit migrated from https://github.com/dotnet/coreclr/commit/
72cc25a8ef0c014cb9a899d51126cd00ed5823af
Peter Jas [Tue, 6 Oct 2015 18:13:59 +0000 (18:13 +0000)]
code: Fix redefined macro warning.
For example, in this log:
https://dotnet-ci.cloudapp.net/job/dotnet_coreclr_freebsd_debug_prtest/1082/consoleFull
search for '-Wmacro-redefined'. All 26 occurences are pointing to this line.
Commit migrated from https://github.com/dotnet/coreclr/commit/
6c152931f469c1336f5841d6d7f29fb20cd71308
Sergiy Kuryata [Tue, 6 Oct 2015 19:38:49 +0000 (12:38 -0700)]
Merge pull request dotnet/coreclr#1675 from wtgodbe/clrBugFixes
Fixed small bugs in decodemd.cpp, gcrecord.h, gc.cpp, Strike/util.cpp…
Commit migrated from https://github.com/dotnet/coreclr/commit/
ef9e505c66a82dc6928b8ddf9332a88e675d532d
William Godbe [Tue, 29 Sep 2015 21:06:58 +0000 (14:06 -0700)]
Fixed small bugs in decodemd.cpp, gcrecord.h, gc.cpp, Strike/util.cpp, and strike.cpp, as outlined in this article: viva64.com/en/b/0310/#ID0E5BJM
Commit migrated from https://github.com/dotnet/coreclr/commit/
e3942e300637c6e9a3d098476fafa11ab062642a
Marvin [Mon, 5 Oct 2015 22:05:40 +0000 (00:05 +0200)]
Typos in qcall.h
Apparently both "marshaling" and "marshalling" are valid, but for consistency's sake I opted for what the MSDN uses.
Commit migrated from https://github.com/dotnet/coreclr/commit/
311c9113e1209a886f85acb8b77021df2ea881e9
Matt Ellis [Mon, 5 Oct 2015 22:39:52 +0000 (15:39 -0700)]
Merge pull request dotnet/coreclr#1662 from steveharter/master
fix ICU compile error on CentOS
Commit migrated from https://github.com/dotnet/coreclr/commit/
bc146608854d1db9cdbcc0b08029a87754e12b49
Jan Vorlicek [Mon, 5 Oct 2015 21:21:54 +0000 (23:21 +0200)]
Merge pull request dotnet/coreclr#1677 from janvorli/refactor-exception-handling
Implement refactored Unix managed exception handling
Commit migrated from https://github.com/dotnet/coreclr/commit/
7889c40b6fb68ecd57a53894544f7a3ae111de0f
Koundinya Veluri [Mon, 5 Oct 2015 18:36:55 +0000 (11:36 -0700)]
Merge pull request dotnet/coreclr#1681 from kouvel/FixPathSeparators
Fix loading native libraries from native search paths provided by the…
Commit migrated from https://github.com/dotnet/coreclr/commit/
f7461fed79d952532146891de7c2746758fa9a88
Koundinya Veluri [Sat, 3 Oct 2015 18:45:17 +0000 (11:45 -0700)]
Fix loading native libraries from native search paths provided by the host
Fixed a couple of issues outside Windows regarding the directory separator char, path separator char, and absolute path determination.
Fixes dotnet/coreclr#1680
Commit migrated from https://github.com/dotnet/coreclr/commit/
ca6c4a9e7b6cb893ce1a79442f5048312d7f6357
Steve Harter [Thu, 1 Oct 2015 22:18:00 +0000 (17:18 -0500)]
Fix ICU compile error on CentOS by using DateFormatSymbols::NARROW insead of SHORT as SHORT is not defined in the version 50 of ICU being used by Centos. SHORT was added in ICU 51.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4c11093793d420093e3a0eba51de31b804afc269
Jan Vorlicek [Mon, 5 Oct 2015 15:49:28 +0000 (17:49 +0200)]
Few fixes
This change fixes few issues that I've found:
- The frame popping in the Frame destructor is still needed, so I've put it back.
- There was a problem (I've found that it was there before this change) with the "ex"
variable passed to the StartUnwindingNativeFrames. The local was in frames that were
obsoleted by the StartUnwindingNativeFrames before the ThrowExceptionHelper was called.
And when runtime called malloc to allocate its internal exception data, the stack
of the malloc has overwritten part of the PAL_SEHException. It was not visible before
since that part was in the end of the ContextRecord. But now that I've put the
TargetFrameSp to the end of the PAL_SEHException, it was sometimes getting overwritten.
The fix is to create a copy of the "ex" out of stack.
Commit migrated from https://github.com/dotnet/coreclr/commit/
83c1a657ecac35030d4c1e0204daf12201535874
Jan Vorlicek [Fri, 2 Oct 2015 12:55:07 +0000 (14:55 +0200)]
Implement refactored Unix managed exception handling
This change refactors managed exception handling so that we perform full first
pass over both managed and native frames and only after we find target frame,
we perform the second pass.
This helps in debugging of unhandled managed exceptions since the debugger can
kick in at the end of the first pass when the stack frames are still intact and
it can show the context where the exception was fired.
Commit migrated from https://github.com/dotnet/coreclr/commit/
a723811c171a3dae340a08f24afedbfc238b7930
Matt Mitchell [Fri, 2 Oct 2015 23:17:49 +0000 (16:17 -0700)]
Merge pull request dotnet/coreclr#1672 from kouvel/IncludeTestsInBuildSh
On builds outside Windows, build native test components by default
Commit migrated from https://github.com/dotnet/coreclr/commit/
125fd8145cd2b57e6ad362910583c10b7f8a493d
Koundinya Veluri [Fri, 2 Oct 2015 18:05:54 +0000 (11:05 -0700)]
On builds outside Windows, build native test components by default
Commit migrated from https://github.com/dotnet/coreclr/commit/
ccfbffb17c5555b6c90e25d694777c0bd6a235fa
Mike McLaughlin [Fri, 2 Oct 2015 17:23:17 +0000 (10:23 -0700)]
Merge pull request dotnet/coreclr#1663 from mikem8361/excepthan
Add native exception filter holder.
Commit migrated from https://github.com/dotnet/coreclr/commit/
5f1ea77280c069eda75003014167771825d10b92
Peter Jas [Fri, 2 Oct 2015 10:02:28 +0000 (10:02 +0000)]
cmake: cleanup FreeBSD system include path.
Include once and DRY.
Similar change made at dotnet/corefxdotnet/coreclr#3487.
Commit migrated from https://github.com/dotnet/coreclr/commit/
44bb23f629e64cd5167a141f0c5436d970048787
Jan Vorlicek [Fri, 2 Oct 2015 08:37:53 +0000 (10:37 +0200)]
Merge pull request dotnet/coreclr#1665 from ursine/patch-1
Fix comment variable name
Commit migrated from https://github.com/dotnet/coreclr/commit/
13914f15dc9b8c7d87294bb97e6c8b2668b8ee38
Gary Coulbourne [Fri, 2 Oct 2015 02:04:44 +0000 (22:04 -0400)]
Fix comment variable name
Commit migrated from https://github.com/dotnet/coreclr/commit/
25b6f13be1e2e0a0567de2c3a1f0e330f8adc7a6
Mike McLaughlin [Sun, 27 Sep 2015 23:11:05 +0000 (16:11 -0700)]
Add native exception filter holder.
The problem is that the debugger unhandled managed exception notification is sent
because the proper filter function (InternalUnhandledExcpetionFilter) isn't called
and the filter can't be called currently during the first pass of managed exception
dispatch that it requires.
The NativeExceptionHolder is used to hold the filter handler for the
PAL_TRY/PAL_EXCEPT/PAL_EXCEPT_FILTER macros so managed exception dispatcher
can call them during the first pass like real SEH on Windows.
Commit migrated from https://github.com/dotnet/coreclr/commit/
339273c3298105c361a10d754608e804cf762b60
Jan Kotas [Thu, 1 Oct 2015 21:47:55 +0000 (14:47 -0700)]
Merge pull request dotnet/coreclr#1661 from janvorli/fix-crossgen
Fix wrong register with module address in crossgen on Unix
Commit migrated from https://github.com/dotnet/coreclr/commit/
9d286b828e42ca811dbee13481f5d94625572cc2
Jan Vorlicek [Thu, 1 Oct 2015 20:13:09 +0000 (22:13 +0200)]
Fix wrong register with module address in crossgen on Unix
This change fixes a crossgen bug when the module pointer as a parameter to
JIT_StrCns was incorrectly placed into RDX both on Windows and on Unix.
Since it is the second parameter to the function, the calling convention
on Unix requires it to be in RSI.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e141ac2dd779a13402dff04d2629845225095fc4
Jan Kotas [Thu, 1 Oct 2015 15:47:09 +0000 (08:47 -0700)]
Merge pull request dotnet/coreclr#1620 from justinvp/dictionary
Avoid the enumerator allocation in Dictionary's constructor
Commit migrated from https://github.com/dotnet/coreclr/commit/
b8d511ad6a9c259422a01cfd8d94ed08e06a09dd
Jan Kotas [Thu, 1 Oct 2015 15:41:50 +0000 (08:41 -0700)]
Merge pull request dotnet/coreclr#1650 from Dmitry-Me/fixLeftShiftIssue1526
Fix left shift of signed integer - issue 1526
Commit migrated from https://github.com/dotnet/coreclr/commit/
5c8eb2798a0417943132a98ad8239b800dfbd5e3
Jan Kotas [Thu, 1 Oct 2015 15:36:12 +0000 (08:36 -0700)]
Merge pull request dotnet/coreclr#1658 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
8ae735f177a7217a5a96580166f3eea81dbe93af
Jan Vorlicek [Thu, 1 Oct 2015 08:58:00 +0000 (10:58 +0200)]
Merge pull request dotnet/coreclr#1654 from janvorli/fix-isipinepilog-assert
Fix assert in IsIPInEpilog
Commit migrated from https://github.com/dotnet/coreclr/commit/
c31150a9284e07b0267b7cd901281862da63788d
Koundinya Veluri [Thu, 1 Oct 2015 06:50:41 +0000 (23:50 -0700)]
Merge pull request dotnet/coreclr#1638 from kouvel/CoreClrTests
Improve CoreCLR test runner outside Windows
Commit migrated from https://github.com/dotnet/coreclr/commit/
411a09f7e21e7f9070d941bd420be8b239880101
John Chen [Thu, 1 Oct 2015 04:08:57 +0000 (21:08 -0700)]
Fix SigPointer::PeekValueTypeTokenClosed to handle generic instantiation represented by ELEMENT_TYPE_INTERNAL
Integrate change dotnet/coreclr#1529861 from NetFXDev1
[tfs-changeset: 1532127]
Commit migrated from https://github.com/dotnet/coreclr/commit/
f97569360a2a0984a31270f75bcf7ba7e60c44d3
Jan Kotas [Thu, 1 Oct 2015 04:01:01 +0000 (21:01 -0700)]
Merge pull request dotnet/coreclr#1657 from Djuffin/disable_lu_ptrace
Remove references to libunwind-ptrace to fix build on RPM distros
Commit migrated from https://github.com/dotnet/coreclr/commit/
167f6cf5da60315946ca3d621c20a2530c0b42ae
Jan Kotas [Thu, 1 Oct 2015 03:59:48 +0000 (20:59 -0700)]
Merge pull request dotnet/coreclr#1656 from janvorli/exception-handling-perf
Improve Unix exception handling performance
Commit migrated from https://github.com/dotnet/coreclr/commit/
c7bbdbdf9d97bd54a983a67491e6ef2631e506f2
Eugene [Thu, 1 Oct 2015 01:09:12 +0000 (18:09 -0700)]
Remove references to libunwind-ptrace to fix build on RPM distros
Commit migrated from https://github.com/dotnet/coreclr/commit/
f1d46b8b6a2fd2a47afbcb6cf2e4194b557efdd1
Jan Vorlicek [Thu, 1 Oct 2015 00:55:30 +0000 (02:55 +0200)]
Improve Unix exception handling performance
This change adds caching of thread base / limit in PAL. Profiling has shown
extraction of the base / limit using pthread APIs to be the main contributors
to the bad performance.
With this fix, a simple loop with throw / catch is about 40 times faster than
before.
Commit migrated from https://github.com/dotnet/coreclr/commit/
97fe10f743275d5d3ff09dc7315afe3dd6dc6972
Jan Vorlicek [Wed, 30 Sep 2015 22:10:41 +0000 (00:10 +0200)]
Fix assert in IsIPInEpilog
The assert was incorrect for managed functions without body. Since there
is no easy way to find out that function has no body at that place,
the fix is to remove the assert.
Commit migrated from https://github.com/dotnet/coreclr/commit/
5ccd752bfaa38ff67e53e4c2046dd77fbbde6ede
Lakshmi Priya [Wed, 30 Sep 2015 21:57:41 +0000 (14:57 -0700)]
Merge pull request dotnet/coreclr#1524 from Priya91/stackstring
Add StackString class for stack/heap allocation for MAX_LONGPATH.
Commit migrated from https://github.com/dotnet/coreclr/commit/
6fa92e3cf8f013b5e694a4716f4b752375f38439
Koundinya Veluri [Wed, 30 Sep 2015 21:48:32 +0000 (14:48 -0700)]
Merge pull request dotnet/coreclr#1651 from kouvel/TpaPktFix
Remove the need for the PKT to match when binding to an assembly on t…
Commit migrated from https://github.com/dotnet/coreclr/commit/
ca8dc1370187dc2bd5fc2147999b77a74b5d12ee
Koundinya Veluri [Wed, 30 Sep 2015 20:22:13 +0000 (13:22 -0700)]
Merge pull request dotnet/coreclr#1646 from kouvel/HeapAllocationFix
Heap allocation fix
Commit migrated from https://github.com/dotnet/coreclr/commit/
7dac994dc3ee4bba846784f0079e54060dc030fb
Koundinya Veluri [Wed, 30 Sep 2015 19:20:52 +0000 (12:20 -0700)]
Remove the need for the PKT to match when binding to an assembly on the TPA list
There is some inconsistency in how binding works with and without a custom AssemblyLoadContext being active. By default, the binder allows binding to assemblies on the TPA list despite a PKT mismatch while searching app paths. This part is skipped when a custom AssemblyLoadContext is active.
It has been determined that generally, the binder shouldn't require the PKT to match, so disabling that check.
Fixes dotnet/coreclr#1640
Commit migrated from https://github.com/dotnet/coreclr/commit/
e780495d6e7575812fd5c42d4125c35b6054fa95
Lakshmi Priya Sekar [Thu, 10 Sep 2015 06:18:32 +0000 (23:18 -0700)]
Add StackString class for stack/heap allocation for MAX_LONGPATH.
Add stackstring.cpp to build.
Commit migrated from https://github.com/dotnet/coreclr/commit/
662ec11f4161edbedc5c70e3e43c32c9a07f1cde
Dmitry-Me [Wed, 30 Sep 2015 09:16:30 +0000 (12:16 +0300)]
Fix left shift of signed integer - issue 1526
Commit migrated from https://github.com/dotnet/coreclr/commit/
5bc51bf79f08ec47e12f5eb57a2c0fb9df09ab54
Justin Van Patten [Thu, 24 Sep 2015 19:38:32 +0000 (12:38 -0700)]
Dictionary constructor perf optimization
Regarding the constructor overloads that take an
IDictionary<TKey, TValue>: It is likely that the passed-in dictionary
is Dictionary<TKey, TValue>. When this is the case, avoid the
enumerator allocation and overhead by looping through the entries
array directly. This is only done when the dictionary is
Dictionary<TKey, TValue> and not a subclass, to maintain back-compat
with subclasses that may have overridden the enumerator behavior.
Commit migrated from https://github.com/dotnet/coreclr/commit/
ee52a8ffcaab89524a4137c807bbde65445f61ab
Koundinya Veluri [Fri, 18 Sep 2015 18:08:28 +0000 (11:08 -0700)]
Improve CoreCLR test runner outside Windows
CoreCLR tests will need to be built on Windows and copied over to a non-Windows machine. Then, coreclr/tests/runtest.sh along
with some switches can be used to run the tests.
Changes:
- Run tests in parallel by default (use --sequential to force sequential mode)
- Update Windows test build to produce the Windows core overlay that includes test dependencies that are not built
- Add a number of switches (see coreclr/tests/runtest.sh for details) to provide locations of:
- The Windows test build
- The CoreCLR native test build
- Either:
- This:
- The core layout (including all of the below)
- Or:
- The CoreCLR build
- mscorlib.dll
- The CoreFX build
- The CoreFX native build
- Using information from above, build or use the core layout, and copy native test binaries to the respective test directories
- Add --testDir to specify an inclusive list of test directories to run
- Add text files to exclude tests:
- coreclr/tests/testsUnsupportedOutsideWindows.txt - Tests that are not supported outside Windows
- coreclr/tests/testsFailingOutsideWindows.txt - Tests that are known to fail outside Windows and are temporarily disabled while they are investigated
- Add --runFailingTestsOnly to run only the tests listed in coreclr/tests/testsFailingOutsideWindows.txt to verify known failures
- Produce xUnit-style output for the CI, output goes into <Windows test build folder>/coreclrtests.xml
Commit migrated from https://github.com/dotnet/coreclr/commit/
f7f1b9ab91bb183dd180115ee287af74faa7acf9
Koundinya Veluri [Tue, 29 Sep 2015 21:01:57 +0000 (14:01 -0700)]
Fix HeapReAlloc to return a non-null pointer for a requested size of zero bytes
Commit migrated from https://github.com/dotnet/coreclr/commit/
23e878fcc063216fe02e9ac407f0370533d383e7
Jan Kotas [Tue, 29 Sep 2015 06:58:33 +0000 (23:58 -0700)]
Merge pull request dotnet/coreclr#1632 from bbowyersmyth/StringStartsWith
String.StartsWith ordinal optimization
Commit migrated from https://github.com/dotnet/coreclr/commit/
1572a8ab9b4f30459b3ae071cab2ae58e09e213d
Lakshmi Priya [Mon, 28 Sep 2015 22:56:03 +0000 (15:56 -0700)]
Merge pull request dotnet/coreclr#1589 from Priya91/pathstring
Use SString type - PathString for path allocations in binder.
Commit migrated from https://github.com/dotnet/coreclr/commit/
bdc5bce919855052679f07450065e17520674970
Koundinya Veluri [Mon, 28 Sep 2015 21:54:46 +0000 (14:54 -0700)]
Merge pull request dotnet/coreclr#1628 from kouvel/CppCheckFixes
Fix a few issues reported by cppcheck
Commit migrated from https://github.com/dotnet/coreclr/commit/
99458af30ac18c5b60afa7a68e241ed70b880eca
Bruce Bowyer-Smyth [Sun, 27 Sep 2015 20:47:43 +0000 (06:47 +1000)]
String.StartsWith ordinal optimization
Commit migrated from https://github.com/dotnet/coreclr/commit/
2005a137172d33f551b4370600ee3fc582a71177
Eric Eilebrecht [Sat, 26 Sep 2015 17:54:11 +0000 (10:54 -0700)]
Merge pull request dotnet/coreclr#1629 from ericeil/AsyncLocalPerf
Reduce allocations in AsyncLocal/ExecutionContext
1: Allocate a new AsyncLocal change notification list only if we need to add an item to the list.
2: Pre-size any collections we allocate, and manually copy into them to avoid IEnumerator allocations, etc.
3: Store the change notification list in an array, rather than a List, to avoid the extra List allocation.
Commit migrated from https://github.com/dotnet/coreclr/commit/
795786f0ac0e5ea82f288dfeb5b673845e1ef075
Eric Eilebrecht [Sat, 26 Sep 2015 17:50:10 +0000 (10:50 -0700)]
Merge branch 'AsyncLocalPerf' of https://github.com/ericeil/coreclr into AsyncLocalPerf
Commit migrated from https://github.com/dotnet/coreclr/commit/
afb78b146b5429f11817688c5277875ff5071021
Eric Eilebrecht [Fri, 25 Sep 2015 21:03:08 +0000 (14:03 -0700)]
Reduce allocations when setting AsyncLocal values
1: Allocate a new AsyncLocal change notification list only if we need to add an item to the list.
2: Pre-size any collections we allocate, and manually copy into them to avoid IEnumerator allocations, etc.
3: Store the change notification list in an array, rather than a List, to avoid the extra List allocation.
Commit migrated from https://github.com/dotnet/coreclr/commit/
9bc06f7e534a1989911d795528737d767c2b408d
Jan Kotas [Sat, 26 Sep 2015 13:42:29 +0000 (06:42 -0700)]
Merge pull request dotnet/coreclr#1617 from jamesqo/patch-1
Assign directly to this in Decimal constructor
Commit migrated from https://github.com/dotnet/coreclr/commit/
4f25a0f321d7d75af994223771c12d461602b6c9
Matt Ellis [Sat, 26 Sep 2015 01:15:07 +0000 (18:15 -0700)]
Merge pull request dotnet/coreclr#1630 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
190d5d868c7f434dd4a49f923417a400ada572dc
Eric Eilebrecht [Sat, 26 Sep 2015 00:30:53 +0000 (17:30 -0700)]
Store AsyncLocal notification list in an array, rather than a List.
This should further reduce allocations, as we don't need the intermediate List<IAsyncLocal> object.
Commit migrated from https://github.com/dotnet/coreclr/commit/
a0cfbd7a868cb56d0df4c02d235a9aeb699d150e
Matt Ellis [Sat, 26 Sep 2015 00:18:34 +0000 (17:18 -0700)]
Fix clang only build breaks
Some new code from TFS was triggering this error in clang:
`error: suggest braces around initialization of subobject`
I just made the obvious fix.
Commit migrated from https://github.com/dotnet/coreclr/commit/
bc966c6018f2e0e467d56fda62f2cbdaa63d0173
Rahul Kumar [Fri, 25 Sep 2015 21:03:54 +0000 (14:03 -0700)]
Fix for 134453: fix prefast warnings
[tfs-changeset: 1529946]
Commit migrated from https://github.com/dotnet/coreclr/commit/
6ac3cef4e3b82b3b9fbbce50a4a762e576464634
Gaurav Khanna [Fri, 25 Sep 2015 19:31:07 +0000 (12:31 -0700)]
VS has mentioned that when they have an AV come through their reflection invoked code, they endup getting TargetInvocationException that is not actionable and also does not help in the Watson bucketing for the issue. To address this, they would like an opt-in flag to force a failfast when a CSE remains unhandled within reflection invocation.
This change adds support for an opt-in flag that will trigger failfast in Reflection codepath inface of an unhandled CSE.
[tfs-changeset: 1529878]
Commit migrated from https://github.com/dotnet/coreclr/commit/
f0c1382fd5c65e44585b84a4bf3dd8ec86d73c6c
Koundinya Veluri [Sat, 26 Sep 2015 00:23:43 +0000 (17:23 -0700)]
Add AssemblyLoadContext.LoadUnmanagedDllFromPathfor use by overriders of AssemblyLoadContext.LoadUnmanagedDll
LoadUnmanagedDllFromPath needs to call LoadLibrary or dlopen, and return the system handle to the library through LoadUnmanagedDll. Outside Windows, when LoadUnmanagedDll returns a system handle to a library, the handle needs to be registered with PAL's module list for lifetime management. From that point on, the system handle is tracked as part of the PAL handle.
To handle both of the above, I have refactored module.cpp!LOADLoadLibrary into a LoadLibraryDirect portion and a RegisterLibrary component.
LoadLibraryDirect loads the specified library directly using the system call, without appending or prepending anything to the library name
RegisterLibrary registers a system library handle with PAL to get a PAL handle
This patch contains the necessary changes to coreclr and mscorlib. Tests will be added separately, after the new APIs are published and can be consumed.
Fixes dotnet/coreclrdotnet/coreclr#935
Part of dotnet/coreclrdotnet/coreclr#937 and dotnet/corefxdotnet/coreclr#3054
See https://github.com/dotnet/coreclr/pull/1500
[tfs-changeset: 1529692]
Commit migrated from https://github.com/dotnet/coreclr/commit/
65663fe8c455fad5c1e54fc068d2ec077bee7222
Eric Eilebrecht [Sat, 26 Sep 2015 00:02:52 +0000 (17:02 -0700)]
Fix typo in my previous typo fix.
Commit migrated from https://github.com/dotnet/coreclr/commit/
3930062ac66cfa0950ef167222b3b6e009ce92b3
Eric Eilebrecht [Sat, 26 Sep 2015 00:01:40 +0000 (17:01 -0700)]
Fix typo
Commit migrated from https://github.com/dotnet/coreclr/commit/
46f7ba73e75861c1205e62ff3cdfe37433b0e333
Eric Eilebrecht [Fri, 25 Sep 2015 23:45:16 +0000 (16:45 -0700)]
Reduce AsyncLocal setter allocations further
Now we pre-size any collections we allocate, and manually copy into them to avoid IEnumerator allocations, etc.
Commit migrated from https://github.com/dotnet/coreclr/commit/
614e749212af87cb0138125db1ee1d996fda4d92
Matt Ellis [Fri, 25 Sep 2015 23:23:24 +0000 (16:23 -0700)]
Merge pull request dotnet/coreclr#1627 from ellismg/icu-collation
Implement basic collation on top of ICU
Commit migrated from https://github.com/dotnet/coreclr/commit/
878ba32ecda015ee77d0425076a0b92ca0f30cad
Matt Ellis [Fri, 25 Sep 2015 23:03:36 +0000 (16:03 -0700)]
Merge pull request dotnet/coreclr#1621 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
ab9bafc085f6f9cbe133e78e3933bd4333434ebf
Matt Ellis [Wed, 15 Jul 2015 18:22:39 +0000 (11:22 -0700)]
Implement basic collation on top of ICU
This change adds support for basic Unicode collation support, built on
top of ICU. Windows and ICU have different collation models, and the
windows model does not correspond 1:1 with the ICU model, so in addition
to differences in sort weights between the two platforms, the
CompareOptions enum does not map nicely to ICU options.
For now, we only map CompareOptions.None, CompareOptions.IgnoreCase as
well as CompareOptions.Ordinal and CompareOptions.OrdinalIngoreCase,
other CompareOptions are ignored during collation.
In addition to collation support, I have enabed the randomized string
hashing code (using Marvin32 + a per app domain seed) so that string
hashcodes are not predictable across runs.
Commit migrated from https://github.com/dotnet/coreclr/commit/
62faf7e4cbbc74e89632a22c3c1b50dc114ba2d2
Eric Eilebrecht [Fri, 25 Sep 2015 21:03:08 +0000 (14:03 -0700)]
Allocate a new AsyncLocal change notification list only if we need to add an item to the list.
Commit migrated from https://github.com/dotnet/coreclr/commit/
640e6d4b99a3cd26d54348335815e1efff14bbe0
Mike McLaughlin [Fri, 25 Sep 2015 21:00:05 +0000 (14:00 -0700)]
Merge pull request dotnet/coreclr#1626 from caslan/exportsforee
Add new exports to get expression evaluator working in clrdbg
Commit migrated from https://github.com/dotnet/coreclr/commit/
f3f2c08269eeae29ba83df22e13e4f3a06349dcb
Lakshmi Priya Sekar [Tue, 22 Sep 2015 06:32:54 +0000 (23:32 -0700)]
Use PathString type to allocate large path strings on linux scenario.
Respond to PR feedback. Fix test failures in mscoree.
Commit migrated from https://github.com/dotnet/coreclr/commit/
965e5d6480ebbff3d021665f95a37cb94eb9d56a