platform/upstream/dotnet/runtime.git
3 years agoRenable AddMethodBody tests (#41613)
Eric StJohn [Mon, 31 Aug 2020 20:58:16 +0000 (13:58 -0700)]
Renable AddMethodBody tests (#41613)

3 years agomake cns_str indirect loads invariant (#40898)
Egor Bogatov [Mon, 31 Aug 2020 20:47:11 +0000 (23:47 +0300)]
make cns_str indirect loads invariant (#40898)

3 years agoMade char.IsAscii public (#41396)
Günther Foidl [Mon, 31 Aug 2020 20:21:36 +0000 (22:21 +0200)]
Made char.IsAscii public (#41396)

3 years ago[mono] Add mono_image_open_from_data_alc to unstable embedding API (#41334)
Ryan Lucia [Mon, 31 Aug 2020 18:53:38 +0000 (14:53 -0400)]
[mono] Add mono_image_open_from_data_alc to unstable embedding API (#41334)

3 years ago[wasm][debugger] Breakpoint stopping after it's removed (#41479)
Thays Grazia [Mon, 31 Aug 2020 17:30:50 +0000 (14:30 -0300)]
[wasm][debugger] Breakpoint stopping after it's removed (#41479)

* Remove unnecessary WriteLine.
Fix #41447.

* Creating unit test about remove breakpoint.

* Implementing @radical suggestions!

3 years agoAdd Request/Response Headers/Content Start/Stop events (#41590)
Miha Zupan [Mon, 31 Aug 2020 16:45:15 +0000 (18:45 +0200)]
Add Request/Response Headers/Content Start/Stop events (#41590)

3 years agoHTTP 1.1 stress test steps (#41592)
Alexander Nikolaev [Mon, 31 Aug 2020 16:31:08 +0000 (18:31 +0200)]
HTTP 1.1 stress test steps (#41592)

Adds HTTP 1.1 steps to http-stress pipeline.

3 years ago[wasm] Disable an extraneous debug message (#41468)
Ankit Jain [Mon, 31 Aug 2020 14:26:34 +0000 (10:26 -0400)]
[wasm] Disable an extraneous debug message (#41468)

Recent debugger test runs were showing lot of
`CWL: Failed to lookup sequence point` messages.

These are being shown for cases like:

`CWL: list_frames: Failed to lookup sequence point. method: runtime_invoke_direct_void, native_offset: 56`

This is a warning, and doesn't need to be emitted by default.

3 years ago[wasm][debugger] Correctly handle empty, and whitespace-only strings (#41424)
Ankit Jain [Mon, 31 Aug 2020 14:21:04 +0000 (10:21 -0400)]
[wasm][debugger] Correctly handle empty, and whitespace-only strings (#41424)

There are two cases being fixed here:

1. str=='', or str=' '
- We check `str_value == 0`, and for the above cases JS returns
true, due to type coercion.
- So, we show the result as a null string.

2. str==null
- debugger.c adds the value for this with `mono_wasm_add_typed_value ("string", NULL, 0)`
- the second argument is converted to a string with
  `Module.UTF8ToString(..)`, but when it's `0`/NULL, we get an
  empty string. And that becomes a null string, because of (1).

Fixing this by using `===` operator to avoid type coercion.

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

3 years agoFix issue 41311 - Assert failure ephemeral_heap_segment->saved_committed == heap_segm...
Peter Sollich [Mon, 31 Aug 2020 13:17:56 +0000 (15:17 +0200)]
Fix issue 41311 - Assert failure ephemeral_heap_segment->saved_committed == heap_segment_committed (#41441)

This is an interaction problem between gradual decommit and entering a no GC region.

Details:
 - When we enter a no GC region, we are manipulating our commit goals outside of GC, we usually are planning to commit more, so it makes sense to stop any gradual decommit in progress.
- Even if we need to do a GC in preparation for a no GC region, any decommit target established by decommit_ephemeral_segment_pages is likely to be invalid, so we do an early out.
- add an assert to grow_heap_segment so we can catch future issues in this area better.

We may want to trigger the gradual decommit logic in set_allocations_for_no_gc if we discover that after accounting for the planned allocation, we still have substantial decommits. I'm leaving this for a later PR though.

3 years agomono: result of regmask should be stored in regmask_t, not int (#41543)
monojenkins [Mon, 31 Aug 2020 13:12:59 +0000 (09:12 -0400)]
mono: result of regmask should be stored in regmask_t, not int (#41543)

While unlikely in practice, architectures with more than 32 registers would be affected by this as `sizeof(regmask_t) ==8` && `sizeof(int) == 4`.

Run into this while debugging something unrelated.

Co-authored-by: skmp <skmp@users.noreply.github.com>
3 years agoMoved HTTP request telemetry to HttpClient.SendAsync (#41022)
Marie Píchová [Mon, 31 Aug 2020 09:28:27 +0000 (11:28 +0200)]
Moved HTTP request telemetry to HttpClient.SendAsync (#41022)

* Moved HTTP request telemetry to HttpClient.SendAsync

* Added ResponseContent and helper methods events.

* Rework helper method activity nesting

* Expand Telemetry tests

* Also log RequestStart/Stop in HttpMessageInvoker

* Update RequestStart signature

* RequestAborted => RequestFailed rename

* ResponseContent Begin => Start/Stop

* Fix HttpMessageInvoker implementation

* Add Synchronous request Telemetry tests

* Check telemetryStarted before ResponseContentStart

Co-authored-by: MihaZupan <mihazupan.zupan1@gmail.com>
3 years agoAdd 32/8 bit values of exit codes (#41566)
eli-fin [Mon, 31 Aug 2020 09:02:16 +0000 (12:02 +0300)]
Add 32/8 bit values of exit codes (#41566)

This will make searching for the exit code a little easier

Co-authored-by: Eli Finkel <Eli.Finkel@checkmarx.com>
3 years agoUpdate perf docs (#41583)
Adam Sitnik [Mon, 31 Aug 2020 08:32:51 +0000 (10:32 +0200)]
Update perf docs (#41583)

* mention benchmarking and profiling in the workflow description

* remove a very general doc about PerfView which was not refferenced by other docs

* update the performance-guidelines.md doc

3 years agoOptimize Half.Equals (#41554)
Huo Yaoyuan [Mon, 31 Aug 2020 07:08:21 +0000 (15:08 +0800)]
Optimize Half.Equals (#41554)

3 years ago[MIPS32] Fix mono_arch_get_cie_program and ELF_MACHINE undefined issue (#41546)
monojenkins [Sun, 30 Aug 2020 16:17:18 +0000 (12:17 -0400)]
[MIPS32] Fix mono_arch_get_cie_program and ELF_MACHINE undefined issue (#41546)

Hi,

Cross compile for MIPS32:

```
CC=mips-linux-gnu-gcc CFLAGS="-I./libatomic_ops/src" ./autogen.sh --host=mips-linux-gnu --prefix=/home/zhaixiang/mono-mips32-git
make
make install
```

And HelloWorld testcase PASSED:

```
$ ./mono-mips32-git/bin/mono HelloWorld/bin/Debug/netcoreapp3.0/HelloWorld.dll
Hello World!
```

Thanks,
Leslie Zhai

Co-authored-by: xiangzhai <xiangzhai@users.noreply.github.com>
3 years agoPass Configuration to cmake. Use -Os on wasm. (#41550)
Zoltan Varga [Sun, 30 Aug 2020 10:25:55 +0000 (06:25 -0400)]
Pass Configuration to cmake. Use -Os on wasm. (#41550)

3 years ago[master] Update dependencies from dotnet/arcade Microsoft/vstest dotnet/runtime-asset...
dotnet-maestro[bot] [Sun, 30 Aug 2020 09:54:11 +0000 (09:54 +0000)]
[master] Update dependencies from dotnet/arcade Microsoft/vstest dotnet/runtime-assets dotnet/xharness dotnet/icu (#41322)

[master] Update dependencies from dotnet/arcade Microsoft/vstest dotnet/runtime-assets dotnet/xharness dotnet/icu
- Updates:
  - System.ComponentModel.TypeConverter.TestData: from 5.0.0-beta.20420.1 to 5.0.0-beta.20426.1
  - System.Drawing.Common.TestData: from 5.0.0-beta.20420.1 to 5.0.0-beta.20426.1
  - System.IO.Compression.TestData: from 5.0.0-beta.20420.1 to 5.0.0-beta.20426.1
  - System.IO.Packaging.TestData: from 5.0.0-beta.20420.1 to 5.0.0-beta.20426.1
  - System.Net.TestData: from 5.0.0-beta.20420.1 to 5.0.0-beta.20426.1
  - System.Private.Runtime.UnicodeData: from 5.0.0-beta.20420.1 to 5.0.0-beta.20426.1
  - System.Security.Cryptography.X509Certificates.TestData: from 5.0.0-beta.20420.1 to 5.0.0-beta.20426.1
  - System.Windows.Extensions.TestData: from 5.0.0-beta.20420.1 to 5.0.0-beta.20426.1

- Updates:
  - Microsoft.DotNet.XHarness.CLI: from 1.0.0-prerelease.20424.1 to 1.0.0-prerelease.20424.2
  - Microsoft.DotNet.XHarness.TestRunners.Xunit: from 1.0.0-prerelease.20424.1 to 1.0.0-prerelease.20424.2

- Updates:
  - Microsoft.NETCore.Runtime.ICU.Transport: from 5.0.0-preview.8.20421.1 to 6.0.0-alpha.1.20428.1

- Updates:
  - Microsoft.DotNet.GenFacades: from 5.0.0-beta.20419.21 to 5.0.0-beta.20427.5
  - Microsoft.DotNet.Build.Tasks.Feed: from 5.0.0-beta.20419.21 to 5.0.0-beta.20427.5
  - Microsoft.DotNet.Build.Tasks.Packaging: from 5.0.0-beta.20419.21 to 5.0.0-beta.20427.5
  - Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk: from 5.0.0-beta.20419.21 to 5.0.0-beta.20427.5
  - Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk: from 5.0.0-beta.20419.21 to 5.0.0-beta.20427.5
  - Microsoft.DotNet.CodeAnalysis: from 5.0.0-beta.20419.21 to 5.0.0-beta.20427.5
  - Microsoft.DotNet.GenAPI: from 5.0.0-beta.20419.21 to 5.0.0-beta.20427.5
  - Microsoft.DotNet.XUnitExtensions: from 5.0.0-beta.20419.21 to 5.0.0-beta.20427.5
  - Microsoft.DotNet.Helix.Sdk: from 5.0.0-beta.20419.21 to 5.0.0-beta.20427.5
  - Microsoft.DotNet.RemoteExecutor: from 5.0.0-beta.20419.21 to 5.0.0-beta.20427.5
  - Microsoft.DotNet.VersionTools.Tasks: from 5.0.0-beta.20419.21 to 5.0.0-beta.20427.5
  - Microsoft.DotNet.XUnitConsoleRunner: from 2.5.1-beta.20419.21 to 2.5.1-beta.20427.5
  - Microsoft.DotNet.Arcade.Sdk: from 5.0.0-beta.20419.21 to 5.0.0-beta.20427.5
  - Microsoft.DotNet.ApiCompat: from 5.0.0-beta.20419.21 to 5.0.0-beta.20427.5

- Updates:
  - Microsoft.NET.Test.Sdk: from 16.8.0-release-20200821-04 to 16.8.0-release-20200828-02

 - fix TestFirstYearOfJapaneseEra test on Browser platform

3 years ago[mono] Squelch Mach exception handlers (#41536)
monojenkins [Sat, 29 Aug 2020 18:23:12 +0000 (14:23 -0400)]
[mono] Squelch Mach exception handlers (#41536)

Work around LLDB's unconditionally-installed and inflexible Mach
exception handler by installing a no-op task-wide Mach exception
handler.

See also:
- https://github.com/openjdk/jdk/blob/50cc54c730bb0f130991648d1547d42483edddc1/src/hotspot/os/bsd/os_bsd.cpp#L2810-L2817
- https://github.com/mono/mono/issues/10180#issuecomment-683119507

Co-authored-by: imhameed <imhameed@users.noreply.github.com>
3 years agoFix comments calling surrogate halves low surrogates (#41545)
Serentty [Sat, 29 Aug 2020 18:14:43 +0000 (14:14 -0400)]
Fix comments calling surrogate halves low surrogates (#41545)

I think these comments were copied and pasted and someone forgot to modify them.

3 years agoFix a race condition in GCStress (#41540)
Bruce Forstall [Sat, 29 Aug 2020 17:22:20 +0000 (10:22 -0700)]
Fix a race condition in GCStress (#41540)

Consider the case of a partially interruptible function where we've replaced
each call site with INTERRUPT_INSTR_CALL or INTERRUPT_INSTR_CALL_32. Even
though the call site itself isn't a safe point, we put a GCStress instruction
there so we can capture the call target at GC stress time, then set a specific
GCStress instruction for the next instruction that will indicate how to GC
protect any GC refs that are returned from the call.

Multiple threads can enter `DoGcStress` at the same time. They all get just
past the race check `if (!IsGcCoverageInterruptInstruction(instrPtr)) return;`.
One goes ahead, and reads the instruction code for the address at which we're
doing a GCStress. We set `atCall` to `true` if this matches one of our known
GCStress instructions for partially-interruptible call sites. Later, if
`atCall` is `true`, we write the original call instruction back to the code
stream, write the distinguished next instruction GCStress instruction, and
continue. If the other threads then read at the instruction address, they
might read the actual call opcode, not the distinguished GCStress breakpoint
instruction code. Then, they will set `atCall` to `false`. This will indicate
that we are in a fully-interruptible location, or that no special call-site
behavior is required. We go on, force a GC, and eventually get to the assert
in `EECodeManager::EnumGcRefs` that we are at a GC safe point.

The solution is to simply move the `if (!IsGcCoverageInterruptInstruction(instrPtr))`
check below the read of `*instrPtr` to set `atCall`.

Re-enable the GitHub_27924 test.

Fixes #36681

3 years agoarea-owners.md: Add @radical for debugger-mono (#41425)
Ankit Jain [Sat, 29 Aug 2020 09:59:41 +0000 (05:59 -0400)]
area-owners.md: Add @radical for debugger-mono (#41425)

3 years ago[runtime] Fix signature of mini_cleanup (). (#41510)
Zoltan Varga [Sat, 29 Aug 2020 08:04:54 +0000 (04:04 -0400)]
[runtime] Fix signature of mini_cleanup (). (#41510)

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

3 years agoFix reading cpu cache size for Alpine(musl) (#41532)
Manish Godse [Sat, 29 Aug 2020 05:17:01 +0000 (22:17 -0700)]
Fix reading cpu cache size for Alpine(musl) (#41532)

* Fix reading cpu cache size for Alpine(musl)

* limiting the fallback to Linux only

* exclude ARM

* fixing copy-paste error

3 years agoSystem.Net Telemetry style changes (#41527)
Miha Zupan [Sat, 29 Aug 2020 00:46:03 +0000 (02:46 +0200)]
System.Net Telemetry style changes (#41527)

* Change HandshakeStop SslProtocols parameter to enum

* Parameterize Http11/Http20 events

* Add dummy request to ensure Http2 settings are received

3 years agoNullable annotations for System.Runtime.Serialization.Xml and System.Runtime.Serializ...
Eric Erhardt [Fri, 28 Aug 2020 21:55:24 +0000 (16:55 -0500)]
Nullable annotations for System.Runtime.Serialization.Xml and System.Runtime.Serialization.Json (#41476)

* Initial nullable annotations of System.Private.DataContractSerialization

Contributes to #2339

* Mark DataMember.Name as non-nullable.

* Fix a few simple nullable compile errors.

* Assert attributes is non-null in XmlObjectSerializerReadContext

* Ensure XmlObjectSerializerContext.serializer is never null

* Fix a few simple nullable errors

* Remove any checks that DataMember.MemberInfo can be null.

* Mark EnumDataContract.Members as non-nullable.

Fix nullable errors in SchemaExporter.

* Correctly annotate CollectionDataContract.IsCollectionOrTryCreate.

* Assert DataContractResolver is non-null.

* Suppress https://github.com/dotnet/runtime/issues/41465

* Update System.Runtime.Serialization.Json ref source for nullable annotations.

* Update System.Runtime.Serializaiton.Xml ref source for nullable annotations.

* Update for Xml.ReaderWriter nullable annotations

* Work around compiler issue.

* Fix test failure.

Reference compiler issue in TODO comment.

* Revert nullable suppression now that XmlSchemaAppInfo.Markup is annotated correctly.

* Fix build for latest annotations in master.

* PR feedback round 1

* Address PR feedback round 2

3 years agoModfiy ErrorHandlingTests for Browser (#40659)
Mitchell Hwang [Fri, 28 Aug 2020 21:29:35 +0000 (17:29 -0400)]
Modfiy ErrorHandlingTests for Browser (#40659)

Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
3 years agoDo not add bundle deps file to APP_CONTEXT_DEPS_FILES on single-file apps (#41430)
Mateo Torres-Ruiz [Fri, 28 Aug 2020 20:57:39 +0000 (13:57 -0700)]
Do not add bundle deps file to APP_CONTEXT_DEPS_FILES on single-file apps (#41430)

* App Context deps file should be empty for single file apps

3 years agoUpdate IgnoreNullValues obsoletion message (#41141)
Layomi Akinrinade [Fri, 28 Aug 2020 20:39:17 +0000 (13:39 -0700)]
Update IgnoreNullValues obsoletion message (#41141)

* Update IgnoreNullValues obsoletion message

* Add attributes to ref file

3 years agoUpdate excluded tests list for WASM (#41415)
Fan Yang [Fri, 28 Aug 2020 18:40:43 +0000 (14:40 -0400)]
Update excluded tests list for WASM (#41415)

* Check runtime test failures on WASM

* Modify ExcludeList for wasm to exclude only failed tests

* Revert the change to runtime.yml

* Update runtime.yml

3 years agofixed issue 36752 mail address display name (#37874)
jaymin93 [Fri, 28 Aug 2020 18:21:27 +0000 (23:51 +0530)]
fixed issue 36752 mail address display name (#37874)

Co-authored-by: Marie Píchová <11718369+ManickaP@users.noreply.github.com>
Co-authored-by: Karel Zikmund <karelz@microsoft.com>
3 years agoObsolete WebRequest, ServicePoint and WebClient (#41400)
Jan Jahoda [Fri, 28 Aug 2020 17:49:52 +0000 (19:49 +0200)]
Obsolete WebRequest, ServicePoint and WebClient (#41400)

* Obsolete WebRequest, ServicePoint and WebClient

* Update src/libraries/Common/src/System/Obsoletions.cs

Co-authored-by: Cory Nelson <phrosty@gmail.com>
* Remove obsoletion from FileWebRequest

* Add refs assemblies obsoletion

* Add missing attribute

* Add missing attribute

* Suppress warning for System.Media.SoundPlayer

* Change message id

Co-authored-by: Jan Jahoda <jajahoda@.microsoft.com>
Co-authored-by: Cory Nelson <phrosty@gmail.com>
3 years agoMake gc/vxsort/isa_detection.cpp portable (#41517)
Jan Kotas [Fri, 28 Aug 2020 17:13:47 +0000 (10:13 -0700)]
Make gc/vxsort/isa_detection.cpp portable (#41517)

Fixes #41515

3 years agoBump emscripten version to 2.0.1 (#41509)
Alexander Köplinger [Fri, 28 Aug 2020 15:19:12 +0000 (17:19 +0200)]
Bump emscripten version to 2.0.1 (#41509)

Updates the emscripten Docker container we use to build in CI. We no longer need to explicitly set `EMSDK_PATH` since the container already does it.
Also remove `--embedded` flag from `./emsdk activate` since it was deprecated and is now the default.

3 years agoClient side logging for HTTP stress. (#41444)
Marie Píchová [Fri, 28 Aug 2020 13:31:29 +0000 (15:31 +0200)]
Client side logging for HTTP stress. (#41444)

3 years agoFixes Windows docker debug prints. (#41443)
Marie Píchová [Fri, 28 Aug 2020 11:56:31 +0000 (13:56 +0200)]
Fixes Windows docker debug prints. (#41443)

3 years agoBump the local emscripten version to 2.0.1. (#41504)
Zoltan Varga [Fri, 28 Aug 2020 11:53:08 +0000 (07:53 -0400)]
Bump the local emscripten version to 2.0.1. (#41504)

3 years agomono.proj: properly pass -mmacosx-version-min to CFLAGS for OSX (#41433)
Alexander Köplinger [Fri, 28 Aug 2020 11:51:20 +0000 (13:51 +0200)]
mono.proj: properly pass -mmacosx-version-min to CFLAGS for OSX (#41433)

Noticed we were missing this while looking at another PR.

3 years agoPort nullability annotations from System.Private.Xml.Linq to contracts (#41086)
David Cantú [Fri, 28 Aug 2020 10:15:15 +0000 (03:15 -0700)]
Port nullability annotations from System.Private.Xml.Linq to contracts (#41086)

* Enable nullability on System.Xml.XPath.XDocument src

* Port nullability annotations to System.Xml.XPath.XDocument

* Port nullability annotations to System.Xml.XDocument

* Add ? to XmlAttribute argument in int? explicit operator

3 years agoPort nullability annotations to refs XmlDocument and XmlSerializer (#41474)
David Cantú [Fri, 28 Aug 2020 09:58:46 +0000 (02:58 -0700)]
Port nullability annotations to refs XmlDocument and XmlSerializer (#41474)

* Port nullability annotations to refs XmlDocument and XmlSerializer

* Fix new System.Data.Common nullability related errors

* Switch nullability of parameter in SoapElementAttribute ctor

3 years ago[wasm][debugger] Make sure `System.Private.CoreLib.dll` is in sync with (#41469)
Ankit Jain [Fri, 28 Aug 2020 08:08:00 +0000 (04:08 -0400)]
[wasm][debugger] Make sure `System.Private.CoreLib.dll` is in sync with (#41469)

.. it's pdb. Running debugger-tests, I saw lot of messages like:

`CWL: : /Users/radical/dev/runtime/src/mono/mono/metadata/debug-mono-ppdb.c:230 <disabled>`

.. which is trying to print:
`CWL: Symbol file data-0x1c38008 doesn't match image System.Private.CoreLib.dll`

And indeed the dll is out of sync with it's pdb. We need to copy the pdb
too.

3 years agoSwitch Markup property to XmlNode?[]? to reflect it can contain null elements (#41488)
David Cantú [Fri, 28 Aug 2020 06:47:24 +0000 (23:47 -0700)]
Switch Markup property to XmlNode?[]? to reflect it can contain null elements (#41488)

* Switch Markup property to XmlNode?[]? to reflect it can contain null elements

* Update ref

3 years agoRemove if-def from JSON ref file previously used to support linker attributes (#41484)
Layomi Akinrinade [Fri, 28 Aug 2020 01:14:55 +0000 (18:14 -0700)]
Remove if-def from JSON ref file previously used to support linker attributes (#41484)

* Remove if-def from JSON ref file previously used to support linker attributes

* Run GenerateReferenceSource target on ref project

3 years agoimprove InitializeCurrentThread (#41440)
Egor Bogatov [Fri, 28 Aug 2020 00:26:06 +0000 (03:26 +0300)]
improve InitializeCurrentThread (#41440)

3 years agoFix perf token (#41345)
Olivia Chen [Fri, 28 Aug 2020 00:22:43 +0000 (17:22 -0700)]
Fix perf token (#41345)

* remove semicolon from upload token

* will revert - test private commands

* remove condition

* add debug code

* add dump task

* comment out internal param

* rename helixprecommands to sharedhelixprecommands

* update and revert for check-in

3 years agoSwitch text param to nullable in WriteProcessingInstructionAsync (#41481)
David Cantú [Thu, 27 Aug 2020 23:54:03 +0000 (16:54 -0700)]
Switch text param to nullable in WriteProcessingInstructionAsync (#41481)

3 years agoClean up changes in #40914 (#41427)
Layomi Akinrinade [Thu, 27 Aug 2020 22:55:23 +0000 (15:55 -0700)]
Clean up changes in #40914 (#41427)

* Fixup JSON equality checks in polymorphic converter tests

* Limit deserialization value validation to custom _polymorphic_ converters

3 years agoUpdate SYSLIB0012 obsoletion messages to be clear and consistent (#41467)
Jeff Handley [Thu, 27 Aug 2020 22:25:49 +0000 (15:25 -0700)]
Update SYSLIB0012 obsoletion messages to be clear and consistent (#41467)

3 years agoadd tracing to Decryp to complement tracing in Encrypt (#40998)
Tomas Weinfurt [Thu, 27 Aug 2020 20:17:14 +0000 (13:17 -0700)]
add tracing to Decryp to complement tracing in Encrypt (#40998)

* add tracing to Decryp to complement tracing in Encrypt

* feedback from review

* revert encrypt

3 years agoPort nullability annotations to System.Xml.ReaderWriter contract (#41083)
David Cantú [Thu, 27 Aug 2020 20:03:46 +0000 (13:03 -0700)]
Port nullability annotations to System.Xml.ReaderWriter contract (#41083)

* Port nullability annotations to System.Xml.ReaderWriter contract assembly

* Port annotations of recently updated members in Xml/Serialization

* Fix anontations on XmlElement discovered while updating System.Data.Common Xml related annotations

* Fix Xml related annotations on System.Data.Common

* address feedback

Co-authored-by: Krzysztof Wicher <kwicher@microsoft.com>
3 years agoFix SPMI to handle replays of BBINSTR jit method contexts (#41386)
Andy Ayers [Thu, 27 Aug 2020 19:26:33 +0000 (12:26 -0700)]
Fix SPMI to handle replays of BBINSTR jit method contexts (#41386)

Move the handling of allocMethodBlockCounts to the method context.
While this data is both an input and an output, we're more interested
in the input side.

We could also treat it as an output, if we say wanted to verify that
the replay jit wrote the same sequence of IL offsets into the BlockCount
records, but that doesn't seem crucial as changes here would also lead
to code diffs.

Fix the code that checks the AddressMap for reloc hints so it doesn't
fail if the exact lookup fails, but instead falls back to a search.
This is needed because the base of the replay count buffer is recorded
as the map key, but the instrumentation probes in jitted code refer
to offsets from this value.

Fixes #37270.

3 years agoMake minimal OSX version consistent between build-native.sh and configurecompiler...
Alexander Köplinger [Thu, 27 Aug 2020 18:38:25 +0000 (20:38 +0200)]
Make minimal OSX version consistent between build-native.sh and configurecompiler.cmake (#41435)

The latter still specified 10.12 but .NET Core 3+ actually only supports macOS 10.13 or later.

3 years agoFix null check in S.Diagnostics.Contract regressed by nullability annotations (#41382)
Krzysztof Wicher [Thu, 27 Aug 2020 18:00:42 +0000 (20:00 +0200)]
Fix null check in S.Diagnostics.Contract regressed by nullability annotations (#41382)

* Fix null check in S.Diagnostics.Contract regressed by nullability annotations

* fix product per Jan's recommendation

3 years agoConsole.Unix: fix window size not always being invalidated (#41317)
Tom Deseyn [Thu, 27 Aug 2020 17:53:49 +0000 (19:53 +0200)]
Console.Unix: fix window size not always being invalidated (#41317)

Ensure signal handlers are setup to invalidate cached values
for window size.

3 years agoFix ArgumentNullException when using minimum json file (#41428)
Maryam Ariyan [Thu, 27 Aug 2020 17:33:18 +0000 (10:33 -0700)]
Fix ArgumentNullException when using minimum json file (#41428)

3 years agoAllow return null from ConnectionListener.AcceptAsync (#41442)
Natalia Kondratyeva [Thu, 27 Aug 2020 16:20:54 +0000 (19:20 +0300)]
Allow return null from ConnectionListener.AcceptAsync (#41442)

Changed API as it was proposed and approved in #41304

Closes #41304

3 years agoIssue18826 fix (#35137)
monojenkins [Thu, 27 Aug 2020 15:38:44 +0000 (11:38 -0400)]
Issue18826 fix (#35137)

<!--
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
-->

Fixes mono/mono#18826

Co-authored-by: HinTak <HinTak@users.noreply.github.com>
3 years ago[mono] ALC function restructuring for unloadability (#41344)
Ryan Lucia [Thu, 27 Aug 2020 14:56:30 +0000 (10:56 -0400)]
[mono] ALC function restructuring for unloadability (#41344)

We previously had a weird split between the domain and loader headers/files. This makes fewer things public, moves the useful ALC functions to loader-internals.h with the implementation in assembly-load-context.c, and cleans up the flow for some unloading behavior.

3 years agoAdd support for using cmake in the mono runtime build. (#41316)
Zoltan Varga [Thu, 27 Aug 2020 14:13:41 +0000 (10:13 -0400)]
Add support for using cmake in the mono runtime build. (#41316)

* Add support for using cmake in the mono runtime build.

Not enabled by default. Ninja is used for building if available, else we fall
back to make.

* Build and install libmonosgen-2.0.dylib.

* Address review comments.

* Add a few more MONO_EMPTY_SOURCE_FILE defines to silence ranlib warnings on osx.

* Pass -mmacosx-version-min=10.12 on osx.

* Add eventpipe support.

* Quiet the OSX build a bit.

* Address review comments.

3 years agoGlobally enable nullability in XML (#41438)
Krzysztof Wicher [Thu, 27 Aug 2020 12:57:29 +0000 (14:57 +0200)]
Globally enable nullability in XML (#41438)

* Globally enable nullability in XML

* remove double #nullable enable in the file

3 years agoBrowserDebugProxy: bump package versions to latest stable (#41436)
Alexander Köplinger [Thu, 27 Aug 2020 12:51:19 +0000 (14:51 +0200)]
BrowserDebugProxy: bump package versions to latest stable (#41436)

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

3 years agoNullable: System.Xml, part 7 (Serialization) (#41261)
Krzysztof Wicher [Thu, 27 Aug 2020 06:29:11 +0000 (08:29 +0200)]
Nullable: System.Xml, part 7 (Serialization) (#41261)

* Nullable: System.Xml, part 7 (Serialization)

* Fix build errors on Release (ifdef-ed code)

* fix incidental product bug

* address PR feedback

* Make XmlSerializer._rootType nullable

3 years agoThree fixes for R2RDump bugs I discovered while investigating #38290 (#41303)
Tomáš Rylek [Wed, 26 Aug 2020 23:33:45 +0000 (01:33 +0200)]
Three fixes for R2RDump bugs I discovered while investigating #38290 (#41303)

1) As ReadyToRunMethod newly looks at method bodies, in the
composite case we need to pass around per-module IL info, not only
the metadata reader. I have replaced such usages of MetadataReader
with the new interface IAssemblyMetadata and I implemented the
standalone variant StandaloneAssemblyMetadata.

2) I hit an UnwindInfo decoding issue and I found out that the
UnwindCode decoder is weirdly split between the UnwindCode ctor
and a separate method ParseUnwindCode that weren't completely
consistent in whether the UnwindInfoArray refers to the raw 16-bit
entries in the UnwindInfo or to the parsed UnwindCode instances.
I have basically migrated ParseUnwindCode into the UnwindCode ctor
and I simplified the related logic.

3) We shouldn't block method dump on header dump, otherwise there's
no way to dump both headers and methods in one R2RDump execution.

Thanks

Tomas

3 years ago[VisualBasic] Fix tests for Android (#41378)
Edison Henrique Andreassy [Wed, 26 Aug 2020 21:57:05 +0000 (22:57 +0100)]
[VisualBasic] Fix tests for Android (#41378)

Remove some empty tests and add data for others. Resolves #37066

3 years agoAdded VersionConverter (#41384)
devsko [Wed, 26 Aug 2020 21:04:52 +0000 (23:04 +0200)]
Added VersionConverter (#41384)

* Added VersionConverter

* Nullable annotation

3 years agoselect Debian10 over Debian9 for PR validation (#41015)
Tomas Weinfurt [Wed, 26 Aug 2020 20:34:20 +0000 (13:34 -0700)]
select Debian10 over Debian9 for PR validation (#41015)

3 years agoExclude Fannkuch_9 test on ARM (#41380)
Drew Scoggins [Wed, 26 Aug 2020 18:08:16 +0000 (11:08 -0700)]
Exclude Fannkuch_9 test on ARM (#41380)

3 years agoNullability annotations for HttpListener (#41189)
Prashanth Govindarajan [Wed, 26 Aug 2020 17:29:19 +0000 (10:29 -0700)]
Nullability annotations for HttpListener (#41189)

* src files annotated

* ref file

* Address feedback

3 years agoHTTP stress docker fix (#41397)
Marie Píchová [Wed, 26 Aug 2020 16:41:38 +0000 (18:41 +0200)]
HTTP stress docker fix (#41397)

Fixed docker files not using currently built runtime for http stress test.

3 years agoRetry up to three times for X509Chain timeout tests
Kevin Jones [Wed, 26 Aug 2020 16:30:07 +0000 (12:30 -0400)]
Retry up to three times for X509Chain timeout tests

3 years agoAdd netcoreapp build of System.Formats.Asn1
Jeremy Barton [Wed, 26 Aug 2020 16:27:01 +0000 (09:27 -0700)]
Add netcoreapp build of System.Formats.Asn1

This avoids the library causing a cyclic dependency in generating netstandard.dll.
The netcoreapp version is not included in the NuGet package,
following the pattern of
  * System.Text.Json
  * System.Collections.Immutable
  * System.Reflection.Metadata

3 years ago[wasm][browser] Fix System.IO.FileSystem failing tests requiring nanosecond/milliseco...
Tammy Qiu [Wed, 26 Aug 2020 16:06:14 +0000 (12:06 -0400)]
[wasm][browser] Fix System.IO.FileSystem failing tests requiring nanosecond/millisecond granularity (#41288)

* Emscripten lacks ns/ms granularity which I included a switch for and added a browser platform check
* Emscripten takes maximum of utime and atime so I set utime and atime together for Browser

3 years ago[mono] Add mono_assembly_decref, return value on both decref and addref (#41342)
Ryan Lucia [Wed, 26 Aug 2020 13:59:58 +0000 (09:59 -0400)]
[mono] Add mono_assembly_decref, return value on both decref and addref (#41342)

3 years agoReset all Uri fields when reusing an instance (#41324)
Miha Zupan [Wed, 26 Aug 2020 13:08:29 +0000 (15:08 +0200)]
Reset all Uri fields when reusing an instance (#41324)

* Reset all Uri fields when reusing an instance

* Test combined Uri's AbsoluteUri

3 years agoChange Environment.CurrentManagedThreadId back to FCall (#41360)
Jan Kotas [Wed, 26 Aug 2020 12:00:20 +0000 (05:00 -0700)]
Change Environment.CurrentManagedThreadId back to FCall (#41360)

3 years ago[HeapVerify=2] Fix Assert failure "Pointer updated without using write barrier" ...
Leslie Zhai [Wed, 26 Aug 2020 09:53:17 +0000 (17:53 +0800)]
[HeapVerify=2] Fix Assert failure "Pointer updated without using write barrier" (#41375)

* [HeapVerify=2] Fix Assert failure "Pointer updated without using write barrier"

3 years agoupdate macOS 11 rid (#41044)
Tomas Weinfurt [Wed, 26 Aug 2020 09:30:26 +0000 (02:30 -0700)]
update macOS 11 rid (#41044)

* update macOS 11 rid

* add compat 10.16 as well

3 years agoDisable the Platform Compat Analyzer until #41354 is fixed (#41367)
Jeff Handley [Wed, 26 Aug 2020 04:14:29 +0000 (21:14 -0700)]
Disable the Platform Compat Analyzer until #41354 is fixed (#41367)

3 years agoRestrict generational aware analysis to processes that matches the command line confi...
Andrew Au [Wed, 26 Aug 2020 03:02:28 +0000 (20:02 -0700)]
Restrict generational aware analysis to processes that matches the command line configuration (#41052)

3 years agoadd extra padding for icmp6stat to support macOS 11 (#41179)
Tomas Weinfurt [Wed, 26 Aug 2020 02:58:17 +0000 (19:58 -0700)]
add extra padding for icmp6stat to support macOS 11 (#41179)

* add extra padding for icmp6stat to support macOS 11

* update SystemNative_GetIcmpv6GlobalStatistics to use variable size

* add cast

* avoid realloc

3 years agoset TLS versions explicitly to prevent SNI test failure on Deb10 (#41014)
Tomas Weinfurt [Wed, 26 Aug 2020 01:31:30 +0000 (18:31 -0700)]
set TLS versions explicitly to prevent SNI test failure on Deb10 (#41014)

3 years agoWebassembly Runtime Tests (#38556)
Nathan Ricci [Wed, 26 Aug 2020 00:58:02 +0000 (20:58 -0400)]
Webassembly Runtime Tests (#38556)

Enable runtime tests for the Wasm Architecture on Mono runtime.

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Co-authored-by: Fan Yang <yangfan@microsoft.com>
Co-authored-by: jashook <jashoo@microsoft.com>
Co-authored-by: Tomas Rylek <trylek@microsoft.com>
3 years agoSupport polymorphic value-type converters and add validation on values returned by...
devsko [Tue, 25 Aug 2020 23:39:57 +0000 (01:39 +0200)]
Support polymorphic value-type converters and add validation on values returned by custom converters (#40914)

* IL emit Box/Unbox in member access

* Test case for object converter

* Test case for class with primitive members and object converter

* Address feedback

* Fixed issues with JsonConverter<object>and nullable value-types

* Address feedback

* Fix test for .NETStandard version

* Fix #41146

* Accidentally commited the local test hack

* Throw JsonException when a deserialized value cannot be assigned to the property/field

* Fix merge

* Fix merge again

* Undo Fix #41146

* Consolidate nullable annotations

* Addressed feedback

* Addressed feedback

3 years agoThrow from CodeBase if assembly is in the bundle (#40974)
Andy Gocke [Tue, 25 Aug 2020 22:51:06 +0000 (15:51 -0700)]
Throw from CodeBase if assembly is in the bundle (#40974)

Also adds test for Module.FullyQualifiedName

3 years agoAdd sleep in hijacking test (#41340)
Jakob Botsch Nielsen [Tue, 25 Aug 2020 22:34:19 +0000 (00:34 +0200)]
Add sleep in hijacking test (#41340)

Calling GC.Collect in a tight loop is unnecessary for the test and
causing timeouts in CI.

Fixes #40916

3 years agoFix \u00A7 char Unicode category (#41343)
Tarek Mahmoud Sayed [Tue, 25 Aug 2020 22:26:41 +0000 (15:26 -0700)]
Fix \u00A7 char Unicode category (#41343)

3 years ago[mono] Pass -Wc++-compat on all platforms, -Werror on OSX, fix errors (#41233)
Ryan Lucia [Tue, 25 Aug 2020 21:55:00 +0000 (17:55 -0400)]
[mono] Pass -Wc++-compat on all platforms, -Werror on OSX, fix errors (#41233)

This PR:
* Enables `-Wc++-compat` on all platforms: we support building the runtime as C++, so this helps catch errors before they're found in CI and will help keep the netcore build C++-compatible
* Sets `-Werror` on netcore CI for OSX

It also fixes various warnings currently present in the build.

`-Werror` should probably be extended to cover all CI platforms eventually. Adding a new platform is as simple as adding to the line in mono.proj whitelisting platforms and fixing the warnings.

Not sure if there's a better way to handle the cpuidex function, but if we're using that from mini it should definitely be in a header somewhere.

3 years agoAdd tests mapping invalid JSON to objects with parameterized ctors (#41121)
Layomi Akinrinade [Tue, 25 Aug 2020 20:22:21 +0000 (13:22 -0700)]
Add tests mapping invalid JSON to objects with parameterized ctors (#41121)

* Move invalid JSON tests to dedicated file

* Add tests mapping invalid JSON to objects with parameterized ctors

3 years agoFix signing in official build with 3rd party libraries (#41346)
Santiago Fernandez Madero [Tue, 25 Aug 2020 20:04:25 +0000 (13:04 -0700)]
Fix signing in official build with 3rd party libraries (#41346)

* Fix signing in official build with 3rd party libraries

* Update eng/Signing.props

Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
3 years ago[runtime] Catch attempts to create enum types with an underlying type that is itself...
monojenkins [Tue, 25 Aug 2020 18:17:25 +0000 (14:17 -0400)]
[runtime] Catch attempts to create enum types with an underlying type that is itself an incomplete enum type. (#41165)

* Catch attempts to create enum types with an underlying type that is itself an incomplete enum type.

Previously, only non-enum types containing fields with incomplete enum
types were forbidden.

* Permit static constant fields with incomplete types if the incomplete type is the type currently being defined

Co-authored-by: Alexis Christoforides <alexis@thenull.net>
Co-authored-by: imhameed <imhameed@users.noreply.github.com>
3 years agoFix NRE introduced in FileSystemWatcher during nullability annotations (#41315)
Krzysztof Wicher [Tue, 25 Aug 2020 17:35:31 +0000 (19:35 +0200)]
Fix NRE introduced in FileSystemWatcher during nullability annotations (#41315)

* Fix NRE introduced during nullability annotations

* Apply Jeff's suggestions from code review

Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com>
Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com>
3 years agoHTTP/3 interop fixes (#41298)
Cory Nelson [Tue, 25 Aug 2020 17:00:47 +0000 (10:00 -0700)]
HTTP/3 interop fixes (#41298)

Support DNS-based quic connections for SNI.
Support multiple ALPN values.
Update H3 ALPN from "h3" to "h3-29".

3 years agoPrevent invoking property 'init' method (#41293)
Charles Stoner [Tue, 25 Aug 2020 16:45:25 +0000 (09:45 -0700)]
Prevent invoking property 'init' method (#41293)

3 years agoFix tailcall regression with compiled F# (#41206)
Jan Kotas [Tue, 25 Aug 2020 14:17:41 +0000 (07:17 -0700)]
Fix tailcall regression with compiled F# (#41206)

* Fix tailcall regression with compiled F#

This change skips instantiating stubs for direct tailcalls and instead passes the inst argument directly to the target method.

Fixes #40864

* Add regression test

Co-authored-by: Jakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com>
3 years agoExclude Mono.Cecil assemblies from signing (#41325)
Alexander Köplinger [Tue, 25 Aug 2020 13:53:28 +0000 (15:53 +0200)]
Exclude Mono.Cecil assemblies from signing (#41325)

We're just shipping them in the Microsoft.NETCore.BrowserDebugHost.Transport package.

3 years agoMark System.Diagnostics.FileVersionInfo as unsupported on Browser (#41271)
Mitchell Hwang [Tue, 25 Aug 2020 13:40:13 +0000 (09:40 -0400)]
Mark System.Diagnostics.FileVersionInfo as unsupported on Browser (#41271)

Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
3 years ago[master] Update dependencies from dotnet/xharness mono/linker (#41257)
dotnet-maestro[bot] [Tue, 25 Aug 2020 11:23:50 +0000 (11:23 +0000)]
[master] Update dependencies from dotnet/xharness mono/linker (#41257)

[master] Update dependencies from dotnet/xharness mono/linker
- Updates:
  - Microsoft.DotNet.XHarness.CLI: from 1.0.0-prerelease.20420.1 to 1.0.0-prerelease.20424.1
  - Microsoft.DotNet.XHarness.TestRunners.Xunit: from 1.0.0-prerelease.20420.1 to 1.0.0-prerelease.20424.1

- Updates:
  - Microsoft.NET.ILLink.Tasks: from 6.0.0-alpha.1.20422.1 to 6.0.0-alpha.1.20424.3

3 years agoMissed cases not discovered during first phase (#40382)
Jan Jahoda [Tue, 25 Aug 2020 09:13:41 +0000 (11:13 +0200)]
Missed cases not discovered during first phase (#40382)

Co-authored-by: Jan Jahoda <jajahoda@.microsoft.com>
3 years agoPort EventPipe CoreCLR changes to Mono. (#41152)
Johan Lorensson [Tue, 25 Aug 2020 06:42:48 +0000 (08:42 +0200)]
Port EventPipe CoreCLR changes to Mono. (#41152)

* [MonoVM] Enable startup events over EventPipe.

Mono port of CoreCLR PR: https://github.com/dotnet/runtime/pull/36720.

* [MonoVM] Add the ability for profilers to listen to EventPipe events.

Mono port of CoreCLR PR: https://github.com/dotnet/runtime/pull/37002.

* [MonoVM] Add ProcessInfo command to Diagnostics Server.

Mono port of CoreCLR PR: https://github.com/dotnet/runtime/pull/38967.

* [MonoVM] Unregister callback when setting a provider for deferred delete.

Mono port of CoreCLR PR: https://github.com/dotnet/runtime/pull/40191.

* [MonoVM] Generational aware analysis based on environment variable.

Mono port of CoreCLR PR: https://github.com/dotnet/runtime/pull/40332.

NOTE, the ability to pause a session was not ported since it
currently have no use in Mono and looks like a temporary
solution in CoreCLR.

* [MonoVM] Rebrand Diagnostics Server to DiagnosticPort.

Mono port of CoreCLR PR: https://github.com/dotnet/runtime/pull/40499.

3 years agoModified #41008 without GetOverlappedResultEx (#41236)
John Salem [Tue, 25 Aug 2020 02:32:35 +0000 (19:32 -0700)]
Modified #41008 without GetOverlappedResultEx (#41236)

* Revert "Revert "Improve Windows error handling in Diagnostics IPC (#41008)" (#41220)"

This reverts commit 15839c0294b51d8bb9b7f689669da86ebe64546d.

* don't use win8+ API