platform/upstream/dotnet/runtime.git
4 years agoRemove workarounds in build scripts for netcoreapp and netfx versionless (#1841)
Santiago Fernandez Madero [Mon, 27 Jan 2020 20:13:14 +0000 (12:13 -0800)]
Remove workarounds in build scripts for netcoreapp and netfx versionless (#1841)

* Remove workarounds in build scripts for netcoreapp and netfx versionless

* Don't pass down netcoreapp in yml builds

* PR Feedback and condition passing -framework arg when not empty in yml files

* Condition TargetGroup global property in helix.yml

* PR Feedback to not use targetgroup for allconfigurations in sendtohelix

* Change from PackageTesting to BuildAllConfigurations

4 years agoMove official builds to OSX 10.14 pool (#2159)
Santiago Fernandez Madero [Mon, 27 Jan 2020 20:12:51 +0000 (12:12 -0800)]
Move official builds to OSX 10.14 pool (#2159)

* Move official builds to OSX 10.14 pool

* Use vmImage instead

4 years agoFix method and basic block flags used by early opts. (#2126)
Eugene Rozenfeld [Mon, 27 Jan 2020 20:03:06 +0000 (12:03 -0800)]
Fix method and basic block flags used by early opts. (#2126)

Fix method and basic block flags used by early opts.

Add missing BBF_HAS_NULLCHECK in loop test transformation.
This change had no diffs in frameworks and benchmark.

Add missing OMF_HAS_ARRAYREF and BBF_HAS_IDX_LEN in many places.
This change had diffs in frameworks and benchmark since the optimization
replacing GT_ARRLENGTH with a constant fires much more often.

Fix inlining to not lose basic block flags when the inlinee basic block
has a ret expr but no statements.

Change propGetType condition in optDoEarlyPropForFunc to check for OMF_HAS_NEWARRAY
in addition to OMF_HAS_NEWOBJ.

Check that methods and basic blocks that have calls to object allocation
helpers have OMF_HAS_NEWOBJ and BBF_HAS_NEWOBJ set.

Check that methods and basic blocks that have calls to array allocation
helpers have OMF_HAS_NEWARRAY and BBF_HAS_NEWARRAY set.

Check that methods and basic blocks that have GT_NULLCHECK nodes
helpers have OMF_HAS_NULLCHECK and BBF_HAS_NULLCHECK set.

Check that methods and basic blocks that access MethodTable
via GT_IND on a ref have OMF_HAS_VTABLEREF and BBF_HAS_VTABLEREF set.

Check that methods and basic blocks that have GT_ARRLENGTH
have OMF_HAS_ARRAYREF and BBF_HAS_IDX_LEN set.

Fix fgOptWhileLoop that could lose BBF_HAS_NEWOBJ and BBF_HAS_NEWARRAY.

Add asserts to make sure we don't have diverging codegen
in debug/checked/release because of early opts.

Add BBF_HAS_VTABREF to BBF_COMPACT_UPD and BBF_SPLIT_GAINED.

4 years agoFactor common prefix text out of Regex alternations (#2171)
Stephen Toub [Mon, 27 Jan 2020 19:56:04 +0000 (14:56 -0500)]
Factor common prefix text out of Regex alternations (#2171)

* Factor common prefix text out of Regex alternations

Given a regex like "this|that|there", we will now factor out the common prefix into a new node concatenated with the alternation, e.g. "th(?:is|at|ere)".  This has a few benefits, including exposing more text to FindFirstChar if this is at the beginning of the sequence, reducing backtracking, and enabling further reduction/optimization opportunities in the alternation.

* Address PR feedback

* Update RegexBoyerMoore.cs

4 years agoFixed Base64 EncodeToUtf8 / DecodeFromUtf8 return states (Done | NeedMoreData) (...
Günther Foidl [Mon, 27 Jan 2020 19:18:14 +0000 (20:18 +0100)]
Fixed Base64 EncodeToUtf8 / DecodeFromUtf8 return states (Done | NeedMoreData) (#281)

4 years agoDelete unused code related to ExtensibleClassFactory (#2224)
Jan Kotas [Mon, 27 Jan 2020 19:04:23 +0000 (11:04 -0800)]
Delete unused code related to ExtensibleClassFactory (#2224)

4 years agoFix for IlAsm round-trip issue #803 (#2168)
Brian Sullivan [Mon, 27 Jan 2020 19:01:25 +0000 (11:01 -0800)]
Fix for IlAsm round-trip issue #803 (#2168)

Remove the unnecessary assignment m_pCustomDescrList = NULL;
from the method RecordTypeConstraints that was added with my original fix.

4 years agoDelete dead ctor in RegexParseException (#2229)
Stephen Toub [Mon, 27 Jan 2020 18:29:52 +0000 (13:29 -0500)]
Delete dead ctor in RegexParseException (#2229)

It'll never be used because the exception gets serialized as its base type and thus is never deserialized.

4 years ago[utils] Default to g_print in mono_counters_dump if the stream is NULL (#2178)
monojenkins [Mon, 27 Jan 2020 18:25:00 +0000 (13:25 -0500)]
[utils] Default to g_print in mono_counters_dump if the stream is NULL (#2178)

This makes `mono_counters_dump` actually work on Android. If either this added default behavior or the macro is too terrible I can explore other options, but I'm tired and this was fast.

Co-authored-by: Ryan Lucia <ryan@luciaonline.net>
4 years ago[mono-corelib] Embed linker descriptor. (#2141)
Zoltan Varga [Mon, 27 Jan 2020 18:11:29 +0000 (13:11 -0500)]
[mono-corelib] Embed linker descriptor. (#2141)

Import illink.targets correctly for Mono System.Private.CoreLib.

This causes an issue when running tests so disable trimming for now.

Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
4 years agoAvoid large switch in compiled FindFirstChar (#2169)
Stephen Toub [Mon, 27 Jan 2020 17:43:12 +0000 (12:43 -0500)]
Avoid large switch in compiled FindFirstChar (#2169)

* Avoid large switch in compiled FindFirstChar

Rather than branching for each value, we can get the value from a lookup table.

* Address PR feedback

Along with some additional style cleanup while addressing that feedback.

4 years agoUse latest System.Memory for ns2.0 refs (#2112)
Eric StJohn [Mon, 27 Jan 2020 17:08:35 +0000 (09:08 -0800)]
Use latest System.Memory for ns2.0 refs (#2112)

4 years ago[runtime] Miscellaneous printf cleanup (#2177)
monojenkins [Mon, 27 Jan 2020 16:59:33 +0000 (11:59 -0500)]
[runtime] Miscellaneous printf cleanup (#2177)

Done to unblock the externs. More work should probably be done, see mono/mono#18580.

Co-authored-by: Ryan Lucia <ryan@luciaonline.net>
4 years agoRemove obsolete files from mono netcore. (#2223)
Steve Pfister [Mon, 27 Jan 2020 16:11:32 +0000 (11:11 -0500)]
Remove obsolete files from mono netcore. (#2223)

Since we moved to dotnet/runtime, they are no longer needed.

4 years agoUpdate locale tables - add Tatar CLDR files tt.xml and tt_RU.xml (#2219)
monojenkins [Mon, 27 Jan 2020 15:56:03 +0000 (10:56 -0500)]
Update locale tables - add Tatar CLDR files tt.xml and tt_RU.xml (#2219)

Fixes mono/mono#18524

The `tt.xml` and `tt_RU.xml` files were added in CLDR 34: http://cldr.unicode.org/index/downloads/cldr-34

Upgrading to v34 (or the latest v36) introduced a larger number of new cultures.  I went with the smallest change possible to have Tatar added.

I wasn't sure if this warranted a test in `CultureInfoTest.cs`, let me know if that would be required and I am happy to add.

Co-authored-by: Adrian <adrianluisgonzalez@gmail.com>
4 years agoAdd pull requests guide doc (#2145)
Marek Safar [Mon, 27 Jan 2020 14:46:23 +0000 (15:46 +0100)]
Add pull requests guide doc (#2145)

* Add pull requests guide doc

Co-Authored-By: Ryan Lucia <ryan@luciaonline.net>
Co-authored-by: Ryan Lucia <ryan@luciaonline.net>
Co-authored-by: Dan Moseley <danmose@microsoft.com>
4 years agoDelete AvailableType/ExternalTypeNode (#2218)
Michal Strehovský [Mon, 27 Jan 2020 14:11:42 +0000 (15:11 +0100)]
Delete AvailableType/ExternalTypeNode (#2218)

These nodes didn't do anything.

4 years agoDelete orphaned file (#2217)
Michal Strehovský [Mon, 27 Jan 2020 14:01:30 +0000 (15:01 +0100)]
Delete orphaned file (#2217)

Became orphaned in #172.

4 years agoMinor R2RDump facelift w.r.t. diffing dump (#2184)
Tomáš Rylek [Mon, 27 Jan 2020 13:04:51 +0000 (14:04 +0100)]
Minor R2RDump facelift w.r.t. diffing dump (#2184)

Based on offline chat with JanV I added initial provisions to simplify
diffing Crossgen1- and 2-compiled SPC. In essence, the --diff option
newly ends up emitting two extra files with the ".r2rdump" extension
representing the methods common to the left and right R2R file. This
is formerly untrodden territory, I'm pioneering R2RDump usability for
this purpose.

Thanks

Tomas

4 years agoConfig for CredScan suppresions (#2212)
Marie Píchová [Mon, 27 Jan 2020 10:54:22 +0000 (11:54 +0100)]
Config for CredScan suppresions (#2212)

4 years agoFix for -mminimal-toc detection, enable BTLS on FreeBSD PowerPC (#2175)
monojenkins [Mon, 27 Jan 2020 10:21:29 +0000 (05:21 -0500)]
Fix for -mminimal-toc detection, enable BTLS on FreeBSD PowerPC (#2175)

Fixes mono/mono#18554 by making autoconf actually check if `-mminimal-toc` works instead of assuming on powerpc. Tested with FreeBSD 12.x and 13.x on powerpc64 ELFv2.
While we are in here, also enable BTLS which has passed testing.

Co-authored-by: Phil Jaenke <prj@rootwyrm.com>
4 years agoAllow passing IntPtr values with UnmanagedType.AsAny. (#2039)
monojenkins [Mon, 27 Jan 2020 10:19:26 +0000 (05:19 -0500)]
Allow passing IntPtr values with UnmanagedType.AsAny. (#2039)

This is used by the SplashScreen class of WindowsBase in .NET Core to pass a NULL pointer.

Co-authored-by: Vincent Povirk <madewokherd@gmail.com>
4 years ago[mono-corelib] Throw exception on an invalid use of short form opcodes for locals...
Alexis Christoforides [Mon, 27 Jan 2020 10:13:32 +0000 (05:13 -0500)]
[mono-corelib] Throw exception on an invalid use of short form opcodes for locals. (#2201)

4 years agoAdd HTTP/3 draft 25 support. (#1294)
Cory Nelson [Mon, 27 Jan 2020 07:50:54 +0000 (23:50 -0800)]
Add HTTP/3 draft 25 support. (#1294)

4 years agoUnify remaining CoreLib interop files (#2203)
Jan Kotas [Mon, 27 Jan 2020 02:24:51 +0000 (18:24 -0800)]
Unify remaining CoreLib interop files (#2203)

Fixes #1232

4 years agoMerge pull request #2206 from vargaz/disable-lldb
Zoltan Varga [Sun, 26 Jan 2020 19:31:17 +0000 (14:31 -0500)]
Merge pull request #2206 from vargaz/disable-lldb

[runtime] Disable lldb backtrace display on osx, it hangs on attaching in lldb.

4 years agoMake JIT configuration a single-init static (#2208)
Michal Strehovský [Sun, 26 Jan 2020 17:52:08 +0000 (18:52 +0100)]
Make JIT configuration a single-init static (#2208)

This fixes two things:
* UseJitPath on compilation builder doesn't make sense for any other backends this file is shared with (CppCodegen/LLVM). Moving that to ReadyToRunCodenCompilationBuilder.
* JitConfigProvider made it look like a configurable JIT path and configurable COMPlus RyuJIT options are a thing, but they're in fact per process and can only be initialized once (first is an implementation limitation in CorInfoImpl, the second is a RyuJIT limitation). Making the config class static+throwing for double-initialization to make this very clear.

4 years ago[runtime] Disable lldb backtrace display on osx, it hangs on attaching in lldb.
Zoltan Varga [Sun, 26 Jan 2020 13:22:05 +0000 (08:22 -0500)]
[runtime] Disable lldb backtrace display on osx, it hangs on attaching in lldb.

4 years agoMerge pull request #2079 from monojenkins/sync-pr-18537-from-mono
Thays Grazia [Sun, 26 Jan 2020 02:59:45 +0000 (23:59 -0300)]
Merge pull request #2079 from monojenkins/sync-pr-18537-from-mono

[debugger] Access invalid memory address using PointerValue Command.

4 years ago[debugger] Access invalid memory address using PointerValue Command.
thaystg [Sun, 26 Jan 2020 00:23:38 +0000 (00:23 +0000)]
[debugger] Access invalid memory address using PointerValue Command.

Creating a fork process to access address that came from IDE using PointerValue. The IDE can send an invalid address and it was crashing mono.

Fixes mono/mono#18191

4 years agoCPU utilization computation fixes (#2196)
Jan Kotas [Sat, 25 Jan 2020 23:56:23 +0000 (15:56 -0800)]
CPU utilization computation fixes (#2196)

* CPU utilization computation fixes
- On Unix, move scalling for total number of processors from PAL to managed side, so that it can use container limit aware ProcessorCount
- Delete asserts for CPU utilization being between 0 and 100. These asserts can fail due to races or rounding errors.
- Converted a few classes to structs

Fixes #2195

* Fix buildbreak

4 years agoFix typos (#2179)
monojenkins [Sat, 25 Jan 2020 18:55:53 +0000 (13:55 -0500)]
Fix typos (#2179)

Co-authored-by: Maher Jendoubi <maher.jendoubi@gmail.com>
4 years agoReduce execution time of RegexCharacterSetTests (#2194)
Stephen Toub [Sat, 25 Jan 2020 18:29:32 +0000 (13:29 -0500)]
Reduce execution time of RegexCharacterSetTests (#2194)

I recently wrote a large, exhaustive set of tests to validate our handling of regex character sets.  Unfortunately it ends up being too much for our CI system.  We were validating ~440 different character sets, for both RegexOptions.None and RegexOptions.Compiled, and for each validating all 65,536 character inputs... that's ~58M regex matches.  In most cases locally it was taking around 15s, but on a loaded, underwhelming CI machine, it was taking minutes in some cases.

I've reduced the load (primarily by only validating the specified characters that should be included or excluded in cases where we're already testing both the positive and negative variants of the same set), while trying to keep a reasonable semblence of the coverage.

I also made it outerloop, and moved a few other longer-running regex tests to outerloop as well.

4 years agoInitialize HashSizeValue for digest algorithms.
Kevin Jones [Sat, 25 Jan 2020 18:00:12 +0000 (13:00 -0500)]
Initialize HashSizeValue for digest algorithms.

The abstract types SHAx and MD5 did not set HashSizeValue, which
would lead to derived types to have HashSize a value of 0. This
initializes the field to match .NET Framework behavior.

4 years agoMerge pull request #2081 from monojenkins/sync-pr-18552-from-mono
Zoltan Varga [Sat, 25 Jan 2020 14:20:20 +0000 (09:20 -0500)]
Merge pull request #2081 from monojenkins/sync-pr-18552-from-mono

[jit] Compute has_references correctly for gshared types whose constraint is a generic valuetype.

4 years ago[jit] Compute has_references correctly for gshared types whose constraint is a generi...
vargaz [Sat, 25 Jan 2020 13:06:43 +0000 (13:06 +0000)]
[jit] Compute has_references correctly for gshared types whose constraint is a generic valuetype.

4 years agoFixed typo in docker readme (#2190)
Marie Píchová [Sat, 25 Jan 2020 13:01:23 +0000 (14:01 +0100)]
Fixed typo in docker readme (#2190)

4 years agoFix intrinsics treatment in Crossgen2 (#1926)
Tomáš Rylek [Sat, 25 Jan 2020 10:27:13 +0000 (11:27 +0100)]
Fix intrinsics treatment in Crossgen2 (#1926)

* Fix intrinsics treatment in Crossgen2

This change fixes unintentional differences in the treatment of
intrinsics in Crossgen2 compared to Crossgen1 I found while
investigating failures in the regression test b426654. While the
change by itself doesn't fully fix the test, I believe it to be
generally useful towards removing the remaining codegen
differences between the compilers.

Thanks

Tomas

* Address JanK's PR feedback

I have audited all entries in the intrinsics table and I added
the [Intrinsic] annotation to all applicable methods. I haven't
found <code>System.EETypePtr.EETypePtrOf</code> and
<code>System.Activator.DefaultConstructorOf</code> anywhere.
I have reverted the additional check for IsInternalCall that
I put in CorInfoImpl in the 1st commit.

Thanks

Tomas

* Revert assertion check for IsInternalCall

* Remove superfluous check for the intrinsic attribute

* Put back the CORINFO_FLG_JIT_INTRINSIC flag

* Remove superfluous namespace name on Intrinsic per JanK's suggestion

* One more removal of superfluous namespace specification

4 years agoMove Strings.resx from CoreCLR to shared System.Private.CoreLib folder (#2151)
Alexander Köplinger [Sat, 25 Jan 2020 10:08:02 +0000 (11:08 +0100)]
Move Strings.resx from CoreCLR to shared System.Private.CoreLib folder (#2151)

* Move Strings.resx from CoreCLR to shared System.Private.CoreLib folder

Mono and CoreCLR both use the same file.

* Get rid of duplicate string

4 years agoRemove unused parts of resource loading (#2164)
Elinor Fung [Sat, 25 Jan 2020 10:01:18 +0000 (02:01 -0800)]
Remove unused parts of resource loading (#2164)

4 years agoFix restore of internal tools and enable IBC merge (#1846)
Santiago Fernandez Madero [Sat, 25 Jan 2020 03:02:49 +0000 (19:02 -0800)]
Fix restore of internal tools and enable IBC merge (#1846)

4 years agoMerge pull request #2142 from vargaz/runtime-no-abort
Zoltan Varga [Sat, 25 Jan 2020 01:12:53 +0000 (20:12 -0500)]
Merge pull request #2142 from vargaz/runtime-no-abort

[runtime] Avoid loading ThreadAbortException class on netcore.

4 years agoIncrease crossgen-comparison job timeout (#2160)
Santiago Fernandez Madero [Sat, 25 Jan 2020 00:45:09 +0000 (16:45 -0800)]
Increase crossgen-comparison job timeout (#2160)

4 years agoChange from PackageTesting to BuildAllConfigurations
Santiago Fernandez Madero [Fri, 24 Jan 2020 19:30:47 +0000 (11:30 -0800)]
Change from PackageTesting to BuildAllConfigurations

4 years agoJIT: merge fgMorph into compCompile (#2110)
Andy Ayers [Sat, 25 Jan 2020 00:19:50 +0000 (16:19 -0800)]
JIT: merge fgMorph into compCompile (#2110)

This gives us a single method that controls most of the jit's phase behavior.
Largely a manual inline, though I updated some comments and changed one assert.

Follow up from #1309; also see #2109.

4 years agoJIT: fix another jitstress/gcstress issue with profiler leave hook (#2105)
Andy Ayers [Sat, 25 Jan 2020 00:05:27 +0000 (16:05 -0800)]
JIT: fix another jitstress/gcstress issue with profiler leave hook (#2105)

Need to also report the hidden return buffer pointer as GC live, in case it
happens to refer to a heap location (method invoked via reflection).

Also did some minor cleanup; we weren't using `returnsGCr` in `emitEndCodeGen`
and we were munging return value liveness unnecessarily when not emitting
a profiler leave hook.

Closes #1971.

4 years agofixed few races when setting or clearing card bundle bits (#2132)
Vladimir Sadov [Fri, 24 Jan 2020 22:58:45 +0000 (14:58 -0800)]
fixed few races when setting or clearing card bundle bits (#2132)

4 years agoRefactor CMake system to allow cross OS DAC compile (#2054)
Steve MacLean [Fri, 24 Jan 2020 22:09:26 +0000 (17:09 -0500)]
Refactor CMake system to allow cross OS DAC compile (#2054)

* Refactor CMake system to allow cross OS DAC compile

Add CLR_CMAKE_HOST_OS

Add rules to determine which cross OS combinations are valid

Make add_definitions depend on TARGET OS properties. Wherever reasonable
make C++ defines depend on runtime target rather than host.

4 years agoUpdate perfview link (#2161)
Bill Wert [Fri, 24 Jan 2020 22:00:28 +0000 (14:00 -0800)]
Update perfview link (#2161)

4 years agoMerge pull request #2108 from vargaz/mono-cmake-build
Zoltan Varga [Fri, 24 Jan 2020 22:00:12 +0000 (17:00 -0500)]
Merge pull request #2108 from vargaz/mono-cmake-build

Initial CMAKE build system support for Mono.

4 years agoFix validation of uninstantiated generic methods (#2137)
Michal Strehovský [Fri, 24 Jan 2020 20:56:32 +0000 (21:56 +0100)]
Fix validation of uninstantiated generic methods (#2137)

Matches what we do for uninstatiated generic types - no need to look at generic parameters.

4 years agoOne more removal of superfluous namespace specification
Tomas [Fri, 24 Jan 2020 19:57:31 +0000 (20:57 +0100)]
One more removal of superfluous namespace specification

4 years agoReenable Http2_ServerSendsInvalidSettingsValue_Error test (#2134)
Tomas Weinfurt [Fri, 24 Jan 2020 19:42:20 +0000 (11:42 -0800)]
Reenable Http2_ServerSendsInvalidSettingsValue_Error test (#2134)

4 years agoRemove superfluous namespace name on Intrinsic per JanK's suggestion
Tomas [Fri, 24 Jan 2020 19:05:40 +0000 (20:05 +0100)]
Remove superfluous namespace name on Intrinsic per JanK's suggestion

4 years agoRemove date number from dev build version (#1835)
Davis Goodin [Fri, 24 Jan 2020 18:17:11 +0000 (12:17 -0600)]
Remove date number from dev build version (#1835)

* Remove date number from dev build version

* Set Library assembly version back to 5.0.0.0

* Use default assembly version in versions.props and fix package testing

* Add missed change to define AssemblyVersion to match MajorVersion.MinorVersion.0.0 in the root

* Don't change AssemblyVersions in installer, leave as it was

* Fix installer tests

* Move AssemblyVersion for installer test assets to right place

Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
4 years agocorefx => runtime (#2068)
Youssef Victor [Fri, 24 Jan 2020 17:30:18 +0000 (19:30 +0200)]
corefx => runtime (#2068)

* corefx => runtime

* Update adding-api-guidelines.md

* Update adding-api-guidelines.md

4 years agoRecognize the `Vector128/256.AsVector*` methods as intrinsic (#1280)
Tanner Gooding [Fri, 24 Jan 2020 15:49:44 +0000 (07:49 -0800)]
Recognize the `Vector128/256.AsVector*` methods as intrinsic (#1280)

* Recognize the `Vector128/256.AsVector*` methods as intrinsic

* Ensure we normalize the struct handle for S.Numerics to S.R.Intrinsic vector conversions

* Marking the Vector128/256.As* methods as intrinsic

* Don't handle AsVector2 or AsVector3 as intrinsic right now

4 years agoenable PostAsync_ReuseRequestContent_Success on Unix (#2118)
Tomas Weinfurt [Fri, 24 Jan 2020 15:00:44 +0000 (07:00 -0800)]
enable PostAsync_ReuseRequestContent_Success on Unix (#2118)

4 years agoRemove ActiveIssue(39075) (#2119)
Eric StJohn [Fri, 24 Jan 2020 14:59:47 +0000 (06:59 -0800)]
Remove ActiveIssue(39075) (#2119)

Issue was fixed but test was not enabled.

4 years agoenable GetAsync_SupportedSSLVersion_Succeeds (#2125)
Tomas Weinfurt [Fri, 24 Jan 2020 14:59:01 +0000 (06:59 -0800)]
enable GetAsync_SupportedSSLVersion_Succeeds (#2125)

4 years ago[runtime] Avoid loading ThreadAbortException class on netcore.
Zoltan Varga [Fri, 24 Jan 2020 14:22:27 +0000 (09:22 -0500)]
[runtime] Avoid loading ThreadAbortException class on netcore.

4 years agoFix pipeline trigger for running libraries tests against Mono (#2097)
Alexander Köplinger [Fri, 24 Jan 2020 08:51:56 +0000 (09:51 +0100)]
Fix pipeline trigger for running libraries tests against Mono (#2097)

Follow-up to https://github.com/dotnet/runtime/pull/1934

Also disables one test that seems to be flaky on Mono.

4 years agoFix enterprise stress pipeline (#2121)
Santiago Fernandez Madero [Fri, 24 Jan 2020 01:01:55 +0000 (17:01 -0800)]
Fix enterprise stress pipeline (#2121)

4 years agoAdd COMPlus_DiagnosticsServerTransportPath (#1600)
John Salem [Fri, 24 Jan 2020 00:27:24 +0000 (16:27 -0800)]
Add COMPlus_DiagnosticsServerTransportPath (#1600)

* Add COMPlus_DiagnosticsServerTransportPath
* allows users to specify a location for the Diagnostics Server

4 years agoUnify EH boundary handling (#2049)
Carol Eidt [Fri, 24 Jan 2020 00:03:23 +0000 (16:03 -0800)]
Unify EH boundary handling (#2049)

4 years agoAdd alpinedac & linuxdac build options (#2056)
Steve MacLean [Thu, 23 Jan 2020 23:31:08 +0000 (18:31 -0500)]
Add alpinedac & linuxdac build options (#2056)

* Add alpinedac & linuxdac build options

4 years agoInitial CMAKE build system support.
Zoltan Varga [Thu, 23 Jan 2020 22:30:05 +0000 (17:30 -0500)]
Initial CMAKE build system support.

4 years agoClean up stale issue links (#2063)
Stephen Toub [Thu, 23 Jan 2020 22:05:05 +0000 (17:05 -0500)]
Clean up stale issue links (#2063)

- In some cases, I deleted ActiveIssues associated with issues where the problem was supposedly fixed.  We'll see.
- In some cases, I deleted test cases entirely, e.g. where the corresponding issue said effectively "we'll live with the behavior" or "another repo is responsible for this now" (paraphrasing), or where the tests were initially added to the repo years ago already disabled and against bug numbers from some old bug database.
- In some cases, I replaced the link with the correct one.
- In some cases, I re-opened closed issues.

4 years agoSpanify SqlDecimal internals (#1155)
Wraith2 [Thu, 23 Jan 2020 19:59:37 +0000 (19:59 +0000)]
Spanify SqlDecimal internals (#1155)

4 years agoFix assert 'treeWithCall == call' (#2050)
Bruce Forstall [Thu, 23 Jan 2020 19:56:20 +0000 (11:56 -0800)]
Fix assert 'treeWithCall == call' (#2050)

* Fix assert 'treeWithCall == call'

This assert was occurring when we have:
- a potential optimistic tail call
- of a function that returns a ref type
- that is also an inline candidate
- whose inline is rejected
- with `COMPlus_JitGCChecks` stress mode that injects a
call to `CORINFO_HELP_CHECK_OBJ` at the `RETURN`
- where we decide to go ahead with the optimistic tailcall
but it is no longer in legal tailcall position.

To fix, simply disallow a tailcall if we are doing
`COMPlus_JitGCChecks` in a function with a ref type return, that
would have inserted the problemmatic call.

Fixes #1821

* Fix formatting

4 years agoMake sure CoreCLRArtifactsPath/MonoArtifactsPath has trailing slash (#2083)
Alexander Köplinger [Thu, 23 Jan 2020 19:13:07 +0000 (20:13 +0100)]
Make sure CoreCLRArtifactsPath/MonoArtifactsPath has trailing slash (#2083)

* Make sure CoreCLRArtifactsPath/MonoArtifactsPath has trailing slash

Addresses the official build break caused by the Mono CI PR.

Fixes https://github.com/dotnet/runtime/issues/2053

* Handle empty RuntimeArtifactsPath

4 years agoMatch blittability rules in crossgen2 with CoreCLR (#2072)
Michal Strehovský [Thu, 23 Jan 2020 19:07:36 +0000 (20:07 +0100)]
Match blittability rules in crossgen2 with CoreCLR (#2072)

Fixes #483. Structs with pointer-typed fields are blittable.

After #1866 we no longer have to worry about the recursion because the code path that recursed into pointed-to types was deleted.

4 years agoRemove legacy guard against loading PFX with no MAC on Unix
Jeremy Barton [Thu, 23 Jan 2020 19:07:07 +0000 (11:07 -0800)]
Remove legacy guard against loading PFX with no MAC on Unix

4 years agoMerge pull request #2040 from monojenkins/sync-pr-18512-from-mono
Aleksey Kliger (λgeek) [Thu, 23 Jan 2020 18:59:28 +0000 (13:59 -0500)]
Merge pull request #2040 from monojenkins/sync-pr-18512-from-mono

Remove "handles" from System.Threading.Semaphore.

Co-Authored-By: Jay Krell <jaykrell@microsoft.com>
4 years agoPut back the CORINFO_FLG_JIT_INTRINSIC flag
Tomas [Thu, 23 Jan 2020 18:46:40 +0000 (19:46 +0100)]
Put back the CORINFO_FLG_JIT_INTRINSIC flag

4 years agoPR Feedback to not use targetgroup for allconfigurations in sendtohelix
Santiago Fernandez Madero [Thu, 23 Jan 2020 18:44:11 +0000 (10:44 -0800)]
PR Feedback to not use targetgroup for allconfigurations in sendtohelix

4 years agoFix typos (#2065)
Youssef Victor [Thu, 23 Jan 2020 18:40:29 +0000 (20:40 +0200)]
Fix typos (#2065)

* begining -> beginning

* paramterized -> parameterized

* folow -> follow

* occurance -> occurrence

* Fix bad changes

* Apply suggestion + minor space fix

4 years agoRemove superfluous check for the intrinsic attribute
Tomas [Thu, 23 Jan 2020 18:38:39 +0000 (19:38 +0100)]
Remove superfluous check for the intrinsic attribute

4 years agoMerge remote-tracking branch 'dotnet/master' into RemoveNetcoreappNetfxBuildScripts
Santiago Fernandez Madero [Thu, 23 Jan 2020 18:30:39 +0000 (10:30 -0800)]
Merge remote-tracking branch 'dotnet/master' into RemoveNetcoreappNetfxBuildScripts

4 years agoRevert assertion check for IsInternalCall
Tomas [Thu, 23 Jan 2020 18:28:13 +0000 (19:28 +0100)]
Revert assertion check for IsInternalCall

4 years agoMerge remote-tracking branch 'dotnet/master' into RemoveNetcoreappNetfxBuildScripts
Santiago Fernandez Madero [Thu, 23 Jan 2020 17:57:10 +0000 (09:57 -0800)]
Merge remote-tracking branch 'dotnet/master' into RemoveNetcoreappNetfxBuildScripts

4 years agoU+0085 not recognised as a newline character in CSharpCodeGenerator.cs (#1740) (...
Hamish Arblaster [Thu, 23 Jan 2020 17:48:36 +0000 (04:48 +1100)]
U+0085 not recognised as a newline character in CSharpCodeGenerator.cs (#1740) (#1853)

* Fix for issue #1740

U+0085 not recognised as a newline character in CSharpCodeGenerator.cs

Fix $1740

* Fix for issue #1740

U+0085 not recognised as a newline character in CSharpCodeGenerator.cs

* Fix for issue #1740

U+0085 not recognised as a newline character in CSharpCodeGenerator.cs
This change fixes a previous test that incorrectly causes the character to be forced out of being in unicode format.

* Stop the changes from #1740 on the .Net Framework as per #1913

Read #1913 for why, view PR #1853 and #1740 also.

4 years agoAddress JanK's PR feedback
Tomas [Thu, 23 Jan 2020 17:07:54 +0000 (18:07 +0100)]
Address JanK's PR feedback

I have audited all entries in the intrinsics table and I added
the [Intrinsic] annotation to all applicable methods. I haven't
found <code>System.EETypePtr.EETypePtrOf</code> and
<code>System.Activator.DefaultConstructorOf</code> anywhere.
I have reverted the additional check for IsInternalCall that
I put in CorInfoImpl in the 1st commit.

Thanks

Tomas

4 years agoMerge pull request #2076 from monojenkins/sync-pr-18501-from-mono
Thays Grazia [Thu, 23 Jan 2020 15:41:12 +0000 (12:41 -0300)]
Merge pull request #2076 from monojenkins/sync-pr-18501-from-mono

[debugger] Native thread not executing managed code considered as terminated

4 years agoAdd disable_omit_fp support for LLVM (#2045)
monojenkins [Thu, 23 Jan 2020 15:30:58 +0000 (10:30 -0500)]
Add disable_omit_fp support for LLVM (#2045)

Fixes mono/mono#18417

4 years ago[jit] Compute the instance size/alignment correctly for gshared types whose constrain...
monojenkins [Thu, 23 Jan 2020 14:43:49 +0000 (09:43 -0500)]
[jit] Compute the instance size/alignment correctly for gshared types whose constraint is a generic valuetype. (#2034)

Fixes mono/mono#18455

4 years agoAdd workaround for ILLinker stripping COM interop details (#2012)
Jan Kotas [Thu, 23 Jan 2020 14:23:59 +0000 (06:23 -0800)]
Add workaround for ILLinker stripping COM interop details (#2012)

* Add workaround for ILLinker stripping COM interop details

Fixes #1264

* Correct version of the fix

4 years agoRemove unrelated msvc/scripts folder from mono (#2069)
Alexander Köplinger [Thu, 23 Jan 2020 14:19:23 +0000 (15:19 +0100)]
Remove unrelated msvc/scripts folder from mono (#2069)

It's not needed in dotnet/runtime.

4 years agoImprove crossgen2 markdown file (#2064)
Youssef Victor [Thu, 23 Jan 2020 14:18:53 +0000 (16:18 +0200)]
Improve crossgen2 markdown file (#2064)

* Improve markdown file

* Revert the ol to ul change

4 years agoUse 4 spaces in coding-style.md examples (#2066)
Youssef Victor [Thu, 23 Jan 2020 13:52:33 +0000 (15:52 +0200)]
Use 4 spaces in coding-style.md examples (#2066)

4 years ago[debugger] Native thread not executing managed code considered as terminated
thaystg [Thu, 23 Jan 2020 13:32:21 +0000 (13:32 +0000)]
[debugger] Native thread not executing managed code considered as terminated

If a thread was suspended and doesn't have any managed stack, it was considered as terminated, but it wasn't really terminated because it can execute managed code again, and stop in a breakpoint so if the execution arrives in debugger_agent_breakpoint_from_context we reset the flag terminated to FALSE.

Fixes #18106

4 years ago[interp] context can be uninitialized for get_resume_state callback (#2073)
monojenkins [Thu, 23 Jan 2020 12:52:11 +0000 (07:52 -0500)]
[interp] context can be uninitialized for get_resume_state callback (#2073)

`jit_tls->interp_context` gets initialized lazily, that is, upon the first interpreter execution on a specific thread (e.g. via interp_runtime_invoke). However, with mixed mode the execution can purely happen in AOT code upon the first interaction with the managed debugger.

Stack trace:

```
  thread #1, name = 'tid_407', queue = 'com.apple.main-thread'
    frame #0: 0x0000000190aedc94 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x0000000190a0f094 libsystem_pthread.dylib`_pthread_cond_wait$VARIANT$armv81 + 672
    frame #2: 0x000000010431318c reloadcontext.iOS`mono_os_cond_wait(cond=0x0000000104b9ba78, mutex=0x0000000104b9ba30) at mono-os-mutex.h:219:8
    frame #3: 0x0000000104312a68 reloadcontext.iOS`mono_coop_cond_wait(cond=0x0000000104b9ba78, mutex=0x0000000104b9ba30) at mono-coop-mutex.h:91:2
    frame #4: 0x0000000104312858 reloadcontext.iOS`suspend_current at debugger-agent.c:3021:4
    frame #5: 0x000000010431be18 reloadcontext.iOS`process_event(event=EVENT_KIND_BREAKPOINT, arg=0x0000000145d09ae8, il_offset=0, ctx=0x0000000149015c20, events=0x0000000000000000, suspend_policy=2) at debugger-agent.c:4058:3
    frame #6: 0x0000000104310cf4 reloadcontext.iOS`process_breakpoint_events(_evts=0x000000028351a680, method=0x0000000145d09ae8, ctx=0x0000000149015c20, il_offset=0) at debugger-agent.c:4722:3
    frame #7: 0x000000010432f1c8 reloadcontext.iOS`mono_de_process_breakpoint(void_tls=0x0000000149014e00, from_signal=0) at debugger-engine.c:1141:2
    frame #8: 0x000000010430f238 reloadcontext.iOS`debugger_agent_breakpoint_from_context(ctx=0x000000016f656790) at debugger-agent.c:4938:2
    frame #9: 0x00000001011b73a4 reloadcontext.iOS`sdb_breakpoint_trampoline + 148
    frame #10: 0x00000001008511b4 reloadcontext.iOS`reloadcontext_iOS_Application_Main_string__(args=0x000000010703a030) at Main.cs:14
    frame #11: 0x00000001010f9730 reloadcontext.iOS`wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 272
    frame #12: 0x00000001042fd8b8 reloadcontext.iOS`mono_jit_runtime_invoke(method=0x0000000145d09ae8, obj=0x0000000000000000, params=0x000000016f656f20, exc=0x0000000000000000, error=0x000000016f656ff8) at mini-runtime.c:3162:3
    frame #13: 0x0000000104411950 reloadcontext.iOS`do_runtime_invoke(method=0x0000000145d09ae8, obj=0x0000000000000000, params=0x000000016f656f20, exc=0x0000000000000000, error=0x000000016f656ff8) at object.c:3052:11
    frame #14: 0x000000010440c4dc reloadcontext.iOS`mono_runtime_invoke_checked(method=0x0000000145d09ae8, obj=0x0000000000000000, params=0x000000016f656f20, error=0x000000016f656ff8) at object.c:3220:9
    frame #15: 0x0000000104415ae0 reloadcontext.iOS`do_exec_main_checked(method=0x0000000145d09ae8, args=0x000000010703a030, error=0x000000016f656ff8) at object.c:5184:3
    frame #16: 0x00000001044144ac reloadcontext.iOS`mono_runtime_exec_main_checked(method=0x0000000145d09ae8, args=0x000000010703a030, error=0x000000016f656ff8) at object.c:5281:9
    frame #17: 0x0000000104414500 reloadcontext.iOS`mono_runtime_run_main_checked(method=0x0000000145d09ae8, argc=1, argv=0x000000016f6570d0, error=0x000000016f656ff8) at object.c:4734:9
    frame #18: 0x00000001042d3b54 reloadcontext.iOS`mono_jit_exec_internal(domain=0x0000000145f00130, assembly=0x0000000281ba2900, argc=1, argv=0x000000016f6570d0) at driver.c:1320:13
    frame #19: 0x00000001042d39a4 reloadcontext.iOS`mono_jit_exec(domain=0x0000000145f00130, assembly=0x0000000281ba2900, argc=1, argv=0x000000016f6570d0) at driver.c:1265:7
    frame #20: 0x0000000104597994 reloadcontext.iOS`::xamarin_main(argc=5, argv=0x000000016f657a80, launch_mode=XamarinLaunchModeApp) at monotouch-main.m:483:8
    frame #21: 0x00000001008510dc reloadcontext.iOS`main(argc=5, argv=0x000000016f657a80) at main.m:104:11
    frame #22: 0x0000000190af8360 libdyld.dylib`start + 4
[...]
* thread #5, name = 'Debugger agent', stop reason = signal SIGABRT
  * frame #0: 0x0000000190aedec4 libsystem_kernel.dylib`__pthread_kill + 8
    frame #1: 0x0000000190a0d724 libsystem_pthread.dylib`pthread_kill$VARIANT$armv81 + 216
    frame #2: 0x000000019095d844 libsystem_c.dylib`abort + 100
    frame #3: 0x00000001045871b4 reloadcontext.iOS`log_callback(log_domain=0x0000000000000000, log_level="error", message="* Assertion at ../../../../../mono/mini/interp/interp.c:7176, condition `context' not met\n", fatal=4, user_data=0x0000000000000000) at runtime.m:1213:3
    frame #4: 0x0000000104544fc8 reloadcontext.iOS`eglib_log_adapter(log_domain=0x0000000000000000, log_level=G_LOG_LEVEL_ERROR, message="* Assertion at ../../../../../mono/mini/interp/interp.c:7176, condition `context' not met\n", user_data=0x0000000000000000) at mono-logger.c:405:2
    frame #5: 0x000000010456093c reloadcontext.iOS`monoeg_g_logstr(log_domain=0x0000000000000000, log_level=G_LOG_LEVEL_ERROR, msg="* Assertion at ../../../../../mono/mini/interp/interp.c:7176, condition `context' not met\n") at goutput.c:134:2
    frame #6: 0x0000000104560598 reloadcontext.iOS`monoeg_g_logv_nofree(log_domain=0x0000000000000000, log_level=G_LOG_LEVEL_ERROR, format="* Assertion at %s:%d, condition `%s' not met\n", args="e\x12z\x04\x01") at goutput.c:149:2
    frame #7: 0x000000010456061c reloadcontext.iOS`monoeg_assertion_message(format="* Assertion at %s:%d, condition `%s' not met\n") at goutput.c:184:22
    frame #8: 0x0000000104560674 reloadcontext.iOS`mono_assertion_message(file="../../../../../mono/mini/interp/interp.c", line=7176, condition="context") at goutput.c:203:2
    frame #9: 0x000000010459b570 reloadcontext.iOS`interp_get_resume_state(jit_tls=0x000000014900d000, has_resume_state=0x000000016fc7a9f4, interp_frame=0x000000016fc7a9e8, handler_ip=0x000000016fc7a9e0) at interp.c:7176:2
    frame #10: 0x0000000104319420 reloadcontext.iOS`compute_frame_info(thread=0x0000000104fe4130, tls=0x0000000149014e00, force_update=1) at debugger-agent.c:3422:3
    frame #11: 0x0000000104320d40 reloadcontext.iOS`thread_commands(command=1, p="", end="", buf=0x000000016fc7acf8) at debugger-agent.c:9048:3
    frame #12: 0x000000010431cca0 reloadcontext.iOS`debugger_thread(arg=0x0000000000000000) at debugger-agent.c:10132:10
    frame #13: 0x000000010447eb04 reloadcontext.iOS`start_wrapper_internal(start_info=0x0000000000000000, stack_ptr=0x000000016fc7b000) at threads.c:1232:3
    frame #14: 0x000000010447e788 reloadcontext.iOS`start_wrapper(data=0x000000028203ef40) at threads.c:1305:8
    frame #15: 0x0000000190a11d8c libsystem_pthread.dylib`_pthread_start + 15
[...]
```

Thanks to @drasticactions for helping me to reproduce.

Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1050615

<!--
Thank you for your Pull Request!

If you are new to contributing to Mono, please try to do your best at conforming to our coding guidelines http://www.mono-project.com/community/contributing/coding-guidelines/ but don't worry if you get something wrong. One of the project members will help you to get things landed.

Does your pull request fix any of the existing issues? Please use the following format: Fixes #issue-number
-->

Co-authored-by: Bernhard Urban-Forster <bernhard.urban@xamarin.com>
4 years agoAddress follow-up feedback from #1934 (#2028)
Viktor Hofer [Thu, 23 Jan 2020 08:49:53 +0000 (09:49 +0100)]
Address follow-up feedback from #1934 (#2028)

* Address follow-up feedback from #1934

* Remove whitespaces

4 years agoUnify build_native via eng/native/build-commons (#1753)
Adeel Mujahid [Thu, 23 Jan 2020 08:47:40 +0000 (10:47 +0200)]
Unify build_native via eng/native/build-commons (#1753)

* Unify build_native via eng/native/build-commons
In order to add new platform, architecture, compiler or its newer
version, there are currently multiple places to update, which can be
deduplicated.

This patch unifies:

* directories creation
* prerequisites checking
* `version.c` generation
* native build invocation
* common argument parsing
* building help menu

for various build scripts under coreclr, installer and libraries.

The common entry-point script is now `eng/native/build-commons.sh` and
rest of the scripts under `eng/native` are implementation detail.

Also extracted CMake platform detection in
`eng/native/configureplatform.cmake`, to share with coreclr and
`installer/corehost`.

* Use if [[ cond ]] in all places

4 years agoJIT: fix jitstress/gcstress issue with return value liveness (#2055)
Andy Ayers [Thu, 23 Jan 2020 08:33:25 +0000 (00:33 -0800)]
JIT: fix jitstress/gcstress issue with return value liveness (#2055)

The jit was not extending return value liveness properly for methods that
returned a ref-wrapped struct, if jitstress caused code to be added between
the final body statement and the epilog (eg a profile leave hook).

Fixes many of the cases in #1971.

4 years agoAdd missing RIDs for Tizen (5.5.0, 6.0.0) (#2003)
Swift Kim [Thu, 23 Jan 2020 08:32:19 +0000 (17:32 +0900)]
Add missing RIDs for Tizen (5.5.0, 6.0.0) (#2003)

4 years agoUnused strings in mscorrc.rc (#2020)
Elinor Fung [Thu, 23 Jan 2020 08:02:53 +0000 (00:02 -0800)]
Unused strings in mscorrc.rc (#2020)

4 years agoFix intrinsics treatment in Crossgen2
Tomas [Sun, 19 Jan 2020 21:33:16 +0000 (22:33 +0100)]
Fix intrinsics treatment in Crossgen2

This change fixes unintentional differences in the treatment of
intrinsics in Crossgen2 compared to Crossgen1 I found while
investigating failures in the regression test b426654. While the
change by itself doesn't fully fix the test, I believe it to be
generally useful towards removing the remaining codegen
differences between the compilers.

Thanks

Tomas

4 years agoContributing: fixed some typos (#2061)
Maher Jendoubi [Thu, 23 Jan 2020 06:41:34 +0000 (07:41 +0100)]
Contributing: fixed some typos (#2061)

4 years agoRemove gc_lh_block_event (#2059)
Andrew Au [Thu, 23 Jan 2020 06:09:44 +0000 (22:09 -0800)]
Remove gc_lh_block_event (#2059)