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

[mono][aot] Static virtual interface methods do not work with generic sharing #54910

Closed
lambdageek opened this issue Jun 29, 2021 · 6 comments
Closed
Assignees
Milestone

Comments

@lambdageek
Copy link
Member

Related to #49904

The new tests added in #54650 do not work on the WebAssembly AOT lanes.

Stack traces look like this:
https://gist.github.com/lambdageek/eed2cbb34c6c133a29b0429c84e0365b

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Jun 29, 2021
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@lambdageek lambdageek added this to the 7.0.0 milestone Jun 29, 2021
@lambdageek lambdageek changed the title Static virtual interface methods do not work with generic sharing [mono][aot] Static virtual interface methods do not work with generic sharing Jun 29, 2021
@lewing
Copy link
Member

lewing commented Jun 29, 2021

If these aren't going to work do we need to flag them for AOT for 6?

cc @marek-safar

@marek-safar marek-safar removed the untriaged New issue has not been triaged by the area owner label Jun 29, 2021
@marek-safar
Copy link
Contributor

We discussed that with @lambdageek and we could not compile the managed APIs for browser-wasm

@lewing
Copy link
Member

lewing commented Jun 29, 2021

I assume that means the work to skip them is targeted for 6.0.0 though?

@vargaz
Copy link
Contributor

vargaz commented Jun 30, 2021

Should be fixed by:
#54981

tannergooding added a commit to tannergooding/runtime that referenced this issue Jul 2, 2021
@vargaz vargaz closed this as completed Jul 2, 2021
tannergooding added a commit that referenced this issue Jul 2, 2021
* Pin MicrosoftNetCompilersToolsetVersion to a version that supports Static Abstracts in Interfaces

* Fixed issues related to enabling generic math in a general sense (#4)

- Disable constraint checking during EEInit
- Disable il linker running on CoreLib
- Fixup generic math tests to actually build

* Adding interfaces to support generic math

* Implement generic math interfaces on core types

* Updating the System.Runtime ref assembly to support generic math

* Add a basic xunit test for generic-math

* Removing unnecessary nullable annotations

* Ensure all preview interface members are explicitly implemented

* Don't use var for various methods in Double/Half/Single

* Ensure FeatureGenericMath is defined for Mono

* Skip generic math tests on Mono WASM due to #54910

* Apply suggestions from code review

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

Co-authored-by: David Wrighton <davidwr@microsoft.com>
Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
@ghost ghost locked as resolved and limited conversation to collaborators Aug 1, 2021
@lambdageek lambdageek reopened this Aug 9, 2021
@lambdageek
Copy link
Member Author

This is still an ActiveIssue on some tests.
There's a separate build issue (that i'm working on in #57071) but after that there is still an error on these tests like in this comment:

[19:59:19] fail: console.error: RuntimeError: function signature mismatch
                 
[19:59:19] fail: console.error: RuntimeError: function signature mismatch
                 
[19:59:19] fail:     at System_Runtime_Experimental_Tests_System_Tests_UIntPtrTests_GenericMath_CreateSaturatingFromInt32Test (<anonymous>:wasm-function[13094]:0x43dcac)
                 
[19:59:19] fail:     at corlib_aot_wrapper_gsharedvt_out_sig_pinvoke_void_ (<anonymous>:wasm-function[33266]:0xaa1d49)
                 
[19:59:19] fail:     at jit_call_cb (<anonymous>:wasm-function[52301]:0x12d5d3c)
                 
[19:59:19] fail:     at invoke_vi (dotnet.js:10804:25)
                 
[19:59:19] fail:     at mono_llvm_cpp_catch_exception (<anonymous>:wasm-function[68979]:0x14a4cc7)
                 
[19:59:19] fail:     at do_jit_call (<anonymous>:wasm-function[52260]:0x12d4de8)
                 
[19:59:19] fail:     at interp_exec_method (<anonymous>:wasm-function[52197]:0x12c7ba7)

vargaz added a commit to vargaz/runtime that referenced this issue Nov 11, 2021
…traints.

If a generic argument is a primitive type, and it has an interface constraint
that enums don't implement, then partial sharing for that instance is not
useful, since only the specific primitive type instance will be able
to use the shared version.

Fixes dotnet#54910.
@vargaz vargaz closed this as completed in edd6467 Nov 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants