Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Utf8String experiment with latest dotnet/runtime #15

Merged
merged 378 commits into from
Jul 16, 2020

Conversation

joperezr
Copy link
Member

No description provided.

maryamariyan and others added 30 commits June 30, 2020 16:31
* Block support for a P/Invoke marked with UnmanagedCallersOnly.

* Update crossgen2.
`fgComputeLifeUntrackedLocal` can be called multiple times for the same
`lclVarNode` since `fgLocalVarLiveness` may call
`fgInterBlockLocalVarLiveness` multiple times. Therefore,
`m_promotedStructDeathVars` may be updated more than once for the same
node.

Fixes #38496.
R2R doesn't generate PInvoke stub for arm because of crossbitness issue.
This patch enables PInvoke stub compilation for R2R,
and updates native size, field offset, and so on based on target machine's bitness.
* [browser][wasm][tests] Add tests for TypedArrays

* Address review comments
For Windows, add clrcompression.dll to the package. For Linux, add { libSystem.IO.Compression.Native.so, libSystem.Native.so, libSystem.Net.Security.Native.so, libSystem.Security.Cryptography.Native.OpenSsl.so } to the package and also remove the corresponding static libraries with the .a extension from crossgen2.deps.json.
* Require struct handler to be set after for CSE.

* Reenable the test.

* fix for empty cache

* Update the comment.
…when -s WASM_OBJECT_FILES=0 is used. (#38370)
* Add ExcludeFromCodeCoverage.Justification property

Delete some ExcludeFromCodeCoverages that aren't warranted, and add justifications almost everywhere else (only not doing so where a project builds for targets without the member).

* Update src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/PointerType.cs

Co-authored-by: Levi Broderick <[email protected]>

Co-authored-by: Levi Broderick <[email protected]>
And use a testsuite that passes for the example
…o utf8 (#38641)

* Change default output encoding to utf8 for wasm
There is a small breaking change in the SDK about how we run the XHarness tool - we are no longer installing the full .NET SDK to install the tool on every agent but rather installing it on the build machine and then shipping it as-is as Helix correlation payload. We then only need the .NET runtime to be installed on the Helix agents saving us bandwidth and cycles
…ers (#38646)

* [mono] Implement getting the type modifiers for DynamicMethod parameters

Fixes dotnet/runtime#36271

* Remove unused parameter from type_array_from_modifiers()
* Make Common.Tests pass

* Remove Common test project from the exclusion list
* add TargetHostName to SslStream

* fix unit tests

* feedback from review
* move the interface check to be before versionbubble

* updating fix to check for TypicalMethod of the target

* Adding a comment to clarify the check

* uncoditinoally invoke GetTypicalMethodDef

* Add a smoke test.

* moving the interface check to before version bubble

Also adding a cross module test.
- Mimic the alignment and other algorithms present in coreclr
- Add tests to crossgen2smoke to cover these scenarios
- Update type system unit tests so that they can run in VS
- Fix issue #38450
* Add platform-specific attributes

Spec dotnet/runtime#33331

* Convert to xml doc

* Update src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/MinimumOSAttribute.cs

Co-authored-by: Jeremy Barton <[email protected]>

* Update src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ObsoletedInPlatformAttribute.cs

Co-authored-by: Jeff Handley <[email protected]>

* Address code review

* Add to ref assembly, test and fix build errors

* Fix spacing, revert unwanted changes

* Namespace was wrong, updated

Co-authored-by: Jeremy Barton <[email protected]>
Co-authored-by: Jeff Handley <[email protected]>
Co-authored-by: Buyaa Namnan <[email protected]>
* add two SslStream tests for custom validation

* use BuildPrivatePki

* feedback from review

* disable on windows
* Align SpecializeComparer with ComparerHelpers

* Align SpecializeEqualityComparer with ComparerHelpers
…38578)

* Turn on argument exception analyzer on runtime, fix failures found
Fix interpreter build
marek-safar and others added 22 commits July 11, 2020 00:06
* Update Environment.OSVersion for browser platform

* Reflect api review
* add 1 repro test.

* temporary disable the tranformation.
* Add GCStress testing for libraries tests on checked CoreCLR

Disable GCStress0x3 for now, as that causes many timeouts in
these tests.

* Increase timeout for GCStress scenarios

* Disable scheduled runs for libraries gcstress runs

There are currently too many failures in these jobs
so we don't want to run them on a schedule yet.

* Add tracking issue for disabling GCStress=3
Disable tests that rely on crypto APIs which don't work on WebAssembly right now which allows the test suite to pass: `Tests run: 3406, Errors: 0, Failures: 0, Skipped: 0. Time: 5.296689s`

Also enables a few test suites in tests.proj.
* Only print to the console from the runtime when PauseOnStart has waited long enough

* Fix typo
Creating an OperatingSystem with PlatformID.Other would result in an exception about an unexpected enum value.
dotnet/runtime#38790 was missing some tests that verified this behavior.
…r macOS ARM64 (#39141)

Related issue: #39010
Make the jit more robust in cases where the IL producer is passing a byref
to an unmanaged caller, by retyping the argument as native int.

Allows the jit to produce self-consistent GC info and avoid the issues
seen in #34279, at least for byrefs.

Closes #39040.
* add POH for svr

* Use the correct alignment for objects on the POH
Following ec73c56.
A few corners have been left annotated because of dependencies.
@joperezr joperezr merged commit 703c516 into dotnet:Utf8String Jul 16, 2020
@joperezr joperezr deleted the UpdateUtf8String branch July 16, 2020 19:41
scalablecory pushed a commit that referenced this pull request Sep 22, 2020
No more PQUIC_* types.
No more useless function block comments.
runtimelab-bot pushed a commit that referenced this pull request May 18, 2021
…2769)

Transition to GC Unsafe mode on every MONO_RT_EXTERNAL_ONLY function in
reflection.c

In particular, fix mono_reflection_type_from_name which is used in
https://github.com/xamarin/xamarin-android/blob/681887ebdbd192ce7ce1cd02221d4939599ba762/src/monodroid/jni/embedded-assemblies.cc#L350

Fixes stack traces like

```
05-14 08:06:12.848 31274 31274 F DEBUG   :       #00 pc 00000b99  [vdso] (__kernel_vsyscall+9)
05-14 08:06:12.848 31274 31274 F DEBUG   :       #1 pc 0005ad68  /apex/com.android.runtime/lib/bionic/libc.so (syscall+40) (BuildId: 6e3a0180fa6637b68c0d181c343e6806)
05-14 08:06:12.848 31274 31274 F DEBUG   :       #2 pc 00076511  /apex/com.android.runtime/lib/bionic/libc.so (abort+209) (BuildId: 6e3a0180fa6637b68c0d181c343e6806)
05-14 08:06:12.848 31274 31274 F DEBUG   :       #3 pc 0002afcd  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonodroid.so (xamarin::android::internal::MonodroidRuntime::mono_log_handler(char const*, char const*, char const*, int, void*)+141) (BuildId: 9726f32ad5f8fa5e7c5762baf2f6e3294da41cc1)
05-14 08:06:12.848 31274 31274 F DEBUG   :       #4 pc 00112c5d  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (eglib_log_adapter+141) (BuildId: b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG   :       #5 pc 00020fdf  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (monoeg_g_logv+175) (BuildId: b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG   :       #6 pc 0002113a  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (monoeg_g_log+42) (BuildId: b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG   :       #7 pc 00128892  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (mono_threads_transition_do_blocking+258) (BuildId: b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG   :       #8 pc 0012a406  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (mono_threads_enter_gc_safe_region_unbalanced_with_info+134) (BuildId: b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG   :       #9 pc 0012a27e  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (mono_threads_enter_gc_safe_region_internal+46) (BuildId: b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG   :       #10 pc 000799a7  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (mono_loader_lock+71) (BuildId: b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG   :       #11 pc 000447a1  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (mono_class_create_from_typedef+129) (BuildId: b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG   :       #12 pc 0003c073  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (mono_class_get_checked+99) (BuildId: b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG   :       #13 pc 0003cc0f  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (mono_class_from_name_checked_aux+735) (BuildId: b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG   :       #14 pc 00037989  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (mono_class_from_name_checked+73) (BuildId: b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG   :       #15 pc 000cc5f4  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (mono_reflection_get_type_internal+132) (BuildId: b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG   :       #16 pc 000c9bce  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (mono_reflection_get_type_with_rootimage+126) (BuildId: b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG   :       #17 pc 000ca204  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (_mono_reflection_get_type_from_info+292) (BuildId: b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG   :       #18 pc 000ca06e  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (mono_reflection_type_from_name_checked+334) (BuildId: b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG   :       #19 pc 000c9f01  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonosgen-2.0.so (mono_reflection_type_from_name+49) (BuildId: b67e93dd750dafdd6f65f408b021b6a3a74868ac)
05-14 08:06:12.849 31274 31274 F DEBUG   :       #20 pc 0001b40b  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonodroid.so (xamarin::android::internal::EmbeddedAssemblies::typemap_java_to_managed(char const*)+427) (BuildId: 9726f32ad5f8fa5e7c5762baf2f6e3294da41cc1)
05-14 08:06:12.849 31274 31274 F DEBUG   :       #21 pc 0001b551  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonodroid.so (xamarin::android::internal::EmbeddedAssemblies::typemap_java_to_managed(_MonoString*)+113) (BuildId: 9726f32ad5f8fa5e7c5762baf2f6e3294da41cc1)
05-14 08:06:12.849 31274 31274 F DEBUG   :       #22 pc 000211a7  /data/app/~~rMrkpKmVPaBpM5jKb8fPAg==/com.microsoft.maui-JfRo8RWSDJaNtJuBa0y7_Q==/lib/x86/libmonodroid.so (xamarin::android::internal::MonodroidRuntime::typemap_java_to_managed(_MonoString*)+39) (BuildId: 9726f32ad5f8fa5e7c5762baf2f6e3294da41cc1)
```
MichalStrehovsky pushed a commit to MichalStrehovsky/runtimelab that referenced this pull request Oct 15, 2021
runtimelab-bot pushed a commit that referenced this pull request Jan 13, 2022
…(#63598)

* Fix native frame unwind in syscall on arm64 for VS4Mac crash report.

Add arm64 version of StepWithCompactNoEncoding for syscall leaf node wrappers that have compact encoding of 0.

Fix ReadCompactEncodingRegister so it actually decrements the addr.

Change StepWithCompactEncodingArm64 to match what MacOS libunwind does for framed and frameless stepping.

arm64 can have frames with the same SP (but different IPs). Increment SP for this condition so createdump's unwind
loop doesn't break out on the "SP not increasing" check and the frames are added to the thread frame list in the
correct order.

Add getting the unwind info for tail called functions like this:

__ZL14PROCEndProcessPvji:
   36630:       f6 57 bd a9     stp     x22, x21, [sp, #-48]!
   36634:       f4 4f 01 a9     stp     x20, x19, [sp, #16]
   36638:       fd 7b 02 a9     stp     x29, x30, [sp, #32]
   3663c:       fd 83 00 91     add     x29, sp, #32
...
   367ac:       e9 01 80 52     mov     w9, #15
   367b0:       7f 3e 02 71     cmp     w19, #143
   367b4:       20 01 88 1a     csel    w0, w9, w8, eq
   367b8:       2e 00 00 94     bl      _PROCAbort
_TerminateProcess:
-> 367bc:       22 00 80 52     mov     w2, #1
   367c0:       9c ff ff 17     b       __ZL14PROCEndProcessPvji

The IP (367bc) returns the (incorrect) frameless encoding with nothing on the stack (uses an incorrect LR to unwind). To fix this
get the unwind info for PC -1 which points to PROCEndProcess with the correct unwind info. This matches how lldb unwinds this frame.

Always address module segment to IP lookup list instead of checking the module regions.

Strip pointer authentication bits on PC/LR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.