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
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
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
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
Cagri [Fri, 25 Sep 2015 17:35:57 +0000 (10:35 -0700)]
Add new exports to get expression evaluator working in clrdbg
Commit migrated from https://github.com/dotnet/coreclr/commit/
b9bff752e5197b2e1ab4de88b3a548c8ef308003
Rama Krishnan Raghupathy [Thu, 24 Sep 2015 23:48:04 +0000 (16:48 -0700)]
Fixing SAL anotation for VM
[tfs-changeset: 1529342]
Commit migrated from https://github.com/dotnet/coreclr/commit/
a52b9639ac96a05844bac11560c4a99cddb6eb06
Jan Kotas [Thu, 24 Sep 2015 18:08:51 +0000 (11:08 -0700)]
Merge pull request dotnet/coreclr#1612 from jkotas/readytorun-directcall
Handle direct call ReadyToRun helpers
Commit migrated from https://github.com/dotnet/coreclr/commit/
f4560c6e113741d2296f2ebbc4cd6e6427b57a88
Jan Kotas [Thu, 24 Sep 2015 16:37:53 +0000 (09:37 -0700)]
Merge pull request dotnet/coreclr#1616 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
6d844126b0afb4b9d059a58fdd1c93a246555af3
dotnet-bot [Thu, 24 Sep 2015 15:04:08 +0000 (08:04 -0700)]
Porting EventCounter from Roxel Branch to ProjectK
[tfs-changeset: 1529077]
Commit migrated from https://github.com/dotnet/coreclr/commit/
42a50efaf066af29ecc196a302586694e4e99fb0
Jan Kotas [Thu, 24 Sep 2015 05:26:08 +0000 (22:26 -0700)]
Merge pull request dotnet/coreclr#1613 from jkotas/crossgen-commandline
Fix crossgen command line handling on Unix
Commit migrated from https://github.com/dotnet/coreclr/commit/
b373d4e1c6cf6a98543e53486c262b5f8d36af82
Jan Kotas [Thu, 24 Sep 2015 05:07:45 +0000 (22:07 -0700)]
Delete incorrect AMD64 ifdef
ReadyToRun case of getCallInstruction was incorrectly ifdefed out
for AMD64. Delete the incorrect ifdef and make other adjustment
to make the code compile for X86 as well.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f87429893fa7d4ea24c4631cc1c229a05b3be9cc
Jan Kotas [Thu, 24 Sep 2015 04:30:35 +0000 (21:30 -0700)]
Fix crossgen command line handling on Unix
Replace hardcoded Windows directory and path separators with symbolic
constants.
Commit migrated from https://github.com/dotnet/coreclr/commit/
dee3161cb612401c81d9f5f434910e46ad25bd1a
Jan Kotas [Thu, 24 Sep 2015 01:34:37 +0000 (18:34 -0700)]
Handle direct call ReadyToRun helpers
Add missing check in the JIT to generate correct code for direct call ReadyToRun helpers. I have run into this bug while experimenting with ReadyToRun optimizations. It is not observable bug today because of crossgen happens to always emit ReadyToRun helpers as indirect calls.
Commit migrated from https://github.com/dotnet/coreclr/commit/
7291e2f10a7812807c558f04527142496e750241
Matt Ellis [Wed, 23 Sep 2015 22:41:59 +0000 (15:41 -0700)]
Merge pull request dotnet/coreclr#1609 from Dmitry-Me/duplicatedCheck
Fix erroneous check
Commit migrated from https://github.com/dotnet/coreclr/commit/
57011c3b00e55343b95df632381c4b08fc8f5f9c
Jan Vorlicek [Wed, 23 Sep 2015 22:18:14 +0000 (00:18 +0200)]
Merge pull request dotnet/coreclr#1610 from janvorli/osx-thread-suspension-activation-2
Implement runtime suspension for OSX
Commit migrated from https://github.com/dotnet/coreclr/commit/
a2491e37b0ed75de0aea643be5ec653fa3984262
Jan Vorlicek [Fri, 18 Sep 2015 13:57:49 +0000 (15:57 +0200)]
Implement runtime suspension for OSX
This change implements runtime suspension for OSX using activation
injection, the same mechanism as Linux uses.
I have modified the activation injection mechanism by adding a new
function that CoreCLR registers with PAL and PAL calls it to check
if an instruction address is safe for injection. The injection is
performed only if this new function returns true.
The activation on OSX is performed by suspending the target thread,
checking the instruction address in the suspended thread's context
using the above mentioned function and modifying the context to
perform the injection only at injection safe place.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0f6c0c35cc3c3d9eaee04e3e46c4898730eff1ec
Dmitry-Me [Wed, 23 Sep 2015 15:32:54 +0000 (18:32 +0300)]
Fix erroneous check
Commit migrated from https://github.com/dotnet/coreclr/commit/
ce91654cc6798465f2b23df8fd8700b43d0f0eb2
Matt Ellis [Wed, 23 Sep 2015 07:39:33 +0000 (00:39 -0700)]
Merge pull request dotnet/coreclr#1608 from ellismg/fix-infinite-recursion-in-culture-init
Use Ordinal when searching for collation keyword
Commit migrated from https://github.com/dotnet/coreclr/commit/
c65ac4f0971cd5ac8ef5eacf39a4b36f4f313584
Matt Ellis [Wed, 23 Sep 2015 06:47:59 +0000 (23:47 -0700)]
Use Ordinal when searching for collation keyword
IndexOf by default is culture specific, which could lead to us doing
the wrong thing depending on the current culture and also can cause
problems where we need to access CultureData while we are still building
up culture information, causing infinite recursion.
Some collection tests were triggering the latter case and failing after
we merged in the ICU changes.
Commit migrated from https://github.com/dotnet/coreclr/commit/
52157825d6b55a24aebabe6f1e0507dc7a26bc2f
Matt Ellis [Wed, 23 Sep 2015 01:24:23 +0000 (18:24 -0700)]
Merge pull request dotnet/coreclr#1604 from ellismg/icu-merge-staging
Merge in initial round of ICU Changes
Commit migrated from https://github.com/dotnet/coreclr/commit/
65abcc1c361c522cfdef291e6de2e3f0a119c9e6
Jan Kotas [Tue, 22 Sep 2015 22:15:48 +0000 (15:15 -0700)]
Merge pull request dotnet/coreclr#1603 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
2a0e7677584cb4bcff0621c1a13897ada35c7b37
Matt Ellis [Tue, 22 Sep 2015 21:47:20 +0000 (14:47 -0700)]
Respond to PR feedback
Commit migrated from https://github.com/dotnet/coreclr/commit/
5f6fce38a9a7cbad436cf10a2410652f0fea3588
Matt Ellis [Tue, 22 Sep 2015 19:08:34 +0000 (12:08 -0700)]
Update documentation to list ICU dependency
Provide some hints on how to obtain the required ICU components for
Linux, OSX and FreeBSD
Commit migrated from https://github.com/dotnet/coreclr/commit/
93eeae8f8ed87230dd3ba5d52195b60dd01d0f2e
Steve Harter [Fri, 18 Sep 2015 19:01:16 +0000 (14:01 -0500)]
complete core implementation of CultureData for Unix
Commit migrated from https://github.com/dotnet/coreclr/commit/
7561e211e364255805314e27064ff62782a05b5e
Eric Erhardt [Thu, 17 Sep 2015 15:50:37 +0000 (10:50 -0500)]
Use 'readlink' of the /etc/localtime file to determine the TimeZoneInfo.Local.Id on Linux.
Fix https://github.com/dotnet/corefx/issues/2489.
Commit migrated from https://github.com/dotnet/coreclr/commit/
cf5669690fbd4fe08ecf264783380667ceb25c27
Eric Erhardt [Fri, 11 Sep 2015 21:02:46 +0000 (16:02 -0500)]
Fixing date patterns on Linux.
1. Getting more LongDatePatterns by getting both full and long ICU patterns.
2. Getting more ShortDatePatterns by getting both medium and short ICU patterns. Still keeping the "yMd" pattern, since this closely matches what is used on Windows.
3. Removing any duplicates in the date patterns.
4. "Normalizing" the date patterns from ICU format to .NET format.
a. "EEEE", "eeee" and "cccc" is replaced with "dddd"
b. "LLLL" is replaced with "MMMM"
c. "G" is replaced with "g"
d. A single 'y' is replaced with 'yyyy'
Commit migrated from https://github.com/dotnet/coreclr/commit/
9dc6f27b77af7bf4272f63d9af2ec5b5ca2ec43a
Matt Ellis [Tue, 25 Aug 2015 00:44:16 +0000 (17:44 -0700)]
Build System.Native.Globalization on OSX
This requires the 'icu4c' package from homebrew, which can be installed
with `brew install icu4c`.
Commit migrated from https://github.com/dotnet/coreclr/commit/
87c7b73e23caa73394e29cab7399d18972328d2b
Eric Erhardt [Wed, 9 Sep 2015 21:29:13 +0000 (16:29 -0500)]
Adding an empty string to the end of month names if ICU only returns 12.
This bug was caught by a test case in System.Globalization.Tests.
Commit migrated from https://github.com/dotnet/coreclr/commit/
73653cce8c173ac7236ffc015f1256bfbf754ea2
Matt Ellis [Wed, 2 Sep 2015 01:40:04 +0000 (18:40 -0700)]
Don't use StringBuilderCache for casing
During code review, Steve proposed we moved to using StringBuilderCache
to the allocation of the temporary char[] array during casing
operations. I made the change but later realized that this caused a few
issues.
- The native layer operates on UChar/length pairs, not null terminated
strings. Because of this, we don't actually write a terminating null
into the destination buffer (since we just do a 1:1 casing operation
on the input and never see the null terminator). However, the
marshalling code for StringBuilder assumes the buffer will be null
terminated and uses that to compute the new length value after a
marshalling call. Because there can be left over data from previous
calls in the buffer the string length calculation will be incorrect
and we will end up leaking in extra data into the cased string.
- The StringBuilder marshalling as a whole won't work if we have
embdedded nulls in a string (we'll end up dropping characters on the
transition from native back to managed) but that's something that we
need to be able to handle.
Ideally there would be a way to construct a mutable string, case into
its buffer and the freeze the string, but we don't have a way to do that
today, so we need to stick with this allocation.
Commit migrated from https://github.com/dotnet/coreclr/commit/
cb057fc92d732fd438c8e7f96195e67e3c92f7f4
Eric Erhardt [Tue, 8 Sep 2015 18:34:11 +0000 (13:34 -0500)]
Responding to PR feedback.
Commit migrated from https://github.com/dotnet/coreclr/commit/
8dfb2a16d321096b6de86ac0ff0f32b9491f044d
Eric Erhardt [Wed, 2 Sep 2015 23:18:20 +0000 (18:18 -0500)]
Implement Japanese Era information.
Commit migrated from https://github.com/dotnet/coreclr/commit/
75cb790ade44b67e2a3c7b01bf0968b822014d65
Eric Erhardt [Tue, 1 Sep 2015 16:49:42 +0000 (11:49 -0500)]
Implement CalendarData.GetCalendars.
Commit migrated from https://github.com/dotnet/coreclr/commit/
1ecbebf365257ff30627ccf28febe8f7dec84c24
Eric Erhardt [Tue, 25 Aug 2015 21:55:30 +0000 (16:55 -0500)]
Implement CalendarData on Linux.
This is the first round of CalendarData implementation on Linux using ICU
for the information. It contains Month Names, Day Names, DateTime format
patterns, etc.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e78ea838781d45b1f16d555a1be5950c05da7bfb
Steve Harter [Wed, 2 Sep 2015 17:42:36 +0000 (12:42 -0500)]
address code review feedback
Commit migrated from https://github.com/dotnet/coreclr/commit/
556a6ce7b7e4969a1ee4bef9625355fac91fadb4
Steve Harter [Wed, 2 Sep 2015 17:31:03 +0000 (12:31 -0500)]
address code review feedback
Commit migrated from https://github.com/dotnet/coreclr/commit/
71380c83610053181dd0ef2c73b452f69fc4dfd5
Steve Harter [Thu, 27 Aug 2015 17:31:25 +0000 (12:31 -0500)]
add number formatting
Commit migrated from https://github.com/dotnet/coreclr/commit/
88b91180979f5089f76fae7e94d579eccd1a39e7
Steve Harter [Tue, 11 Aug 2015 15:14:09 +0000 (10:14 -0500)]
address code review comments in CultureData.Unix.cs and and refactor files
Commit migrated from https://github.com/dotnet/coreclr/commit/
0d3a7b3b472e1d181aca666198b05884b54458b7
Steve Harter [Tue, 4 Aug 2015 22:53:29 +0000 (17:53 -0500)]
address code review comments
Commit migrated from https://github.com/dotnet/coreclr/commit/
f05fa7f22424c636bc5b813e417654a5a45f6773
Steve Harter [Tue, 4 Aug 2015 21:56:03 +0000 (16:56 -0500)]
address code review comments
Commit migrated from https://github.com/dotnet/coreclr/commit/
592327f4b5f86a64d444d89c9e4cf99ce584d78e
Steve Harter [Mon, 3 Aug 2015 17:41:51 +0000 (12:41 -0500)]
base locale and formatting for linux
Commit migrated from https://github.com/dotnet/coreclr/commit/
a2283764cb7b2d80e5660ed115ea65da9308d319
Matt Ellis [Fri, 17 Jul 2015 21:30:52 +0000 (14:30 -0700)]
Respond to PR Feedback
Commit migrated from https://github.com/dotnet/coreclr/commit/
9320e7348ef5751b9bd1294c55d3592b107850ad
Matt Ellis [Thu, 18 Jun 2015 19:03:11 +0000 (12:03 -0700)]
Use System.Globalization.Native for casing
This is a fairly straight forward change to start using
System.Globalization.Native (and hence ICU) for casing support. There
are a few caveats due to how the work is being staged.
- There are some fast paths in mscorlib that do simple ASCII casing if
the input string is ASCII and we know the locale does not do special
casing for ascii characters. This is detected by doing a case
insensitive string comparision between "ABC..XYZ" and "abc...xyz".
However, since we don't have real collation support yet, this check
would always return true and hence we would never actually go to
TextInfo to do casing. For now, this code is just disabled so we
always go to TextInfo
- Some of the dummy collation implementations used the ASCII casing
routines on TextInfo. Since they are no longer needed for TextInfo
we move them to CompareInfo. The alternative would be to do proper
casing via TextInfo, but since all the collation code is throw away
it doesn't seem prudent to spend time moving them to TextInfo.
- Detection on if we should do turkish casing is based on the locale
name, when we have collation support we should likely detect this by
doing a case insenstive string comparision between i and LATIN
CAPTIAL I WITH DOT ABOVE.
Commit migrated from https://github.com/dotnet/coreclr/commit/
71fab326cb589002ed6fa37a60a4a8da6949fe24
Matt Ellis [Thu, 16 Jul 2015 20:33:03 +0000 (13:33 -0700)]
Add wrappers for ICU Casing
Unlike ICU, the CLR only wants to preform simple casing, so we can't
use the ICU APIs that work over strings. Instead we have to do
codepoint by codepoint casing ourselves.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f73c7f7a98efc372bbb35e9e07e3ae62e96bb135
Matt Ellis [Thu, 16 Jul 2015 20:25:25 +0000 (13:25 -0700)]
Add wrappers for IDNA support
Introduce wrappers around ICU for ToAscii and ToUnicode in support of
international domain name support.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4cd931dabc412d92ac32b37f0b79111ca466eb34
Matt Ellis [Thu, 16 Jul 2015 19:48:17 +0000 (12:48 -0700)]
Add Normalization wrappers on top of ICU
This change introduces System.Globalization.Native.so which will be
the libary that we use to wrap all ICU functionality needed by the
System.Globalization.* namespaces.
The initial commit also adds wrappers around the string normalization
functions which are exposed by the System.Globalization.Extensions
contract.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4d199ab379d4364a6202a6bfcd5e79ede77e624d
Venkata Sivaramakrishna Ramadugu [Tue, 22 Sep 2015 18:28:24 +0000 (11:28 -0700)]
Fix to VectorCopyTo test that are failing with NullReferencException on an AVX2 machine.
Scenario: Vector2/3/4.CopyTo(array, idx) or Vector<T>.CopyTo(array, idx)
Expected: Here the second arg is out of range and an argument out of range exception is expected.
Observed: AV while generating helper call to throw range-check exception which gets propagated as NullReferenceException
Root cause: If repro program being run is debug version (i.e. JIT is asked to execute minopts/debuggable code)
genRangeCheck() ->genJumpToThrowHlpBlk(bndsChk->gtThrowKind) ->Compiler::acdHelper(codeKind)
Since Compiler::acdHelper() doesn't have mapping for SCK_ARG_EXCPN and SCK_ARG_RNG_EXCPN it return zero as helper number. On chk builds this further leads to asserts in VM when genEmitHelperCall()->compGetHelperFtn(helpernum) call is made. On retail builds, it will lead to AV, which gets propagated as NullReferenceException.
Why this doesn't repro on SSE2: SIMD intrinsics are disabled while generating minopts/debuggable code.
Why does this repro on AVX2: Since VM used size for Vector<T> doesn't match IL definition of Vector<T>, JIT has no way but to support SIMD intrinsics even while generating minopts/debuggable code.
On manual source examination found a couple of places where (in compiler.hpp) that are supposed to check for SCK_ARG_EXCPN and SCK_ARG_RNG_EXCPN and fixed those as well.
Fix dotnet/coreclr#3262
[tfs-changeset: 1527996]
Commit migrated from https://github.com/dotnet/coreclr/commit/
a4882f5ed09736946ad7871f933c0e726b10b956
Jan Kotas [Mon, 21 Sep 2015 19:37:52 +0000 (12:37 -0700)]
Merge pull request dotnet/coreclr#1600 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
e879597385221df7131042d1e0830b87f7632a01
Jan Kotas [Mon, 21 Sep 2015 16:39:14 +0000 (09:39 -0700)]
Undo MAX_LONGPATH use in SDK header file
[tfs-changeset: 1527242]
Commit migrated from https://github.com/dotnet/coreclr/commit/
f54b42dc88fd9f43212e749968e5c91f44c70474
Jan Kotas [Sat, 19 Sep 2015 03:32:53 +0000 (20:32 -0700)]
Merge pull request dotnet/coreclr#1566 from tijoytom/master
Implement NativeCallableMethods for CoreCLR
Commit migrated from https://github.com/dotnet/coreclr/commit/
9fa52c4b8c4e54ee1023140993be3a12f080b5cd
Eugene Zemtsov [Sat, 19 Sep 2015 00:39:54 +0000 (17:39 -0700)]
Merge pull request dotnet/coreclr#1593 from Djuffin/funceval
Fix debugger's funceval on Linux
Commit migrated from https://github.com/dotnet/coreclr/commit/
1f6172fe2ac167253615f998f42e41167b6f12e8
Eugene [Fri, 18 Sep 2015 02:07:37 +0000 (19:07 -0700)]
Fix debugger's funceval on Linux
Address issues which prevented funceval from working on Linux:
1. Invalid stack alignment in funceval hijacks
2. Using System V calling convention for funceval hijacks
3. Disable executability check that is not implemented on Linux
Commit migrated from https://github.com/dotnet/coreclr/commit/
ec040a9919ad20161f4f4aae37c9b49521a2bb57
Lubomir Litchev [Fri, 18 Sep 2015 21:04:36 +0000 (14:04 -0700)]
Merge pull request dotnet/coreclr#1577 from LLITCHEV/master
Fix for Issue dotnet/coreclr#3164.
Thanks all!
Commit migrated from https://github.com/dotnet/coreclr/commit/
18a776f1961061f474bb84a96f34c876cde59222
Koundinya Veluri [Fri, 18 Sep 2015 18:56:22 +0000 (11:56 -0700)]
Merge pull request dotnet/coreclr#1565 from kouvel/TryGetRawMetadataFix
Fix TryGetRawMetadata to return false when the assembly is not a Runtā¦
Commit migrated from https://github.com/dotnet/coreclr/commit/
c83642af770bf5a00d36a0c3a93ac5852947a7cc
Mike McLaughlin [Fri, 18 Sep 2015 18:54:26 +0000 (11:54 -0700)]
Merge pull request dotnet/coreclr#1588 from mikem8361/target4
Add ICorDebugDataTarget4 to SOS.
Commit migrated from https://github.com/dotnet/coreclr/commit/
793dfa9f3430b368833b4c28cc00359814ccb4f5
Lubomir Litchev [Fri, 18 Sep 2015 17:58:12 +0000 (10:58 -0700)]
Disable the clang/llvm optimizer for a method that triggers wrong codegen.
There is a bug in the clang-3.5 optimizer. The issue is that in release
build the optimizer is mistyping (or just wrongly decides to use 32 bit
operation for a corner case of MIN_LONG) the args of the (ltemp / lval2)
to int (it does a 32 bit div operation instead of 64 bit.)
For the case of lval1 and lval2 equal to MIN_LONG (0x8000000000000000)
this results in raising a SIGFPE.
Commit migrated from https://github.com/dotnet/coreclr/commit/
93a90d45e66eefe916295f2812a3c6437b0806b3
tijoytom [Thu, 3 Sep 2015 20:58:14 +0000 (13:58 -0700)]
Add support for NativeCallableAttribute
Apply [NativeCallable] attribute to a managed method and then it can be
called from native code.Typical use would be passing a managed method as
callback to native, now it can be done by wrapping the method in a
delegate or directly using Marshal.GetFunctionPointerForDelegate.This's
fine as long as we make sure that delegate is not garbage
collected.[NativeCallable] introduce another way, where you can directly
load the function pointer of a native callable method and use it as
callback.This feature cannot be directly used from C#,but can be very
useful in dynamic code generation scenarios where you want a callback to
be passed to native.
Here's an example of how it can be used.
public static class NativeMethods {
[DllImport("user32.dll")]
public static extern int EnumWindows(IntPtr enumProc, IntPtr lParam);
}
//Method attributed with NativeCallable
[NativeCallable]
public static int CallbackMethod(IntPtr hWnd, IntPtr lParam){ return 1; }
Now you can generate the below IL to load native callable function pointer
( LDFTN) and then pass it a native method.
.locals init ([0] native int ptr)
nop
ldftn int32 CallbackMethod(native int,native int)
stloc.0
ldloc.0
ldsfld native int System.IntPtr::Zero
call bool NativeMethods::EnumWindows(native int,native int)
pop
ret
Encoding native callable methods as ENCODE_METHOD_NATIVECALLABLE_HANDLE
so that we don't have to check for the custom attribute at runtime to
decode the method.Also fixing the remaining code review comments.
Adding runtime check to prevent Native Callable methods from being used as
calli target with an ldftn. Also adding some negative test cases , they
are disabled for now since the tests failfast and msbuild report it as
failure.
Commit migrated from https://github.com/dotnet/coreclr/commit/
1e62862b631fb64c6a9fae0a0084c0ae1d9fbeba
Matt Mitchell [Fri, 18 Sep 2015 15:58:44 +0000 (08:58 -0700)]
Merge pull request dotnet/coreclr#1580 from ravimeda/fixTestBuildProj
Remove Clean Target in Test Build Proj.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e6183617997a6c72c8a060745e7d09d4d2840d90
Jan Kotas [Fri, 18 Sep 2015 03:09:47 +0000 (20:09 -0700)]
Merge pull request dotnet/coreclr#1582 from janvorli/osx-thread-suspension-activation
Change PAL_InjectActivation to use pthread_kill
Commit migrated from https://github.com/dotnet/coreclr/commit/
4486bcf73cf9f2926ee8b1e9cb8b5c80339d9627
Sergiy Kuryata [Fri, 18 Sep 2015 01:40:16 +0000 (18:40 -0700)]
Merge pull request dotnet/coreclr#1583 from adityamandaleeka/coreclr_tests_linux
CoreCLR tests on Linux
Commit migrated from https://github.com/dotnet/coreclr/commit/
b844d2a4114342b1ad08ae6b8a31a694281d4570
Jan Vorlicek [Thu, 17 Sep 2015 21:16:13 +0000 (23:16 +0200)]
Change PAL_InjectActivation to use pthread_kill
This change modifies the PAL_InjectActivation to use much more portable pthread_kill
instead of pthread_sigqueue.
Remove the activation function passing from the PAL_InjectActivation
and add a PAL API to set the activation function globally, since we need just one.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f65f17708609ab554ed106822bf6d27dd658b712
Jan Kotas [Fri, 18 Sep 2015 01:20:23 +0000 (18:20 -0700)]
Merge pull request dotnet/coreclr#1585 from DasAllFolks/patch-2
Fix link to "Public Contract" subsection
Commit migrated from https://github.com/dotnet/coreclr/commit/
28930c2f2ae2a5a8d746551470696cc8db87f23e
Jan Kotas [Fri, 18 Sep 2015 01:18:50 +0000 (18:18 -0700)]
Merge pull request dotnet/coreclr#1586 from DasAllFolks/patch-1
Fix link to "Coding Style" page
Commit migrated from https://github.com/dotnet/coreclr/commit/
37ea695c52ca0f4c3398c218c1fdd2ba51ba14dc
Jan Kotas [Fri, 18 Sep 2015 01:18:20 +0000 (18:18 -0700)]
Merge pull request dotnet/coreclr#1587 from DasAllFolks/patch-3
Fix link to CoreFX Performance Guidelines
Commit migrated from https://github.com/dotnet/coreclr/commit/
ce42c2edae783f24948142f5d76daf148ba5ae7e
Mike McLaughlin [Wed, 16 Sep 2015 22:08:11 +0000 (15:08 -0700)]
Add ICorDebugDataTarget4 to SOS.
Now that Eugene fixed out of context unwinding in the DAC for Linux after
this change, the SOS "clrstack" command should always work and not hang anymore.
Commit migrated from https://github.com/dotnet/coreclr/commit/
cd8f7c437156a811d1003c2cd17da593c8f5e5da
Steven Das [Fri, 18 Sep 2015 00:15:03 +0000 (19:15 -0500)]
Fix link to CoreFX Performance Guidelines
This link currently returns a 404 error.
It appears to be one of several links broken by some of the CoreFX
documentation having been moved into the new `coding-guidelines`
subdirectory.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0d80b2b478300bd2f483e7034c697576f2884f6f
Steven Das [Thu, 17 Sep 2015 23:59:34 +0000 (18:59 -0500)]
Fix link to "Coding Style" page
This link is currently returning a 404 error; it appears that several of these links may have been broken when a new `coding-guidelines` subdirectory was created.
Commit migrated from https://github.com/dotnet/coreclr/commit/
a9ad8dd7e2d9516ff28204d2ad2dd8a2628900d9
Steven Das [Thu, 17 Sep 2015 23:55:11 +0000 (18:55 -0500)]
Fix link to "Public Contract" subsection
The link to the "Public Contract" subsection of the "Breaking Changes" page is currently stale and returns a 404 error.
Commit migrated from https://github.com/dotnet/coreclr/commit/
bce0a5cee6ba05d3c5e2185d58a8b1feafe31aab
Jan Kotas [Thu, 17 Sep 2015 23:50:42 +0000 (16:50 -0700)]
Merge pull request dotnet/coreclr#1584 from DasAllFolks/patch-1
Unbreak "breaking changes" link
Commit migrated from https://github.com/dotnet/coreclr/commit/
8811dcdddbbde43e8286bfe29765fe4bd3ae328d
Steven Das [Thu, 17 Sep 2015 23:48:48 +0000 (18:48 -0500)]
Unbreak "breaking changes" link
Previous link produced a 404 error.
Commit migrated from https://github.com/dotnet/coreclr/commit/
17fb74a8dbf90c335987a3bb28ebc53708ead6f9
Aditya Mandaleeka [Thu, 17 Sep 2015 23:21:50 +0000 (16:21 -0700)]
Minor improvements to runtest.sh
Commit migrated from https://github.com/dotnet/coreclr/commit/
a3a7282226443ba702ec9282358aa104e2bbde64
Aditya Mandaleeka [Thu, 17 Sep 2015 23:01:42 +0000 (16:01 -0700)]
Add runtest.sh script to run CoreCLR tests on Linux
Commit migrated from https://github.com/dotnet/coreclr/commit/
25d056b046065778f9cf79778f0446e068ab26b5
Jan Kotas [Thu, 17 Sep 2015 22:55:33 +0000 (15:55 -0700)]
Merge pull request dotnet/coreclr#1581 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
5f359dc2c22fc2d30f346911814d7ed91f40d2b1
Matt Mitchell [Thu, 17 Sep 2015 20:49:46 +0000 (13:49 -0700)]
Merge pull request dotnet/coreclr#1574 from kouvel/FixPalTests
Fix some frequently failing PAL tests
Commit migrated from https://github.com/dotnet/coreclr/commit/
8c86f7fdfe7b1f48a06f4172a35a69f5a461bccd
Koundinya Veluri [Wed, 16 Sep 2015 18:32:46 +0000 (11:32 -0700)]
Fix some frequently failing PAL tests
Some PAL tests are frequently failing in the CI. The specified output folder is currently used as the working folder for all PAL tests. The CI machine happened to have the output folder on a mount mounted as fuseblk instead of ext4. We don't know why this is happening. For the moment, I'm fixing the test runner to work around this issue.
Changes:
- Use /tmp/PalTestOutput/default as the output folder by default
- If a specific folder is specified for the output, use a unique folder inside /tmp/PalTestOutput for output files, and copy them to the specified folder at the end. A unique folder is used to support parallel runs on the same machine in this mode.
- Run each test in its own folder. Many PAL tests don't clean up after themselves, and create/use the same file/folder names in the current folder.
- Add a few more checks to some tests to hopefully provide more information upon the next failure
- Fix GetFileAttributes tests, which were crashing upon some failures due to mismatched number of placeholders and arguments to vprintf
Fixes dotnet/coreclr#1561
Commit migrated from https://github.com/dotnet/coreclr/commit/
e0c013e2af50bace4004e856cba67fcbec01fc00
Tarek Mahmoud Sayed [Thu, 17 Sep 2015 18:05:43 +0000 (11:05 -0700)]
Port the DateTime parser fix with Serbia cultures
Serbia has '.' at the end of the date and time parts. (like 'd.M.yyyy.'). while '.' is marked as date and time separator in same time. this confuse the parser and make it fail
to parse date/time string formatted with the Serbia culture.
[tfs-changeset: 1526268]
Commit migrated from https://github.com/dotnet/coreclr/commit/
596f0cdafe9f8f2ee2a16419e6203c8e1a8e46d4
AlexGhiondea [Thu, 17 Sep 2015 17:19:56 +0000 (10:19 -0700)]
Merge pull request dotnet/coreclr#1460 from bbowyersmyth/StringJoin
String.Join optimization for single item lists
Commit migrated from https://github.com/dotnet/coreclr/commit/
d176041723f366c35fd71ee4b176253fefddfee1
Ravi Eda [Thu, 17 Sep 2015 16:09:02 +0000 (11:09 -0500)]
Remove Clean Target in Test Build Proj.
Commit migrated from https://github.com/dotnet/coreclr/commit/
11f1c6be9db3e64c97704ef6acc3a406d815f91d
Jan Kotas [Thu, 17 Sep 2015 14:57:10 +0000 (07:57 -0700)]
Merge pull request dotnet/coreclr#1578 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
5c3324b982039efdf9f1c1cc9a401a5c7fd3770b
Jan Kotas [Thu, 17 Sep 2015 12:27:09 +0000 (05:27 -0700)]
Fix build break on arm
[tfs-changeset: 1526208]
Commit migrated from https://github.com/dotnet/coreclr/commit/
586006e4255a7db70601c556e9ab95e50771a7a3
Lubomir Litchev [Thu, 17 Sep 2015 05:53:49 +0000 (22:53 -0700)]
Fix for Issue dotnet/coreclr#3164.
Added extra code to work around an optimizer bug in clang 3.5. In a
particular case 0/MIN_LONG results into MIN_LONG that causes a const
folding to produce a result of 0 instead of overflow exception for
MIN_LONG * MIN_LONG.
Commit migrated from https://github.com/dotnet/coreclr/commit/
8ff8514192ff83a1625f009bb5783a3ee675e072
Jan Kotas [Thu, 17 Sep 2015 02:42:32 +0000 (19:42 -0700)]
Merge pull request dotnet/coreclr#1575 from benpye/arm-unwind-regression
Fix ARM unwind regression
Commit migrated from https://github.com/dotnet/coreclr/commit/
097e72ad43195c4c4c8a6332ff5e1fc3134751d0
Jan Kotas [Thu, 17 Sep 2015 02:38:27 +0000 (19:38 -0700)]
Merge pull request dotnet/coreclr#1568 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
de5f5f9c1d308f523d318ad7758f3aa3f348d3c1
Ben Pye [Wed, 16 Sep 2015 23:38:18 +0000 (23:38 +0000)]
Fix ARM build regression
Commit migrated from https://github.com/dotnet/coreclr/commit/
c893bf0699c81d7ea9ca9d37543eb5339d64d116
Eric Erhardt [Wed, 16 Sep 2015 20:06:03 +0000 (15:06 -0500)]
Merge pull request dotnet/coreclr#1559 from eerhardt/Fix2788
Time Zone transitions are 1 tick off on Linux
Commit migrated from https://github.com/dotnet/coreclr/commit/
059b6592a9bc1390a982f34a4a693a1159d7bd97
Lakshmi Priya [Wed, 16 Sep 2015 19:06:13 +0000 (12:06 -0700)]
Merge pull request dotnet/coreclr#1560 from Priya91/longpath-test
Replace MAX_PATH with new defines in rest of coreclr.
Commit migrated from https://github.com/dotnet/coreclr/commit/
8ff2389204d7c41b17eff0e9536267aea8d6496f
Gaurav Khanna [Wed, 16 Sep 2015 18:45:06 +0000 (11:45 -0700)]
Fix for GH issue 410 - https://github.com/dotnet/coreclr/issues/410
Whenever a managed exception is thrown, the details about the thrown exception are also saved off the managed thread object (as LastThrownObject). The VM also has an exception tracker that tracks its dispatch across the managed frames and incase of nested exceptions, the trackers are collapsed correctly, when the nested exception is handled, and last thrown object is updated correctly. The VM works on the premise that the LastThrownObject is updated correctly.
Incase of this bug, a method (M1)is invoked via Reflection and has an exception E1. During exception dispatch for E1, an IL filter is invoked that, in turn, has an exception (E2) that remains unhandled. While this is swallowed by the VM (as expected), the LastThrownObject is not updated to reflect the active exception to be E1. Thus, when the dispatch for original exception E1 completes and no managed handler is found, the exception is caught by Reflection subsystem that extracts the thrown exception using the GET_THROWABLE macro that uses the LastThrownObject to determine the thrown exception. Since the LTO was not updated, it still reflects E2.
The fix is to update the managed exception state, if the filter has an unhandled exception, similar to how we do when a managed catch block successfully handles the exception. I have refactored the code to make the semantic cleaner.
[tfs-changeset: 1525835]
Commit migrated from https://github.com/dotnet/coreclr/commit/
14de7d30063c2955523c1ff2ccb48e339977742b
Eric Erhardt [Tue, 15 Sep 2015 22:49:54 +0000 (17:49 -0500)]
Time Zone transitions are 1 tick off on Linux
When we build the AdjustmentRules up, we set the StartDate to be the Transition Time that comes from the tzfile, and we set the EndDate to the be (the next Transition Time - 1 tick). That way the next AdjustmentRule goes into effect at the exact transition time. The issue is that the code in CheckIsDst uses a less than operator when comparing the endTime, but for these rules it should be less than or equal to.
Fix https://github.com/dotnet/corefx/issues/2788.
Commit migrated from https://github.com/dotnet/coreclr/commit/
5841002dca5c1138e4c51ccf6ab16bf9c6e177e6
Jan Kotas [Wed, 16 Sep 2015 18:17:53 +0000 (11:17 -0700)]
Merge pull request dotnet/coreclr#1564 from dotnet-bot/from-tfs
Merge changes from TFS
Commit migrated from https://github.com/dotnet/coreclr/commit/
8cad40bbcf4c404c518c1f202a0f93cf71c866c6
Koundinya Veluri [Wed, 16 Sep 2015 17:17:56 +0000 (10:17 -0700)]
Fix TryGetRawMetadata to return false when the assembly is not a RuntimeAssembly
Related to dotnet/corefxdotnet/coreclr#2768
Commit migrated from https://github.com/dotnet/coreclr/commit/
ca3e85d395dfadadf309e6111f254eea35cdcbde
Vance Morrison [Wed, 16 Sep 2015 16:09:56 +0000 (09:09 -0700)]
Merge pull request dotnet/coreclr#1562 from cshung/EventCounterWork
Port bug fixes and add hooks for EventCounter work
Commit migrated from https://github.com/dotnet/coreclr/commit/
b66746c9132c157b807e3387147c4337b8c6cae0
Jan Kotas [Wed, 16 Sep 2015 16:07:48 +0000 (09:07 -0700)]
Merge pull request dotnet/coreclr#1553 from paulnice/patch-1
Fix runtime versions in the Console example
Commit migrated from https://github.com/dotnet/coreclr/commit/
c27a149e3e0b15e5449ab5a0b6c87752dae2ee4e
Jan Kotas [Wed, 16 Sep 2015 16:06:37 +0000 (09:06 -0700)]
Merge pull request dotnet/coreclr#1557 from ravimeda/master
Update Build CoreCLR Instructions on Mac OS X.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f8c2d7a18e90834f29107fa6cd1a3fc3d80da77c
Andrew Au [Wed, 16 Sep 2015 14:59:03 +0000 (07:59 -0700)]
Port bug fixes and add hooks for EventCounter work
Commit migrated from https://github.com/dotnet/coreclr/commit/
cb67da60a9c462b620afc1e8b7571228cbf46ac3
Stephen Toub [Wed, 16 Sep 2015 13:13:53 +0000 (09:13 -0400)]
Merge pull request dotnet/coreclr#1554 from kouvel/WaitAllCheckForDuplicates
Check for duplicate handles in PAL's implementation of a wait-all opeā¦
Commit migrated from https://github.com/dotnet/coreclr/commit/
830570c135db0bd917c9e4239314fd6f976e21bb
Aditya Mandaleeka [Tue, 15 Sep 2015 23:20:55 +0000 (16:20 -0700)]
Handle pre- and post-commands gracefully in bash execution scripts.
Existing tests can specify pre- or post-commands that are injected into
the execution scripts. However, today these are all using Windows syntax
so they break the bash scripts. We will handle that by skipping any tests
that are using pre- or post-commands unless they specify the bash-specific
equivalent. The scripts will continue to run and just exit with an exit
code that indicates a skip, so that the skipped tests are tracked and not
just hidden.
Also, this change moves the global pre-command that was being added for
running __TestEnv into the bash/batch targets rather than in the dir.props
file that is used for all platforms.
Commit migrated from https://github.com/dotnet/coreclr/commit/
093f4eeb4bb1dddec685b35bdc8ffcd6bc9cce86