dotnet-maestro[bot] [Tue, 29 Sep 2020 01:23:14 +0000 (01:23 +0000)]
[master] Update dependencies from Microsoft/vstest dotnet/runtime-assets dotnet/llvm-project dotnet/xharness dotnet/icu dotnet/arcade mono/linker (#42619)
[master] Update dependencies from Microsoft/vstest dotnet/runtime-assets dotnet/llvm-project dotnet/xharness dotnet/icu dotnet/arcade mono/linker
Thays Grazia [Mon, 28 Sep 2020 23:35:28 +0000 (20:35 -0300)]
The test was already working on master. (#42818)
Adeel Mujahid [Mon, 28 Sep 2020 20:51:02 +0000 (23:51 +0300)]
Add a switch to compile dotnet.js as ES6 module (#41964)
* Add a switch to compile dotnet.js as ES6 module
With `./build.sh -os Browser /p:WasmEnableES6=True`, we can now compile
`dotnet.js` as an ES6 module, which can be easily be loaded in
environments like Deno. e.g.:
```js
// myApp.js
import jsdom from "https://dev.jspm.io/jsdom";
window.document = new jsdom.JSDOM(null, {url:'http://localhost'}).window.document;
const dotnetModule = await import('./artifacts//bin/native/net5.0-Browser-Debug-wasm/dotnet.js');
// this is needed since we cannot pass scriptDirectory to upstream module (yet: https://github.com/emscripten-core/emscripten/pull/12120)
const bytes = Deno.readFileSync('./artifacts//bin/native/net5.0-Browser-Debug-wasm/dotnet.wasm', 'utf8');
const dotnet = await dotnetModule.default({wasmBinary: bytes}); // currently it calls run() on load
// dotnet.run(); // we can _additionally_ invoke run() on demand
```
Also waiting on Deno PR to merge with utf-16le suppot, workaround is:
```sh
$ ./build.sh -os Browser /p:WasmEnableES6=True
$ sed -i '' 's/utf-16le/utf8/' artifacts/bin/native/net5.0-Browser-Debug-wasm/dotnet.js
```
and then
```sh
$ deno run --allow-read myApp.js
```
* Set default value to False explicitly
* Use lower-case false for check
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
Bruce Forstall [Mon, 28 Sep 2020 20:39:55 +0000 (13:39 -0700)]
Handle general SuperPMI fatal errors better (#42821)
Before, we weren't printing out an error message for fatal
errors, and the summary message indicated there were no problems.
rizi [Mon, 28 Sep 2020 17:54:42 +0000 (19:54 +0200)]
TraceSourceLogger now takes exception into account(adds it to the log… (#42571)
* TraceSourceLogger now takes exception into account(adds it to the log message) even if formatter is not null
* Fixed a logical error, that would have added the exception twice to the log message when the formatter would have been null.
* Added tests for TraceSourceLogger.
* Removed unnecessary white-spaces.
* Make the TraceLogger output more "natural" (one line message) and similar to SystemdConsoleFormatter.
* Update TraceSourceLoggerTest.cs
* Update TraceSourceLoggerTest.cs
Co-authored-by: Maryam Ariyan <maryam.ariyan@microsoft.com>
Eirik Tsarpalis [Mon, 28 Sep 2020 16:22:44 +0000 (17:22 +0100)]
Make Process.WaitForExitAsync wait for redirected output reads (#42585)
* Make Process.WaitForExitAsync wait for output reads
Addresses an issue where Process.WaitForExitAsync
doesn't wait for background redirected output reads,
a behaviour which diverges from the sync method
equivalent. Fixes #42556.
* address feedback
* pass cancellation token to AsyncStreamReader waiter
* address feedback
* use tcs.TrySetResult
* Update src/libraries/Common/src/System/Threading/Tasks/TaskTimeoutExtensions.cs
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Viktor Hofer [Mon, 28 Sep 2020 16:15:17 +0000 (18:15 +0200)]
Add CompileDesignTime target to IL.Sdk (#42794)
Visual Studio requires the CompileDesignTime target to be present as it is called by the language service. This fixed building ilproj projects inside Visual Studio.
Aleksey Kliger (λgeek) [Mon, 28 Sep 2020 16:13:13 +0000 (12:13 -0400)]
[docs] Clarify that mixed configuration doesn't work in wasm (#42682)
Kevin Jones [Mon, 28 Sep 2020 15:48:39 +0000 (11:48 -0400)]
Support ECDiffieHellman on X509Certificate2
* Adds support for getting ECDH public/private key objects from an X509Certificate2.
* Makes it easier to build PublicKey objects, and makes them more useful.
monojenkins [Mon, 28 Sep 2020 08:44:05 +0000 (04:44 -0400)]
[interp] Throw an InvalidProgramException instead of asserting when trying to transform a method with too many locals. (#42797)
https://github.com/dotnet/runtime/issues/42628.
Co-authored-by: vargaz <vargaz@users.noreply.github.com>
Manish Godse [Mon, 28 Sep 2020 04:22:59 +0000 (21:22 -0700)]
Get builds working when paths contain whitespaces and utf8 chars (#42671)
* Fix to get builds working for paths with whitespaces
Currently builds clr+libs when space exists in repo folder. non-ascii should also be supported.
Validated only of windows
mono is still failing.
* fix midl to not emit full path in generated headers
* avoid full filenames in python source generator
* Fix ilasm target to support folders with spaces.
* update targets for ILDASM
Jan Kotas [Mon, 28 Sep 2020 01:52:38 +0000 (18:52 -0700)]
Use CryptographicallySecureRandomBytes for Guid generation (#42770)
Fixes #42752
Tomáš Rylek [Sun, 27 Sep 2020 22:37:45 +0000 (00:37 +0200)]
Move most of src/coreclr/tests under src/tests and related cleanups (#42386)
* Move stress_dependencies, external and scripts under src/tests/Common;
* Fix build scripts to download nuget packages under artifacts, not into the source tree;
* Replace src/tests/Directory.Build.props with src/coreclr/tests/Directory.Build.props;
* Inject src/coreclr/tests/Directory.Build.targets into src/tests/Directory.Build.targets.
Thanks
Tomas
RaymondHuy [Sun, 27 Sep 2020 22:16:58 +0000 (05:16 +0700)]
Support deserialization for Struct properties that implements IList<T> (#41223)
* Support deserialization for Struct properties that implements IList<T>
Add a new field into IListOfTConverter class to store the values to prevent unboxing when the TCollection is ValueType.
* Support deserialization for struct that implements IList<T>, ICollection<T>, IList
Use constraint type instead of TCollection to avoid unboxing when TCollection is ValueType.
* Add testcase Support deserialization for Struct that implements ISet<T>, IDictionary<TKey, TValue>, IDictionary
Use constraint type to cast to avoid unboxing when the target type is ValueType
* Add testcase for reading nullable struct and null json.
Modify the 'Add' method to use actual type casting.
* Add test cases for struct collection:
- Serializing a default instance.
- Deserializing a null json string.
Co-authored-by: HuyLuong <huy.luong@orientsoftware.com>
Adeel Mujahid [Sun, 27 Sep 2020 16:44:50 +0000 (19:44 +0300)]
Delete dead C/C++ code files (#42782)
Cleaned up some dead files, most of which are either not referenced
anywhere or referencing each other but not part of the overall build
plan.
The search heuristic used is not leveraging build system, but instead
lookup with multiple passes followed by manually excluding the files
which are either part of third-party libraries (libunwind, rapidjson),
a few shims cross-referencing libraries and coreclr or files that are
included in CMakeLists via globbing patterns:
* `src/coreclr/src/pal/prebuilt/idl/*.cpp`
* `src/coreclr/src/unwinder/{ARCH}/unwinder_{ARCH}.cpp`
Stephen Toub [Sun, 27 Sep 2020 12:35:47 +0000 (08:35 -0400)]
Remove dead DnsEndPoint allocation in HttpConnectionPool (#42778)
Stephen Toub [Sun, 27 Sep 2020 12:35:24 +0000 (08:35 -0400)]
Remove unnecessary byte[] allocation from CertificateRequest.CreateSelfSigned (#42776)
Levi Broderick [Sun, 27 Sep 2020 00:31:28 +0000 (17:31 -0700)]
Remove p/invoke to RtlMoveMemory, cleanup caller (#42749)
Bruce Forstall [Sat, 26 Sep 2020 20:10:39 +0000 (13:10 -0700)]
superpmi.py script improvements (#42773)
1. Make the script pylint and pycodestyle clean (with exclusions).
Add pylint/pycodestyle configuration files.
2. Simplify and remove duplication in asm diffs code for generating
asm and JIT dump files.
3. Add cases to automatically upload and download associated .MCT files
if one or more specific .MCH files are specified.
4. Fix a few bugs related to using VS Code to view diffs. (I'm inclined
to remove this complication entirely unless someone actually uses it.)
Jan Kotas [Sat, 26 Sep 2020 18:09:27 +0000 (11:09 -0700)]
Delete empty WarningControl.h (#42771)
Tanner Gooding [Sat, 26 Sep 2020 14:43:03 +0000 (07:43 -0700)]
Update the build script to support opening S.P.Corelib (#42700)
* Update the build script to support opening S.P.Corelib
* Adding a RuntimeFlavor switch to the build scripts
Mike McLaughlin [Sat, 26 Sep 2020 02:20:55 +0000 (19:20 -0700)]
Fix DAC thread context flags (#42744)
Fix DAC thread context flags
The CONTEXT_* flags doesn't have the proper architecture specific bit set for the cross-OS/cross-arch DAC/DBI. This causes the thread contexts not to be copied correctly because of the way CORDbgCopyThreadContext (in coreclr\src\debug\shared\arm64\ primitives.cpp) masks/checks the context flags.
Fix x86 build: missing DT_CONTEXT_ALL
monojenkins [Sat, 26 Sep 2020 01:50:59 +0000 (21:50 -0400)]
[aot] Prepend the assembly name to the names of gsharedvt wrappers to avoid duplicate symbol errors during static linking. (#42667)
Fixes https://github.com/mono/mono/issues/20417.
Co-authored-by: vargaz <vargaz@users.noreply.github.com>
Buyaa [Sat, 26 Sep 2020 00:42:24 +0000 (17:42 -0700)]
Fix additional warnings introduced after fixing inconsistencty (#42750)
Vladimir Sadov [Fri, 25 Sep 2020 23:42:54 +0000 (16:42 -0700)]
SIngle-pass `CopyValueClassUnchecked` (#42654)
* use memmoveGCRefs when copying structs with GC references
* no need for a full fence when copying struct without GC references
Maoni Stephens [Fri, 25 Sep 2020 22:07:26 +0000 (15:07 -0700)]
the other part of suspension fix (#42721)
monojenkins [Fri, 25 Sep 2020 21:41:50 +0000 (17:41 -0400)]
[runtime] Transition the trampoline code to use memory managers for memory allocation. (#42462)
Co-authored-by: vargaz <vargaz@users.noreply.github.com>
Ryan Lucia [Fri, 25 Sep 2020 21:36:34 +0000 (17:36 -0400)]
Change TARGETS_BROWSER define to TARGET_BROWSER (#42635)
This makes our define name consistent across the test suite. I noticed this while making unrelated wasm-specific changes to our tests.
Ryan Lucia [Fri, 25 Sep 2020 21:35:45 +0000 (17:35 -0400)]
Add Type.Namespace tests with array types, disable on Mono (#42634)
We probably have more issues lurking in here since a lot of these reflection APIs don't seem to test array types, but this particular one was in response to a customer bug report.
Drew Scoggins [Fri, 25 Sep 2020 20:46:32 +0000 (13:46 -0700)]
Add wildcard to release branch trigger (#42644)
* Add wildcard to release branch trigger
* Change wildcard to cover all release branches
Adeel Mujahid [Fri, 25 Sep 2020 19:28:24 +0000 (22:28 +0300)]
Enable clang 10,11 and gcc 10 detection (#42583)
Bruce Forstall [Fri, 25 Sep 2020 18:59:33 +0000 (11:59 -0700)]
Improve superpmi.py script output (#42715)
Create a log file that contains all output, and restrict
console output to a more concise subset, to avoid overwhelming
the user.
The `-log_level` option allows changing the level of console output.
The `-log_file` option allows changing the location of the generated
log file.
Also, create a better asm diffs summary at the end of the asm diffs run,
and similar for replay.
Kevin Jones [Fri, 25 Sep 2020 16:51:38 +0000 (12:51 -0400)]
Retry entire test for X.509 TimeoutTests instead of just X509Chain.Build
The TimeoutTests had functionality to retry the X509Chain.Build call if
it failed to improve the reliability of the tests. However, retrying
only the Build portion broke some assumptions about how long a chain
build would take.
If Build is invoked for a second time per the retry, however the
previous call to Build primed some of the AIA or CRL/OCSP caches, this
broke the assumption of how long a delayed fetch would take.
Instead, retry the entire test with a new chain every time so that
nothing is in the cache and the timing assumptions remain valid.
Sergey Andreenko [Fri, 25 Sep 2020 16:10:35 +0000 (09:10 -0700)]
Disable ArrayBufferWriterTests.Advance with JitStress. (#42674)
* Disable ArrayBufferWriterTests.Advance with JitStress.
Issue #42517
* Try to disable broader.
Julien Couvreur [Fri, 25 Sep 2020 15:27:10 +0000 (08:27 -0700)]
Adjust for roslyn change on ref parameters and NotNullIfNotNull (#42707)
* Adjust for roslyn change on ref parameters
* Adjust for roslyn change on NotNullIfNotNull
monojenkins [Fri, 25 Sep 2020 14:46:32 +0000 (10:46 -0400)]
Fix mono_aot_plt_trampoline GC unsafe assumption. (#42685)
managed->native wrapper does the following under coop:
enter gc safe
native call
exit gc safe
since enter/exit gc safe are icalls they will be called through PLT on AOT builds. First call through a PLT slot will resolve the function using mono_aot_plt_trampoline and it currently assumes GC safe mode, so when hit as part of resolving exit gc safe, it is called under GC safe mode.
This has not showed up to be an issue under coop AOT, but asserts when running under checked build.
Fix will make sure thread is in GC unsafe mode making sure assumption of GC unsafe mode holds.
Co-authored-by: lateralusX <lateralusX@users.noreply.github.com>
Tomáš Rylek [Fri, 25 Sep 2020 12:28:59 +0000 (14:28 +0200)]
Update docs and comments to reflect the renames around build-test and runtest scripts (#42708)
* Move the script runtesttilstable.sh under src/tests
* Update most references to build-test / runtest in the runtime repo
With this change I can't find any remaining orphaned references to
the old script names except for a few superpmi-related scripts
I need to follow up on separately as I'm not too familiar with
their functionality.
Thanks
Tomas
Stephen Toub [Fri, 25 Sep 2020 10:33:07 +0000 (06:33 -0400)]
Enable several more IDE analyzer warnings (#42692)
* Enable IDE0062: Make local functions static
* Enable IDE0079: Remove unnecessary suppression
* Enable IDE0082: Convert typeof to nameof
* Enable IDE0043: Validate format string
* Enable IDE0041: Use is null check
Miha Zupan [Fri, 25 Sep 2020 08:16:18 +0000 (10:16 +0200)]
Fix System.Net.Sockets telemetry (#42188)
* Correct NameResolutionTelemetry logic
Taken from
c4c9a2f99b7e339388199086d3014041abccc21e
* Enable listening to multiple sources with TestEventListener
* Workaround EventWrittenEventArgs bug when the EventArgs are stored
Workaround https://github.com/dotnet/runtime/issues/42128
* Correct System.Net.Sockets Telemetry
* Avoid using value tuple in TestEventListener
* Remove unnecessary argument to OnCompletedInternal
* Remove redundant Telemetry.IsEnabled check
* Log Connect/Accept start before the initial context capture
* Use SocketHelperBase in Accept tests
* Avoid duplicate events for BeginConnect without ConnextEx support
* Enable Sync Socket tests
* Revert unrelated SocketPal change
* Log the correct ErrorCode in case of socket disposal
* Add more info on TelemetryTest timeout
* Add PlatformSpecific attribute to ConnectFailure test
* Add missing BeginConnect AfterConnect call on sync failure
* Add comment around GetHelperBase
* Correct WaitForEventCountersAsync helper
* Assert against SocketError.TimedOut in ConnectFailed test
* Add EndConnect comment
* Log Failure around sync SocketPal exceptions
* Don't assert that the exception message is empty
* Dispose socket in a different Thread
* Disable Telemetry failure tests for Sync on RedHat7
* Use more descriptive names in MemberData generation
* Avoid using reflection for #42128 workaround
* Remove ConnectCanceled event
Omair Majid [Fri, 25 Sep 2020 03:05:45 +0000 (23:05 -0400)]
Re-enable support for using the system libunwind (#42689)
We can now build runtime against the system libunwind using:
./build.sh -cmakeargs -DCLR_CMAKE_USE_SYSTEM_LIBUNWIND
This allows Linux distributions that already ship a compatible version
of libunwind library to use that instead of carrying a duplicate in
.NET. This provides some benefits to them, including smaller build
sizes, slightly faster builds and fewer places to fix any
vulnerabilities
This functionality was already supported in .NET Core 3.1 and has
regressed since.
CoreCLR already handles `-DCLR_CMAKE_USE_SYSTEM_LIBUNWIND`, so no
changes are needed there.
The libraries build doesn't care about this cmake varibale, but cmake
itself fails if the variable is not used:
EXEC : CMake error : [runtime/src/libraries/Native/build-native.proj]
Manually-specified variables were not used by the project:
CLR_CMAKE_USE_SYSTEM_LIBUNWIND
So libraries just needs to check and ignore this variable.
The singlefilehost needs to link against libunwind too. Otherwise the
linker fails to resolve symbols, making the build fail:
/usr/bin/ld: runtime/artifacts/bin/coreclr/Linux.x64.Debug//lib/libcoreclrpal.a(seh.cpp.o): in function `UnwindContextToWinContext(unw_cursor*, _CONTEXT*)':
dotnet/runtime/src/coreclr/src/pal/src/exception/seh-unwind.cpp:176: undefined reference to `_ULx86_64_get_reg'
/usr/bin/ld: runtime/src/coreclr/src/pal/src/exception/seh-unwind.cpp:177: undefined reference to `_ULx86_64_get_reg'
/usr/bin/ld: runtime/src/coreclr/src/pal/src/exception/seh-unwind.cpp:178: undefined reference to `_ULx86_64_get_reg'
/usr/bin/ld: runtime/src/coreclr/src/pal/src/exception/seh-unwind.cpp:179: undefined reference to `_ULx86_64_get_reg'
/usr/bin/ld: runtime/src/coreclr/src/pal/src/exception/seh-unwind.cpp:180: undefined reference to `_ULx86_64_get_reg'
/usr/bin/ld: runtime/artifacts/bin/coreclr/Linux.x64.Debug//lib/libcoreclrpal.a(seh.cpp.o): runtime/src/coreclr/src/pal/src/exception/seh-unwind.cpp:181: more undefined references to `_ULx86_64_get_reg' follow
/usr/bin/ld: runtime/artifacts/bin/coreclr/Linux.x64.Debug//lib/libcoreclrpal.a(seh.cpp.o): in function `GetContextPointer(unw_cursor*, ucontext_t*, int, unsigned long**)':
runtime/src/coreclr/src/pal/src/exception/seh-unwind.cpp:227: undefined reference to `_ULx86_64_get_save_loc'
/usr/bin/ld: runtime/artifacts/bin/coreclr/Linux.x64.Debug//lib/libcoreclrpal.a(seh.cpp.o): in function `PAL_VirtualUnwind':
runtime/src/coreclr/src/pal/src/exception/seh-unwind.cpp:340: undefined reference to `_ULx86_64_init_local'
/usr/bin/ld: runtime/src/coreclr/src/pal/src/exception/seh-unwind.cpp:351: undefined reference to `_ULx86_64_step'
/usr/bin/ld: runtime/src/coreclr/src/pal/src/exception/seh-unwind.cpp:360: undefined reference to `_ULx86_64_is_signal_frame'
clang-10: error: linker command failed with exit code 1 (use -v to see invocation)
Fixes: #42661
Jeremy Koritzinsky [Fri, 25 Sep 2020 03:05:32 +0000 (20:05 -0700)]
Extend IDynamicInterfaceCastable test to cover public default-implemented methods on interface impl types. (#42544)
* Extend IDynamicInterfaceCastable test suite to validate current behavior around calling a default-implemented public method defined on the interface impl type.
* Change implementation to use Assert.Fail to describe failure.
* Add public modifier.
Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
* Fix failures.
Stephen Toub [Fri, 25 Sep 2020 02:46:57 +0000 (22:46 -0400)]
Add logging test for SocketsHttpHandler.PlaintextStreamFilter (#42690)
* Add logging test for SocketsHttpHandler.PlaintextStreamFilter
* Make ByteLoggingStream more efficient
Eugene Rozenfeld [Fri, 25 Sep 2020 01:35:01 +0000 (18:35 -0700)]
Remove code for GC Poll marking and insertion. (#42664)
This is a follow-up to
https://github.com/dotnet/runtime/issues/13582#issuecomment-
542386711
and
https://github.com/dotnet/runtime/issues/13582#issuecomment-
653235564
The code to insert gc polls was added in desktop for gc suspension not based
on hijaking. All platforms we target support hijaking so this code is not exercised
or tested. It also clutters other code and adds a bit of runtime overhead.
This change removes all that code.
There are minimal asm diffs because of a removed call to `fgRenumberBlocks`.
Ankit Jain [Fri, 25 Sep 2020 01:29:45 +0000 (21:29 -0400)]
[wasm][debugger][tests] Add tests related to hidden sequence points (#42705)
- this includes two tests that are not working, with files issues
Kevin Jones [Fri, 25 Sep 2020 00:58:21 +0000 (20:58 -0400)]
Remove unused file. (#42697)
monojenkins [Fri, 25 Sep 2020 00:42:13 +0000 (20:42 -0400)]
[aot] Add support for references to GENERIC_ARRAY_HELPER wrappers. (#42580)
The testcase only fails when AOTed using --aot=soft-debug.
Fixes https://github.com/mono/mono/issues/20421.
Co-authored-by: vargaz <vargaz@users.noreply.github.com>
Eric StJohn [Fri, 25 Sep 2020 00:26:35 +0000 (17:26 -0700)]
Add executeable bit to tizen sh files (#42533)
Tarek Mahmoud Sayed [Thu, 24 Sep 2020 23:34:56 +0000 (16:34 -0700)]
Fix Activity.Baggage items Order (#42659)
damageboy [Thu, 24 Sep 2020 23:20:09 +0000 (02:20 +0300)]
JIT: Remove double-{negation,not} in during morph phase (#32000)
- fixes #13647
- Deals with arithmetic negation as well as bitwise-not
- Co-authored with @EgorBo holding my hand :)
Bruce Forstall [Thu, 24 Sep 2020 23:03:40 +0000 (16:03 -0700)]
Add merge-mch command for CI scripting (#42696)
Viktor Hofer [Thu, 24 Sep 2020 22:21:13 +0000 (00:21 +0200)]
Fix illink invocation inside VS (#42678)
* Fix illink invocation inside VS
Fixes https://github.com/dotnet/runtime/issues/42676
* Update illink-sharedframework.targets
Drew Scoggins [Thu, 24 Sep 2020 21:05:17 +0000 (14:05 -0700)]
Fix assigning of config as it got swapped somehow (#42695)
Co-authored-by: Drew Scoggins <andrew.g.scoggins@gmail>
Thays Grazia [Thu, 24 Sep 2020 19:50:34 +0000 (16:50 -0300)]
[wasm][debugger] Fix line number =
16777215 (#42640)
* Fix line number =
16777215.
* Trying to get the line number before the hidden offset.
* Adding comments.
* Adding test case
* Removing extra new line
* Fixing line number
monojenkins [Thu, 24 Sep 2020 18:39:47 +0000 (14:39 -0400)]
[interp] Refactor finally block invocation (#42208)
Stop managing a finally_ips list at runtime. It is cumbersome, redundant and has a performance penalty (since we malloc/free for every single finally block invocation).
For every EH clause we were allocating a local slot (exvar_offsets). This was used to store thrown exception for catch blocks, but wasted for finally blocks. Following this commit, we reuse that slot to store the endfinally return ip. When we execute the endfinally instruction we check this local slot and branch to that ip. If it is null, then we know we were called from EH and should bail out of interpreter execution loop. In normal execution, this return ip is set by MINT_CALL_HANDLER. For every leave IL instruction we explicitly generate a MINT_CALL_HANDLER for every finally block.
Co-authored-by: BrzVlad <BrzVlad@users.noreply.github.com>
Bruce Forstall [Thu, 24 Sep 2020 18:10:22 +0000 (11:10 -0700)]
superpmi.py script improvements (#42668)
* superpmi.py script improvements
1. Simplify and regularize superpmi and mcs tool finding: they are both looked
for first in Core_Root, then in the built product directory, then on the PATH.
2. Improve JIT-EE version determination: first, search for the GUID by parsing
corinfo.h, if found. Otherwise, use "mcs -printJITEEVersion" as before.
3. Improve JIT dll finding: search first in Core_Root, then in the built
product directory.
4. When downloading coredistools, create the Core_Root if it doesn't exist.
With these changes, you can build the "clr.runtime" subset then immediately run
a replay or asmdiffs, without first generating a Core_Root directory. The script
will automatically create the Core_Root directory simply to put coredistools in
it (and also use it as the "current directory" when running superpmi commands).
* Fix bug in altjit processing for 'collect', and 3 code review nits fixed
Adeel Mujahid [Thu, 24 Sep 2020 17:53:00 +0000 (20:53 +0300)]
Fix SingleFile regression in client configuration (#42176)
* Fix SingleFile regression in client configuration
* Simplify condition
* Pass isSingleFile to GetTypeAndHashSuffix
Thays Grazia [Thu, 24 Sep 2020 17:09:43 +0000 (14:09 -0300)]
[wasm][debugger] Fixing step over in an async method (#42639)
* Fixing step over in an async method.
* Removing debugstore change.
Layomi Akinrinade [Thu, 24 Sep 2020 16:30:29 +0000 (09:30 -0700)]
Address additional feedback from number-handling PRs (#42505)
* Address further feedback from number-handling PRs
* Address review feedback
Layomi Akinrinade [Thu, 24 Sep 2020 16:24:01 +0000 (09:24 -0700)]
Guard against (de)serializing SerializationInfo instances (#42605)
* Guard against (de)serializing SerializationInfo instances
* Address feedback
Zoltan Varga [Thu, 24 Sep 2020 16:17:17 +0000 (12:17 -0400)]
Ongoing work on the cmake build. (#42647)
* Fix some warnings.
* Avoid creating netcore/config.make.
* Fix CPU_COUNT test.
* Add missing source file.
Nathan Ricci [Thu, 24 Sep 2020 16:15:08 +0000 (12:15 -0400)]
[Mono] [GC] Fix TotalBytesAllocated and reenable test (#42388)
* Account for bytes in tlab when a thread detaches.
Stephen Toub [Thu, 24 Sep 2020 15:46:09 +0000 (11:46 -0400)]
Expose StackTraceHiddenAttribute publicly (#42632)
* Expose StackTraceHiddenAttribute publicly
* Add hiding tests
Geoff Kizer [Thu, 24 Sep 2020 15:37:00 +0000 (08:37 -0700)]
add SocketsHttpHandler.PlaintextStreamFilter (#42660)
Carol Eidt [Thu, 24 Sep 2020 15:16:32 +0000 (08:16 -0700)]
Interleave GC Info with assembly (#42552)
* Interleave GC Info with assembly
Output GC info deltas *after* the instruction (or label) that changes it.
Add `COMPlus_JitDisasmWithGC` option to turn on the interleaving with assembly.
Fix #41647
Santiago Fernandez Madero [Thu, 24 Sep 2020 13:54:00 +0000 (08:54 -0500)]
Update intellisense package version to RC2 (#42220)
* Update intellisense package version to RC2
* Update intellisense package.
Co-authored-by: Carlos Sanchez <1175054+carlossanlop@users.noreply.github.com>
Co-authored-by: Carlos Sanchez <1175054+carlossanlop@users.noreply.github.com>
Tomas Weinfurt [Thu, 24 Sep 2020 13:13:04 +0000 (06:13 -0700)]
Fix spelling errors in SslStream (#42662)
Viktor Hofer [Thu, 24 Sep 2020 12:27:24 +0000 (14:27 +0200)]
Print help for -? and /? cross-plat (#42396)
* Print help for -? and /? cross-plat
Jan Kotas [Thu, 24 Sep 2020 09:38:23 +0000 (02:38 -0700)]
Use function pointers in crossgen2 (#42655)
Co-authored-by: Adeel Mujahid <adeelbm@outlook.com>
Jan Vorlicek [Thu, 24 Sep 2020 08:31:54 +0000 (10:31 +0200)]
Compile test framework using R2RTest (#42617)
This change switches crossgening of framework when building coreclr
tests to using R2RTest instead of explicitly invoking crossgen /
crossgen2.
To support that, the R2RTest was slightly updated to support specifying
target architecture, full path to crossgen2 and overriding the output
directory.
imhameed [Thu, 24 Sep 2020 08:07:13 +0000 (01:07 -0700)]
[mono] Fix LLVM IR emission for Ssse3.AlignRight and Sse2/Sse41.Extract (#42648)
The `mask` parameter to `shufflevector` must be a vector of `i32`s; we
were mistakenly using a vector of `i8`s previously.
`extractelement` requires that supplied index is smaller than the source
vector's length. The underlying instructions only pay attention to the
lower bits of the index, so replicate this behavior manually with
masking at the LLVM IR level.
This change makes JIT/HardwareIntrinsics/X86/Sse2/Sse2_{r,ro} pass with
LLVM JIT. LLVM AOT still makes this test fail for unrelated reasons.
This change makes more subtests in
JIT/HardwareIntrinsics/X86/Ssse3/Ssse3_{r,ro} pass with LLVM JIT. But
there are still other unrelated failures.
Larry Ewing [Thu, 24 Sep 2020 04:35:51 +0000 (23:35 -0500)]
[wasm][bindings] Fix an api regression introduced in #42486 (#42658)
* Fix an api regression introduced in #42486
* Update src/mono/wasm/runtime/binding_support.js
a number it is
Co-authored-by: Ankit Jain <radical@gmail.com>
Co-authored-by: Ankit Jain <radical@gmail.com>
monojenkins [Thu, 24 Sep 2020 03:19:22 +0000 (23:19 -0400)]
[runtime] Throw a MarshalDirectiveException when returning an array from a pinvoke method. (#42631)
Fixes https://github.com/mono/mono/issues/20367.
Co-authored-by: vargaz <vargaz@users.noreply.github.com>
Stephen Toub [Thu, 24 Sep 2020 02:26:31 +0000 (22:26 -0400)]
Add IDE warnings to code analysis ruleset (#42566)
- Add all IDEXXXX warnings to ruleset, but as hidden for now
- Enable IDE0073: file header mismatch
Tarek Mahmoud Sayed [Thu, 24 Sep 2020 01:34:33 +0000 (18:34 -0700)]
Support cp1252 codepage alias (#42599)
* Support cp1252 codepage alias
* Apply suggestions from code review
Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Fix teh License comment in the file headers
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Bruce Forstall [Thu, 24 Sep 2020 00:58:40 +0000 (17:58 -0700)]
Fix use of uninitialized 'altjit' attribute (#42656)
Change the `-altjit` flag to require passing a JIT filename. There are
too many altjits (cross-compile JITs) available now to be able to pick
a good default, so force the user to pick.
Eric Erhardt [Wed, 23 Sep 2020 22:22:05 +0000 (17:22 -0500)]
Ensure Enumerable methods are preserved by System.Linq.Querable (#42603)
* Ensure Enumerable methods are preserved by System.Linq.Querable
When using System.Linq.Queryable against an in-memory collection, and trimming the application, the underlying Enumerable methods need to be preserved by the linker.
Annotating each Queryable method with a DynamicDependency to the corresponding Enumerable method will fix this scenario.
Fix #42536
Yaroslav Yamshchikov [Wed, 23 Sep 2020 19:26:18 +0000 (22:26 +0300)]
fix dwarf-based unwinding to the end of stack (#42620)
We experience CLR crash on some architectures (at least in x86) in case
of unhandled managed exception. libunwind steps to the very end of a
stack, and if .eh_frame info is correct, it returns with retcode 0 and
ip=0 from unw_step, then PAL calls unw_is_signal_frame with
c->validate==0 which in turn dereferences zeroed ip in access_mem.
libunwind spec says that retcode 0 from unw_step means very end of a
stack, so PAL should not expect any frames, signal or not. It should
convert cursor back to SEH representation and return with TRUE.
Jan Kotas [Wed, 23 Sep 2020 19:23:55 +0000 (12:23 -0700)]
Delete unused Monitor.Wait argument (#42610)
* Delete unused Monitor.Wait argument
* Move Monitor to shared partition
Kevin Jones [Wed, 23 Sep 2020 19:16:57 +0000 (15:16 -0400)]
Return null from ClaimsPrincipal.Current if no thread principal. (#42622)
* Return null from ClaimsPrincipal.Current if no thread principal.
In the .NET Framework, the AppDomain's default PrincipalPolicy is
UnauthenticatedPrincipal. When falling back to the thread's principal,
this would no throw because a GenericPrincipal was returned.
If the policy was changed to NoPrincipal, ClaimsPrincipal.Current would
throw constructing the ClaimsPrincipal since there is no principal.
However that behavior was opt-in.
In .NET Core, the default policy was changed to NoPrincipal, which would
mean unless a principal was explicitly set, Current would always throw.
This changes the behavior to return null instead of throw for
NoPrincipal. This is to continue supporting the existing behavior in
.NET Core 3 of returning null if there is no principal, but continue
to allow falling back to the thread's principal.
* Code review feedback.
Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Fix typos
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Eugene Rozenfeld [Wed, 23 Sep 2020 18:47:14 +0000 (11:47 -0700)]
Delete dead code in `genCheckUseBlockInit`. (#42601)
Stephen Toub [Wed, 23 Sep 2020 18:34:29 +0000 (14:34 -0400)]
Fix nullable annotation on Socket.BeginSendFile (#42623)
Koundinya Veluri [Wed, 23 Sep 2020 17:08:45 +0000 (13:08 -0400)]
Fix to allow entering cooperative GC mode when the thread is in a forbid-suspend-for-debugger region (#42587)
- Followup to https://github.com/dotnet/runtime/pull/40060
- In short timing windows if a thread is placed in a pending-suspend-for-debugger state while in a forbid-suspend-for-debugger region, from the above PR it would not suspend for the debugger but it was missed that it can also get stuck in a perpetual spin-wait while entering cooperative GC mode. This causes the thread to not suspend for the debugger (VS times out after waiting) and the thread can only progress by unmarking it for debugger suspension.
- Fixed to break the spin-wait by checking whether the thread is in the forbid region
Fix for https://github.com/dotnet/runtime/issues/42375 in master
Andy Ayers [Wed, 23 Sep 2020 16:06:21 +0000 (09:06 -0700)]
JIT: initial version of a profile checker (#42481)
Adds a new flowgraph checker that tries to verify that the profile data is
self-consistent.
Use `COMPlus_JitProfileChecks=1` to enable in dumps, `=2` to raise asserts
if issues are found.
I plan on using this to start fixing the issues it finds and then perhaps
gradually enable more stringent checking.
Marie Píchová [Wed, 23 Sep 2020 15:41:26 +0000 (17:41 +0200)]
HTTP stress test improvements (#42313)
Fixes:
stress client double read of content fixed
fixed stress client hangs at start and stop
leveraged HttpVersionPolicy
increased pipeline timeout since we doubled the runs
fixed base docker images to avoid missing IO.Pipelines Kestrel exception.
Re-hauled tracing:
added server file logging
added log file rotation
Minor renames.
Contributes to: #42211 and #42198
Steve Harter [Wed, 23 Sep 2020 14:52:41 +0000 (09:52 -0500)]
Make nullable-related checks consistent and faster (#42401)
Omair Majid [Wed, 23 Sep 2020 14:48:12 +0000 (10:48 -0400)]
Fix singlefilehost build in non-portable mode (#42415)
The singilefilehost needs to follow the libraries build in terms of how
it links to OpenSSL: if it's a non-portable build, the singlefilehost
needs to link to OpenSSL via linker arguments.
The installer also needs to have FEATURE_DISTRO_AGNOSTIC_SSL defined
just like it is defined for the libraries build.
Fixes: #41768
Stephen Toub [Wed, 23 Sep 2020 13:22:58 +0000 (09:22 -0400)]
Fix a few Socket.SendFile issues (#42535)
* Fix a few Socket.SendFile issues
- The string argument in the single-argument overload should be nullable.
- All overloads on Windows should allow a null file path, but they've been throwing an exception
- On Linux, data was silently truncated when sending a file larger than int.MaxValue with BeginSendFile.
* Address PR feedback
Jan Kotas [Wed, 23 Sep 2020 13:16:12 +0000 (06:16 -0700)]
Integrate changes in shared files from dotnet/runtimelab:NativeAOT (#42609)
- Style analyzer fixes
- ARM64 port
Jan Kotas [Wed, 23 Sep 2020 12:55:32 +0000 (05:55 -0700)]
Fix race condition in Environment.GetEnvironmentVariable (#42608)
Eirik Tsarpalis [Wed, 23 Sep 2020 12:40:03 +0000 (13:40 +0100)]
Revert "Make Console.ReadKey() distinguish between CR and LF inputs" (#42470)
* Revert "Make Console.ReadKey() distinguish between CR and LF inputs (#37491)"
This reverts commit
a62bfcbd6e03396e85232a73aeef10df9df5fa4d.
* Account for terminals that have ICRNL disabled
* Add manual tests that validates the current \n ReadKey() behaviour on Unix
dotnet-maestro[bot] [Wed, 23 Sep 2020 09:59:47 +0000 (09:59 +0000)]
[master] Update dependencies from dotnet/xharness mono/linker dotnet/arcade Microsoft/vstest dotnet/llvm-project dotnet/icu (#42201)
[master] Update dependencies from dotnet/xharness mono/linker dotnet/arcade Microsoft/vstest dotnet/llvm-project dotnet/icu
- Merge branch 'master' into darc-master-
c2f56120-c0a9-49ac-83ec-
d0550f2e6a36
- Fix merge conflict
- Revert override of local changes to send-to-helix.yml
- Fix path to ILLink.Tasks.dll
- Revert override of local changes to send-to-helix.yml
- Revert override of local changes to send-to-helix.yml
- Fix path to ILLink.Tasks.dll
- Fix another path to ILLink.Tasks.dll
Tarek Mahmoud Sayed [Wed, 23 Sep 2020 06:28:04 +0000 (23:28 -0700)]
Fix the closure allocations in ActivityTagsCollection (#42606)
Jackson Miller [Wed, 23 Sep 2020 04:57:04 +0000 (00:57 -0400)]
add tests to increase enum serialization code coverage (#40601)
* add tests to increase enum serialization code coverage
* implement feedback and add test to cover naming policy scenario
* remove unnecessary bound check now that all primitive types are supported
* Revert "remove unnecessary bound check now that all primitive types are supported"
This reverts commit
0a6a345ed3eaf65be8efbb51c6258a8448aaf9c1.
* implement review feedback
remove unnecessary serializer options in test
rename JsonNamingPolicy ToLower -> ToLowerNamingPolicy
* Remove commented-out code
Co-authored-by: David Cantú <dacantu@microsoft.com>
Jan Kotas [Wed, 23 Sep 2020 01:08:15 +0000 (18:08 -0700)]
Rewrite Type.GetTypeFromProgID in C# (#42546)
- Move CoreRT managed implementation of Type.GetTypeFromProgID to CoreCLR
- Delete dead code and unnecessary levels of indirection
- Add tests for Type.GetTypeFromProgID and Type.GetTypeFromCLSID
Eric Erhardt [Tue, 22 Sep 2020 22:12:28 +0000 (17:12 -0500)]
Always generate resx default values in ComponentModel.DataAnnotations (#42274)
Since many resource strings in ComponentModel.DataAnnotations contain messages that will be shown to end-users, we generate the "default value" string into the SR code. When a trimmed app strips the system resources, these strings will be used instead of the resource keys.
Fix #42257
Egor Bogatov [Tue, 22 Sep 2020 22:07:35 +0000 (01:07 +0300)]
RyuJIT: Optimize "x<0" to "x>>31" (#35627)
* Optimize x<0 to x>>31
* enable for x86, handle "x>=0" case
Aaron Robinson [Tue, 22 Sep 2020 21:27:00 +0000 (14:27 -0700)]
Address reliability issue with setting ITypeInfo (#42560)
Bruce Forstall [Tue, 22 Sep 2020 20:53:06 +0000 (13:53 -0700)]
Reduce the number of platforms run by the ilasm round-trip test (#42567)
Specifically, don't run on Windows arm32. Also, don't
run on the musl platforms, either; just run on the same set
as most of the JIT pipelines.
David Wrighton [Tue, 22 Sep 2020 17:55:10 +0000 (10:55 -0700)]
Tweak crossgen2 so that SuperPMI should work (#42555)
- Remove unneeded getBuiltinClass for CLASSID_ARGUMENT_HANDLE from SuperPMI
- Tweak crossgen2 single threaded compilation to reliably only use exactly 1 for compilation
- This allows superpmi to rely on the detail that handles are unique.
- This assumes that superpmi collection is done with the compilation options `--parallelism 1`
David Wrighton [Tue, 22 Sep 2020 17:54:17 +0000 (10:54 -0700)]
First steps towards x86 compatible crossgen2 (#42471)
- Fix bug in crossgen2 around compilation of type forwarder only assemblies
- Use 64bit x86 crossgen2 when running crossgen2 as part of test build
- Disable inlined pinvoke generation on X86 until failures are understood
- Autolayout alignment should align to 4 byte offsets on X86 platforms
- Convert ArgIterator to use CoreCLR ABI instead of ProjectN ABI
- Align instance fields of classes to the start of the fields of the object, not the start of the object
- Fix hardware intrinsic support for X86
- MDArray address method uses custom calling convention on X86
- X86 JIT expects VM to normalize some single element structures to int, and inptr types
- Enable crossgen2smoke test for x86
With this change the crossgen2smoke test passes when compiled with crossgen2, as do simpler tests which use a crossgen2 compiled variant of the framework libraries. crossgen2smoke + libraries compiled with crossgen2 does not pass due to issues in resource handling.