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

[wasm] Fix debugger tests #49206

Merged
merged 3 commits into from
Mar 10, 2021
Merged

[wasm] Fix debugger tests #49206

merged 3 commits into from
Mar 10, 2021

Conversation

radical
Copy link
Member

@radical radical commented Mar 5, 2021

Don't invoke static getters.

future todo: static members

Fixes: #49198

@ghost
Copy link

ghost commented Mar 5, 2021

Tagging subscribers to this area: @thaystg
See info in area-owners.md if you want to be subscribed.

Issue Details

Don't invoke static getters.

future todo: static members

Fixes: #49198

Author: radical
Assignees: -
Labels:

area-Debugger-mono

Milestone: -

@radical radical added the arch-wasm WebAssembly architecture label Mar 5, 2021
@ghost
Copy link

ghost commented Mar 5, 2021

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

Don't invoke static getters.

future todo: static members

Fixes: #49198

Author: radical
Assignees: radical
Labels:

arch-wasm, area-Debugger-mono

Milestone: -

@radical radical requested review from thaystg and lewing March 5, 2021 12:20
@radical radical removed their assignment Mar 5, 2021
Copy link
Member

@lewing lewing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good, please open an issue to track the static accessors.

@radical
Copy link
Member Author

radical commented Mar 10, 2021

We have one - #45104 .

@radical radical merged commit 647c258 into dotnet:main Mar 10, 2021
@radical radical deleted the fix-tests branch March 10, 2021 14:52
thaystg added a commit to thaystg/runtime that referenced this pull request Mar 10, 2021
* upstream/main: (83 commits)
  Fix a crash in llvm if the sreg of a setret is not set because the methods ends with a throw. (dotnet#49122)
  [macOS-arm64] Disable failing libraries tests (dotnet#49400)
  improve PriorityQueue documentation (dotnet#49392)
  [wasm] Fix debugger tests (dotnet#49206)
  [mono] Fix the emission of EnumEqualityComparer instances into the corlib AOT image. (dotnet#49402)
  jitutils M2M renaming reaction (dotnet#49430)
  WinHttpHandler: Read HTTP/2 trailing headers
  [RyuJIT] Make casthelpers cold for sealed classes (dotnet#49295)
  JIT: Non-void ThrowHelpers (dotnet#48589)
  Update package index for servicing (dotnet#49417)
  Remove unnecessary check on polymorphic serialization (dotnet#48464)
  Remove release build cron triggers from jitstress jobs (dotnet#49333)
  [main] Update dependencies from dotnet/arcade dotnet/llvm-project dotnet/runtime-assets (dotnet#49359)
  Implement AppleCryptoNative_X509GetRawData using SecCertificateCopyData
  [AndroidCrypto] Support a zero-length salt for HMACs. (dotnet#49384)
  Use managed implementation of pbkdf2 for Android's one-shot implementation. (dotnet#49314)
  Make 303 redirects do GET like Net Framework (dotnet#49095)
  Make sure event generation is incremental (dotnet#48903)
  Add amd and Surface arm64 perf runs (dotnet#49389)
  Enregister EH var that are single def (dotnet#47307)
  ...
thaystg added a commit to thaystg/runtime that referenced this pull request Mar 11, 2021
When we call runtime_invoke on wasm the exception always returns NULL and the error returns OK.
This was a problem because we were trying to get value of this new static property in DateTime type:
private static ReadOnlySpan<byte> DaysInMonth365 => new byte[] { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
As we don't know that we were getting an exception, the value that returns to the test was wrong.
The goal of this PR is detect that we got an exception when running runtime_invoke and return the expected value to debugger.
This is a temporary solution, I think the final solution is to fix runtime_invoke to return exception correctly on WASM.
We also need to support it: https://github.com/dotnet/runtime/blob/b3411852caa6a3de8ab9fa27f7860c76ef43e384/src/mono/mono/metadata/object.c#L6298
thaystg added a commit that referenced this pull request Mar 12, 2021
…49498)

* Related to #49206.
When we call runtime_invoke on wasm the exception always returns NULL and the error returns OK.
This was a problem because we were trying to get value of this new static property in DateTime type:
private static ReadOnlySpan<byte> DaysInMonth365 => new byte[] { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
As we don't know that we were getting an exception, the value that returns to the test was wrong.
The goal of this PR is detect that we got an exception when running runtime_invoke and return the expected value to debugger.
This is a temporary solution, I think the final solution is to fix runtime_invoke to return exception correctly on WASM.
We also need to support it: https://github.com/dotnet/runtime/blob/b3411852caa6a3de8ab9fa27f7860c76ef43e384/src/mono/mono/metadata/object.c#L6298

* Fix compilation error

* Update src/mono/mono/mini/mini-wasm-debugger.c

Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>

* Adding comment as suggested by @lambdageek

Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
@ghost ghost locked as resolved and limited conversation to collaborators Apr 11, 2021
@karelz karelz added this to the 6.0.0 milestone May 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Debugger-mono
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[wasm] Failing debugger tests - system.datetime issue
3 participants