platform/upstream/coreclr.git
5 years agoMerge pull request #22431 from BruceForstall/DisableCorefxFailingTests
Bruce Forstall [Tue, 5 Feb 2019 21:27:21 +0000 (13:27 -0800)]
Merge pull request #22431 from BruceForstall/DisableCorefxFailingTests

Disable failing Linux/arm64 corefx tests

5 years agoMerge pull request #22432 from BruceForstall/DisableWindowsArm64CorefxCronJobs
Bruce Forstall [Tue, 5 Feb 2019 20:46:35 +0000 (12:46 -0800)]
Merge pull request #22432 from BruceForstall/DisableWindowsArm64CorefxCronJobs

Disable Windows arm64 corefx cron jobs

5 years agoFix ProjectN build breaks (dotnet/corert#6954)
Michal Strehovský [Tue, 5 Feb 2019 17:03:52 +0000 (18:03 +0100)]
Fix ProjectN build breaks (dotnet/corert#6954)

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
5 years agoAvoid duplicate tree lookup in GetCollatorFromSortHandle (#22390)
Filip Navara [Tue, 5 Feb 2019 20:29:01 +0000 (21:29 +0100)]
Avoid duplicate tree lookup in GetCollatorFromSortHandle (#22390)

5 years agoMerge pull request #22425 from BruceForstall/UploadMsbuildLogs
Bruce Forstall [Tue, 5 Feb 2019 20:24:19 +0000 (12:24 -0800)]
Merge pull request #22425 from BruceForstall/UploadMsbuildLogs

Configure MSBuild debug path and save any logs

5 years agoDisable Windows arm64 corefx cron jobs
Bruce Forstall [Tue, 5 Feb 2019 20:03:26 +0000 (12:03 -0800)]
Disable Windows arm64 corefx cron jobs

These currently all fail with timeout. They also take way too much time
to run. We have good Linux/arm64 corefx test coverage already.

The issue of these runs being slow is tracked by
https://github.com/dotnet/coreclr/issues/21236.

5 years agoMerge pull request #22415 from adityamandaleeka/pinvoke_eh
Aditya Mandaleeka [Tue, 5 Feb 2019 20:21:50 +0000 (12:21 -0800)]
Merge pull request #22415 from adityamandaleeka/pinvoke_eh

Disable PInvoke inlining within try regions on ARM64

5 years agoUse Jenkins for Linux/arm32 testing (#22429)
Egor Chesakov [Tue, 5 Feb 2019 20:04:40 +0000 (12:04 -0800)]
Use Jenkins for Linux/arm32 testing (#22429)

5 years agoDisable failing Linux/arm64 corefx tests
Bruce Forstall [Tue, 5 Feb 2019 19:52:22 +0000 (11:52 -0800)]
Disable failing Linux/arm64 corefx tests

5 years agoMerge pull request #22421 from BruceForstall/RestrictArm64XunitParallelism
Bruce Forstall [Tue, 5 Feb 2019 19:04:07 +0000 (11:04 -0800)]
Merge pull request #22421 from BruceForstall/RestrictArm64XunitParallelism

Restrict arm64 parallelism to collections

5 years agoMerge pull request #22416 from BruceForstall/FixRunTestOutput
Bruce Forstall [Tue, 5 Feb 2019 19:02:50 +0000 (11:02 -0800)]
Merge pull request #22416 from BruceForstall/FixRunTestOutput

Fix runtest.py output

5 years agoCorrectly error out gracefully on setup-stress-dependencies when libcoredistools...
Jeremy Koritzinsky [Tue, 5 Feb 2019 18:38:57 +0000 (10:38 -0800)]
Correctly error out gracefully on setup-stress-dependencies when libcoredistools isn't available. (#22357)

5 years agoNotify dac when prejitted code is going to be used for a method (#22296)
Andy Ayers [Tue, 5 Feb 2019 08:43:23 +0000 (00:43 -0800)]
Notify dac when prejitted code is going to be used for a method (#22296)

This allows sos bpmd breakpoints to work on prejitted methods.

Closes #22265.

5 years agoAdd draft default interface methods specification (#21564)
Michal Strehovský [Tue, 5 Feb 2019 08:03:49 +0000 (09:03 +0100)]
Add draft default interface methods specification (#21564)

5 years agoFix marshalling UTF8 string struct member from native to managed. (#22408)
Jeremy Koritzinsky [Tue, 5 Feb 2019 06:16:43 +0000 (22:16 -0800)]
Fix marshalling UTF8 string struct member from native to managed. (#22408)

* Fix marshalling UTF8 string struct member from native to managed.

Fixes #22394

* PR Feedback.

5 years agoExtract addressing mode analysis from gtSetEvalOrder (#22387)
Carol Eidt [Tue, 5 Feb 2019 05:49:25 +0000 (21:49 -0800)]
Extract addressing mode analysis from gtSetEvalOrder (#22387)

* Extract addressing mode analysis from gtSetEvalOrder

5 years agoMerge pull request #22417 from BruceForstall/ExtractRuntestTimeout
Bruce Forstall [Tue, 5 Feb 2019 04:37:18 +0000 (20:37 -0800)]
Merge pull request #22417 from BruceForstall/ExtractRuntestTimeout

Extract setting __TestTimeout in runtest.py

5 years agoFix string.strlen (#22397)
Ben Adams [Tue, 5 Feb 2019 04:04:30 +0000 (05:04 +0100)]
Fix string.strlen (#22397)

* Add explanation comment

Fixes #22393

5 years agoMove SynchronizationContext to shared partition (#22389)
Marek Safar [Tue, 5 Feb 2019 03:43:10 +0000 (04:43 +0100)]
Move SynchronizationContext to shared partition (#22389)

* Move SynchronizationContext to shared partition

* Move WaitHelperNative to WaitHandle

5 years agoConfigure MSBuild debug path and save any logs
Bruce Forstall [Tue, 5 Feb 2019 03:00:39 +0000 (19:00 -0800)]
Configure MSBuild debug path and save any logs

We have had many problems in the CI with MSBuild failing, and not
capturing the failure logs.

See https://github.com/dotnet/coreclr/issues/20236.

So, for all msbuild invocations, set MSBUILDDEBUGPATH to a new,
distinguished, subdirectory of the bin\Logs directory, named
"MsbuildDebugLogs". Change the CI to upload any log files found
there.

5 years agoFix runtest.py output
Bruce Forstall [Mon, 4 Feb 2019 23:20:09 +0000 (15:20 -0800)]
Fix runtest.py output

1. Fix extra newline output
2. Remove extra output of failed logs
3. Catch errors with Unicode conversion

5 years agoRestrict arm64 parallelism to collections
Bruce Forstall [Tue, 5 Feb 2019 00:21:43 +0000 (16:21 -0800)]
Restrict arm64 parallelism to collections

Attempt to reduce test timeout failures by restricting test parallelism.

Attempts to address https://github.com/dotnet/coreclr/issues/22419

5 years agoHandle SPC in GetLoadContext
Steve MacLean [Mon, 4 Feb 2019 18:36:52 +0000 (13:36 -0500)]
Handle SPC in GetLoadContext

GetBindingContext() returns NULL for System.Private.CoreLib.  Add support
for this special case.

5 years agoExtract setting __TestTimeout
Bruce Forstall [Mon, 4 Feb 2019 23:41:29 +0000 (15:41 -0800)]
Extract setting __TestTimeout

Avoid setting or reporting setting it twice

5 years agoRe-enable tests blocked by 21964.
Aditya Mandaleeka [Mon, 4 Feb 2019 23:21:05 +0000 (15:21 -0800)]
Re-enable tests blocked by 21964.

5 years agoDisable PInvoke inlining within try regions on ARM64.
Aditya Mandaleeka [Mon, 4 Feb 2019 23:12:33 +0000 (15:12 -0800)]
Disable PInvoke inlining within try regions on ARM64.

5 years agoMerge pull request #22411 from BruceForstall/AlwaysArchiveLogs
Bruce Forstall [Mon, 4 Feb 2019 22:38:12 +0000 (14:38 -0800)]
Merge pull request #22411 from BruceForstall/AlwaysArchiveLogs

Always archive build logs

5 years agoAlways archive build logs
Bruce Forstall [Mon, 4 Feb 2019 21:30:12 +0000 (13:30 -0800)]
Always archive build logs

Even if the build fails. Add archiving in more cases where it was missing.

5 years agoDisable JIT/SIMD/Vector3Interop_ro on x64 Unix platforms
Egor Chesakov [Mon, 4 Feb 2019 17:54:47 +0000 (09:54 -0800)]
Disable JIT/SIMD/Vector3Interop_ro on x64 Unix platforms

Related issue: https://github.com/dotnet/coreclr/issues/22401

5 years agoDisable JIT/Regression/CLR-x86-JIT/v2.1/b152292 on all Unix platforms
Egor Chesakov [Mon, 4 Feb 2019 17:45:38 +0000 (09:45 -0800)]
Disable JIT/Regression/CLR-x86-JIT/v2.1/b152292 on all Unix platforms

Related issue: https://github.com/dotnet/coreclr/issues/20358

5 years agoMore compact implementation of Marshal.GenerateProgIdForType (#22395)
Jan Kotas [Mon, 4 Feb 2019 19:36:06 +0000 (11:36 -0800)]
More compact implementation of Marshal.GenerateProgIdForType (#22395)

5 years agoReenable corefx System.Linq.Expressions.Tests. (#22362)
Sergey Andreenko [Mon, 4 Feb 2019 19:13:24 +0000 (11:13 -0800)]
Reenable  corefx System.Linq.Expressions.Tests. (#22362)

5 years agoDelete exclusions that reference fixed issues. (#22355)
Sergey Andreenko [Mon, 4 Feb 2019 17:45:03 +0000 (09:45 -0800)]
Delete exclusions that reference fixed issues. (#22355)

* Delete exclusions for the issue that were fixed.

* Change the issue number for ThreadStartString_1

5 years agoFix arm32 unwind for large methods (#22381)
Andy Ayers [Mon, 4 Feb 2019 16:47:48 +0000 (08:47 -0800)]
Fix arm32 unwind for large methods (#22381)

* Fix arm32 unwind for large methods

For arm32, the unwinder bails out with an error if the method offset is not
within the fragment range. And the jit copies prolog unwind codes to all
fragments, so there's no need to walk back and find the root unwind record.

Closes #22260.

* re-enable test

5 years agoRemove code that was moved to System.Native (dotnet/corert#6932)
Filip Navara [Mon, 4 Feb 2019 13:09:20 +0000 (14:09 +0100)]
Remove code that was moved to System.Native (dotnet/corert#6932)

* Remove code that was already moved from System.Private.CoreLib.Native to System.Native.

* Move Interop files for System.Native to shared Interop directory.

* Add FeaturePortableThreadPool conditions to csproj files.

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
5 years agoMerge pull request #22378 from filipnavara/native_cpp_to_C
Jan Kotas [Mon, 4 Feb 2019 04:33:56 +0000 (20:33 -0800)]
Merge pull request #22378 from filipnavara/native_cpp_to_C

Convert System.Globalization.Native to C

5 years agoThrow the right exception when interface dispatch is ambiguous (#22295)
Michal Strehovský [Sun, 3 Feb 2019 18:22:32 +0000 (19:22 +0100)]
Throw the right exception when interface dispatch is ambiguous (#22295)

Throw the approved exception per dotnet/corefx#34124.

5 years agoUse unsigned index extension in muldi-dimensional array stubs (#22376)
Jan Kotas [Sun, 3 Feb 2019 17:07:09 +0000 (09:07 -0800)]
Use unsigned index extension in muldi-dimensional array stubs (#22376)

Delete unnecessary parallel logic that kept track of the total multiplier

Fixes #22348

5 years agoRename DevDiv_754566.ilprog to DevDiv_754566.ilproj (#22375)
Tamás Csala [Sun, 3 Feb 2019 13:53:18 +0000 (13:53 +0000)]
Rename DevDiv_754566.ilprog to DevDiv_754566.ilproj (#22375)

Typo in file name

5 years agoPrefix enums, remove DLLEXPORT from GetResultCode
Filip Navara [Sun, 3 Feb 2019 09:59:55 +0000 (10:59 +0100)]
Prefix enums, remove DLLEXPORT from GetResultCode
Move SortHandle out of public API header, it is opaque structure

5 years agoFix inconsistent usage of various bool types
Filip Navara [Sun, 3 Feb 2019 09:26:27 +0000 (10:26 +0100)]
Fix inconsistent usage of various bool types
Convert u_charsToUChars_safe to ICU style error handling
Unify error handling code across functions to use the same patterns
Add static modifier to functions that are used only from single C file

5 years agoUpdate static_assert usage to c_static_assert_msg
Filip Navara [Sun, 3 Feb 2019 07:46:33 +0000 (08:46 +0100)]
Update static_assert usage to c_static_assert_msg

5 years agoAvoid memory allocation in EnumSymbols for small buffers
Filip Navara [Sun, 3 Feb 2019 02:37:19 +0000 (03:37 +0100)]
Avoid memory allocation in EnumSymbols for small buffers

5 years agoFix error handling in GetLocaleIso639LanguageTwoLetterName
Filip Navara [Sun, 3 Feb 2019 02:20:45 +0000 (03:20 +0100)]
Fix error handling in GetLocaleIso639LanguageTwoLetterName

5 years agoUpdate one more place to use version.c instead of version.cpp
Filip Navara [Sun, 3 Feb 2019 01:02:24 +0000 (02:02 +0100)]
Update one more place to use version.c instead of version.cpp

5 years agoSimplify and fix error handling
Filip Navara [Sun, 3 Feb 2019 00:50:56 +0000 (01:50 +0100)]
Simplify and fix error handling

5 years agoChange NormalizationForm to address feedback.
Filip Navara [Sun, 3 Feb 2019 00:19:29 +0000 (01:19 +0100)]
Change NormalizationForm to address feedback.

5 years agoFix enum alignment
kasper3 [Sun, 1 Jul 2018 09:51:09 +0000 (09:51 +0000)]
Fix enum alignment

5 years agoAddress feedback
kasper3 [Fri, 29 Jun 2018 15:15:56 +0000 (15:15 +0000)]
Address feedback

5 years agoConvert version.cpp to C
kasper3 [Mon, 25 Jun 2018 20:05:58 +0000 (20:05 +0000)]
Convert version.cpp to C

5 years agoAddress feedback
kasper3 [Mon, 25 Jun 2018 14:39:57 +0000 (14:39 +0000)]
Address feedback

5 years agoConvert System.Globalization.Native to C
kasper3 [Fri, 22 Jun 2018 15:54:55 +0000 (15:54 +0000)]
Convert System.Globalization.Native to C

5 years agoRename files
kasper3 [Fri, 22 Jun 2018 15:45:26 +0000 (15:45 +0000)]
Rename files

5 years agoMove Interop.GetTimestamp.cs to shared CoreLib partition. (#35031)
Filip Navara [Sun, 3 Feb 2019 01:35:39 +0000 (02:35 +0100)]
Move Interop.GetTimestamp.cs to shared CoreLib partition. (#35031)

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
5 years agoSpill tree temp large vectors around calls (#22311)
Carol Eidt [Sat, 2 Feb 2019 22:33:30 +0000 (14:33 -0800)]
Spill tree temp large vectors around calls (#22311)

* Spill tree temp large vectors around calls

The code was there to handle lclVars, but there was an implicit assumption that non-lclVar large vector tree temps would never be live across a call.

Fixes the GitHub_20657 failure in #22253

5 years agoAvoid delegate/work item allocations when setting async continuation (#22373)
Stephen Toub [Sat, 2 Feb 2019 18:31:31 +0000 (13:31 -0500)]
Avoid delegate/work item allocations when setting async continuation (#22373)

When awaiting a task, there's a race between seeing whether the task has completed (in which case we just continue running synchronously), finding the task hasn't completed (in which case we hook up a continuation), and then by the time we try to hook up the continuation finding the task has already completed.  In that final case, we don't want to just execute the callback synchronously, as we risk a stack dive, so we queue it.  That queueing currently entails two allocations in the common case: one for the work item object, and one for the Action delegate we force into existence for the state machine box's MoveNext method (in the common case it's now never allocated because you only await Tasks and ValueTasks known to the runtime, which bypasses its creation).  We can instead just queue the box itself, and avoid both allocations.

5 years agoRename ResourceManager fields to follow conventions (#22371)
Jan Kotas [Sat, 2 Feb 2019 17:14:47 +0000 (09:14 -0800)]
Rename ResourceManager fields to follow conventions (#22371)

5 years agoPropagate preferences (#19429)
Carol Eidt [Sat, 2 Feb 2019 14:37:34 +0000 (06:37 -0800)]
Propagate preferences (#19429)

* Propagate preferences

Instead of selecting a single relatedInterval for preferencing,
follow the chain of relatedIntervals (preferenced intervals).

Change when preferences are propagated to the relatedInterval;
do it in allocateRegisters, so that we can update it when we see a last use.

Also tune when and how intervals are preferenced, including allowing multiple
uses on an RMW node to have the target as their preference.

Fixes #11463
Contributes to #16359

5 years agoUpdate dependencies from dotnet/arcade (#22096)
dotnet-maestro[bot] [Sat, 2 Feb 2019 06:29:56 +0000 (22:29 -0800)]
Update dependencies from dotnet/arcade (#22096)

* Update dependencies from https://github.com/dotnet/arcade build 20190118.4

This change updates the following dependencies
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19068.4
- Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19068.4

* Update dependencies from https://github.com/dotnet/arcade build 20190119.2

This change updates the following dependencies
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19069.2
- Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19069.2

* Update dependencies from https://github.com/dotnet/arcade build 20190120.2

This change updates the following dependencies
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19070.2
- Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19070.2

* Update dependencies from https://github.com/dotnet/arcade build 20190122.5

This change updates the following dependencies
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19072.5
- Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19072.5

* Update dependencies from https://github.com/dotnet/arcade build 20190123.5

This change updates the following dependencies
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19073.5
- Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19073.5

* Update dependencies from https://github.com/dotnet/arcade build 20190130.6

This change updates the following dependencies
- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19080.6
- Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19080.6

5 years agoMake Import of Helix.Sdk conditional in tests/helixpublishwitharcade.proj (#22360)
Egor Chesakov [Sat, 2 Feb 2019 05:01:53 +0000 (21:01 -0800)]
Make Import of Helix.Sdk conditional in tests/helixpublishwitharcade.proj (#22360)

5 years agoMove Marshal::UnsafeAddrOfPinnedArrayElement to shared partition (#22359)
Marek Safar [Sat, 2 Feb 2019 03:48:58 +0000 (04:48 +0100)]
Move Marshal::UnsafeAddrOfPinnedArrayElement to shared partition (#22359)

5 years agoMake Exception._HResult private (#22354)
Jan Kotas [Sat, 2 Feb 2019 03:47:52 +0000 (19:47 -0800)]
Make Exception._HResult private (#22354)

5 years agoFix the scratch register used for arm64 stack probing (#22313)
Bruce Forstall [Sat, 2 Feb 2019 00:09:10 +0000 (16:09 -0800)]
Fix the scratch register used for arm64 stack probing (#22313)

* Fix the scratch register used for arm64 stack probing

In some circumstances, genFnProlog might pick a callee-saved
register to be the initReg. This doesn't work for stack probing
since we might need a scratch register before we save the
callee-save regs. So, always use R9 (REG_SCRATCH) instead.

Fixes #22284

* Formatting

5 years agoPreserve Vector Arg registers on Arm64 (#22257)
Carol Eidt [Fri, 1 Feb 2019 23:35:28 +0000 (15:35 -0800)]
Preserve Vector Arg registers on Arm64 (#22257)

* Preserve Vector Arg registers on Arm64

Fix #14371

5 years agoRemove stale warning 420 pragmas (#22352)
Stephen Toub [Fri, 1 Feb 2019 22:26:36 +0000 (17:26 -0500)]
Remove stale warning 420 pragmas (#22352)

It used to be that the CS0420 warning ("a reference to a volatile field will not be treated as volatile") would fire when a volatile was used with an Interlocked.* operation.  That warning was unnecessary, as Interlocked.* would itself provide the relevant barriers, and these functions were special cased in Roslyn a long time ago.  But there are still lots of places where pragmas disabling the warning have stuck around.  I'm deleting them all.

5 years agoMove ResourceManager to shared CoreLib. (#22249)
Filip Navara [Fri, 1 Feb 2019 22:25:56 +0000 (23:25 +0100)]
Move ResourceManager to shared CoreLib. (#22249)

* Move ResourceManager to shared CoreLib.

* Split UAP code out of ResourceManager.cs into separate files.

* Remove ResourceManager.NonUap.cs.

* Do not access internal field (CoreRT build fix).

* Fix non-Windows builds (CoreRT).

* Remove obsolete Debug code.

5 years agoExclude RecursiveException and MultipleException from GCStress runs. (#22340)
Sergey Andreenko [Fri, 1 Feb 2019 20:20:51 +0000 (12:20 -0800)]
Exclude RecursiveException and MultipleException from GCStress runs. (#22340)

Fixes #20460.

See issue #22339.

5 years agoUpdate the double/float formatters to return the shortest roundtrippable string....
Tanner Gooding [Fri, 1 Feb 2019 19:58:35 +0000 (11:58 -0800)]
Update the double/float formatters to return the shortest roundtrippable string. (#22040)

* Updating Number.Formatting to always compute a round-trippable number by default.

* Adding a third-party notice entry for the Grisu3 reference implementation

* Fixing up the Grisu3 algorithm to better match the reference implementation (including comments, etc)

* Porting the Grisu3 implementation that generates the shortest roundtrippable sequence.

* Updating the Dragon4 algorithm to support printing the shortest roundtrippable string.

* Fixing the double/float formatters to ignore precision specifiers for 'R'

* Fixing the double/float formatters to handle +0.0 and -0.0

* Fix the casing of `point` in THIRD-PARTY-NOTICES

Co-Authored-By: tannergooding <tagoo@outlook.com>
* Fixing the double/float formatting code to consider a precision specifier of 0 to be the same as default.

* Fixing the double/float formatter so that nMaxDigits is set appropriately.

* Changing the double/float formatting logic to account for the format when determining the correct precision to request.

* Updating the double/float formatter to take the format specifier into account when determining the number of digits to request.

* Fixing the double/float formatting code to continue handling zero correctly.

* Disabling some outdated CoreFX tests.

* Responding to various feedback from the PR

5 years agoRefactor helixpublishwitharcade.proj (#22346)
Egor Chesakov [Fri, 1 Feb 2019 19:49:39 +0000 (11:49 -0800)]
Refactor helixpublishwitharcade.proj (#22346)

5 years agoEnsure method is active in PrepareMethod (#22351)
Andy Ayers [Fri, 1 Feb 2019 19:34:31 +0000 (11:34 -0800)]
Ensure method is active in PrepareMethod (#22351)

Fixes an assert when first call to PrepareMethod for an assembly
is an interop method.

5 years agoAnnotate types moved from S.R.Extensions
Michal Strehovský [Thu, 31 Jan 2019 21:51:45 +0000 (13:51 -0800)]
Annotate types moved from S.R.Extensions

Testing how much hate this is going to bring me.

These annotations let ProjectN deal with the fact that we now have two
definitions of System.Environment in the system. This is needed as long
as Project N is stuck on 2.1-level version of the framework.

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
5 years agoRevert "Re-point Jenkins to new Ubuntu ARM64 queue"
Russ Keldorph [Fri, 1 Feb 2019 04:23:21 +0000 (20:23 -0800)]
Revert "Re-point Jenkins to new Ubuntu ARM64 queue"

This reverts commit 193d5da27fecb7bf95e7342f1c4b9e2b63ce5313.

5 years agoCoreclr gnuport (#22129)
Sinan Kaya [Fri, 1 Feb 2019 15:27:39 +0000 (10:27 -0500)]
Coreclr gnuport (#22129)

* Abstract away NOINLINE statement

MSVC and GNU compilers use different attributes for noinline.
Abstract away compiler differences.

* Replace __sync_swap with __atomic_exchange_n

__sync_swap doesn't exist on GNU. Replacing with __atomic_exchange_n
which is universally available.

* Define CDECL for GNUC

__cdecl is not defined by default on GNU compilers.

* Define gcc version of __declspec(thread)

* Correct pointer casting

A pointer value is usually unsigned long on most platforms.
Casting it to integer causes signedness issues. Use size_t
to be efficient on all 32 and 64 bit architectures.

* Put quotes around the error string

Correct error statement. GNU G++ is picky about the string
following the error statement with ' character in it. It needs
to be enclosed with double quotes.

* Fix casting problem

Seeing these warnings with GNU G++ compiler

src/pal/src/sync/cs.cpp: In function ‘void CorUnix::InternalInitializeCriticalSectionAndSpinCount(PCRITICAL_SECTION, DWORD, bool)’:
src/pal/src/sync/cs.cpp:630:48: warning: converting to non-pointer type ‘SIZE_T {aka long unsigned int}’ from NULL [-Wconversion-null]
         pPalCriticalSection->OwningThread      = NULL;
                                                ^
src/pal/src/sync/cs.cpp: In function ‘void CorUnix::InternalLeaveCriticalSection(CorUnix::CPalThread*, _CRITICAL_SECTION*)’:
src/pal/src/sync/cs.cpp:880:43: warning: converting to non-pointer type ‘SIZE_T {aka long unsigned int}’ from NULL [-Wconversion-null]
         pPalCriticalSection->OwningThread = NULL;
                                           ^

* Abstract optnone compiler attribute

GNU compiler doesn't support optnone attribute.

pal/src/exception/seh-unwind.cpp:449:77: warning: ‘optnone’ attribute directive ignored [-Wattributes]

* Set the aligned attribute for GNU compiler

* Make __rotl and __rotr functions portable

GNU compiler doesn't have an intrinsic for these. Open code them
using the provided implementation.

* Define deprecated attribute for gcc

* Add throw specifier for GCC

/usr/include/string.h:43:28: error: declaration of ‘void* memcpy(void*, const void*, size_t) throw ()’ has a different exception specifier
        size_t __n) __THROW __nonnull ((1, 2));

5 years agoFixing a GC hole in Number.BigInteger (#22334)
Tanner Gooding [Fri, 1 Feb 2019 06:52:01 +0000 (22:52 -0800)]
Fixing a GC hole in Number.BigInteger (#22334)

5 years agoAdd -skipcrossarchnative option to build.cmd (#22091)
Bruce Forstall [Fri, 1 Feb 2019 05:13:00 +0000 (21:13 -0800)]
Add -skipcrossarchnative option to build.cmd (#22091)

* Add -skipcrossarchnative option to build.cmd

This allows you to skip building the cross-architecture native components.

* Add -skipcrossarchnative to build.sh

5 years agoReplace several Nullable<T>.Value with .GetValueOrDefault() (#22297)
Stephen Toub [Fri, 1 Feb 2019 04:20:14 +0000 (23:20 -0500)]
Replace several Nullable<T>.Value with .GetValueOrDefault() (#22297)

The former does extra work that the latter doesn't do, and they're equivalent when we know it contains a value, such as immediately after a HasValue check.

5 years agoAsyncSteppingFix - Eagerly initialize the AsyncStateMachineBox to avoid expression...
Andrew Au [Thu, 31 Jan 2019 17:07:09 +0000 (09:07 -0800)]
AsyncSteppingFix - Eagerly initialize the AsyncStateMachineBox to avoid expression evaluation in ProjectN async stepping.

[tfs-changeset: 1732745]

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
5 years agoIncrease arm64 timeout. (#22298)
Sergey Andreenko [Fri, 1 Feb 2019 02:55:58 +0000 (18:55 -0800)]
Increase arm64 timeout. (#22298)

* increase arm64 debug/checked timeout.

* Increase timeout only for corefx jobs.

5 years ago[Arm64/arm32] GCStress failure in tracing/eventsourcetrace/eventsourcetrace/eventsour...
José Rivero [Fri, 1 Feb 2019 02:19:09 +0000 (18:19 -0800)]
[Arm64/arm32] GCStress failure in tracing/eventsourcetrace/eventsourcetrace/eventsourcetrace.sh (#22328)

Marking this test `GCStressIncompatible` = True for now.

5 years agoRe-point Jenkins to new Ubuntu ARM64 queue
Russ Keldorph [Thu, 31 Jan 2019 23:20:41 +0000 (15:20 -0800)]
Re-point Jenkins to new Ubuntu ARM64 queue

Move Jenkins off the Ubuntu.1604.Arm64.Open queue so it can be repurposed for Azure DevOps.  This "Iron" queue should only be used by Jenkins.

5 years agoSupport for dumping GC info in R2RDump (#22216)
Tomáš Rylek [Thu, 31 Jan 2019 23:10:58 +0000 (00:10 +0100)]
Support for dumping GC info in R2RDump (#22216)

Thanks to tons of help from Jan Vorlicek I found out that a huge
failure bucket in the CoreCLR Pri#1 tests is caused by incorrect
GC info for generic methods causing failures in catch clauses
where the exception type is a generic referring to a generic
parameter of the method.

As part of investigation of this issue I'm adding provisions for
dumping the GC info alongside methods to make the differences
between CPAOT and Crossgen easier to analyze.

For now I have only implemented the AMD64 variant of the GC info.
Thankfully it turns out that the same GC info is used by both ARM32
and ARM64 so that the only remaining debt is supplying a variant
of the new code for X86.

Thanks

Tomas

5 years agoUpdate python lookup in CMakeLists.txt to match build.(sh|cmd) (#22145)
Omair Majid [Thu, 31 Jan 2019 21:09:35 +0000 (16:09 -0500)]
Update python lookup in CMakeLists.txt to match build.(sh|cmd) (#22145)

Use the same logic that's used in build.sh/build.cmd to lookup python:
first search for `python3`, then fall back to `python2` and finally to
`python`.

5 years agoFix ProjectN build breaks (dotnet/corert#6924)
Michal Strehovský [Thu, 31 Jan 2019 17:18:36 +0000 (18:18 +0100)]
Fix ProjectN build breaks (dotnet/corert#6924)

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
5 years agoFix for missing GC ref map record on ARM64 for the X8 register (#22309)
Tomáš Rylek [Thu, 31 Jan 2019 19:23:38 +0000 (20:23 +0100)]
Fix for missing GC ref map record on ARM64 for the X8 register (#22309)

GC stress testing revealed a deficiency in GC ref map on ARM64 - we weren't
emitting the entry corresponding to the X8 return buffer address because
a recent refactoring changed its location in the transition block. This change
generalizes transition block by exposing a new function

GetOffsetOfFirstGCRefMapSlot()

that returns the same value as

GetOffsetOfArgumentRegisters()

except on ARM64 where it returns the offset of the X8 register in the
transition block (above the callee-saved registers and 8-byte padding i.e.
at position 13 corresponding to offset 0x68, or
GetOffsetOfArgumentRegisters() - 8).

Thanks

Tomas

5 years agoAdd design document for unloadability (#22166)
Jan Vorlicek [Thu, 31 Jan 2019 19:17:11 +0000 (20:17 +0100)]
Add design document for unloadability (#22166)

* Add design document for the unloadability

5 years agoReplace Environment.s_macOS with use of PLATFORM_OSX
Stephen Toub [Thu, 31 Jan 2019 14:35:33 +0000 (09:35 -0500)]
Replace Environment.s_macOS with use of PLATFORM_OSX

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
5 years agoAdapt corert to Environment moving from corefx
Stephen Toub [Wed, 30 Jan 2019 17:18:01 +0000 (12:18 -0500)]
Adapt corert to Environment moving from corefx

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
5 years agoStop collecting source line information during a stacktrace for the E… (#22305)
Aaron Robinson [Thu, 31 Jan 2019 13:04:43 +0000 (05:04 -0800)]
Stop collecting source line information during a stacktrace for the E… (#22305)

* Stop collecting source line information during a stacktrace for the Exception.Source property.

* Code review feedback

5 years agoAdd managed implementation of GetSystemMaxDBCSCharSize (#22290)
Marek Safar [Thu, 31 Jan 2019 06:57:39 +0000 (07:57 +0100)]
Add managed implementation of GetSystemMaxDBCSCharSize (#22290)

5 years agoAdd timeoutPerTestCollection and use this to control Helix workitem timeout (#22312)
Egor Chesakov [Thu, 31 Jan 2019 06:42:49 +0000 (22:42 -0800)]
Add timeoutPerTestCollection and use this to control Helix workitem timeout (#22312)

5 years agoUpdate CoreFx, IbcData, PgoData to preview.19080.2, master-20190130.3, master-2019013...
dotnet-maestro-bot [Thu, 31 Jan 2019 05:09:06 +0000 (21:09 -0800)]
Update CoreFx, IbcData, PgoData to preview.19080.2, master-20190130.3, master-20190130.3, respectively (#22310)

5 years agoRemove run.exe and config.json (#21608)
Sven Boemer [Thu, 31 Jan 2019 00:24:33 +0000 (16:24 -0800)]
Remove run.exe and config.json (#21608)

This moves us one step away from buildtools and towards arcade.

This replaces run.sh and run.cmd (and all invocations) with "dotnet.sh msbuild" and "msbuild.cmd".
- I'm using these wrapper scripts for now instead of those in eng/common in order to retain the very helpful "Running <command>" output in the build logs.
- I'm using msbuild.cmd instead of dotnet.sh to match the current behavior that uses desktop msbuild on windows, instead of dotnet.

All of the arguments that used to be implicitly generated by run.exe and config.json are now explicit, resulting in longer (but easier to copy+paste) commands. Some of these arguments are likely unnecessary, but in this change my goal is just to match the run.exe behavior. Later, I would like to go through and clean up parameters that don't need to be passed in every invocation. I might also consider moving more of the common arguments out into variables in a later change.

Some of the wrapper scripts now have limited support for parsing "-Argument=Value" style parameters, to support our existing buildpipeline infrastructure, since I thought this was easier to test than changing our buildpipeline definitions. We can remove that parsing logic once we stop using buildpipeline (which has happened at this point).

Some subtle parts of the change:

* Add msbuild.cmd

This simulates the behavior of Tools\msbuild.cmd, which calls desktop msbuild.

* Fix BuildOS processing in package build and publish

Previously, config.json had its own processing that would set
OSName. Instead, we now pass it in explicitly where it's
needed (building packages), or not at all (publishing them).

* Handle "=" in publish-packages.cmd and other scripts

This seems necessary to properly handle the azure access token

* Set __BuildOS in PublishPackages

Required for cases where the build OS isn't detected during the build
such as freebsd.

* Use dotnet msbuild in runtest.py

This prevents us from having to deal with different quote escape
behavior on windows and linux. Previously, arguments like
fileloggerparameters and the logger were given quotes to escape
semicolons in the argument. On unix, this prevented the argument from
being split up by bash. On windows, it seems that the run.cmd/run.exe
tools would prevent the extra quotes from being passed to
msbuild.exe (desktop msbuild would choke on the quotes if they were
passed along).

Unlike desktop msbuild, dotnet msbuild is able to parse the quoted
strings, so we simply psas the quoted arguments directly to it on
windows. We may be able to do the same on unix.

* Fix build-test.sh problem with BuildOS

When copying native files during the unix test build, we rely on
__BuildOS being set. Fixing the import order and always setting
__BuildOS fixes this. We should eventually fix the inconsistent use of
BuildOS vs __BuildOS.

5 years agoReverting "Fixing up the UTF8Formatter and some tests to properly handle -0.0" (...
Tanner Gooding [Wed, 30 Jan 2019 23:35:07 +0000 (15:35 -0800)]
Reverting "Fixing up the UTF8Formatter and some tests to properly handle -0.0" (#22300)

5 years agoDisable outdated test until it is updated
Russ Keldorph [Wed, 30 Jan 2019 20:55:30 +0000 (12:55 -0800)]
Disable outdated test until it is updated

5 years agoUpdate CoreFx, PgoData to preview.19080.1, master-20190130.1, respectively
dotnet-maestro-bot [Wed, 30 Jan 2019 15:14:33 +0000 (07:14 -0800)]
Update CoreFx, PgoData to preview.19080.1, master-20190130.1, respectively

5 years agoDisable tests consistently failing in AzDO CI (#22304)
Egor Chesakov [Wed, 30 Jan 2019 22:59:29 +0000 (14:59 -0800)]
Disable tests consistently failing in AzDO CI (#22304)

* JIT\jit64\opt\cse\hugeexpr1 on Linux/arm

Related issue: https://github.com/dotnet/coreclr/issues/22260

* baseservices\threading\interlocked\compareexchange\CompareExchangeTClass
* baseservices\threading\interlocked\compareexchange\CompareExchangeTClass_1

Related issue: https://github.com/dotnet/coreclr/issues/22303

5 years agoRemove GTF_ADDR_ONSTACK and IsVarAddr.
Eugene Rozenfeld [Tue, 29 Jan 2019 19:26:49 +0000 (11:26 -0800)]
Remove GTF_ADDR_ONSTACK and IsVarAddr.

IsVarAddr was checking GTF_ADDR_ONSTACK  to determine if
the GT_ADDR node is an address of a local. This change removes both
GTF_ADDR_ONSTACK and  IsVarAddr and uses IsLocalAdrExpr instead.
IsLocalAddrExpr uses opcodes to determine if GT_ADDR node is
a local address.

GTF_ADDR_ONSTACK flag is ancient, added before 2002 so I couldn't find
the checkin that introduced it.

I changed the assert to a check and an assignment since simplifications
inside fgMorphArgs between
https://github.com/dotnet/coreclr/blob/1a1e4c4d5a8030cb8d82a2e5b06c2ab357b92534/src/jit/morph.cpp#L3709
(which causes https://github.com/dotnet/coreclr/blob/1a1e4c4d5a8030cb8d82a2e5b06c2ab357b92534/src/jit/morph.cpp#L3057)
and
https://github.com/dotnet/coreclr/blob/1a1e4c4d5a8030cb8d82a2e5b06c2ab357b92534/src/jit/morph.cpp#L3790
may result in more GT_ADDR nodes recognized by IsLocalAdrExpr.

x86 and x64 pmi frameworks had no code diffs and some gcinfo reductions
(15 methods with gcinfo diffs in x86).

Fixes #22190.

5 years agoSwitch CoreLib over to using shared Environment from corefx (#22106)
Stephen Toub [Wed, 30 Jan 2019 21:22:27 +0000 (16:22 -0500)]
Switch CoreLib over to using shared Environment from corefx (#22106)

This requires merging/adapting the implementation with EnvironmentAugments (which goes away completely), the shared files, what corert has, etc.

5 years agoFix CorError header file generation (#22294)
Michal Strehovský [Wed, 30 Jan 2019 20:16:13 +0000 (21:16 +0100)]
Fix CorError header file generation (#22294)

The checked in batch script was only usable if you have a Razzle environment and even then it didn't update the right files.

5 years agofixed pdf link in dotnet-standards.md (#22292)
Meir Blachman [Wed, 30 Jan 2019 15:44:57 +0000 (17:44 +0200)]
fixed pdf link in dotnet-standards.md (#22292)